Commit b55bcefc authored by 涂伟's avatar 涂伟

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

parent efe81f3d
Pipeline #94010 passed with stages
import React, { useEffect, useState } from 'react';
import { useHistory } from 'react-router-dom';
import { reloadFlows, removeFlowExtend } from '@/services/flow/flow';
import {
GetFlowNode,
} from '@/services/workflow/workflow';
import {
Tag,
Card,
......@@ -23,11 +26,13 @@ import {
OrderedListOutlined,
ControlOutlined,
EyeOutlined,
ToolTwoTone,
} from '@ant-design/icons';
import classnames from 'classnames';
import PageContainer from '@/components/BasePageContainer';
import ProcessConfig from './flowComponents/ProcessConfig';
import Order from './flowComponents/Order';
import OrderNode from './flowComponents/OrderNode';
import Timelimit from './flowComponents/Timelimit';
import styles from './flow.less';
......@@ -44,10 +49,13 @@ const Flow = () => {
const [hoverItemIndex, setHoverItemIndex] = useState(0); // hover流程索引
const [searchValue, setSearchValue] = useState('');
const [showSearchStyle, setShowSearchStyle] = useState(false); // 是否显示模糊查询样式
const [nodeData, setNodeData] = useState([]); // 流程节点数据
const [flowId, setFlowId] = useState(''); // 当前排序流程id
const [visible, setVisible] = useState({
processConfig: false,
order: false,
auxiliaryView: false,
orderNode: false,
}); // 弹窗显示
// 初始化
useEffect(() => {
......@@ -254,6 +262,12 @@ const Flow = () => {
style={{ fontSize: '16px', color: '#1890FF' }}
/>
</Tooltip>
<Tooltip title="节点排序">
<ToolTwoTone
onClick={() => getNodeData(record.ID,record)}
style={{ fontSize: '16px', color: '#1890FF' }}
/>
</Tooltip>
{/* <Tooltip title="清除流程配置">
<Popconfirm
title="是否清除该流程配置?"
......@@ -299,6 +313,19 @@ const Flow = () => {
}
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 (
<PageContainer>
<div className={styles.flowContainer}>
......@@ -426,6 +453,19 @@ const Flow = () => {
getProcessData();
}}
/>
{/* 节点排序弹窗 */}
<OrderNode
flowId={flowId}
visible={visible.orderNode}
tableData={nodeData}
processData={processData}
handleCancel={() => showModal('orderNode', false)}
submitCallBack={() => {
showModal('orderNode', false);
setDataSource('current');
getProcessData();
}}
/>
{/* 流程时限配置 */}
<Timelimit
visible={visible.auxiliaryView}
......
......@@ -65,6 +65,8 @@ const Order = props => {
};
// 拖拽回调函数
const dragCallBack = data => {
console.log(data,'datadatadatadata');
if (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 = [
{
key: '中国水务',
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 => {
const [showParmarModal, setShowParmarModal] = useState(false);
const [keepText, setKeepText] = useState([]);
const [keepValue, setKeepValue] = useState([]);
const [visibleAmap, setVisibleAmap]= useState();
const [visibleAmap, setVisibleAmap] = useState();
const [visibleChecked, setVisibleChecked] = useState(''); // 菜单开关
const [visibleChecked1, setVisibleChecked1] = useState(''); // SaaS样式开关
const [visibleChecked2, setVisibleChecked2] = useState(''); // Web4地图开关
......@@ -243,7 +243,7 @@ export default props => {
isCache: true,
changeStation: false,
OpenAnnouncement: false,
isGodFirst:true,
isGodFirst: true,
headerPrimaryColor: 'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)',
});
setVisibleAnn(false);
......@@ -320,7 +320,7 @@ export default props => {
// return;
// }
validate.topMenu = checkedList.toString();
validate.navTheme = visibleChecked ? 'light' : 'dark';
validate.navTheme = validate.primaryColor === '#009C74' ? 'chinaWater' : visibleChecked ? 'light' : 'dark';
validate.CloudStyle = visibleChecked1 ? '是' : '否';
validate.messageMarking = visibleChecked3 ? 'All' : 'One';
validate.menuState = visibleChecked5 ? 'open' : 'close';
......@@ -421,7 +421,7 @@ export default props => {
setVisibleAnn(e);
};
const changeAmapShow =(e) => {
const changeAmapShow = (e) => {
setVisibleAmap(e)
}
......@@ -800,12 +800,12 @@ export default props => {
)}
</Row>
<Form.Item label="高德地图" name="isGodFirst">
<Switch
checkedChildren="是"
unCheckedChildren="否"
checked={visibleAmap}
onChange={changeAmapShow}
/>
<Switch
checkedChildren="是"
unCheckedChildren="否"
checked={visibleAmap}
onChange={changeAmapShow}
/>
</Form.Item>
{/* <Form.Item label="菜单样式" name="menuState">
<Switch
......
......@@ -113,3 +113,7 @@ export const GetDeviceQRCodeConfig = (param) => get(`${PUBLISH_SERVICE}/WorkOrde
//新增或修改维保二维码配置
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(
request.url != '/PandaOMS/OMS/OMSLogin' &&
request.url != '/Publish/OMS/FileCenter/SaveMobileApk' &&
request.url != '/PandaOMS/OMS/HostManager/GetGateWay' &&
request.url != '/PandaOMS/OMS/IsOpenVerificationCodeValidation' &&
!request.url.includes('/PandaCore/GateWay/')
)
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