Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
a0a58f97
提交
a0a58f97
authored
4月 24, 2024
作者:
ZhangLingKun
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
ff8ffa45
be291a66
流水线
#9014
已通过 于阶段
in 1 分 17 秒
变更
2
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
17 行增加
和
4 行删除
+17
-4
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
index.tsx
src/pages/systemManage/companyManage/companyDetail/index.tsx
+16
-3
没有找到文件。
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
a0a58f97
...
@@ -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
:
f7d03cf2d4883716425b8e6d7b142776629de197
newTag
:
1066a30c4b288ed82efa7c6312ded799e5512799
src/pages/systemManage/companyManage/companyDetail/index.tsx
浏览文件 @
a0a58f97
...
@@ -3,7 +3,7 @@ import { useEffect, useState } from 'react';
...
@@ -3,7 +3,7 @@ import { useEffect, useState } from 'react';
import
{
SystemManageAPI
}
from
'~/api'
;
import
{
SystemManageAPI
}
from
'~/api'
;
import
{
InterDataType
,
PaginationProps
}
from
'~/api/interface'
;
import
{
InterDataType
,
PaginationProps
}
from
'~/api/interface'
;
import
{
getCompanyInfoByIdType
,
listCompanyMembersType
}
from
'~/api/interface/systemManageType'
;
import
{
getCompanyInfoByIdType
,
listCompanyMembersType
}
from
'~/api/interface/systemManageType'
;
import
{
Button
,
Descriptions
,
message
,
Modal
,
Table
}
from
'antd'
;
import
{
Button
,
Descriptions
,
message
,
Modal
,
SelectProps
,
Table
}
from
'antd'
;
import
'./index.scss'
;
import
'./index.scss'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
...
@@ -21,6 +21,8 @@ const CompanyDetail = () => {
...
@@ -21,6 +21,8 @@ const CompanyDetail = () => {
const
navigate
=
useNavigate
();
const
navigate
=
useNavigate
();
const
{
userInfo
}
=
useSelector
((
state
:
any
)
=>
state
.
UserInfo
);
const
{
userInfo
}
=
useSelector
((
state
:
any
)
=>
state
.
UserInfo
);
// 角色列表
const
[
roleList
,
setRoleList
]
=
useState
<
SelectProps
[
'options'
]
>
();
const
tableColumns
:
ColumnsType
<
companyMembersType
[
0
]
>
=
[
const
tableColumns
:
ColumnsType
<
companyMembersType
[
0
]
>
=
[
{
{
...
@@ -37,7 +39,7 @@ const CompanyDetail = () => {
...
@@ -37,7 +39,7 @@ const CompanyDetail = () => {
title
:
'角色'
,
title
:
'角色'
,
align
:
'center'
,
align
:
'center'
,
dataIndex
:
'leader'
,
dataIndex
:
'leader'
,
render
:
(
text
:
number
)
=>
(
text
?
'单位管理员'
:
'普通员工'
)
,
render
:
(
text
)
=>
roleList
?.
find
((
i
)
=>
i
.
value
===
text
)?.
label
||
text
,
},
},
{
{
title
:
'手机号'
,
title
:
'手机号'
,
...
@@ -91,6 +93,7 @@ const CompanyDetail = () => {
...
@@ -91,6 +93,7 @@ const CompanyDetail = () => {
setCompanyDetail
(
result
);
setCompanyDetail
(
result
);
});
});
};
};
//
//单位成员列表
//单位成员列表
const
getListCompanyMembers
=
(
companyInfoId
:
number
)
=>
{
const
getListCompanyMembers
=
(
companyInfoId
:
number
)
=>
{
SystemManageAPI
.
getListCompanyMembers
({
SystemManageAPI
.
getListCompanyMembers
({
...
@@ -157,11 +160,20 @@ const CompanyDetail = () => {
...
@@ -157,11 +160,20 @@ const CompanyDetail = () => {
const
backRoute
=
()
=>
{
const
backRoute
=
()
=>
{
navigate
(
-
1
);
navigate
(
-
1
);
};
};
// 获取角色列表
const
getRoleList
=
async
()
=>
{
const
res
=
await
SystemManageAPI
.
getRolesList
();
if
(
res
&&
res
.
code
===
'200'
)
{
setRoleList
(
res
.
result
?.
map
((
i
)
=>
({
label
:
i
?.
roleName
,
value
:
i
?.
id
,
disabled
:
i
?.
id
===
1
})),
);
}
};
useEffect
(()
=>
{
useEffect
(()
=>
{
setCompanyId
(
Number
(
searchParams
.
get
(
'id'
)));
setCompanyId
(
Number
(
searchParams
.
get
(
'id'
)));
getCompanyDetailInfo
(
Number
(
searchParams
.
get
(
'id'
)));
getCompanyDetailInfo
(
Number
(
searchParams
.
get
(
'id'
)));
getListCompanyMembers
(
Number
(
searchParams
.
get
(
'id'
)));
getListCompanyMembers
(
Number
(
searchParams
.
get
(
'id'
)));
getRoleList
().
then
();
},
[]);
},
[]);
return
(
return
(
...
@@ -214,6 +226,7 @@ const CompanyDetail = () => {
...
@@ -214,6 +226,7 @@ const CompanyDetail = () => {
onCancel=
{
addPeopleModalCancel
}
onCancel=
{
addPeopleModalCancel
}
onOk=
{
addPeopleModalOk
}
onOk=
{
addPeopleModalOk
}
companyInfoId=
{
companyId
}
companyInfoId=
{
companyId
}
roleList=
{
roleList
}
/>
/>
{
/*转让管理员*/
}
{
/*转让管理员*/
}
<
TransferLeaderModal
<
TransferLeaderModal
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论