Commit b55bcefc authored by 涂伟's avatar 涂伟

feat: '1.流程审查新增流程节点排序功能2.验证码校验接口不走网关3.中国水务主题色定制化配置'

parent efe81f3d
Pipeline #94010 passed with stages
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { useHistory } from 'react-router-dom'; import { useHistory } from 'react-router-dom';
import { reloadFlows, removeFlowExtend } from '@/services/flow/flow'; import { reloadFlows, removeFlowExtend } from '@/services/flow/flow';
import {
GetFlowNode,
} from '@/services/workflow/workflow';
import { import {
Tag, Tag,
Card, Card,
...@@ -23,11 +26,13 @@ import { ...@@ -23,11 +26,13 @@ import {
OrderedListOutlined, OrderedListOutlined,
ControlOutlined, ControlOutlined,
EyeOutlined, EyeOutlined,
ToolTwoTone,
} from '@ant-design/icons'; } from '@ant-design/icons';
import classnames from 'classnames'; import classnames from 'classnames';
import PageContainer from '@/components/BasePageContainer'; import PageContainer from '@/components/BasePageContainer';
import ProcessConfig from './flowComponents/ProcessConfig'; import ProcessConfig from './flowComponents/ProcessConfig';
import Order from './flowComponents/Order'; import Order from './flowComponents/Order';
import OrderNode from './flowComponents/OrderNode';
import Timelimit from './flowComponents/Timelimit'; import Timelimit from './flowComponents/Timelimit';
import styles from './flow.less'; import styles from './flow.less';
...@@ -44,10 +49,13 @@ const Flow = () => { ...@@ -44,10 +49,13 @@ const Flow = () => {
const [hoverItemIndex, setHoverItemIndex] = useState(0); // hover流程索引 const [hoverItemIndex, setHoverItemIndex] = useState(0); // hover流程索引
const [searchValue, setSearchValue] = useState(''); const [searchValue, setSearchValue] = useState('');
const [showSearchStyle, setShowSearchStyle] = useState(false); // 是否显示模糊查询样式 const [showSearchStyle, setShowSearchStyle] = useState(false); // 是否显示模糊查询样式
const [nodeData, setNodeData] = useState([]); // 流程节点数据
const [flowId, setFlowId] = useState(''); // 当前排序流程id
const [visible, setVisible] = useState({ const [visible, setVisible] = useState({
processConfig: false, processConfig: false,
order: false, order: false,
auxiliaryView: false, auxiliaryView: false,
orderNode: false,
}); // 弹窗显示 }); // 弹窗显示
// 初始化 // 初始化
useEffect(() => { useEffect(() => {
...@@ -254,6 +262,12 @@ const Flow = () => { ...@@ -254,6 +262,12 @@ const Flow = () => {
style={{ fontSize: '16px', color: '#1890FF' }} style={{ fontSize: '16px', color: '#1890FF' }}
/> />
</Tooltip> </Tooltip>
<Tooltip title="节点排序">
<ToolTwoTone
onClick={() => getNodeData(record.ID,record)}
style={{ fontSize: '16px', color: '#1890FF' }}
/>
</Tooltip>
{/* <Tooltip title="清除流程配置"> {/* <Tooltip title="清除流程配置">
<Popconfirm <Popconfirm
title="是否清除该流程配置?" title="是否清除该流程配置?"
...@@ -299,6 +313,19 @@ const Flow = () => { ...@@ -299,6 +313,19 @@ const Flow = () => {
} }
return <div dangerouslySetInnerHTML={{ __html: n }} />; return <div dangerouslySetInnerHTML={{ __html: n }} />;
}; };
// 获取表单回显
const getNodeData = (id,record) => {
GetFlowNode({ flowID: id }).then(res => {
if (res.code === 0) {
setFlowId(id);
setNodeData(res.data.Nodes.map((item,index) => {return {...item,order: index + 1}}))
showModal('orderNode', true)
} else {
setNodeData([])
setFlowId('')
}
});
};
return ( return (
<PageContainer> <PageContainer>
<div className={styles.flowContainer}> <div className={styles.flowContainer}>
...@@ -426,6 +453,19 @@ const Flow = () => { ...@@ -426,6 +453,19 @@ const Flow = () => {
getProcessData(); getProcessData();
}} }}
/> />
{/* 节点排序弹窗 */}
<OrderNode
flowId={flowId}
visible={visible.orderNode}
tableData={nodeData}
processData={processData}
handleCancel={() => showModal('orderNode', false)}
submitCallBack={() => {
showModal('orderNode', false);
setDataSource('current');
getProcessData();
}}
/>
{/* 流程时限配置 */} {/* 流程时限配置 */}
<Timelimit <Timelimit
visible={visible.auxiliaryView} visible={visible.auxiliaryView}
......
...@@ -65,6 +65,8 @@ const Order = props => { ...@@ -65,6 +65,8 @@ const Order = props => {
}; };
// 拖拽回调函数 // 拖拽回调函数
const dragCallBack = data => { const dragCallBack = data => {
console.log(data,'datadatadatadata');
if (data) { if (data) {
setOrderTable(data); setOrderTable(data);
} }
......
/*
* @Description:
* @Author: leizhe
* @Date: 2022-01-13 17:26:13
* @LastEditTime: 2022-03-31 17:37:35
* @LastEditors: leizhe
*/
import React, { useState, useEffect } from 'react';
import { flowReOrder, UpdateFlowNodeOrder } from '@/services/flow/flow';
import { Modal, notification } from 'antd';
import DragTable from '@/components/DragTable/DragTable';
import {
getFlowNode,
} from '@/services/flow/flow';
const OrderNode = props => {
const { visible, handleCancel, tableData, submitCallBack, processData, flowId } = props;
const [orderTable, setOrderTable] = useState([]);
const [activityIds, setActivityIds] = useState('');
// 页面弹出的时候初始化拖拽数据
useEffect(() => {
if (visible) {
console.log(tableData,'tableDatatableData');
// console.log(processData);
// let aa = [];
// processData.map(i => {
// i.root.map(j => {
// aa.push(j);
// });
// });
setOrderTable(tableData);
// setOrderTable(() => {
// let table;
// table = tableData.filter(item => item.extendID !== -1);
// return table;
// });
}
}, [visible]);
// 根据orderTable值改变flowIDs
useEffect(() => {
let ids = '';
orderTable.forEach((item, index) => {
if (index === orderTable.length - 1) {
ids += `${item.ActivityId}`;
} else {
ids += `${item.ActivityId},`;
}
});
console.log(ids,'idsidsidsidsidsids');
setActivityIds(ids);
}, [orderTable]);
// 提交表单
const onSubmit = () => {
UpdateFlowNodeOrder({ flowId: flowId, activityIds }).then(res => {
if (res.code === 0) {
notification.success({
message: '提示',
duration: 3,
description: '保存成功',
});
submitCallBack();
} else {
notification.error({
message: '提示',
duration: 3,
description: res.msg,
});
}
});
};
// 拖拽回调函数
const dragCallBack = data => {
console.log(data,'datadatadatadata');
if (data) {
setOrderTable(data);
}
};
const columns = [
{
title: '序号',
dataIndex: 'order',
width: 50,
key: 'order',
},
{
title: '节点名称',
dataIndex: 'NodeName',
width: 150,
key: 'NodeName',
},
{
title: '节点别名',
dataIndex: 'NodeAliasName',
width: 150,
key: 'NodeAliasName',
},
];
return (
<Modal
title="调整节点顺序"
width="600px"
visible={visible}
onOk={onSubmit}
onCancel={handleCancel}
maskClosable={false}
destroyOnClose
>
<div style={{ minHeight: '200px' }}>
<DragTable
bordered
style={{ marginBottom: '10px' }}
rowKey={record => record.extendID}
columns={columns}
dataSource={orderTable}
// showHeader={false}
pagination={false}
size="small"
dragCallBack={dragCallBack}
ItemTypes="flowOrder"
scroll={{
y: 500,
}}
/>
</div>
</Modal>
);
};
export default OrderNode;
...@@ -57,7 +57,7 @@ const colorList = [ ...@@ -57,7 +57,7 @@ const colorList = [
{ {
key: '中国水务', key: '中国水务',
color: '#009C74', color: '#009C74',
headerColor: 'linear-gradient(0deg, #048373 0%, #024AE9D 100%)', headerColor: 'linear-gradient(0deg, #048373 0%, #24AE9D 100%)',
}, },
]; ];
...@@ -90,7 +90,7 @@ export default props => { ...@@ -90,7 +90,7 @@ export default props => {
const [showParmarModal, setShowParmarModal] = useState(false); const [showParmarModal, setShowParmarModal] = useState(false);
const [keepText, setKeepText] = useState([]); const [keepText, setKeepText] = useState([]);
const [keepValue, setKeepValue] = useState([]); const [keepValue, setKeepValue] = useState([]);
const [visibleAmap, setVisibleAmap]= useState(); const [visibleAmap, setVisibleAmap] = useState();
const [visibleChecked, setVisibleChecked] = useState(''); // 菜单开关 const [visibleChecked, setVisibleChecked] = useState(''); // 菜单开关
const [visibleChecked1, setVisibleChecked1] = useState(''); // SaaS样式开关 const [visibleChecked1, setVisibleChecked1] = useState(''); // SaaS样式开关
const [visibleChecked2, setVisibleChecked2] = useState(''); // Web4地图开关 const [visibleChecked2, setVisibleChecked2] = useState(''); // Web4地图开关
...@@ -243,7 +243,7 @@ export default props => { ...@@ -243,7 +243,7 @@ export default props => {
isCache: true, isCache: true,
changeStation: false, changeStation: false,
OpenAnnouncement: false, OpenAnnouncement: false,
isGodFirst:true, isGodFirst: true,
headerPrimaryColor: 'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)', headerPrimaryColor: 'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)',
}); });
setVisibleAnn(false); setVisibleAnn(false);
...@@ -320,7 +320,7 @@ export default props => { ...@@ -320,7 +320,7 @@ export default props => {
// return; // return;
// } // }
validate.topMenu = checkedList.toString(); validate.topMenu = checkedList.toString();
validate.navTheme = visibleChecked ? 'light' : 'dark'; validate.navTheme = validate.primaryColor === '#009C74' ? 'chinaWater' : visibleChecked ? 'light' : 'dark';
validate.CloudStyle = visibleChecked1 ? '是' : '否'; validate.CloudStyle = visibleChecked1 ? '是' : '否';
validate.messageMarking = visibleChecked3 ? 'All' : 'One'; validate.messageMarking = visibleChecked3 ? 'All' : 'One';
validate.menuState = visibleChecked5 ? 'open' : 'close'; validate.menuState = visibleChecked5 ? 'open' : 'close';
...@@ -421,7 +421,7 @@ export default props => { ...@@ -421,7 +421,7 @@ export default props => {
setVisibleAnn(e); setVisibleAnn(e);
}; };
const changeAmapShow =(e) => { const changeAmapShow = (e) => {
setVisibleAmap(e) setVisibleAmap(e)
} }
...@@ -800,12 +800,12 @@ export default props => { ...@@ -800,12 +800,12 @@ export default props => {
)} )}
</Row> </Row>
<Form.Item label="高德地图" name="isGodFirst"> <Form.Item label="高德地图" name="isGodFirst">
<Switch <Switch
checkedChildren="是" checkedChildren="是"
unCheckedChildren="否" unCheckedChildren="否"
checked={visibleAmap} checked={visibleAmap}
onChange={changeAmapShow} onChange={changeAmapShow}
/> />
</Form.Item> </Form.Item>
{/* <Form.Item label="菜单样式" name="menuState"> {/* <Form.Item label="菜单样式" name="menuState">
<Switch <Switch
......
...@@ -113,3 +113,7 @@ export const GetDeviceQRCodeConfig = (param) => get(`${PUBLISH_SERVICE}/WorkOrde ...@@ -113,3 +113,7 @@ export const GetDeviceQRCodeConfig = (param) => get(`${PUBLISH_SERVICE}/WorkOrde
//新增或修改维保二维码配置 //新增或修改维保二维码配置
export const EditOrAddDeviceQRCodeConfig = query => post(`${PUBLISH_SERVICE}/WorkOrderCenter/EditOrAddDeviceQRCodeConfig`, query); export const EditOrAddDeviceQRCodeConfig = query => post(`${PUBLISH_SERVICE}/WorkOrderCenter/EditOrAddDeviceQRCodeConfig`, query);
//修改流程节点顺序
export const UpdateFlowNodeOrder = query => get(`${PUBLISH_SERVICE}/WorkOrderCenter/UpdateFlowNodeOrder`, query);
...@@ -43,6 +43,7 @@ axios.interceptors.request.use( ...@@ -43,6 +43,7 @@ axios.interceptors.request.use(
request.url != '/PandaOMS/OMS/OMSLogin' && request.url != '/PandaOMS/OMS/OMSLogin' &&
request.url != '/Publish/OMS/FileCenter/SaveMobileApk' && request.url != '/Publish/OMS/FileCenter/SaveMobileApk' &&
request.url != '/PandaOMS/OMS/HostManager/GetGateWay' && request.url != '/PandaOMS/OMS/HostManager/GetGateWay' &&
request.url != '/PandaOMS/OMS/IsOpenVerificationCodeValidation' &&
!request.url.includes('/PandaCore/GateWay/') !request.url.includes('/PandaCore/GateWay/')
) )
request.url = getWay + request.url; request.url = getWay + request.url;
......
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