Browse Source

wenti xiugai

dev
deartibers 2 years ago
parent
commit
b9d921cdbb
  1. BIN
      web/client/assets/images/install/table_question.png
  2. 2
      web/client/src/sections/install/components/adminModal.jsx
  3. 2
      web/client/src/sections/install/components/memberModal.jsx
  4. 31
      web/client/src/sections/install/containers/roles.jsx
  5. 41
      web/client/src/sections/install/containers/system.jsx

BIN
web/client/assets/images/install/table_question.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 789 B

After

Width:  |  Height:  |  Size: 19 KiB

2
web/client/src/sections/install/components/adminModal.jsx

@ -77,7 +77,7 @@ function adminModal (props) {
<div style={{ margin: "0px 25px" }}>
<div style={{ width: '100%', height: 32, background: '#F4F8FF', borderRadius: 2, border: '1px solid #C7E1FF', display: 'flex', alignItems: 'center' }}>
<div style={{ display: 'flex', alignItems: 'center', marginLeft: 12 }}><IconAlertCircle style={{ color: '#0F7EFB' }} /></div>
<div style={{ color: '#0F7EFB', fontSize: 12, marginLeft: 8 }}>成员成为管理员后拥有平台所有权限和项目不再拥有成员角色</div>
<div style={{ color: '#0F7EFB', fontSize: 12, marginLeft: 8 }}>成员成为管理员后拥有平台所有权限和项目成员的普通角色会被禁用</div>
</div>
<Form
allowEmpty

2
web/client/src/sections/install/components/memberModal.jsx

@ -86,7 +86,7 @@ function memberModal (props) {
<div style={{ margin: "0px 25px" }}>
<div style={{ width: '100%', height: 32, background: '#F4F8FF', borderRadius: 2, border: '1px solid #C7E1FF', display: 'flex', alignItems: 'center' }}>
<div style={{ display: 'flex', alignItems: 'center', marginLeft: 12 }}><IconAlertCircle style={{ color: '#0F7EFB' }} /></div>
<div style={{ color: '#0F7EFB', fontSize: 12, marginLeft: 8 }}>成员成为管理员后拥有平台所有权限和项目不再拥有成员角色</div>
<div style={{ color: '#0F7EFB', fontSize: 12, marginLeft: 8 }}>成员成为管理员后拥有平台所有权限和项目成员的普通角色会被禁用</div>
</div>
<Form
allowEmpty

31
web/client/src/sections/install/containers/roles.jsx

@ -70,7 +70,7 @@ const Roles = (props) => {
title: (
<div style={{ display: 'flex', alignItems: 'center' }}>
数据分析师
<Tooltip content={'拥有分析、工单、资料的权限'}>
<Tooltip content={'拥有数据分析、工单管理的权限、资料相关的权限'} style={{ lineHeight: 2 }}>
<img src="/assets/images/install/table_question.png" alt="" style={{ height: 14, width: 14, marginLeft: 4 }} />
</Tooltip>
</div>
@ -103,7 +103,7 @@ const Roles = (props) => {
title: (
<div style={{ display: 'flex', alignItems: 'center' }}>
售后运维
<Tooltip content={'拥有问题、设备、工单、资料、一期控制台的权限'}>
<Tooltip content={'拥有设备、问题、工单、资料相关的权限'}>
<img src="/assets/images/install/table_question.png" alt="" style={{ height: 14, width: 14, marginLeft: 4 }} />
</Tooltip>
</div>
@ -135,8 +135,8 @@ const Roles = (props) => {
}, {
title: (
<div style={{ display: 'flex', alignItems: 'center' }}>
资源管理
<Tooltip content={'拥有资料、工单的权限'}>
资源管理
<Tooltip content={'拥有资料、设备、工单相关的权限'}>
<img src="/assets/images/install/table_question.png" alt="" style={{ height: 14, width: 14, marginLeft: 4 }} />
</Tooltip>
</div>
@ -169,7 +169,7 @@ const Roles = (props) => {
title: (
<div style={{ display: 'flex', alignItems: 'center' }}>
客户服务
<Tooltip content={'拥有服务、工单的权限'}>
<Tooltip content={'拥有服务、工单、资料相关的权限'}>
<img src="/assets/images/install/table_question.png" alt="" style={{ height: 14, width: 14, marginLeft: 4 }} />
</Tooltip>
</div>
@ -209,11 +209,12 @@ const Roles = (props) => {
{row?.disabled ? (
<Button
theme="borderless"
style={{ color: '#F31C1C' }}
onClick={() => {
dispatch(install.putOrganizationUser({ pomsUserId: row?.id, disabled: !row?.disabled })).then(() => getUserList())
}}
>
已禁
</Button>
) : (
<Popconfirm
@ -227,7 +228,7 @@ const Roles = (props) => {
})
}}
>
<Button theme="borderless"></Button>
<Button theme="borderless">已启</Button>
</Popconfirm>
)}
<Button
@ -247,7 +248,7 @@ const Roles = (props) => {
position="topRight"
onConfirm={() => {
dispatch(install.putOrganizationUser({ pomsUserId: row?.id, deleted: true })).then(() => {
if (page.current > 0 && limits.current < 2) {
if (page.current > 0 && mylimits.current < 2) {
setQuery({ limit: 10, page: page.current - 1 })
} else {
setQuery({ limit: 10, page: page.current })
@ -265,7 +266,8 @@ const Roles = (props) => {
// const [data, setdata] = useState([])//
const tableData = useRef([]); //
const page = useRef(query.page);//
const limits = useRef(); //
const [limits, setLimits] = useState()//
const mylimits = useRef(); //
const [pepList, setPepList] = useState([])//
useEffect(() => {
getUserList();
@ -279,6 +281,7 @@ const Roles = (props) => {
function getUserList () {
let searchData = { ...query, role: roleChoose }
dispatch(install.getOrganizationUser(searchData)).then((res) => {//
if (res.success) {
tableData.current = res.payload.data.users.rows;
let notCreatedArr = []
let notCreatedNum = 5 - res.payload.data.admin.length
@ -286,7 +289,9 @@ const Roles = (props) => {
notCreatedArr.push('')
}
setRoleAssignment(res.payload.data.admin.concat(notCreatedArr))
limits.current = res.payload.data.users.count
setLimits(res.payload.data.users.count)
mylimits.current = res.payload.data.users.rows.length
}
})
}
function handleRow (record, index) {//
@ -327,7 +332,7 @@ const Roles = (props) => {
<div style={{ display: 'flex', marginLeft: 21, }}>
{
item.departments?.map((itm, idx) => {
let mydepartmentsArr=[]
let mydepartmentsArr = []
for (let index = 0; index < item.departments.length; index++) {
mydepartmentsArr.push(item.departments[index].name)
}
@ -482,11 +487,11 @@ const Roles = (props) => {
}}
>
<span style={{ lineHeight: "30px", fontSize: 13, color: 'rgba(0,90,189,0.8)' }}>
{limits.current}条信息
{limits}条信息
</span>
<Pagination
className="22"
total={limits.current}
total={limits}
showSizeChanger
currentPage={query.page + 1}
pageSizeOpts={[10, 20, 30, 40]}

41
web/client/src/sections/install/containers/system.jsx

@ -1,6 +1,6 @@
import React, { useEffect } from 'react';
import { connect } from 'react-redux';
import { Spin, Card } from '@douyinfe/semi-ui';
import { Spin, Button } from '@douyinfe/semi-ui';
import '../style.less'
const Example = (props) => {
@ -13,21 +13,48 @@ const Example = (props) => {
return (
<>
<div>
2222222222222
<div style={{ background: '#FFFFFF', margin: '8px 12px', padding: '20px 20px 0px 20px' }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ width: 0, height: 20, borderLeft: '3px solid #005ABD', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div>
<div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#101531', marginLeft: 8 }}>系统映射</div>
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>ROLE ASSIGNMENT</div>
</div>
<div style={{marginRight:20}}>
<Button
theme="solid"
type="primary"
style={{
width: 108,
height: 32,
borderRadius: 2,
marginLeft: 40
}}
onClick={() => {
// setEditObj({})
// setMemberEdit(false)
// setMemberModal(true);
}}
>
添加映射关系
</Button>
</div>
</div>
<div style={{marginTop:20}}>
111
</div>
</div>
</>
)
}
function mapStateToProps (state) {
const { auth, global, members, webSocket } = state;
const { auth, global, members } = state;
return {
// loading: members.isRequesting,
// user: auth.user,
// actions: global.actions,
user: auth.user,
actions: global.actions,
// members: members.data,
// socket: webSocket.socket
};
}

Loading…
Cancel
Save