Commit aa36af8a authored by 邓超's avatar 邓超

fix: 流程中心功能优化

parent 79275726
Pipeline #66072 passed with stages
...@@ -32,13 +32,19 @@ const WorkflowHomePage = () => { ...@@ -32,13 +32,19 @@ const WorkflowHomePage = () => {
}); // 弹窗显示 }); // 弹窗显示
const [flag, setFlag] = useState(0); const [flag, setFlag] = useState(0);
const activeKey = useRef(null); const activeKey = useRef(null);
useEffect(() => {
getFlowList();
}, []);
useEffect(() => { useEffect(() => {
console.log(history.location.state, 'history.location.state'); console.log(history.location.state, 'history.location.state');
if (history.location.state) { if (history.location.state) {
activeKey.current = history.location.state.activeKey; activeKey.current = history.location.state.activeKey;
console.log(document.querySelector(`.${styles.flowTable}`));
setTimeout(() => {
document.querySelector(`.${styles.flowTable}`).scrollTop = history.location.state.scrollTop;
}, 0);
} }
getFlowList(); }, [flowList]);
}, []);
// 获取所有数据 // 获取所有数据
const getFlowList = () => { const getFlowList = () => {
WFGetAllFlow().then(res => { WFGetAllFlow().then(res => {
...@@ -141,7 +147,7 @@ const WorkflowHomePage = () => { ...@@ -141,7 +147,7 @@ const WorkflowHomePage = () => {
} }
}; };
const chooseNode = val => { const chooseNode = val => {
console.log(val, 'val'); let scroll = document.querySelector(`.${styles.flowTable}`).scrollTop;
GetFlowNode({ flowID: val.FlowID }).then(res => { GetFlowNode({ flowID: val.FlowID }).then(res => {
if (res.code === 0) { if (res.code === 0) {
res.data.Nodes.forEach(item => { res.data.Nodes.forEach(item => {
...@@ -150,6 +156,7 @@ const WorkflowHomePage = () => { ...@@ -150,6 +156,7 @@ const WorkflowHomePage = () => {
history.push({ history.push({
pathname: '/biz/workflow/flowBoard', pathname: '/biz/workflow/flowBoard',
state: { state: {
scrollTop: scroll,
flowData: { ...res.data, flowName: val.FlowName }, flowData: { ...res.data, flowName: val.FlowName },
flowID: val.FlowID, flowID: val.FlowID,
chartLoading: false, chartLoading: false,
...@@ -193,11 +200,11 @@ const WorkflowHomePage = () => { ...@@ -193,11 +200,11 @@ const WorkflowHomePage = () => {
const tabRender = (val, index) => ( const tabRender = (val, index) => (
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-around' }}> <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-around' }}>
{val.name}({val.count}) {val.name}({val.count})
{val.name === activeKey.current ? ( {/* {val.name === activeKey.current ? (
<EditOutlined onClick={() => eiditFlowGroup(val, index)} style={{ marginLeft: '5px' }} /> <EditOutlined onClick={() => eiditFlowGroup(val, index)} style={{ marginLeft: '5px' }} />
) : ( ) : (
'' ''
)} )} */}
</div> </div>
); );
return ( return (
...@@ -245,10 +252,12 @@ const WorkflowHomePage = () => { ...@@ -245,10 +252,12 @@ const WorkflowHomePage = () => {
<div className={styles.flowGroup} key={item.name}> <div className={styles.flowGroup} key={item.name}>
<div <div
className={styles.header} className={styles.header}
onClick={() => eiditFlowGroup(item, index)}
style={{ display: item.children.length > 0 ? 'flex' : 'none' }} style={{ display: item.children.length > 0 ? 'flex' : 'none' }}
> >
<div className={styles.line} /> <div className={styles.line} />
<div className={styles.name}>{item.name}</div> <div className={styles.name}>{item.name}</div>
<EditOutlined style={{ marginLeft: '5px' }} />
</div> </div>
<div className={styles.groupBox}> <div className={styles.groupBox}>
{item.children.map(ele => ( {item.children.map(ele => (
...@@ -289,7 +298,7 @@ const WorkflowHomePage = () => { ...@@ -289,7 +298,7 @@ const WorkflowHomePage = () => {
/> />
</div> </div>
<div className={styles.bottom}> <div className={styles.bottom}>
<div className={styles.left}>拥有者:{ele.CreateUser || '--'}</div> <div className={styles.left}>{ele.CreateUser || ''}</div>
<div className={styles.right}>更新于{ele.UpdateTime || '--'}</div> <div className={styles.right}>更新于{ele.UpdateTime || '--'}</div>
</div> </div>
</div> </div>
......
...@@ -141,6 +141,7 @@ ...@@ -141,6 +141,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
height: 45px; height: 45px;
cursor: pointer;
.line { .line {
width: 3px; width: 3px;
......
...@@ -8,7 +8,7 @@ const FlowBoard = () => { ...@@ -8,7 +8,7 @@ const FlowBoard = () => {
const history = useHistory(); const history = useHistory();
useEffect(() => {}, []); useEffect(() => {}, []);
const { flowData, flowID, chartLoading, activeKey, flowTree } = history.location.state; const { flowData, flowID, chartLoading, activeKey, flowTree, scrollTop } = history.location.state;
return ( return (
<div className={styles.flowChartContainer}> <div className={styles.flowChartContainer}>
<FlowChart <FlowChart
...@@ -17,6 +17,7 @@ const FlowBoard = () => { ...@@ -17,6 +17,7 @@ const FlowBoard = () => {
chartLoading={chartLoading} chartLoading={chartLoading}
activeKey={activeKey} activeKey={activeKey}
flowTree={flowTree} flowTree={flowTree}
scrollTop={scrollTop}
/> />
</div> </div>
); );
......
...@@ -37,7 +37,16 @@ let myOverview = null; ...@@ -37,7 +37,16 @@ let myOverview = null;
const FlowChart = props => { const FlowChart = props => {
const history = useHistory(); const history = useHistory();
const { flowData, flowID, chartLoading, msg, treeVisible, activeKey, flowTree } = props; const {
flowData,
flowID,
chartLoading,
msg,
treeVisible,
activeKey,
flowTree,
scrollTop,
} = props;
const [visible, setVisible] = useState(false); const [visible, setVisible] = useState(false);
const [lineVisible, setLineVisible] = useState(false); const [lineVisible, setLineVisible] = useState(false);
const [editMsg, setEditMsg] = useState({}); // 编辑节点的信息 const [editMsg, setEditMsg] = useState({}); // 编辑节点的信息
...@@ -955,68 +964,6 @@ const FlowChart = props => { ...@@ -955,68 +964,6 @@ const FlowChart = props => {
'fasdfsad', 'fasdfsad',
); );
}; };
// 节点配置回调
// const nodeCallBack = obj => {
// let nameIsRepeat;
// let { nodes } = diagram;
// let keyArr = [];
// // 遍历输出节点对象
// nodes.each(node => {
// keyArr = [...keyArr, Number(node.data.key)];
// if (obj.NodeName === node.data.NodeName) {
// nameIsRepeat = true;
// if (modalType === 'edit' && obj.NodeName === editMsg.NodeName) {
// nameIsRepeat = false;
// }
// }
// });
// if (nameIsRepeat) {
// notification.error({
// message: '提示',
// duration: 3,
// description: '节点名称不能重复',
// });
// return;
// }
// // 编辑节点
// let nodeData = diagram.model.findNodeDataForKey(nodeKey);
// const {
// NodeName,
// NodeType,
// roleList,
// SerialNo,
// aheadHandle,
// NodeHandling,
// nodeDetail,
// RuleList,
// CarbonCopyPeopleList,
// SubFlowInfo,
// } = obj;
// nodeData.NodeName = NodeName;
// nodeData.NodeType = NodeType;
// nodeData.NodeId = nodeKey;
// nodeData.roleList = roleList;
// nodeData.SerialNo = SerialNo;
// nodeData.aheadHandle = aheadHandle;
// nodeData.NodeHandling = NodeHandling;
// nodeData.nodeDetail = nodeDetail;
// nodeData.RuleList = RuleList;
// nodeData.CarbonCopyPeopleList = CarbonCopyPeopleList;
// nodeData.SubFlowInfo = SubFlowInfo;
// diagram.model.updateTargetBindings(nodeData);
// // 给线上添加文字
// let diagramObj = JSON.parse(diagram.model.toJson());
// console.log(diagramObj.linkDataArray, 'diagramObj.linkDataArray');
// diagramObj.linkDataArray.forEach(item => {
// let node = diagram.model.findLinkDataForKey(item.LineKey);
// node.text = item.RuleName;
// diagram.model.updateTargetBindings(node);
// });
// // 关闭时进行数据比对看数据是否改变
// leaveTip();
// // setVisible(false);
// };
const nodeCallBack = () => { const nodeCallBack = () => {
SaveWorkFlowImage({ SaveWorkFlowImage({
flowName: flowData.flowName, flowName: flowData.flowName,
...@@ -1028,6 +975,7 @@ const FlowChart = props => { ...@@ -1028,6 +975,7 @@ const FlowChart = props => {
if (response.code === 0) { if (response.code === 0) {
FlowNodeSave({ FlowNodeSave({
PreviewImage: response.data, PreviewImage: response.data,
CreateUser: sessionStorage.getItem('userName'),
flowID, flowID,
...currentNode.current, ...currentNode.current,
CarbonCopyPeopleList: currentNode.current.CarbonCopyPeopleList.map(item => CarbonCopyPeopleList: currentNode.current.CarbonCopyPeopleList.map(item =>
...@@ -1089,11 +1037,7 @@ const FlowChart = props => { ...@@ -1089,11 +1037,7 @@ const FlowChart = props => {
setCurrentFlowData(JSON.parse(JSON.stringify(res.data))); setCurrentFlowData(JSON.parse(JSON.stringify(res.data)));
} else { } else {
notification.error({ message.error(res.msg);
title: '提示',
duration: 3,
description: res.msg,
});
} }
}); });
}; };
...@@ -1146,7 +1090,6 @@ const FlowChart = props => { ...@@ -1146,7 +1090,6 @@ const FlowChart = props => {
// return; // return;
// } // }
let list = new Set([]); let list = new Set([]);
console.log(list, '11111');
diagramObj.nodeDataArray.forEach(item => { diagramObj.nodeDataArray.forEach(item => {
if ((item.NodeType === '20' || item.NodeType === '21') && item.RuleList) { if ((item.NodeType === '20' || item.NodeType === '21') && item.RuleList) {
...@@ -1173,7 +1116,6 @@ const FlowChart = props => { ...@@ -1173,7 +1116,6 @@ const FlowChart = props => {
} }
item.CarbonCopyPeopleList = item.CarbonCopyPeopleList.map(ele => Number(ele.value)); item.CarbonCopyPeopleList = item.CarbonCopyPeopleList.map(ele => Number(ele.value));
}); });
console.log(list, '222');
if ([...list].length > 0) { if ([...list].length > 0) {
list.forEach(item => { list.forEach(item => {
message.error(`请检查${item}规则配置`); message.error(`请检查${item}规则配置`);
...@@ -1192,6 +1134,7 @@ const FlowChart = props => { ...@@ -1192,6 +1134,7 @@ const FlowChart = props => {
SaveNodeChange({ SaveNodeChange({
FlowId: flowID, FlowId: flowID,
// DeleteNodes, // DeleteNodes,
CreateUser: sessionStorage.getItem('userName'),
PreviewImage: val.data, PreviewImage: val.data,
DeleteLines, DeleteLines,
Lines: diagramObj.linkDataArray, Lines: diagramObj.linkDataArray,
...@@ -1206,26 +1149,14 @@ const FlowChart = props => { ...@@ -1206,26 +1149,14 @@ const FlowChart = props => {
setDeleteNode(''); setDeleteNode('');
setDeleteLine(''); setDeleteLine('');
getFlowData(); getFlowData();
notification.success({ message.success('保存成功');
message: '提示',
duration: 3,
description: '保存成功',
});
} else { } else {
notification.error({ message.error(res.msg);
message: '提示',
duration: 8,
description: res.msg,
});
} }
}) })
.catch(() => { .catch(() => {
setButtonLoading(false); setButtonLoading(false);
notification.error({ message.error('网络异常请稍后重试');
message: '提示',
duration: 3,
description: '网络异常请稍后重试',
});
}); });
} }
}); });
...@@ -1301,6 +1232,7 @@ const FlowChart = props => { ...@@ -1301,6 +1232,7 @@ const FlowChart = props => {
pathname: '/biz/workflow/center', pathname: '/biz/workflow/center',
state: { state: {
activeKey, activeKey,
scrollTop,
}, },
}) })
} }
......
...@@ -31,9 +31,9 @@ const FlowModal = props => { ...@@ -31,9 +31,9 @@ const FlowModal = props => {
if (validate) { if (validate) {
let obj = {}; let obj = {};
if (modalType === 'add') { if (modalType === 'add') {
obj = { ...validate, CreateUser: sessionStorage.getItem('userType') }; obj = { ...validate, CreateUser: sessionStorage.getItem('userName') };
} else { } else {
obj = { ...validate, flowID: msg.FlowID }; obj = { ...validate, CreateUser: sessionStorage.getItem('userName'), flowID: msg.FlowID };
} }
CreateFlow(obj) CreateFlow(obj)
.then(res => { .then(res => {
......
...@@ -72,6 +72,10 @@ ...@@ -72,6 +72,10 @@
} }
} }
.ant-form label {
width: 100%;
}
.titleBox { .titleBox {
color: #BCBCBC; color: #BCBCBC;
font-size: 14px; font-size: 14px;
......
...@@ -48,6 +48,10 @@ const ConfigNodeMsg = (props, ref) => { ...@@ -48,6 +48,10 @@ const ConfigNodeMsg = (props, ref) => {
aheadHandle: aheadHandle || aheadHandle === 0 ? aheadHandle : 1, aheadHandle: aheadHandle || aheadHandle === 0 ? aheadHandle : 1,
NodeHandling: NodeHandling || NodeHandling === 0 ? NodeHandling : 1, NodeHandling: NodeHandling || NodeHandling === 0 ? NodeHandling : 1,
}); });
setNodeMsg(editMsg);
if (!editMsg.TableName) {
return;
}
loadEventFields({ eventTableName: editMsg.TableName }).then(res => { loadEventFields({ eventTableName: editMsg.TableName }).then(res => {
if (res.code === 0) { if (res.code === 0) {
let initList = []; let initList = [];
...@@ -63,7 +67,6 @@ const ConfigNodeMsg = (props, ref) => { ...@@ -63,7 +67,6 @@ const ConfigNodeMsg = (props, ref) => {
setFiledList(initList); setFiledList(initList);
} }
}); });
setNodeMsg(editMsg);
}; };
// 获取表名 // 获取表名
const getTableName = () => { const getTableName = () => {
...@@ -277,16 +280,6 @@ const ConfigNodeMsg = (props, ref) => { ...@@ -277,16 +280,6 @@ const ConfigNodeMsg = (props, ref) => {
</Form.Item> */} </Form.Item> */}
{/* 第一次填写显示,如果是网关、子节点一直显示 */} {/* 第一次填写显示,如果是网关、子节点一直显示 */}
<Form.Item <Form.Item
// style={{
// display:
// !editMsg.ActivityId ||
// nodeMsg.NodeType === '20' ||
// nodeMsg.NodeType === '21' ||
// nodeMsg.NodeType === '22' ||
// nodeMsg.NodeType === '30'
// ? 'flex'
// : 'none',
// }}
label={`${ label={`${
nodeMsg.NodeType === '20' || nodeMsg.NodeType === '21' || nodeMsg.NodeType === '22' nodeMsg.NodeType === '20' || nodeMsg.NodeType === '21' || nodeMsg.NodeType === '22'
? '网关' ? '网关'
...@@ -342,22 +335,58 @@ const ConfigNodeMsg = (props, ref) => { ...@@ -342,22 +335,58 @@ const ConfigNodeMsg = (props, ref) => {
</Form.Item> </Form.Item>
<Form.Item label="移交方式" name="Handover"> <Form.Item label="移交方式" name="Handover">
<Radio.Group> <Radio.Group>
<Radio value="移交选择人">移交选择人</Radio> <Radio value="移交选择人">
<Radio value="自处理" style={{ display: editMsg.NodeType === '1' ? 'none' : 'flex' }}> <div style={{ display: 'flex', alignItems: 'center' }}>
自处理 移交选择人
<Tooltip title="根据人员选择面板,自主选择移交的人员">
<InfoCircleOutlined style={{ color: '#1890ff', marginLeft: '3px' }} />
</Tooltip>
</div>
</Radio>
<Radio
value="自处理"
style={{
display: editMsg.NodeType === '1' ? 'none' : 'flex',
}}
>
<div style={{ display: 'flex', alignItems: 'center' }}>
自处理
<Tooltip title="下一个节点,默认由自己继续办理">
<InfoCircleOutlined style={{ color: '#1890ff', marginLeft: '3px' }} />
</Tooltip>
</div>
</Radio>
<Radio value="移交默认人">
<div style={{ display: 'flex', alignItems: 'center' }}>
移交默认人
<Tooltip title="自动移交给权限配置中的默认承办人">
<InfoCircleOutlined style={{ color: '#1890ff', marginLeft: '3px' }} />
</Tooltip>
</div>
</Radio> </Radio>
<Radio value="移交默认人">移交默认人</Radio>
<Radio <Radio
value="移交发起人" value="移交发起人"
style={{ display: editMsg.NodeType === '1' ? 'none' : 'flex' }} style={{ display: editMsg.NodeType === '1' ? 'none' : 'flex' }}
> >
移交发起人 <div style={{ display: 'flex', alignItems: 'center' }}>
移交发起人
<Tooltip title="自动移交给流程发起人">
<InfoCircleOutlined style={{ color: '#1890ff', marginLeft: '3px' }} />
</Tooltip>
</div>
</Radio>
<Radio value="跨站移交">
<div style={{ display: 'flex', alignItems: 'center' }}>
跨站移交
<Tooltip title="人员选择面板,会忽略当前处理站点,展示配置权限所有人员">
<InfoCircleOutlined style={{ color: '#1890ff', marginLeft: '3px' }} />
</Tooltip>
</div>
</Radio> </Radio>
<Radio value="跨站移交">跨站移交</Radio>
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>
<Form.Item label="工单主表" name="TableName"> <Form.Item label="节点表名" name="TableName">
<Select placeholder="请选择工单主表" onChange={changTable} showSearch> <Select placeholder="请选择节点表名" onChange={changTable} showSearch>
{eventTable.map(item => ( {eventTable.map(item => (
<Option value={item.Name} key={item.Name}> <Option value={item.Name} key={item.Name}>
{item.Name} {item.Name}
...@@ -365,35 +394,42 @@ const ConfigNodeMsg = (props, ref) => { ...@@ -365,35 +394,42 @@ const ConfigNodeMsg = (props, ref) => {
))} ))}
</Select> </Select>
</Form.Item> </Form.Item>
<Tooltip title={form.getFieldValue('Fields')}>
<Form.Item <Form.Item
label={ label={
<div className={styles.formData_label}> <div className={styles.formData_label}>
{form.getFieldValue('OutFields') ? ( {form.getFieldValue('OutFields') ? (
<Tooltip title={`外部字段${form.getFieldValue('OutFields')}个`}> <Tooltip title={`外部字段${form.getFieldValue('OutFields')}个`}>
<InfoCircleOutlined style={{ color: 'red', padding: '0.2rem 0.2rem 0 0' }} /> <InfoCircleOutlined style={{ color: 'red', padding: '0.2rem 0.2rem 0 0' }} />
</Tooltip> </Tooltip>
) : ( ) : (
'' ''
)} )}
<span>字段编辑</span> <span>字段编辑</span>
</div> </div>
} }
> >
<div className={styles.filedListItem}> <div className={styles.filedListItem}>
<Tooltip title={form.getFieldValue('Fields')}>
<Form.Item name="Fields" style={{ marginBottom: 0, width: '100%' }}> <Form.Item name="Fields" style={{ marginBottom: 0, width: '100%' }}>
<Input placeholder="请选编辑字段" allowClear /> <Input
placeholder="请选编辑字段"
readOnly
onClick={() => {
deployField('Fields');
}}
/>
</Form.Item> </Form.Item>
<Button </Tooltip>
type="dashed" <Button
icon={<PlusOutlined />} style={{ margin: 0, borderLeft: 0 }}
onClick={() => { icon={<PlusOutlined />}
deployField('Fields'); onClick={() => {
}} deployField('Fields');
/> }}
</div> />
</Form.Item> </div>
</Tooltip> </Form.Item>
{/* <Form.Item label="前端视图" name="WebPage"> {/* <Form.Item label="前端视图" name="WebPage">
<Input placeholder="请配置前端视图" /> <Input placeholder="请配置前端视图" />
...@@ -423,9 +459,9 @@ const ConfigNodeMsg = (props, ref) => { ...@@ -423,9 +459,9 @@ const ConfigNodeMsg = (props, ref) => {
> >
<Form.Item label="办理方式" name="NodeHandling"> <Form.Item label="办理方式" name="NodeHandling">
<Select> <Select>
<Option value={1}>多人接收,一人办理(抢占模式</Option> <Option value={1}>多人接收,一人办理(抢占)</Option>
<Option value={0}>多人接收,多人办理(会签模式</Option> <Option value={0}>多人接收,多人办理(会签)</Option>
<Option value={2}>一人接收,一人办理</Option> <Option value={2}>一人接收,一人办理(独占)</Option>
</Select> </Select>
</Form.Item> </Form.Item>
</div> </div>
......
...@@ -47,6 +47,9 @@ const ConfigOperate = (props, ref) => { ...@@ -47,6 +47,9 @@ const ConfigOperate = (props, ref) => {
}; };
// 加载修改流程节点配置允许退回列表 // 加载修改流程节点配置允许退回列表
const rollBackNodes = () => { const rollBackNodes = () => {
if (!editMsg.ActivityId) {
return;
}
loadRollbackNodes({ flowNodeId: editMsg.ActivityId }).then(res => { loadRollbackNodes({ flowNodeId: editMsg.ActivityId }).then(res => {
if (res.code === 0) { if (res.code === 0) {
setBackNodes(res.data); setBackNodes(res.data);
...@@ -118,9 +121,9 @@ const ConfigOperate = (props, ref) => { ...@@ -118,9 +121,9 @@ const ConfigOperate = (props, ref) => {
style={{ marginBottom: '0', padding: '2px', borderBottom: '1px solid #ccc' }} style={{ marginBottom: '0', padding: '2px', borderBottom: '1px solid #ccc' }}
label={ label={
<div style={{ display: 'flex', alignItems: 'center' }}> <div style={{ display: 'flex', alignItems: 'center' }}>
<Tooltip title="开始节点不允许转办"> {/* <Tooltip title="开始节点不允许转办">
<InfoCircleOutlined style={{ color: '#1890ff', marginRight: '3px' }} /> <InfoCircleOutlined style={{ color: '#1890ff', marginRight: '3px' }} />
</Tooltip> </Tooltip> */}
<span>转办</span> <span>转办</span>
</div> </div>
} }
...@@ -146,9 +149,9 @@ const ConfigOperate = (props, ref) => { ...@@ -146,9 +149,9 @@ const ConfigOperate = (props, ref) => {
valuePropName="checked" valuePropName="checked"
label={ label={
<div style={{ display: 'flex', alignItems: 'center' }}> <div style={{ display: 'flex', alignItems: 'center' }}>
<Tooltip title="开始节点和结束节点不可配置中途关单"> {/* <Tooltip title="开始节点和结束节点不可配置中途关单">
<InfoCircleOutlined style={{ color: '#1890ff', marginRight: '3px' }} /> <InfoCircleOutlined style={{ color: '#1890ff', marginRight: '3px' }} />
</Tooltip> </Tooltip> */}
<span>中途关单</span> <span>中途关单</span>
</div> </div>
} }
......
...@@ -39,7 +39,7 @@ const Login = props => { ...@@ -39,7 +39,7 @@ const Login = props => {
const { msg } = result; const { msg } = result;
if (result.data && result.data.pass) { if (result.data && result.data.pass) {
const { userMode, token } = result.data; const { userMode, token, userName } = result.data;
console.log(token); console.log(token);
localStorage.setItem('token', token?.access_token || ''); localStorage.setItem('token', token?.access_token || '');
updateDicName(); updateDicName();
...@@ -50,6 +50,7 @@ const Login = props => { ...@@ -50,6 +50,7 @@ const Login = props => {
setAuthority(authority); setAuthority(authority);
setAuth(authority); setAuth(authority);
sessionStorage.setItem('userType', AUTHORITY[userMode]); sessionStorage.setItem('userType', AUTHORITY[userMode]);
sessionStorage.setItem('userName', userName);
if (userMode === USER_MODE.SUPER) { if (userMode === USER_MODE.SUPER) {
history.push(`/solution`); history.push(`/solution`);
} else { } else {
......
...@@ -258,6 +258,18 @@ const UserManage = () => { ...@@ -258,6 +258,18 @@ const UserManage = () => {
align: 'center', align: 'center',
render: record => ( render: record => (
<Space size="middle"> <Space size="middle">
<Tooltip title="关联权限">
<IdcardOutlined
onClick={() => relateRole(record)}
style={{ fontSize: '16px', color: '#1890FF' }}
/>
</Tooltip>
<Tooltip title="更改机构">
<ApartmentOutlined
onClick={() => changeOrg(record)}
style={{ fontSize: '16px', color: '#1890FF' }}
/>
</Tooltip>
<Tooltip title="设置为主管"> <Tooltip title="设置为主管">
<Popconfirm <Popconfirm
placement="bottomRight" placement="bottomRight"
...@@ -290,18 +302,6 @@ const UserManage = () => { ...@@ -290,18 +302,6 @@ const UserManage = () => {
/> />
</Popconfirm> </Popconfirm>
</Tooltip> </Tooltip>
<Tooltip title="关联权限">
<IdcardOutlined
onClick={() => relateRole(record)}
style={{ fontSize: '16px', color: '#1890FF' }}
/>
</Tooltip>
<Tooltip title="更改机构">
<ApartmentOutlined
onClick={() => changeOrg(record)}
style={{ fontSize: '16px', color: '#1890FF' }}
/>
</Tooltip>
{/* <Tooltip title="修改密码"> {/* <Tooltip title="修改密码">
<UnlockOutlined <UnlockOutlined
onClick={() => changePassword(record)} onClick={() => changePassword(record)}
...@@ -314,7 +314,7 @@ const UserManage = () => { ...@@ -314,7 +314,7 @@ const UserManage = () => {
{(record.state == 0 || record.state == null) && ( {(record.state == 0 || record.state == null) && (
<> <>
{record.loginName == 'panda' || record.loginName == 'admin' ? ( {record.loginName == 'panda' || record.loginName == 'admin' ? (
<StopOutlined style={{ fontSize: '16px' }} /> <StopOutlined style={{ fontSize: '16px', color: '#1890ff' }} disabled />
) : ( ) : (
<Tooltip title="冻结用户"> <Tooltip title="冻结用户">
<Popconfirm <Popconfirm
...@@ -388,7 +388,7 @@ const UserManage = () => { ...@@ -388,7 +388,7 @@ const UserManage = () => {
</Popconfirm> </Popconfirm>
</Tooltip> */} </Tooltip> */}
{record.loginName == 'panda' || record.loginName == 'admin' ? ( {record.loginName == 'panda' || record.loginName == 'admin' ? (
<DeleteOutlined style={{ fontSize: '16px' }} /> <DeleteOutlined style={{ fontSize: '16px', color: '#e86060' }} disabled />
) : ( ) : (
<Popconfirm <Popconfirm
placement="bottomRight" placement="bottomRight"
...@@ -1600,7 +1600,6 @@ const UserManage = () => { ...@@ -1600,7 +1600,6 @@ const UserManage = () => {
}} }}
/> />
</Tooltip> </Tooltip>
</div> </div>
<hr style={{ width: '95%', color: '#eeecec', marginLeft: '15px' }} /> <hr style={{ width: '95%', color: '#eeecec', marginLeft: '15px' }} />
{treeData.length > 0 && ( {treeData.length > 0 && (
...@@ -1745,7 +1744,7 @@ const UserManage = () => { ...@@ -1745,7 +1744,7 @@ const UserManage = () => {
updateTrees={updateTrees} updateTrees={updateTrees}
onCancel={() => setDeleteOrgVisible(false)} onCancel={() => setDeleteOrgVisible(false)}
/> />
{/* 关联角色 */} {/* 关联角色 */}
<RelateRoleModal <RelateRoleModal
currentUser={currentUser} currentUser={currentUser}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment