Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
admin-ci-test
Commits
6597bb93
提交
6597bb93
authored
6月 16, 2023
作者:
ZhangLingKun
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
2c643bec
b997fc6c
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
59 行增加
和
17 行删除
+59
-17
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
commonType.ts
src/api/interface/commonType.ts
+3
-3
index.tsx
...resourceManage/materielManage/comp/addEditModal/index.tsx
+10
-1
index.tsx
src/pages/resourceManage/materielManage/detail/index.tsx
+38
-8
index.tsx
src/pages/resourceManage/materielManage/index.tsx
+5
-2
router.tsx
src/router/router.tsx
+2
-2
没有找到文件。
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
6597bb93
...
@@ -14,4 +14,4 @@ patches:
...
@@ -14,4 +14,4 @@ patches:
images
:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newTag
:
40f342151f040d006728e6d14285447c62855c5
5
newTag
:
01d77ad63c0e5a29390b7748dd9d32cbf85d15d
5
src/api/interface/commonType.ts
浏览文件 @
6597bb93
...
@@ -60,9 +60,9 @@ export type insertModuleInfo = InterFunction<
...
@@ -60,9 +60,9 @@ export type insertModuleInfo = InterFunction<
export
type
updateModuleInfo
=
InterFunction
<
export
type
updateModuleInfo
=
InterFunction
<
{
{
id
:
number
;
id
:
number
;
moduleCode
:
string
;
moduleCode
?
:
string
;
moduleName
:
string
;
moduleName
?
:
string
;
moduleType
:
number
;
moduleType
?
:
number
;
remark
?:
string
;
remark
?:
string
;
},
},
NonNullable
<
unknown
>
NonNullable
<
unknown
>
...
...
src/pages/resourceManage/materielManage/comp/addEditModal/index.tsx
浏览文件 @
6597bb93
...
@@ -31,7 +31,7 @@ const bannerType = [
...
@@ -31,7 +31,7 @@ const bannerType = [
{
label
:
'纯文本'
,
value
:
5
},
{
label
:
'纯文本'
,
value
:
5
},
// { label: '服务SKU', value: 6 },
// { label: '服务SKU', value: 6 },
// { label: '红包', value: 7 },
// { label: '红包', value: 7 },
// { label: '推文
', value: 8 },
{
label
:
'链接
'
,
value
:
8
},
{
label
:
'富文本'
,
value
:
11
},
{
label
:
'富文本'
,
value
:
11
},
];
];
...
@@ -203,6 +203,15 @@ const AddEditModal: React.FC<propType> = (props) => {
...
@@ -203,6 +203,15 @@ const AddEditModal: React.FC<propType> = (props) => {
</
Uploader
>
</
Uploader
>
</
Form
.
Item
>
</
Form
.
Item
>
)
}
)
}
{
[
8
].
includes
(
bannerTypeValue
)
&&
(
<
Form
.
Item
label=
'链接地址'
name=
'bannerUrl'
rules=
{
[{
required
:
true
,
message
:
'请输入链接地址'
}]
}
>
<
Input
placeholder=
{
'请输入链接地址'
}
maxLength=
{
100
}
allowClear
/>
</
Form
.
Item
>
)
}
</
Form
>
</
Form
>
</
Modal
>
</
Modal
>
);
);
...
...
src/pages/resourceManage/materielManage/detail/index.tsx
浏览文件 @
6597bb93
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Button
,
Form
,
Input
,
Select
,
Table
,
Image
,
Modal
,
message
}
from
'antd'
;
import
{
Button
,
Form
,
Input
,
Select
,
Table
,
Image
,
Modal
,
message
}
from
'antd'
;
import
{
listBannerInfoPage
}
from
'~/api/interface/commonType'
;
import
{
listBannerInfoPage
,
updateModuleInfo
}
from
'~/api/interface/commonType'
;
import
{
InterListType
,
InterReqListType
}
from
'~/api/interface'
;
import
{
InterListType
,
InterReqListType
,
InterReqType
}
from
'~/api/interface'
;
import
{
useLocation
,
useNavigate
}
from
'react-router-dom'
;
import
{
useLocation
,
useNavigate
}
from
'react-router-dom'
;
import
qs
from
'query-string'
;
import
qs
from
'query-string'
;
import
{
ArrowDownOutlined
,
ArrowUpOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
ArrowDownOutlined
,
ArrowUpOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
...
@@ -34,14 +34,14 @@ const bannerType = [
...
@@ -34,14 +34,14 @@ const bannerType = [
{
label
:
'纯文本'
,
value
:
5
},
{
label
:
'纯文本'
,
value
:
5
},
// { label: '服务SKU', value: 6 },
// { label: '服务SKU', value: 6 },
// { label: '红包', value: 7 },
// { label: '红包', value: 7 },
// { label: '推文
', value: 8 },
{
label
:
'链接
'
,
value
:
8
},
{
label
:
'富文本'
,
value
:
11
},
{
label
:
'富文本'
,
value
:
11
},
];
];
const
MaterielManageDetail
=
()
=>
{
const
MaterielManageDetail
=
()
=>
{
const
{
confirm
}
=
Modal
;
const
{
confirm
}
=
Modal
;
// 表单钩子
// 表单钩子
const
[
form
]
=
Form
.
useForm
<
ReqType
>
();
const
[
form
]
=
Form
.
useForm
<
InterReqType
<
updateModuleInfo
>
>
();
// 路由钩子
// 路由钩子
const
location
=
useLocation
();
const
location
=
useLocation
();
const
navigate
=
useNavigate
();
const
navigate
=
useNavigate
();
...
@@ -101,8 +101,11 @@ const MaterielManageDetail = () => {
...
@@ -101,8 +101,11 @@ const MaterielManageDetail = () => {
onOk
:
async
()
=>
{
onOk
:
async
()
=>
{
const
res
=
await
CommonAPI
.
removeBannerInfo
({
id
:
record
.
id
});
const
res
=
await
CommonAPI
.
removeBannerInfo
({
id
:
record
.
id
});
if
(
res
&&
res
.
code
===
'200'
)
{
if
(
res
&&
res
.
code
===
'200'
)
{
paginationChange
(
pagination
.
current
,
pagination
.
pageSize
);
message
.
success
(
'删除成功'
);
await
message
.
success
(
'删除成功'
);
paginationChange
(
tableData
.
length
===
1
?
pagination
.
current
-
1
:
pagination
.
current
,
pagination
.
pageSize
,
);
}
}
},
},
});
});
...
@@ -164,6 +167,31 @@ const MaterielManageDetail = () => {
...
@@ -164,6 +167,31 @@ const MaterielManageDetail = () => {
getAllData
().
then
();
getAllData
().
then
();
}
}
};
};
// 修改提交数据
const
handleEdit
=
()
=>
{
form
.
validateFields
()
.
then
(
async
(
values
)
=>
{
const
res
=
await
CommonAPI
.
updateModuleInfo
({
...
values
,
id
:
Number
(
qs
.
parse
(
location
.
search
).
id
),
});
if
(
res
&&
res
.
code
===
'200'
)
{
message
.
success
(
'修改成功'
);
getTableList
().
then
();
getAllData
().
then
();
}
else
{
window
.
location
.
reload
();
}
})
.
catch
((
err
)
=>
{
message
.
warning
({
content
:
err
.
errorFields
[
0
].
errors
[
0
],
})
.
then
();
});
};
// componentDidMount
// componentDidMount
useEffect
(()
=>
{
useEffect
(()
=>
{
query
=
{};
query
=
{};
...
@@ -199,7 +227,7 @@ const MaterielManageDetail = () => {
...
@@ -199,7 +227,7 @@ const MaterielManageDetail = () => {
),
),
},
},
{
{
title
:
'
点击详情
'
,
title
:
'
详情类型
'
,
dataIndex
:
'bannerType'
,
dataIndex
:
'bannerType'
,
align
:
'center'
,
align
:
'center'
,
width
:
'100px'
,
width
:
'100px'
,
...
@@ -268,7 +296,9 @@ const MaterielManageDetail = () => {
...
@@ -268,7 +296,9 @@ const MaterielManageDetail = () => {
justifyContent
:
'space-around'
,
justifyContent
:
'space-around'
,
}
}
}
}
>
>
<
Button
type=
{
'primary'
}
>
修改
</
Button
>
<
Button
type=
{
'primary'
}
onClick=
{
handleEdit
}
>
修改
</
Button
>
<
Button
type=
{
'primary'
}
onClick=
{
handleBack
}
>
<
Button
type=
{
'primary'
}
onClick=
{
handleBack
}
>
返回
返回
</
Button
>
</
Button
>
...
...
src/pages/resourceManage/materielManage/index.tsx
浏览文件 @
6597bb93
...
@@ -99,8 +99,11 @@ const MaterielManageView = () => {
...
@@ -99,8 +99,11 @@ const MaterielManageView = () => {
onOk
:
async
()
=>
{
onOk
:
async
()
=>
{
const
res
=
await
CommonAPI
.
removeModuleInfo
({
id
:
record
.
id
});
const
res
=
await
CommonAPI
.
removeModuleInfo
({
id
:
record
.
id
});
if
(
res
&&
res
.
code
===
'200'
)
{
if
(
res
&&
res
.
code
===
'200'
)
{
paginationChange
(
pagination
.
current
,
pagination
.
pageSize
);
message
.
success
(
'删除成功'
);
await
message
.
success
(
'删除成功'
);
paginationChange
(
tableData
.
length
===
1
?
pagination
.
current
-
1
:
pagination
.
current
,
pagination
.
pageSize
,
);
}
}
},
},
});
});
...
...
src/router/router.tsx
浏览文件 @
6597bb93
...
@@ -695,7 +695,7 @@ export const routerList: Array<RouteObjectType> = [
...
@@ -695,7 +695,7 @@ export const routerList: Array<RouteObjectType> = [
element
:
withLoadingComponent
(<
MaterielManageView
/>),
element
:
withLoadingComponent
(<
MaterielManageView
/>),
meta
:
{
meta
:
{
id
:
30100
,
id
:
30100
,
title
:
'
物料
管理'
,
title
:
'
宣传
管理'
,
icon
:
<
SketchOutlined
/>,
icon
:
<
SketchOutlined
/>,
},
},
},
},
...
@@ -704,7 +704,7 @@ export const routerList: Array<RouteObjectType> = [
...
@@ -704,7 +704,7 @@ export const routerList: Array<RouteObjectType> = [
element
:
withLoadingComponent
(<
MaterielManageDetail
/>),
element
:
withLoadingComponent
(<
MaterielManageDetail
/>),
meta
:
{
meta
:
{
id
:
30100
,
id
:
30100
,
title
:
'
物料
详情'
,
title
:
'
宣传管理
详情'
,
icon
:
<
SketchOutlined
/>,
icon
:
<
SketchOutlined
/>,
hidden
:
true
,
hidden
:
true
,
},
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论