|
@@ -18,6 +18,7 @@ import ConnectModal from '../System/components/ConnectModal'
|
|
|
import FormItem from 'antd/lib/form/FormItem'
|
|
|
import { permData } from '../Customer'
|
|
|
import styles from './index.less'
|
|
|
+import classNames from 'classnames'
|
|
|
|
|
|
const Product = () => {
|
|
|
const { TabPane } = Tabs
|
|
@@ -62,6 +63,22 @@ const Product = () => {
|
|
|
enterprise: [],
|
|
|
...formatPermission('init', result.permission)
|
|
|
}
|
|
|
+ // 特殊处理云版switch
|
|
|
+ if (values.showBuilding || values.showCuring || values.showHighway || values.showGs) {
|
|
|
+ values.showCloud = true
|
|
|
+ delete values.showBuilding
|
|
|
+ delete values.showCuring
|
|
|
+ delete values.showHighway
|
|
|
+ delete values.showGs
|
|
|
+ }
|
|
|
+
|
|
|
+ // 特殊处理大司空2.0
|
|
|
+ if (values.showPersonal || values.showEnterprise) {
|
|
|
+ values.showRoad = true
|
|
|
+ delete values.showPersonal
|
|
|
+ delete values.showEnterprise
|
|
|
+ }
|
|
|
+
|
|
|
setState({
|
|
|
...state,
|
|
|
rolePermission: values,
|
|
@@ -136,8 +153,7 @@ const Product = () => {
|
|
|
title="确认删除吗?"
|
|
|
okText="确认"
|
|
|
cancelText="取消"
|
|
|
- onConfirm={() => tryDeleteStaff({ id: state.id, staffId: record.staffId })}
|
|
|
- >
|
|
|
+ onConfirm={() => tryDeleteStaff({ id: state.id, staffId: record.staffId })}>
|
|
|
<div className="pl-2 text-hex-fd3995 cursor-pointer hover:text-hex-e7026e">
|
|
|
<Delete />
|
|
|
</div>
|
|
@@ -165,8 +181,7 @@ const Product = () => {
|
|
|
<Tabs
|
|
|
defaultActiveKey="1"
|
|
|
type="card"
|
|
|
- onChange={key => setState({ ...state, activeKey: key })}
|
|
|
- >
|
|
|
+ onChange={key => setState({ ...state, activeKey: key })}>
|
|
|
<TabPane tab="员工列表" key="1">
|
|
|
<Table<API.RoleStaffListItem>
|
|
|
dataSource={state.roleStaff}
|
|
@@ -187,8 +202,7 @@ const Product = () => {
|
|
|
id: state.id
|
|
|
})
|
|
|
message.success('设置成功')
|
|
|
- }}
|
|
|
- >
|
|
|
+ }}>
|
|
|
<ProFormSwitch
|
|
|
fieldProps={{
|
|
|
onChange(checked) {
|
|
@@ -200,11 +214,7 @@ const Product = () => {
|
|
|
name="showLockstore"
|
|
|
label={
|
|
|
<span className="flex items-center">
|
|
|
- <DataLock
|
|
|
- theme="outline"
|
|
|
- className="mr-1"
|
|
|
- className="flex items-baseline mr-1"
|
|
|
- />
|
|
|
+ <DataLock theme="outline" className="flex items-baseline mr-1" />
|
|
|
软件锁-公共锁库
|
|
|
</span>
|
|
|
}
|
|
@@ -237,7 +247,7 @@ const Product = () => {
|
|
|
name="showCloud"
|
|
|
label={<span className="flex items-center">云版管理</span>}
|
|
|
/>
|
|
|
- <div className={['ml-6', styles.laberContent].join(' ')}>
|
|
|
+ <div className={classNames('ml-6', styles.laberContent)}>
|
|
|
<ProFormDependency name={['showCloud']}>
|
|
|
{({ showCloud }) => (
|
|
|
<>
|
|
@@ -323,8 +333,7 @@ const Product = () => {
|
|
|
}
|
|
|
message.success('设置成功')
|
|
|
return true
|
|
|
- }}
|
|
|
- >
|
|
|
+ }}>
|
|
|
<FormItem name="access" label="客户模块可见" required>
|
|
|
<Radio.Group>
|
|
|
<Space direction="vertical">
|