Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
admin-ci-test
Commits
dd4cfc9f
提交
dd4cfc9f
authored
6月 09, 2023
作者:
翁进城
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
http://git.mmcuav.cn/root/sharefly-admin-uav
上级
58fc499b
b586bc38
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
208 行增加
和
103 行删除
+208
-103
index.ts
src/api/index.ts
+2
-0
customManageType.ts
src/api/interface/customManageType.ts
+33
-0
customManage.ts
src/api/modules/customManage.ts
+8
-0
index.tsx
src/pages/customManage/customList/index.tsx
+80
-38
router.tsx
src/router/router.tsx
+85
-65
没有找到文件。
src/api/index.ts
浏览文件 @
dd4cfc9f
...
@@ -8,6 +8,7 @@ import { CouponManageAPI } from './modules/couponManage';
...
@@ -8,6 +8,7 @@ import { CouponManageAPI } from './modules/couponManage';
import
{
MakeManageAPI
}
from
'./modules/makeManage'
;
import
{
MakeManageAPI
}
from
'./modules/makeManage'
;
import
{
CategoryManageAPI
}
from
'./modules/categoryManage'
;
import
{
CategoryManageAPI
}
from
'./modules/categoryManage'
;
import
{
SystemManageAPI
}
from
'./modules/systemManage'
;
import
{
SystemManageAPI
}
from
'./modules/systemManage'
;
import
{
CustomManageAPI
}
from
'./modules/customManage'
;
export
{
export
{
CommonAPI
,
CommonAPI
,
...
@@ -20,4 +21,5 @@ export {
...
@@ -20,4 +21,5 @@ export {
MakeManageAPI
,
MakeManageAPI
,
CategoryManageAPI
,
CategoryManageAPI
,
SystemManageAPI
,
SystemManageAPI
,
CustomManageAPI
,
};
};
src/api/interface/customManageType.ts
0 → 100644
浏览文件 @
dd4cfc9f
import
{
InterListFunction
}
from
'~/api/interface'
;
// 客户列表
export
type
listAppUserType
=
InterListFunction
<
{
companyAuthStatus
?:
number
;
endTime
?:
string
;
keyword
?:
string
;
phoneNum
?:
string
;
startTime
?:
string
;
},
{
id
:
number
;
accountType
:
number
;
uid
:
string
;
accountNo
:
null
;
phoneNum
:
string
;
userName
:
null
;
nickName
:
string
;
userImg
:
string
;
userSex
:
number
;
email
:
null
;
source
:
null
;
accountStatus
:
number
;
remark
:
null
;
portType
:
number
;
createTime
:
string
;
companyAuthStatus
:
number
;
cooperationTagId
:
null
;
companyName
:
null
;
tagName
:
null
;
}
>
;
src/api/modules/customManage.ts
0 → 100644
浏览文件 @
dd4cfc9f
import
axios
from
'../request'
;
import
{
listAppUserType
}
from
'~/api/interface/customManageType'
;
export
class
CustomManageAPI
{
// 客户列表
static
listAppUser
:
listAppUserType
=
(
params
)
=>
axios
.
post
(
'/userapp/user-account/listAppUser'
,
params
);
}
src/pages/customManage/customList/index.tsx
浏览文件 @
dd4cfc9f
import
{
useState
}
from
'react'
;
import
{
use
Effect
,
use
State
}
from
'react'
;
import
SearchBox
from
'~/components/search-box'
;
import
SearchBox
from
'~/components/search-box'
;
import
{
Button
,
Table
}
from
'antd'
;
import
{
Button
,
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
{
listAppUserType
}
from
'~/api/interface/customManageType'
;
import
{
CustomManageAPI
}
from
'~/api'
;
// 表格数据类型
// 表格数据类型
type
TableType
=
any
;
type
TableType
=
InterListType
<
listAppUserType
>
;
// 请求数据的类型
type
ReqType
=
InterReqType
<
listAppUserType
>
;
// 搜索表单的数据
let
query
:
ReqType
=
{};
//来源列表
const
portTypeList
=
[
{
value
:
100
,
label
:
'自然流'
},
{
value
:
200
,
label
:
'海报'
},
{
value
:
300
,
label
:
'抖音'
},
{
value
:
400
,
label
:
'公众号'
},
{
value
:
500
,
label
:
'社群'
},
{
value
:
600
,
label
:
'招投标'
},
];
function
CustomListView
()
{
function
CustomListView
()
{
// 是否打开变更弹窗
// 是否打开变更弹窗
const
[
isChangeVisModal
,
setIsChangeVisModal
]
=
useState
<
boolean
>
(
false
);
const
[
isChangeVisModal
,
setIsChangeVisModal
]
=
useState
<
boolean
>
(
false
);
// 表格分页配置
// 表格分页配置
const
[
pagination
]
=
useState
({
const
[
pagination
,
setPagination
]
=
useState
({
total
:
0
,
total
:
0
,
pageSize
:
10
,
pageSize
:
10
,
current
:
1
,
current
:
1
,
totalPage
:
0
,
totalPage
:
0
,
});
});
// 表格数据
// 表格数据
const
[
tableData
]
=
useState
<
TableType
>
([{
id
:
1
}
]);
const
[
tableData
,
setTableData
]
=
useState
<
TableType
>
([
]);
// 需要编辑的数据
// 需要编辑的数据
const
[
editData
]
=
useState
<
TableType
[
0
]
>
();
const
[
editData
]
=
useState
<
TableType
[
0
]
>
();
// 加载列表
const
getTableList
=
async
(
value
=
{})
=>
{
// 只需要修改这个地方的接口即可
const
res
=
await
CustomManageAPI
.
listAppUser
({
pageNo
:
pagination
.
current
,
pageSize
:
pagination
.
pageSize
,
...
value
,
...
query
,
});
if
(
res
&&
res
.
code
===
'200'
)
{
const
{
list
,
pageNo
,
totalCount
,
pageSize
,
totalPage
}
=
res
.
result
;
// 解构
setPagination
({
total
:
totalCount
,
current
:
pageNo
,
pageSize
,
totalPage
,
});
setTableData
(
list
);
// console.log('加载列表 --->', list);
}
};
// 翻页
const
paginationChange
=
(
pageNo
:
number
,
pageSize
:
number
)
=>
{
getTableList
({
pageNo
,
pageSize
}).
then
();
};
// 表单提交
const
onFinish
=
(
data
:
ReqType
)
=>
{
pagination
.
current
=
1
;
query
=
data
;
getTableList
(
data
).
then
();
};
// componentDidMount
useEffect
(()
=>
{
query
=
{};
getTableList
().
then
();
},
[]);
// 表格结构
// 表格结构
const
columns
:
ColumnsType
<
TableType
[
0
]
>
=
[
const
columns
:
ColumnsType
<
TableType
[
0
]
>
=
[
{
{
title
:
'用户UID'
,
title
:
'用户UID'
,
dataIndex
:
'u
serName
'
,
dataIndex
:
'u
id
'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_text
,
_record
)
=>
`--`
,
width
:
'100px'
,
render
:
(
text
)
=>
`UID
${
text
}
`
,
},
},
{
{
title
:
'用户名称'
,
title
:
'用户名称'
,
dataIndex
:
'userName'
,
dataIndex
:
'userName'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_text
,
_record
)
=>
`--`
,
render
:
(
text
,
record
)
=>
text
||
record
.
nickName
,
},
},
{
{
title
:
'手机号'
,
title
:
'手机号'
,
dataIndex
:
'
userName
'
,
dataIndex
:
'
phoneNum
'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_text
,
_record
)
=>
`--`
,
},
},
{
{
title
:
'认证企业'
,
title
:
'认证企业'
,
dataIndex
:
'
user
Name'
,
dataIndex
:
'
company
Name'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_text
,
_record
)
=>
`--`
,
},
},
{
{
title
:
'企业认证'
,
title
:
'企业认证'
,
dataIndex
:
'
userName
'
,
dataIndex
:
'
companyAuthStatus
'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_text
,
_record
)
=>
`--`
,
render
:
(
text
)
=>
(
text
===
0
?
'未认证'
:
'已认证'
)
,
},
},
{
{
title
:
'电子签约认证'
,
title
:
'电子签约认证'
,
dataIndex
:
'userName'
,
dataIndex
:
'userName'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_text
,
_record
)
=>
`--
`
,
render
:
(
_text
)
=>
`未认证
`
,
},
},
{
{
title
:
'用户来源'
,
title
:
'用户来源'
,
dataIndex
:
'
userNam
e'
,
dataIndex
:
'
portTyp
e'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_text
,
_record
)
=>
`--`
,
render
:
(
text
)
=>
portTypeList
.
find
((
i
)
=>
i
.
value
===
text
)?.
label
||
text
,
},
},
{
{
title
:
'创建时间'
,
title
:
'创建时间'
,
dataIndex
:
'
userNa
me'
,
dataIndex
:
'
createTi
me'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_text
,
_record
)
=>
`--`
,
},
},
{
{
title
:
'账号类型'
,
title
:
'账号类型'
,
dataIndex
:
'
userName
'
,
dataIndex
:
'
phoneNum
'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_text
,
_record
)
=>
`--`
,
render
:
(
text
)
=>
(
text
?
'普通用户'
:
'游客用户'
)
,
},
},
{
{
title
:
'渠道等级'
,
title
:
'渠道等级'
,
dataIndex
:
'
remark
'
,
dataIndex
:
'
cooperationTagId
'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_text
,
_record
)
=>
`--`
,
render
:
(
text
)
=>
text
,
},
},
{
{
title
:
'上级推荐人'
,
title
:
'上级推荐人'
,
dataIndex
:
'remark'
,
dataIndex
:
'remark'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_text
,
_record
)
=>
`--`
,
render
:
(
_text
)
=>
`--`
,
},
},
{
{
title
:
'推荐伙伴'
,
title
:
'推荐伙伴'
,
dataIndex
:
'remark'
,
dataIndex
:
'remark'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_text
,
_record
)
=>
`--`
,
render
:
(
_text
)
=>
`--`
,
},
},
{
{
title
:
'相关运营'
,
title
:
'相关运营'
,
dataIndex
:
'remark'
,
dataIndex
:
'remark'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_text
,
_record
)
=>
`--`
,
render
:
(
_text
)
=>
`--`
,
},
},
{
{
title
:
'相关销售'
,
title
:
'相关销售'
,
dataIndex
:
'remark'
,
dataIndex
:
'remark'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_text
,
_record
)
=>
`--`
,
render
:
(
_text
)
=>
`--`
,
},
},
{
{
title
:
'操作'
,
title
:
'操作'
,
...
@@ -113,7 +163,7 @@ function CustomListView() {
...
@@ -113,7 +163,7 @@ function CustomListView() {
align
:
'center'
,
align
:
'center'
,
fixed
:
'right'
,
fixed
:
'right'
,
width
:
'150px'
,
width
:
'150px'
,
render
:
(
_text
,
_record
)
=>
(
render
:
(
_text
)
=>
(
<>
<>
<
Button
<
Button
type=
{
'link'
}
type=
{
'link'
}
...
@@ -151,14 +201,7 @@ function CustomListView() {
...
@@ -151,14 +201,7 @@ function CustomListView() {
name
:
'form'
,
name
:
'form'
,
type
:
'Select'
,
type
:
'Select'
,
placeholder
:
'请选择相关来源'
,
placeholder
:
'请选择相关来源'
,
options
:
[
options
:
portTypeList
,
{
value
:
1
,
label
:
'自然流'
},
{
value
:
2
,
label
:
'海报'
},
{
value
:
3
,
label
:
'抖音'
},
{
value
:
4
,
label
:
'公众号'
},
{
value
:
5
,
label
:
'社群'
},
{
value
:
6
,
label
:
'招投标'
},
],
},
},
{
{
label
:
'创建时间'
,
label
:
'创建时间'
,
...
@@ -187,7 +230,7 @@ function CustomListView() {
...
@@ -187,7 +230,7 @@ function CustomListView() {
],
],
},
},
]
}
]
}
searchData=
{
(
e
:
any
)
=>
console
.
log
(
'提交数据 --->'
,
e
)
}
searchData=
{
onFinish
}
/>
/>
<
Table
<
Table
size=
'small'
size=
'small'
...
@@ -201,8 +244,7 @@ function CustomListView() {
...
@@ -201,8 +244,7 @@ function CustomListView() {
current
:
pagination
.
current
,
current
:
pagination
.
current
,
showSizeChanger
:
true
,
showSizeChanger
:
true
,
showQuickJumper
:
true
,
showQuickJumper
:
true
,
// onChange: (page: number, pageSize: number) =>
onChange
:
(
page
:
number
,
pageSize
:
number
)
=>
paginationChange
(
page
,
pageSize
),
// paginationChange(page, pageSize),
showTotal
:
(
total
,
range
)
=>
`当前 ${range[0]}-${range[1]} 条记录 / 共 ${total} 条数据`
,
showTotal
:
(
total
,
range
)
=>
`当前 ${range[0]}-${range[1]} 条记录 / 共 ${total} 条数据`
,
}
}
}
}
// rowSelection={{ selectedRowKeys, onChange: onSelectChange }}
// rowSelection={{ selectedRowKeys, onChange: onSelectChange }}
...
...
src/router/router.tsx
浏览文件 @
dd4cfc9f
...
@@ -18,7 +18,6 @@ import {
...
@@ -18,7 +18,6 @@ import {
RedEnvelopeOutlined
,
RedEnvelopeOutlined
,
SettingOutlined
,
SettingOutlined
,
UserOutlined
,
UserOutlined
,
SisternodeOutlined
,
SendOutlined
,
SendOutlined
,
RocketOutlined
,
RocketOutlined
,
AppstoreAddOutlined
,
AppstoreAddOutlined
,
...
@@ -343,6 +342,82 @@ export const routerList: Array<RouteObjectType> = [
...
@@ -343,6 +342,82 @@ export const routerList: Array<RouteObjectType> = [
],
],
},
},
{
{
path
:
'/categoryManage'
,
element
:
<
LayoutView
/>,
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
18000
,
icon
:
<
ReconciliationOutlined
/>,
title
:
'分类管理'
,
},
children
:
[
{
path
:
'/categoryManage/jobServicesCategory/1'
,
element
:
withLoadingComponent
(<
CategoryManage
/>),
meta
:
{
id
:
18100
,
title
:
'作业服务分类'
,
icon
:
<
SendOutlined
/>,
},
},
{
path
:
'/categoryManage/jobServicesCategory/2'
,
element
:
withLoadingComponent
(<
CategoryManage
/>),
meta
:
{
id
:
18200
,
title
:
'设备租赁分类'
,
icon
:
<
RocketOutlined
/>,
},
},
{
path
:
'/categoryManage/jobServicesCategory/3'
,
element
:
withLoadingComponent
(<
CategoryManage
/>),
meta
:
{
id
:
18300
,
title
:
'飞手培训分类'
,
icon
:
<
AppstoreAddOutlined
/>,
},
},
{
path
:
'/categoryManage/jobServicesCategory/4'
,
element
:
withLoadingComponent
(<
CategoryManage
/>),
meta
:
{
id
:
18400
,
title
:
'产品商城分类'
,
icon
:
<
AppstoreOutlined
/>,
},
},
{
path
:
'/categoryManage/jobServicesCategory/0'
,
element
:
withLoadingComponent
(<
CategoryManage
/>),
meta
:
{
id
:
18500
,
title
:
'通用分类'
,
icon
:
<
CoffeeOutlined
/>,
},
},
{
path
:
'/categoryManage/detail/:id'
,
element
:
withLoadingComponent
(<
CategoryDetail
/>),
meta
:
{
id
:
18600
,
title
:
'分类详情'
,
icon
:
''
,
hidden
:
true
,
},
},
{
path
:
'/categoryManage/DirectoryManage'
,
element
:
withLoadingComponent
(<
DirectoryManage
/>),
meta
:
{
id
:
18700
,
title
:
'目录管理'
,
icon
:
<
UnorderedListOutlined
/>,
},
},
],
},
{
path
:
'/customManage'
,
path
:
'/customManage'
,
element
:
<
LayoutView
/>,
element
:
<
LayoutView
/>,
errorElement
:
<
ErrorPage
/>,
errorElement
:
<
ErrorPage
/>,
...
@@ -550,77 +625,22 @@ export const routerList: Array<RouteObjectType> = [
...
@@ -550,77 +625,22 @@ export const routerList: Array<RouteObjectType> = [
],
],
},
},
{
{
path
:
'/
category
Manage'
,
path
:
'/
system
Manage'
,
element
:
<
LayoutView
/>,
element
:
<
LayoutView
/>,
errorElement
:
<
ErrorPage
/>,
errorElement
:
<
ErrorPage
/>,
meta
:
{
meta
:
{
id
:
1
8000
,
id
:
2
8000
,
icon
:
<
Reconciliation
Outlined
/>,
icon
:
<
Setting
Outlined
/>,
title
:
'
分类
管理'
,
title
:
'
系统
管理'
,
},
},
children
:
[
children
:
[
{
{
path
:
'/categoryManage/jobServicesCategory/1'
,
path
:
'/systemManage/accountManage'
,
element
:
withLoadingComponent
(<
CategoryManage
/>),
element
:
withLoadingComponent
(<
AccountManageView
/>),
meta
:
{
id
:
18100
,
title
:
'作业服务分类'
,
icon
:
<
SendOutlined
/>,
},
},
{
path
:
'/categoryManage/jobServicesCategory/2'
,
element
:
withLoadingComponent
(<
CategoryManage
/>),
meta
:
{
id
:
18200
,
title
:
'设备租赁分类'
,
icon
:
<
RocketOutlined
/>,
},
},
{
path
:
'/categoryManage/jobServicesCategory/3'
,
element
:
withLoadingComponent
(<
CategoryManage
/>),
meta
:
{
id
:
18300
,
title
:
'飞手培训分类'
,
icon
:
<
AppstoreAddOutlined
/>,
},
},
{
path
:
'/categoryManage/jobServicesCategory/4'
,
element
:
withLoadingComponent
(<
CategoryManage
/>),
meta
:
{
id
:
18400
,
title
:
'产品商城分类'
,
icon
:
<
AppstoreOutlined
/>,
},
},
{
path
:
'/categoryManage/jobServicesCategory/0'
,
element
:
withLoadingComponent
(<
CategoryManage
/>),
meta
:
{
meta
:
{
id
:
18500
,
id
:
28100
,
title
:
'通用分类'
,
title
:
'账号管理'
,
icon
:
<
CoffeeOutlined
/>,
icon
:
<
UserOutlined
/>,
},
},
{
path
:
'/categoryManage/detail/:id'
,
element
:
withLoadingComponent
(<
CategoryDetail
/>),
meta
:
{
id
:
18600
,
title
:
'分类详情'
,
icon
:
''
,
hidden
:
true
,
},
},
{
path
:
'/categoryManage/DirectoryManage'
,
element
:
withLoadingComponent
(<
DirectoryManage
/>),
meta
:
{
id
:
18700
,
title
:
'目录管理'
,
icon
:
<
UnorderedListOutlined
/>,
},
},
},
},
],
],
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论