Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
cbcd8259
提交
cbcd8259
authored
8月 03, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
功能:飞手中心
上级
57ecd804
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
215 行增加
和
16 行删除
+215
-16
index.ts
src/api/index.ts
+2
-0
commonType.ts
src/api/interface/commonType.ts
+10
-0
flyerCenterType.ts
src/api/interface/flyerCenterType.ts
+41
-0
common.ts
src/api/modules/common.ts
+4
-0
flyerCenterAPI.ts
src/api/modules/flyerCenterAPI.ts
+10
-0
index.tsx
src/pages/customManage/customVerification/index.tsx
+1
-1
index.tsx
src/pages/flyerCenter/flyerList/index.tsx
+139
-13
index.ts
src/router/index.ts
+7
-1
router.tsx
src/router/router.tsx
+1
-1
没有找到文件。
src/api/index.ts
浏览文件 @
cbcd8259
...
@@ -13,6 +13,7 @@ import { MallManageAPI } from './modules/mallManage';
...
@@ -13,6 +13,7 @@ import { MallManageAPI } from './modules/mallManage';
import
{
ResourceManageAPI
}
from
'./modules/resourceManageAPI'
;
import
{
ResourceManageAPI
}
from
'./modules/resourceManageAPI'
;
import
{
ForumManageAPI
}
from
'./modules/forumManageAPI'
;
import
{
ForumManageAPI
}
from
'./modules/forumManageAPI'
;
import
{
PilotTrainAPI
}
from
'./modules/pilotTrainAPI'
;
import
{
PilotTrainAPI
}
from
'./modules/pilotTrainAPI'
;
import
{
FlyerCenterAPI
}
from
'./modules/flyerCenterAPI'
;
export
{
export
{
CommonAPI
,
CommonAPI
,
...
@@ -30,4 +31,5 @@ export {
...
@@ -30,4 +31,5 @@ export {
ResourceManageAPI
,
ResourceManageAPI
,
ForumManageAPI
,
ForumManageAPI
,
PilotTrainAPI
,
PilotTrainAPI
,
FlyerCenterAPI
,
};
};
src/api/interface/commonType.ts
浏览文件 @
cbcd8259
...
@@ -169,3 +169,13 @@ export type getUserAccountByPhoneNumType = InterFunction<
...
@@ -169,3 +169,13 @@ export type getUserAccountByPhoneNumType = InterFunction<
export
type
appletQRCodeType
=
InterFunction
<
{
page
:
string
;
scene
:
string
},
string
>
;
export
type
appletQRCodeType
=
InterFunction
<
{
page
:
string
;
scene
:
string
},
string
>
;
//登录信息-获取
//登录信息-获取
export
type
getLoginInfoType
=
InterFunction
<
{
randomLoginCode
:
string
},
any
>
;
export
type
getLoginInfoType
=
InterFunction
<
{
randomLoginCode
:
string
},
any
>
;
//地区-获取
type
locationType
=
{
id
:
number
;
name
:
string
;
level
:
number
;
childInfo
:
locationType
[];
};
export
type
getSecondDistrictInfoType
=
InterFunction
<
any
,
locationType
[]
>
;
src/api/interface/flyerCenterType.ts
0 → 100644
浏览文件 @
cbcd8259
import
{
InterFunction
,
InterItemFunction
}
from
'~/api/interface'
;
//飞手列表
export
type
backListPilotType
=
InterItemFunction
<
{
abilityId
?:
number
;
accountNumber
?:
string
;
areaNumber
?:
any
;
auditStatus
?:
number
;
id
?:
number
;
licenseType
?:
string
;
},
{
abilityUrl
:
string
;
age
:
number
;
areaNumber
:
number
;
auditStatus
:
number
;
createTime
:
string
;
id
:
number
;
individualResume
:
string
;
licenseNumber
:
number
;
licenseType
:
string
;
licenseUrl
:
string
;
phoneNum
:
number
;
pilotAbility
:
{
abilityId
:
number
;
abilityName
:
string
;
id
:
number
;
}[];
remark
:
string
;
residentCity
:
string
;
sex
:
number
;
timeOfApplication
:
string
;
updateTime
:
string
;
userAccountId
:
number
;
userName
:
number
;
yearsOfWorking
:
number
;
}[]
>
;
//能力类型
export
type
abilityListType
=
InterFunction
<
any
,
{
abilityId
:
number
;
abilityName
:
string
}[]
>
;
src/api/modules/common.ts
浏览文件 @
cbcd8259
...
@@ -5,6 +5,7 @@ import {
...
@@ -5,6 +5,7 @@ import {
batchRemoveBannerInfo
,
batchRemoveBannerInfo
,
exchangeBannerInfo
,
exchangeBannerInfo
,
getLoginInfoType
,
getLoginInfoType
,
getSecondDistrictInfoType
,
getUserAccountByPhoneNumType
,
getUserAccountByPhoneNumType
,
insertBannerInfo
,
insertBannerInfo
,
insertModuleInfo
,
insertModuleInfo
,
...
@@ -84,4 +85,7 @@ export class CommonAPI {
...
@@ -84,4 +85,7 @@ export class CommonAPI {
//获取登录信息
//获取登录信息
static
getLoginInfo
:
getLoginInfoType
=
(
params
)
=>
static
getLoginInfo
:
getLoginInfoType
=
(
params
)
=>
axios
.
get
(
'/userapp/temp-auth/getLoginInfo'
,
{
params
});
axios
.
get
(
'/userapp/temp-auth/getLoginInfo'
,
{
params
});
// 获取地域
static
getSecondDistrictInfo
:
getSecondDistrictInfoType
=
()
=>
axios
.
get
(
'/pms/appDevice/getSecondDistrictInfo'
);
}
}
src/api/modules/flyerCenterAPI.ts
0 → 100644
浏览文件 @
cbcd8259
import
{
abilityListType
,
backListPilotType
}
from
'~/api/interface/flyerCenterType'
;
import
axios
from
'../request'
;
export
class
FlyerCenterAPI
{
//飞手列表
static
getBackListPilot
:
backListPilotType
=
(
data
)
=>
axios
.
post
(
'/userapp/pilot/backListPilot'
,
data
);
// 飞手能力类型
static
getAbilityList
:
abilityListType
=
()
=>
axios
.
get
(
'/userapp/pilot/abilityList'
);
}
src/pages/customManage/customVerification/index.tsx
浏览文件 @
cbcd8259
...
@@ -20,7 +20,7 @@ const CustomVerification = () => {
...
@@ -20,7 +20,7 @@ const CustomVerification = () => {
placeholder
:
'请输入UID,姓名或手机号'
,
placeholder
:
'请输入UID,姓名或手机号'
,
},
},
];
];
const
tableColumns
:
ColumnsType
<
any
>
=
[
const
tableColumns
:
ColumnsType
<
listAuthType
[
0
]
>
=
[
{
{
title
:
'UID'
,
title
:
'UID'
,
align
:
'center'
,
align
:
'center'
,
...
...
src/pages/flyerCenter/flyerList/index.tsx
浏览文件 @
cbcd8259
import
SearchBox
,
{
searchColumns
as
searchColumnsType
}
from
'~/components/search-box'
;
import
SearchBox
,
{
searchColumns
as
searchColumnsType
}
from
'~/components/search-box'
;
import
{
Table
}
from
'antd'
;
import
{
Button
,
Table
,
Tag
}
from
'antd'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
CommonAPI
,
FlyerCenterAPI
}
from
'~/api'
;
import
{
useEffect
,
useState
}
from
'react'
;
import
{
InterDataType
,
InterReqListType
,
PaginationProps
}
from
'~/api/interface'
;
import
{
backListPilotType
}
from
'~/api/interface/flyerCenterType'
;
import
{
getSecondDistrictInfoType
}
from
'~/api/interface/commonType'
;
//飞手列表返回类型
type
flyerListType
=
InterDataType
<
backListPilotType
>
[
'list'
];
//飞手列表请求类型
type
flyerListParameters
=
InterReqListType
<
backListPilotType
>
;
//地址返回数据
type
locationType
=
InterDataType
<
getSecondDistrictInfoType
>
;
const
FlyerList
=
()
=>
{
const
FlyerList
=
()
=>
{
const
searchColumns
:
searchColumnsType
[]
=
[
const
[
searchColumns
,
setSearchColumns
]
=
useState
<
searchColumnsType
[]
>
(
[
{
{
name
:
''
,
name
:
'
accountNumber
'
,
label
:
'账号'
,
label
:
'账号'
,
placeholder
:
'请输入UID,姓名或手机号'
,
placeholder
:
'请输入UID,姓名或手机号'
,
type
:
'input'
,
type
:
'input'
,
},
},
{
{
name
:
''
,
name
:
'
auditStatus
'
,
label
:
'执照认证状态'
,
label
:
'执照认证状态'
,
placeholder
:
'请选择执照认证状态'
,
placeholder
:
'请选择执照认证状态'
,
type
:
'select'
,
type
:
'select'
,
options
:
[],
options
:
[
{
id
:
0
,
name
:
'审核中'
},
{
id
:
1
,
name
:
'已通过'
},
{
id
:
2
,
name
:
'未通过'
},
],
},
},
{
{
name
:
''
,
name
:
'
abilityId
'
,
label
:
'
场景培训
认证'
,
label
:
'
能力
认证'
,
placeholder
:
'请选择
场景培训认证状态
'
,
placeholder
:
'请选择
能力认证
'
,
type
:
'select'
,
type
:
'select'
,
options
:
[],
options
:
[],
},
},
];
{
const
tableColumns
:
ColumnsType
<
any
>
=
[
name
:
'areaNumber'
,
label
:
'常驻城市'
,
placeholder
:
'请选择常驻城市'
,
type
:
'Cascader'
,
options
:
[],
},
]);
const
tableColumns
:
ColumnsType
<
flyerListType
[
0
]
>
=
[
{
{
title
:
'UID'
,
title
:
'UID'
,
dataIndex
:
'uid'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
title
:
'姓名'
,
title
:
'姓名'
,
align
:
'center'
,
align
:
'center'
,
dataIndex
:
'userName'
,
},
},
{
{
title
:
'执照认证状态'
,
title
:
'执照认证状态'
,
align
:
'center'
,
align
:
'center'
,
dataIndex
:
'auditStatus'
,
render
:
(
text
:
number
)
=>
(
text
===
0
?
'审核中'
:
text
===
1
?
'已通过'
:
'未通过'
),
},
},
{
{
title
:
'
场景培训
认证'
,
title
:
'
能力
认证'
,
align
:
'center'
,
align
:
'center'
,
dataIndex
:
'pilotAbility'
,
render
:
(
text
:
flyerListType
[
0
][
'pilotAbility'
])
=>
text
?
text
.
map
((
v
)
=>
<
Tag
key=
{
v
.
abilityId
}
>
{
v
.
abilityName
}
</
Tag
>)
:
''
,
},
{
title
:
'常驻城市'
,
align
:
'center'
,
dataIndex
:
'residentCity'
,
},
},
{
{
title
:
'手机号'
,
title
:
'手机号'
,
align
:
'center'
,
align
:
'center'
,
dataIndex
:
'phoneNum'
,
},
},
{
{
title
:
'申请认证时间'
,
title
:
'申请认证时间'
,
align
:
'center'
,
align
:
'center'
,
dataIndex
:
'createTime'
,
},
},
{
{
title
:
'备注'
,
title
:
'备注'
,
align
:
'center'
,
align
:
'center'
,
dataIndex
:
'remark'
,
},
},
{
{
title
:
'操作'
,
title
:
'操作'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_text
:
string
,
record
)
=>
(
<>
<
Button
type=
'link'
danger
disabled=
{
record
.
auditStatus
!==
0
}
>
审批
</
Button
>
<
Button
type=
'link'
>
变更
</
Button
>
<
Button
type=
'link'
>
详情
</
Button
>
</>
),
},
},
];
];
const
[
tableData
,
setTableData
]
=
useState
<
flyerListType
>
([]);
const
[
query
,
setQuery
]
=
useState
<
flyerListParameters
>
();
const
[
pagination
,
setPagination
]
=
useState
<
PaginationProps
&
{
totalCount
:
number
}
>
({
pageNo
:
1
,
pageSize
:
10
,
totalCount
:
0
,
});
//飞手列表
const
getFlyerList
=
(
query
?:
flyerListParameters
)
=>
{
FlyerCenterAPI
.
getBackListPilot
({
pageNo
:
pagination
.
pageNo
,
pageSize
:
pagination
.
pageSize
,
...
query
,
}).
then
(({
result
})
=>
{
pagination
.
totalCount
=
result
.
totalCount
;
setTableData
(
result
.
list
||
[]);
setPagination
(
pagination
);
});
};
//飞手能力列表
const
getAbilityList
=
()
=>
{
FlyerCenterAPI
.
getAbilityList
().
then
(({
result
})
=>
{
searchColumns
[
2
].
options
=
(
result
||
[]).
map
((
v
)
=>
({
id
:
v
.
abilityId
,
name
:
v
.
abilityName
,
}));
setSearchColumns
([...
searchColumns
]);
});
};
//分页
const
paginationChange
=
(
pageNo
:
number
,
pageSize
:
number
)
=>
{
pagination
.
pageNo
=
pageNo
;
pagination
.
pageSize
=
pageSize
;
getFlyerList
(
query
);
};
//筛选成功
const
searchSuccess
=
(
value
:
flyerListParameters
)
=>
{
pagination
.
pageNo
=
1
;
pagination
.
pageSize
=
10
;
setQuery
({
...
value
,
areaNumber
:
value
.
areaNumber
?
value
.
areaNumber
[
1
]
:
undefined
});
getFlyerList
({
...
value
,
areaNumber
:
value
.
areaNumber
?
value
.
areaNumber
[
1
]
:
undefined
});
};
//获取地域数据
const
getSecondDistrictInfo
=
()
=>
{
CommonAPI
.
getSecondDistrictInfo
().
then
(({
result
})
=>
{
const
covertLocationData
:
any
=
(
list
:
locationType
)
=>
{
return
list
.
map
((
v
)
=>
({
label
:
v
.
name
,
value
:
v
.
id
,
children
:
v
.
childInfo
?
covertLocationData
(
v
.
childInfo
)
:
[],
}));
};
searchColumns
[
3
].
options
=
covertLocationData
(
result
);
setSearchColumns
([...
searchColumns
]);
});
};
useEffect
(()
=>
{
getFlyerList
();
getAbilityList
();
getSecondDistrictInfo
();
},
[]);
return
(
return
(
<
div
className=
'flyer-list'
>
<
div
className=
'flyer-list'
>
<
SearchBox
search=
{
searchColumns
}
/>
<
SearchBox
search=
{
searchColumns
}
searchData=
{
searchSuccess
}
/>
<
Table
bordered
columns=
{
tableColumns
}
/>
<
Table
bordered
columns=
{
tableColumns
}
dataSource=
{
tableData
}
rowKey=
'id'
pagination=
{
{
total
:
pagination
.
totalCount
,
pageSize
:
pagination
.
pageSize
,
current
:
pagination
.
pageNo
,
showSizeChanger
:
true
,
showQuickJumper
:
true
,
onChange
:
(
page
:
number
,
pageSize
:
number
)
=>
paginationChange
(
page
,
pageSize
),
showTotal
:
(
total
,
range
)
=>
`当前 ${range[0]}-${range[1]} 条记录 / 共 ${total} 条数据`
,
}
}
/>
</
div
>
</
div
>
);
);
};
};
...
...
src/router/index.ts
浏览文件 @
cbcd8259
...
@@ -20,7 +20,13 @@ export const authRouterList = async () => {
...
@@ -20,7 +20,13 @@ export const authRouterList = async () => {
const
getRouteList
=
(
data
:
RouteObjectType
[])
=>
{
const
getRouteList
=
(
data
:
RouteObjectType
[])
=>
{
return
data
.
reduce
((
pre
:
RouteObjectType
[],
cur
)
=>
{
return
data
.
reduce
((
pre
:
RouteObjectType
[],
cur
)
=>
{
const
Obj
:
RouteObjectType
=
{
...
cur
};
const
Obj
:
RouteObjectType
=
{
...
cur
};
if
(
ids
.
includes
(
Obj
.
meta
.
id
)
||
Obj
.
meta
.
hidden
)
{
if
(
ids
.
includes
(
Obj
.
meta
.
id
)
||
Obj
.
meta
.
hidden
||
[
'/customManage/customVerification'
,
'/flyerCenter'
,
'/flyerCenter/flyerList'
].
includes
(
Obj
.
path
as
string
,
)
)
{
if
(
Obj
.
children
)
{
if
(
Obj
.
children
)
{
Obj
.
children
=
[...
getRouteList
(
Obj
.
children
)];
Obj
.
children
=
[...
getRouteList
(
Obj
.
children
)];
}
}
...
...
src/router/router.tsx
浏览文件 @
cbcd8259
...
@@ -986,7 +986,7 @@ export const routerList: Array<RouteObjectType> = [
...
@@ -986,7 +986,7 @@ export const routerList: Array<RouteObjectType> = [
errorElement
:
<
ErrorPage
/>,
errorElement
:
<
ErrorPage
/>,
meta
:
{
meta
:
{
id
:
1510
,
id
:
1510
,
title
:
'飞手
列表
'
,
title
:
'飞手
管理
'
,
icon
:
<
UserOutlined
/>,
icon
:
<
UserOutlined
/>,
},
},
},
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论