Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
31204a5e
提交
31204a5e
authored
6月 12, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/develop' into develop
上级
78dbe444
4f04636a
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
114 行增加
和
73 行删除
+114
-73
deployment.yaml
kustomization/base/deployment.yaml
+2
-3
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
categoryManage.ts
src/api/interface/categoryManage.ts
+9
-0
mallManageType.ts
src/api/interface/mallManageType.ts
+20
-1
categoryManage.ts
src/api/modules/categoryManage.ts
+3
-3
produceManageAPI.ts
src/api/modules/produceManageAPI.ts
+5
-0
index.tsx
src/components/goods/commonAddOrEdit/baseInfo/index.tsx
+3
-0
index.tsx
src/components/uploader/index.tsx
+1
-1
index.tsx
src/pages/categoryManage/category/index.tsx
+20
-46
index.tsx
...yManage/directoryManage/components/addOrEditDec/index.tsx
+20
-6
index.tsx
src/pages/categoryManage/directoryManage/index.tsx
+5
-6
index.tsx
src/pages/customManage/customList/index.tsx
+21
-3
index.tsx
...pages/mallManage/courseManage/comp/addEditModal/index.tsx
+3
-2
index.tsx
src/pages/mallManage/produceManage/produceList/index.tsx
+1
-1
没有找到文件。
kustomization/base/deployment.yaml
浏览文件 @
31204a5e
...
@@ -4,7 +4,7 @@ metadata:
...
@@ -4,7 +4,7 @@ metadata:
name
:
admin-deployment
name
:
admin-deployment
namespace
:
default
namespace
:
default
spec
:
spec
:
minReadySeconds
:
120
#
minReadySeconds: 120
revisionHistoryLimit
:
2
revisionHistoryLimit
:
2
replicas
:
1
replicas
:
1
selector
:
selector
:
...
@@ -23,4 +23,4 @@ spec:
...
@@ -23,4 +23,4 @@ spec:
memory
:
512Mi
memory
:
512Mi
cpu
:
100m
cpu
:
100m
ports
:
ports
:
-
containerPort
:
80
-
containerPort
:
80
\ No newline at end of file
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
31204a5e
...
@@ -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
:
19f90a28239990b38b47b958a96806d6132fd492
newTag
:
3bff7965b990c05ebcc4298bd4aea6b4281b4495
src/api/interface/categoryManage.ts
浏览文件 @
31204a5e
...
@@ -66,3 +66,12 @@ export type directoryListType = InterFunction<
...
@@ -66,3 +66,12 @@ export type directoryListType = InterFunction<
type
:
number
;
type
:
number
;
}[]
}[]
>
;
>
;
//目录列表-产品指定
export
type
directoryProductType
=
InterFunction
<
any
,
{
id
:
number
;
directoryName
:
string
;
type
:
number
;
}[]
>
;
src/api/interface/mallManageType.ts
浏览文件 @
31204a5e
...
@@ -60,7 +60,7 @@ export type updateCurriculumType = InterFunction<
...
@@ -60,7 +60,7 @@ export type updateCurriculumType = InterFunction<
>
;
>
;
// V1.0.1课程技能列表
// V1.0.1课程技能列表
export
type
treeCurriculumSkillType
=
InterFunction
<
export
type
treeCurriculumSkillType
=
InterFunction
<
NonNullable
<
unknown
>
,
any
,
{
{
id
:
number
;
id
:
number
;
skillsName
:
string
;
skillsName
:
string
;
...
@@ -73,3 +73,22 @@ export type treeCurriculumSkillType = InterFunction<
...
@@ -73,3 +73,22 @@ export type treeCurriculumSkillType = InterFunction<
>
;
>
;
// V1.0.1删除课程
// V1.0.1删除课程
export
type
removeCurriculumType
=
InterFunction
<
{
id
:
number
},
NonNullable
<
unknown
>>
;
export
type
removeCurriculumType
=
InterFunction
<
{
id
:
number
},
NonNullable
<
unknown
>>
;
// 根据类型获取各个目录及分类信息
export
type
queryCategoryInfoByType
=
InterFunction
<
{
/**
* 类型:1:作业服务 2:设备 3:培训 4:产品商城
*/
type
:
number
},
{
directoryId
:
number
name
:
string
categoriesInfoListDTO
:
Array
<
{
id
:
number
directoryId
:
number
name
:
string
icon
:
string
}
>
}[]
>
src/api/modules/categoryManage.ts
浏览文件 @
31204a5e
...
@@ -25,7 +25,7 @@ export class CategoryManageAPI {
...
@@ -25,7 +25,7 @@ export class CategoryManageAPI {
};
};
// 新增或编辑目录
// 新增或编辑目录
static
addOrEditDirectory
=
(
static
addOrEditDirectory
=
(
data
:
{
id
?:
number
;
directoryName
:
string
;
type
:
number
;
relevance
:
number
}[]
,
data
:
{
id
?:
number
;
directoryName
:
string
;
type
:
number
;
show
:
number
[]
}
,
)
=>
{
)
=>
{
return
axios
.
post
(
'/pms/classify/addOrEditDirectory'
,
data
);
return
axios
.
post
(
'/pms/classify/addOrEditDirectory'
,
data
);
};
};
...
@@ -65,8 +65,8 @@ export class CategoryManageAPI {
...
@@ -65,8 +65,8 @@ export class CategoryManageAPI {
};
};
// 删除分类
// 删除分类
static
delete
GoodsTypeByOneLevel
=
(
params
:
object
):
any
=>
{
static
delete
RelevantBusiness
=
(
params
:
object
):
any
=>
{
return
axios
.
get
(
'
uavgoods/mgoods/deleteGoodsTypeByOneLevel
'
,
{
params
});
return
axios
.
get
(
'
/pms/classify/deleteRelevantBusiness
'
,
{
params
});
};
};
// 删除子分类
// 删除子分类
...
...
src/api/modules/produceManageAPI.ts
浏览文件 @
31204a5e
...
@@ -14,6 +14,7 @@ import {
...
@@ -14,6 +14,7 @@ import {
ProductSpecListType
,
ProductSpecListType
,
productSpecPriceType
,
productSpecPriceType
,
}
from
'~/api/interface/produceManageType'
;
}
from
'~/api/interface/produceManageType'
;
import
{
directoryProductType
}
from
'~/api/interface/categoryManage'
;
export
class
ProduceManageAPI
{
export
class
ProduceManageAPI
{
// 产品管理-分页列表
// 产品管理-分页列表
...
@@ -70,4 +71,8 @@ export class ProduceManageAPI {
...
@@ -70,4 +71,8 @@ export class ProduceManageAPI {
static
getCooperationListTag
:
cooperationTagType
=
()
=>
{
static
getCooperationListTag
:
cooperationTagType
=
()
=>
{
return
axios
.
get
(
'/userapp/cooperation/listTag'
);
return
axios
.
get
(
'/userapp/cooperation/listTag'
);
};
};
// 产品-目录
static
getProductDirectoryList
:
directoryProductType
=
()
=>
{
return
axios
.
get
(
'/pms/product/spec/productDirectoryList'
);
};
}
}
src/components/goods/commonAddOrEdit/baseInfo/index.tsx
浏览文件 @
31204a5e
...
@@ -87,6 +87,9 @@ const BaseInfo: React.FC<selfProps> = forwardRef(
...
@@ -87,6 +87,9 @@ const BaseInfo: React.FC<selfProps> = forwardRef(
});
});
};
};
const
directorySelectChange
=
(
value
:
number
)
=>
{
const
directorySelectChange
=
(
value
:
number
)
=>
{
form
.
setFieldsValue
({
masterTypeId
:
undefined
,
});
getCategoryList
(
value
);
getCategoryList
(
value
);
};
};
//商品标签
//商品标签
...
...
src/components/uploader/index.tsx
浏览文件 @
31204a5e
...
@@ -64,7 +64,7 @@ export const Uploader: React.FC<PropsType> = (props) => {
...
@@ -64,7 +64,7 @@ export const Uploader: React.FC<PropsType> = (props) => {
return
isType
;
return
isType
;
}
}
if
(
!
isSize
)
{
if
(
!
isSize
)
{
message
.
error
(
'文件最大2M,请压缩后上传!'
).
then
();
message
.
error
(
`文件最大
${
props
.
fileSize
}
M,请压缩后上传!`
).
then
();
return
isSize
;
return
isSize
;
}
}
},
},
...
...
src/pages/categoryManage/category/index.tsx
浏览文件 @
31204a5e
...
@@ -17,7 +17,6 @@ import {
...
@@ -17,7 +17,6 @@ import {
ProfileOutlined
,
ProfileOutlined
,
}
from
'@ant-design/icons'
;
}
from
'@ant-design/icons'
;
import
AddCgyDailog
from
'./components/addCgyDailog'
;
import
AddCgyDailog
from
'./components/addCgyDailog'
;
import
DeleteCgyDailog
from
'./components/deleteCgyDailog'
;
import
EditableCell
from
'./components/EditableCell'
;
import
EditableCell
from
'./components/EditableCell'
;
import
{
CategoryManageAPI
}
from
'~/api'
;
import
{
CategoryManageAPI
}
from
'~/api'
;
import
{
categoryEntity
,
categoryDec
}
from
'~/api/interface/categoryManage'
;
import
{
categoryEntity
,
categoryDec
}
from
'~/api/interface/categoryManage'
;
...
@@ -129,7 +128,7 @@ const Category: FC = (props: any) => {
...
@@ -129,7 +128,7 @@ const Category: FC = (props: any) => {
render
:
(
text
:
string
,
record
:
categoryEntity
,
index
:
number
)
=>
{
render
:
(
text
:
string
,
record
:
categoryEntity
,
index
:
number
)
=>
{
return
(
return
(
<
div
className=
'table-option-wrap'
>
<
div
className=
'table-option-wrap'
>
{
record
.
children
?.
length
>
0
?
(
{
record
.
level
==
1
?
(
<>
<>
{
btnAddChildCgy
?
(
{
btnAddChildCgy
?
(
<
Button
<
Button
...
@@ -234,8 +233,6 @@ const Category: FC = (props: any) => {
...
@@ -234,8 +233,6 @@ const Category: FC = (props: any) => {
const
[
activeViewerIndex
]
=
useState
<
number
>
(
0
);
const
[
activeViewerIndex
]
=
useState
<
number
>
(
0
);
// 新增弹窗
// 新增弹窗
const
[
isVisible
,
setIsVisible
]
=
useState
<
boolean
>
(
false
);
const
[
isVisible
,
setIsVisible
]
=
useState
<
boolean
>
(
false
);
// 删除弹窗
const
[
isDeleteVisible
,
setIsDeleteVisible
]
=
useState
<
boolean
>
(
false
);
// 删除分类id
// 删除分类id
const
[
cgyId
,
setCgyId
]
=
useState
<
number
>
(
0
);
const
[
cgyId
,
setCgyId
]
=
useState
<
number
>
(
0
);
// 弹窗title
// 弹窗title
...
@@ -358,7 +355,8 @@ const Category: FC = (props: any) => {
...
@@ -358,7 +355,8 @@ const Category: FC = (props: any) => {
...
values
,
...
values
,
id
:
currentRecord
.
id
,
id
:
currentRecord
.
id
,
pid
:
currentRecord
.
pid
,
pid
:
currentRecord
.
pid
,
sortTypeId
:
activeTabKey
,
directoryId
:
activeTabKey
,
type
,
});
});
if
(
res
.
code
===
'200'
)
{
if
(
res
.
code
===
'200'
)
{
message
.
success
(
'修改成功'
);
message
.
success
(
'修改成功'
);
...
@@ -418,7 +416,7 @@ const Category: FC = (props: any) => {
...
@@ -418,7 +416,7 @@ const Category: FC = (props: any) => {
};
};
// 新增子分类
// 新增子分类
const
sureAddChildrenCgy
=
(
record
:
categoryEntity
)
=>
{
const
sureAddChildrenCgy
=
(
record
:
categoryEntity
)
=>
{
let
pid
:
string
|
number
=
-
1
;
let
pid
:
string
|
number
;
categoryList
.
map
((
item
:
categoryEntity
)
=>
{
categoryList
.
map
((
item
:
categoryEntity
)
=>
{
if
(
item
.
children
&&
item
.
children
.
length
!=
0
)
{
if
(
item
.
children
&&
item
.
children
.
length
!=
0
)
{
const
bol
:
boolean
=
item
.
children
.
some
(
const
bol
:
boolean
=
item
.
children
.
some
(
...
@@ -485,40 +483,21 @@ const Category: FC = (props: any) => {
...
@@ -485,40 +483,21 @@ const Category: FC = (props: any) => {
};
};
// 删除分类
// 删除分类
const
deleteCgy
=
(
record
:
categoryEntity
)
=>
{
const
deleteCgy
=
(
record
:
categoryEntity
)
=>
{
setCgyId
(
Number
(
record
.
id
));
Modal
.
confirm
({
setIsDeleteVisible
(
true
);
title
:
'分类删除'
,
};
content
:
'确认删除该分类?'
,
// 删除弹窗确认
async
onOk
()
{
const
deleteHandleOk
=
async
()
=>
{
const
res
=
await
CategoryManageAPI
.
deleteRelevantBusiness
({
const
bol
=
categoryList
.
some
((
item
:
categoryEntity
)
=>
item
.
id
===
cgyId
);
id
:
record
.
id
,
if
(
bol
)
{
});
const
res
=
await
CategoryManageAPI
.
deleteGoodsTypeByOneLevel
({
if
(
res
.
code
===
'200'
)
{
id
:
cgyId
,
message
.
success
(
'删除成功'
);
sortTypeId
:
activeTabKey
,
getCategoryList
(
Number
(
activeTabKey
));
});
}
else
{
if
(
res
.
code
===
'200'
)
{
message
.
error
(
res
.
message
);
message
.
success
(
'删除成功'
);
}
getCategoryList
(
Number
(
activeTabKey
));
},
}
else
{
});
message
.
warning
(
res
.
message
);
}
}
else
{
const
res
=
await
CategoryManageAPI
.
deleteGoodsTypeByChildren
({
id
:
cgyId
,
sortTypeId
:
activeTabKey
,
});
if
(
res
.
code
===
'200'
)
{
message
.
success
(
'删除成功'
);
getCategoryList
(
Number
(
activeTabKey
));
}
else
{
message
.
warning
(
res
.
message
);
}
}
setIsDeleteVisible
(
false
);
};
// 删除弹框取消
const
deleteHandleCancel
=
()
=>
{
setIsDeleteVisible
(
false
);
};
};
// 编辑分类
// 编辑分类
const
editCgy
=
(
record
:
categoryEntity
)
=>
{
const
editCgy
=
(
record
:
categoryEntity
)
=>
{
...
@@ -528,7 +507,7 @@ const Category: FC = (props: any) => {
...
@@ -528,7 +507,7 @@ const Category: FC = (props: any) => {
setTitle
(
'修改分类'
);
setTitle
(
'修改分类'
);
const
addForm
=
baseRef
.
current
.
getForm
();
const
addForm
=
baseRef
.
current
.
getForm
();
addForm
.
setFieldsValue
({
addForm
.
setFieldsValue
({
director
yName
:
record
.
classifyName
,
classif
yName
:
record
.
classifyName
,
description
:
record
.
description
,
description
:
record
.
description
,
remark
:
record
.
remark
,
remark
:
record
.
remark
,
});
});
...
@@ -764,11 +743,6 @@ const Category: FC = (props: any) => {
...
@@ -764,11 +743,6 @@ const Category: FC = (props: any) => {
baseRef=
{
baseRef
}
baseRef=
{
baseRef
}
imgClick=
{
imgClick
}
imgClick=
{
imgClick
}
/>
/>
<
DeleteCgyDailog
isDeleteVisable=
{
isDeleteVisible
}
deleteHandleOk=
{
deleteHandleOk
}
deleteHandleCancel=
{
deleteHandleCancel
}
/>
{
/* 图片放大 */
}
{
/* 图片放大 */
}
<
Viewer
<
Viewer
visible=
{
visible
}
visible=
{
visible
}
...
...
src/pages/categoryManage/directoryManage/components/addOrEditDec/index.tsx
浏览文件 @
31204a5e
...
@@ -10,6 +10,7 @@ import {
...
@@ -10,6 +10,7 @@ import {
RadioChangeEvent
,
RadioChangeEvent
,
Radio
,
Radio
,
Space
,
Space
,
Checkbox
,
}
from
'antd'
;
}
from
'antd'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
...
@@ -54,7 +55,6 @@ const AddOrEditDec: React.FC<PropsType & selfPropsType> = ({
...
@@ -54,7 +55,6 @@ const AddOrEditDec: React.FC<PropsType & selfPropsType> = ({
editData
,
editData
,
})
=>
{
})
=>
{
const
[
form
]
=
Form
.
useForm
<
any
>
();
const
[
form
]
=
Form
.
useForm
<
any
>
();
const
[
hasPid
,
setHasPid
]
=
useState
(
false
);
//是否有上级目录
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
//提交按钮的loading
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
//提交按钮的loading
const
[
directoryOptions
,
setDirectoryOptions
]
=
useState
([]);
//目录options
const
[
directoryOptions
,
setDirectoryOptions
]
=
useState
([]);
//目录options
...
@@ -66,10 +66,11 @@ const AddOrEditDec: React.FC<PropsType & selfPropsType> = ({
...
@@ -66,10 +66,11 @@ const AddOrEditDec: React.FC<PropsType & selfPropsType> = ({
form
.
setFieldValue
(
'directoryName'
,
editData
.
directoryName
);
form
.
setFieldValue
(
'directoryName'
,
editData
.
directoryName
);
onChangeType
(
editData
.
type
);
onChangeType
(
editData
.
type
);
if
(
editData
.
pid
)
{
if
(
editData
.
type
==
0
)
{
setHasPid
(
true
);
form
.
setFieldValue
(
}
else
{
'show'
,
setHasPid
(
false
);
editData
.
show
?.
map
((
value
)
=>
Number
(
value
)),
);
}
}
}
}
}
}
...
@@ -92,7 +93,6 @@ const AddOrEditDec: React.FC<PropsType & selfPropsType> = ({
...
@@ -92,7 +93,6 @@ const AddOrEditDec: React.FC<PropsType & selfPropsType> = ({
const
res
=
await
CategoryManageAPI
.
addOrEditDirectory
({
const
res
=
await
CategoryManageAPI
.
addOrEditDirectory
({
...
values
,
...
values
,
id
:
editData
?.
id
,
id
:
editData
?.
id
,
pid
:
hasPid
?
values
.
pid
:
null
,
});
});
res
.
code
==
'200'
&&
message
.
success
(
'新增成功'
);
res
.
code
==
'200'
&&
message
.
success
(
'新增成功'
);
handleOk
();
handleOk
();
...
@@ -142,6 +142,20 @@ const AddOrEditDec: React.FC<PropsType & selfPropsType> = ({
...
@@ -142,6 +142,20 @@ const AddOrEditDec: React.FC<PropsType & selfPropsType> = ({
<
Form
.
Item
label=
'目录名称'
name=
'directoryName'
rules=
{
[{
required
:
true
}]
}
>
<
Form
.
Item
label=
'目录名称'
name=
'directoryName'
rules=
{
[{
required
:
true
}]
}
>
<
Input
placeholder=
'请输入目录名称'
allowClear=
{
true
}
></
Input
>
<
Input
placeholder=
'请输入目录名称'
allowClear=
{
true
}
></
Input
>
</
Form
.
Item
>
</
Form
.
Item
>
{
form
.
getFieldValue
(
'type'
)
==
'0'
&&
(
<
Form
.
Item
label=
'显示设置'
name=
'show'
rules=
{
[{
required
:
true
,
message
:
'请选择显示设置'
}]
}
>
<
Checkbox
.
Group
>
<
Checkbox
value=
{
1
}
>
作业服务分类
</
Checkbox
>
<
Checkbox
value=
{
3
}
>
飞手培训分类
</
Checkbox
>
<
Checkbox
value=
{
2
}
>
设备租赁分类
</
Checkbox
>
<
Checkbox
value=
{
4
}
>
产品商城分类
</
Checkbox
>
</
Checkbox
.
Group
>
</
Form
.
Item
>
)
}
</
Form
>
</
Form
>
</
Modal
>
</
Modal
>
);
);
...
...
src/pages/categoryManage/directoryManage/index.tsx
浏览文件 @
31204a5e
...
@@ -50,7 +50,6 @@ const DirectoryManage: FC = (props: any) => {
...
@@ -50,7 +50,6 @@ const DirectoryManage: FC = (props: any) => {
});
});
//目录modal
//目录modal
const
[
isAddOrEditDecModal
,
setIsAddOrEditDecModal
]
=
useState
<
boolean
>
(
false
);
const
[
isAddOrEditDecModal
,
setIsAddOrEditDecModal
]
=
useState
<
boolean
>
(
false
);
const
[
reload
,
setReload
]
=
useState
(
false
);
const
[
editData
,
setEditData
]
=
useState
<
categoryDec
|
null
>
(
null
);
const
[
editData
,
setEditData
]
=
useState
<
categoryDec
|
null
>
(
null
);
const
columns
:
ColumnsType
<
DataType
>
=
[
const
columns
:
ColumnsType
<
DataType
>
=
[
...
@@ -109,6 +108,10 @@ const DirectoryManage: FC = (props: any) => {
...
@@ -109,6 +108,10 @@ const DirectoryManage: FC = (props: any) => {
},
},
];
];
useEffect
(()
=>
{
getDirectoryList
();
},
[
pagination
.
current
]);
// 目录弹窗
// 目录弹窗
const
showDecModal
=
()
=>
{
const
showDecModal
=
()
=>
{
setEditData
(
null
);
setEditData
(
null
);
...
@@ -163,7 +166,7 @@ const DirectoryManage: FC = (props: any) => {
...
@@ -163,7 +166,7 @@ const DirectoryManage: FC = (props: any) => {
CategoryManageAPI
.
removeDirectory
(
id
).
then
((
res
)
=>
{
CategoryManageAPI
.
removeDirectory
(
id
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
message
.
success
(
'删除成功'
);
message
.
success
(
'删除成功'
);
setReload
(
!
reload
);
getDirectoryList
(
);
}
else
{
}
else
{
message
.
error
(
res
.
message
);
message
.
error
(
res
.
message
);
}
}
...
@@ -172,10 +175,6 @@ const DirectoryManage: FC = (props: any) => {
...
@@ -172,10 +175,6 @@ const DirectoryManage: FC = (props: any) => {
});
});
};
};
useEffect
(()
=>
{
getDirectoryList
();
},
[
JSON
.
stringify
(
pagination
),
reload
]);
const
handleTableChange
=
(
const
handleTableChange
=
(
pagination
:
TablePaginationConfig
,
pagination
:
TablePaginationConfig
,
filters
:
Record
<
string
,
FilterValue
>
,
filters
:
Record
<
string
,
FilterValue
>
,
...
...
src/pages/customManage/customList/index.tsx
浏览文件 @
31204a5e
import
{
useEffect
,
useState
}
from
'react'
;
import
{
useEffect
,
useState
}
from
'react'
;
import
SearchBox
from
'~/components/search-box'
;
import
SearchBox
from
'~/components/search-box'
;
import
{
Button
,
Table
}
from
'antd'
;
import
{
Button
,
message
,
Modal
,
Table
}
from
'antd'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
ChangeModal
}
from
'~/pages/customManage/customList/comp/changeModal'
;
import
{
ChangeModal
}
from
'~/pages/customManage/customList/comp/changeModal'
;
import
{
InterListType
,
InterReqType
}
from
'~/api/interface'
;
import
{
InterListType
,
InterReqType
}
from
'~/api/interface'
;
import
{
listAppUserType
}
from
'~/api/interface/customManageType'
;
import
{
listAppUserType
}
from
'~/api/interface/customManageType'
;
import
{
CustomManageAPI
}
from
'~/api'
;
import
{
CustomManageAPI
,
SystemManageAPI
}
from
'~/api'
;
// 表格数据类型
// 表格数据类型
type
TableType
=
InterListType
<
listAppUserType
>
;
type
TableType
=
InterListType
<
listAppUserType
>
;
...
@@ -24,6 +24,7 @@ const portTypeList = [
...
@@ -24,6 +24,7 @@ const portTypeList = [
];
];
function
CustomListView
()
{
function
CustomListView
()
{
const
{
confirm
}
=
Modal
;
// 等级标签列表
// 等级标签列表
const
[
cooperationTagIdList
,
setCooperationTagIdList
]
=
useState
<
const
[
cooperationTagIdList
,
setCooperationTagIdList
]
=
useState
<
{
value
:
number
;
label
:
string
}[]
{
value
:
number
;
label
:
string
}[]
...
@@ -80,6 +81,23 @@ function CustomListView() {
...
@@ -80,6 +81,23 @@ function CustomListView() {
// console.log(res.result);
// console.log(res.result);
}
}
};
};
// 删除用户
const
handleDelete
=
(
value
:
TableType
[
0
])
=>
{
confirm
({
title
:
'提示'
,
content
:
'是否删除该账号?'
,
onOk
:
async
()
=>
{
const
res
=
await
SystemManageAPI
.
removeBAccount
({
userAccountId
:
value
.
id
});
if
(
res
&&
res
.
code
===
'200'
)
{
message
.
success
(
'删除成功'
);
paginationChange
(
tableData
.
length
===
1
?
pagination
.
current
-
1
:
pagination
.
current
,
pagination
.
pageSize
,
);
}
},
});
};
// componentDidMount
// componentDidMount
useEffect
(()
=>
{
useEffect
(()
=>
{
query
=
{};
query
=
{};
...
@@ -188,7 +206,7 @@ function CustomListView() {
...
@@ -188,7 +206,7 @@ function CustomListView() {
>
>
变更
变更
</
Button
>
</
Button
>
<
Button
type=
{
'link'
}
danger
>
<
Button
type=
{
'link'
}
danger
onClick=
{
()
=>
handleDelete
(
record
)
}
>
删除
删除
</
Button
>
</
Button
>
</>
</>
...
...
src/pages/mallManage/courseManage/comp/addEditModal/index.tsx
浏览文件 @
31204a5e
...
@@ -155,6 +155,7 @@ const AddEditModal: React.FC<propType> = (props) => {
...
@@ -155,6 +155,7 @@ const AddEditModal: React.FC<propType> = (props) => {
listType=
{
'picture-card'
}
listType=
{
'picture-card'
}
fileUpload
fileUpload
fileLength=
{
1
}
fileLength=
{
1
}
fileSize=
{
10
}
onChange=
{
(
e
)
=>
form
.
setFieldValue
(
'surfaceUrl'
,
e
[
0
].
url
)
}
onChange=
{
(
e
)
=>
form
.
setFieldValue
(
'surfaceUrl'
,
e
[
0
].
url
)
}
defaultFileList=
{
data
?.
surfaceUrl
?
[{
url
:
data
?.
surfaceUrl
}]
:
[]
}
defaultFileList=
{
data
?.
surfaceUrl
?
[{
url
:
data
?.
surfaceUrl
}]
:
[]
}
>
>
...
@@ -169,7 +170,7 @@ const AddEditModal: React.FC<propType> = (props) => {
...
@@ -169,7 +170,7 @@ const AddEditModal: React.FC<propType> = (props) => {
<
Form
.
Item
<
Form
.
Item
label=
'课程上传'
label=
'课程上传'
name=
'videoUrl'
name=
'videoUrl'
rules=
{
[{
required
:
tru
e
,
message
:
'请上传质检视频'
}]
}
rules=
{
[{
required
:
fals
e
,
message
:
'请上传质检视频'
}]
}
style=
{
{
marginBottom
:
'-40px'
}
}
style=
{
{
marginBottom
:
'-40px'
}
}
>
>
<
Uploader
<
Uploader
...
@@ -177,7 +178,7 @@ const AddEditModal: React.FC<propType> = (props) => {
...
@@ -177,7 +178,7 @@ const AddEditModal: React.FC<propType> = (props) => {
fileUpload
fileUpload
fileLength=
{
1
}
fileLength=
{
1
}
fileType=
{
[
'video/mp4'
,
'video/avi'
,
'video/wmv'
,
'video/rmvb'
]
}
fileType=
{
[
'video/mp4'
,
'video/avi'
,
'video/wmv'
,
'video/rmvb'
]
}
fileSize=
{
10
}
fileSize=
{
10
24
}
onChange=
{
(
e
)
=>
form
.
setFieldValue
(
'videoUrl'
,
e
[
0
].
url
)
}
onChange=
{
(
e
)
=>
form
.
setFieldValue
(
'videoUrl'
,
e
[
0
].
url
)
}
defaultFileList=
{
data
?.
videoUrl
?
[{
url
:
data
?.
videoUrl
}]
:
[]
}
defaultFileList=
{
data
?.
videoUrl
?
[{
url
:
data
?.
videoUrl
}]
:
[]
}
>
>
...
...
src/pages/mallManage/produceManage/produceList/index.tsx
浏览文件 @
31204a5e
...
@@ -189,7 +189,7 @@ function ProduceManage() {
...
@@ -189,7 +189,7 @@ function ProduceManage() {
};
};
// 目录列表
// 目录列表
const
getDirectoryList
=
()
=>
{
const
getDirectoryList
=
()
=>
{
CategoryManageAPI
.
getDirectoryListClone
({
type
:
4
}
).
then
(({
result
})
=>
{
ProduceManageAPI
.
getProductDirectoryList
(
).
then
(({
result
})
=>
{
setDecList
(
result
||
[]);
setDecList
(
result
||
[]);
});
});
};
};
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论