Commit fa02667d authored by 皮倩雯's avatar 皮倩雯

fix: '转办,暂存,中途关单,回退流程节点别名'

parent d0cdaa00
Pipeline #83384 failed with stages
...@@ -214,7 +214,6 @@ const FlowChart = props => { ...@@ -214,7 +214,6 @@ const FlowChart = props => {
currentNode.current = nodeData; currentNode.current = nodeData;
setNodeKey(nodeData.key); setNodeKey(nodeData.key);
setEditMsg(nodeData); setEditMsg(nodeData);
debugger;
setModalType('edit'); setModalType('edit');
setVisible(true); setVisible(true);
}); });
...@@ -1037,31 +1036,13 @@ const FlowChart = props => { ...@@ -1037,31 +1036,13 @@ const FlowChart = props => {
}), }),
1.2, // 压缩比例 1.2, // 压缩比例
base64 => { base64 => {
console.log(base64);
SaveWorkFlowImage({ SaveWorkFlowImage({
flowName: flowData.flowName, flowName: flowData.flowName,
base64Data: base64, base64Data: base64,
}).then(response => { }).then(response => {
if (response.code === 0) { if (response.code === 0) {
console.log(currentNode.current);
// let list = JSON.parse(JSON.stringify(currentNode.current));
// list.FlowNodeBackfillConfigs = jsonData(list.FlowNodeBackfillConfigs);
// currentNode.current = list;
let flowNodeBackfillConfigs = currentNode.current.FlowNodeBackfillConfigs; let flowNodeBackfillConfigs = currentNode.current.FlowNodeBackfillConfigs;
currentNode.current.FlowNodeBackfillConfigs = jsonData(flowNodeBackfillConfigs); currentNode.current.FlowNodeBackfillConfigs = jsonData(flowNodeBackfillConfigs);
let data = isJSON(currentNode.current.BtnAliasNameConfig);
// currentNode.current.BtnAliasNameConfig &&
// JSON.parse(currentNode.current.BtnAliasNameConfig.toString()).saveBtnAliasName;
if (currentNode.current.BtnAliasNameConfig) {
if (!data) {
let BtnAliasNameConfig = JSON.stringify({
saveBtnAliasName: currentNode.current.BtnAliasNameConfig,
});
currentNode.current.BtnAliasNameConfig = BtnAliasNameConfig;
}
} else {
currentNode.current.BtnAliasNameConfig = '';
}
FlowNodeSave({ FlowNodeSave({
PreviewImage: response.data, PreviewImage: response.data,
CreateUser: sessionStorage.getItem('userName'), CreateUser: sessionStorage.getItem('userName'),
...@@ -1213,10 +1194,51 @@ const FlowChart = props => { ...@@ -1213,10 +1194,51 @@ const FlowChart = props => {
const nodeChage = (key, value) => { const nodeChage = (key, value) => {
setShowLeaveTip(true); setShowLeaveTip(true);
let obj = JSON.parse(JSON.stringify(currentNode.current)); let obj = JSON.parse(JSON.stringify(currentNode.current));
if (key === 'saveBtnAliasName') {
let data = obj.BtnAliasNameConfig === '' ? {} : JSON.parse(obj.BtnAliasNameConfig);
data.saveBtnAliasName = value;
obj.BtnAliasNameConfig = JSON.stringify(data);
diagram.model.setDataProperty(
currentNode.current,
'BtnAliasNameConfig',
obj.BtnAliasNameConfig,
);
} else if (key === 'HalfwayCloseBtnAliasName') {
let data = obj.BtnAliasNameConfig === '' ? {} : JSON.parse(obj.BtnAliasNameConfig);
data.HalfwayCloseBtnAliasName = value;
obj.BtnAliasNameConfig = JSON.stringify(data);
diagram.model.setDataProperty(
currentNode.current,
'BtnAliasNameConfig',
obj.BtnAliasNameConfig,
);
// currentNode.current = obj;
} else if (key === 'TransferableBtnAliasName') {
let data = obj.BtnAliasNameConfig === '' ? {} : JSON.parse(obj.BtnAliasNameConfig);
data.TransferableBtnAliasName = value;
obj.BtnAliasNameConfig = JSON.stringify(data);
diagram.model.setDataProperty(
currentNode.current,
'BtnAliasNameConfig',
obj.BtnAliasNameConfig,
);
// currentNode.current = obj;
} else if (key === 'RollbackBtnAliasName') {
let data = obj.BtnAliasNameConfig === '' ? {} : JSON.parse(obj.BtnAliasNameConfig);
data.RollbackBtnAliasName = value;
obj.BtnAliasNameConfig = JSON.stringify(data);
diagram.model.setDataProperty(
currentNode.current,
'BtnAliasNameConfig',
obj.BtnAliasNameConfig,
);
// currentNode.current = obj;
} else {
diagram.model.setDataProperty(currentNode.current, key, value);
}
obj[key] = value; obj[key] = value;
const nodeDetail = JSON.stringify(obj); const nodeDetail = JSON.stringify(obj);
diagram.model.setDataProperty(currentNode.current, key, value);
if (key === 'roleList') { if (key === 'roleList') {
diagram.model.setDataProperty(currentNode.current, 'nodeDetail', nodeDetail); diagram.model.setDataProperty(currentNode.current, 'nodeDetail', nodeDetail);
} }
...@@ -1306,25 +1328,8 @@ const FlowChart = props => { ...@@ -1306,25 +1328,8 @@ const FlowChart = props => {
base64Data: base64, base64Data: base64,
}).then(val => { }).then(val => {
if (val.code === 0) { if (val.code === 0) {
console.log(diagramObj.nodeDataArray);
diagramObj.nodeDataArray.map(i => { diagramObj.nodeDataArray.map(i => {
i.FlowNodeBackfillConfigs = jsonData(i.FlowNodeBackfillConfigs); i.FlowNodeBackfillConfigs = jsonData(i.FlowNodeBackfillConfigs);
let data = isJSON(i.BtnAliasNameConfig);
console.log(data);
debugger;
// let data =
// i.BtnAliasNameConfig &&
// JSON.parse(i.BtnAliasNameConfig.toString()).saveBtnAliasName;
if (i.BtnAliasNameConfig) {
if (!data) {
let BtnAliasNameConfig = JSON.stringify({
saveBtnAliasName: i.BtnAliasNameConfig,
});
i.BtnAliasNameConfig = BtnAliasNameConfig;
}
} else {
i.BtnAliasNameConfig = '';
}
}); });
SaveNodeChange({ SaveNodeChange({
FlowId: flowID, FlowId: flowID,
...@@ -1358,6 +1363,7 @@ const FlowChart = props => { ...@@ -1358,6 +1363,7 @@ const FlowChart = props => {
}, },
); );
}; };
const treeChange = newValue => { const treeChange = newValue => {
setSelectValue(newValue); setSelectValue(newValue);
}; };
......
...@@ -24,15 +24,23 @@ const AddView = props => { ...@@ -24,15 +24,23 @@ const AddView = props => {
}, [visible]); }, [visible]);
// 获取表单回显 // 获取表单回显
const getFormData = () => { const getFormData = () => {
if (msg.WebPage === 'GisGatherProjectView' && msg.WebParam) {
if (!Array.isArray(msg.WebParam)) {
msg.WebParam = msg.WebParam?.split(',');
}
} else {
msg.WebParam = [];
}
form.setFieldsValue(msg); form.setFieldsValue(msg);
}; };
// 提交表单 // 提交表单
const onFinish = () => { const onFinish = () => {
form.validateFields().then(validate => { form.validateFields().then(validate => {
if (validate) { if (validate) {
if (validate.WebPage === 'GisGatherProjectView' && validate.WebParam) {
validate.WebParam = validate.WebParam.toString();
}
let obj = {}; let obj = {};
console.log(modalType);
if (modalType === 'add') { if (modalType === 'add') {
obj = validate; obj = validate;
} else { } else {
...@@ -118,7 +126,7 @@ const AddView = props => { ...@@ -118,7 +126,7 @@ const AddView = props => {
display: form.getFieldValue('WebPage') === 'GisGatherProjectView' ? 'flex' : 'none', display: form.getFieldValue('WebPage') === 'GisGatherProjectView' ? 'flex' : 'none',
}} }}
> >
<Select placeholder="选择视图参数" showSearch> <Select placeholder="选择视图参数" showSearch mode="multiple">
{['一键入库', 'edit'].map((item, index) => ( {['一键入库', 'edit'].map((item, index) => (
<Option key={index} value={item}> <Option key={index} value={item}>
{item} {item}
......
...@@ -21,14 +21,23 @@ const ConfigOperate = (props, ref) => { ...@@ -21,14 +21,23 @@ const ConfigOperate = (props, ref) => {
HalfwayClose, HalfwayClose,
} = editMsg; } = editMsg;
let newBtnAliasNameConfig; let newBtnAliasNameConfig;
let newHalfwayCloseBtnAliasName;
let newTransferableBtnAliasName;
let newRollbackBtnAliasName;
if (BtnAliasNameConfig) { if (BtnAliasNameConfig) {
newBtnAliasNameConfig = JSON.parse(BtnAliasNameConfig).saveBtnAliasName; newBtnAliasNameConfig = JSON.parse(BtnAliasNameConfig).saveBtnAliasName;
newHalfwayCloseBtnAliasName = JSON.parse(BtnAliasNameConfig).HalfwayCloseBtnAliasName;
newTransferableBtnAliasName = JSON.parse(BtnAliasNameConfig).TransferableBtnAliasName;
newRollbackBtnAliasName = JSON.parse(BtnAliasNameConfig).RollbackBtnAliasName;
} }
const obj = { const obj = {
Transferable: Transferable === 1, Transferable: Transferable === 1,
// EventsInformation: EventsInformation === 1, // EventsInformation: EventsInformation === 1,
// IsSendMessage: IsSendMessage === 1, // IsSendMessage: IsSendMessage === 1,
BtnAliasNameConfig: newBtnAliasNameConfig, saveBtnAliasName: newBtnAliasNameConfig,
HalfwayCloseBtnAliasName: newHalfwayCloseBtnAliasName,
TransferableBtnAliasName: newTransferableBtnAliasName,
RollbackBtnAliasName: newRollbackBtnAliasName,
IsSave: IsSave === 1, IsSave: IsSave === 1,
AutoClose: AutoClose === '是', AutoClose: AutoClose === '是',
HalfwayClose: HalfwayClose === 1, HalfwayClose: HalfwayClose === 1,
...@@ -84,10 +93,8 @@ const ConfigOperate = (props, ref) => { ...@@ -84,10 +93,8 @@ const ConfigOperate = (props, ref) => {
case 'HalfwayClose': case 'HalfwayClose':
value = changedFields[0].value ? 1 : 0; value = changedFields[0].value ? 1 : 0;
break; break;
default: default:
value = changedFields[0].value; value = changedFields[0].value;
break;
} }
nodeChage(changedFields[0].name[0], value); nodeChage(changedFields[0].name[0], value);
}; };
...@@ -123,7 +130,8 @@ const ConfigOperate = (props, ref) => { ...@@ -123,7 +130,8 @@ const ConfigOperate = (props, ref) => {
功能按钮配置 功能按钮配置
</div> </div>
<Form.Item <Form.Item
valuePropName="checked" labelCol={{ span: 5 }}
wrapperCol={{ span: 19 }}
style={{ style={{
marginBottom: '0', marginBottom: '0',
padding: '2px', padding: '2px',
...@@ -138,9 +146,24 @@ const ConfigOperate = (props, ref) => { ...@@ -138,9 +146,24 @@ const ConfigOperate = (props, ref) => {
<span>转办</span> <span>转办</span>
</div> </div>
} }
name="Transferable"
> >
<Switch disabled={editMsg.NodeType === '1'} checkedChildren="是" unCheckedChildren="否" /> <Row>
<Col span={18}>
<Form.Item name="TransferableBtnAliasName" style={{ marginBottom: '0' }}>
<Input placeholder="请输入转办按钮别名" style={{ width: '180px' }} />
</Form.Item>
</Col>
<Col span={6}>
<Form.Item name="Transferable" valuePropName="checked" style={{ marginBottom: '0' }}>
<Switch
disabled={editMsg.NodeType === '1'}
checkedChildren="是"
unCheckedChildren="否"
style={{ marginLeft: '12px' }}
/>
</Form.Item>
</Col>
</Row>
</Form.Item> </Form.Item>
{/* <Form.Item {/* <Form.Item
valuePropName="checked" valuePropName="checked"
...@@ -151,14 +174,14 @@ const ConfigOperate = (props, ref) => { ...@@ -151,14 +174,14 @@ const ConfigOperate = (props, ref) => {
<Switch checkedChildren="是" unCheckedChildren="否" /> <Switch checkedChildren="是" unCheckedChildren="否" />
</Form.Item> */} </Form.Item> */}
<Form.Item <Form.Item
labelCol={{ span: 4 }} labelCol={{ span: 5 }}
wrapperCol={{ span: 20 }} wrapperCol={{ span: 19 }}
style={{ marginBottom: '0', padding: '2px', borderBottom: '1px solid #ccc' }} style={{ marginBottom: '0', padding: '2px', borderBottom: '1px solid #ccc' }}
label="暂存" label="暂存"
> >
<Row> <Row>
<Col span={18}> <Col span={18}>
<Form.Item name="BtnAliasNameConfig" style={{ marginBottom: '0' }}> <Form.Item name="saveBtnAliasName" style={{ marginBottom: '0' }}>
<Input placeholder="请输入暂存按钮别名" style={{ width: '180px' }} /> <Input placeholder="请输入暂存按钮别名" style={{ width: '180px' }} />
</Form.Item> </Form.Item>
</Col> </Col>
...@@ -174,13 +197,14 @@ const ConfigOperate = (props, ref) => { ...@@ -174,13 +197,14 @@ const ConfigOperate = (props, ref) => {
</Row> </Row>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
labelCol={{ span: 5 }}
wrapperCol={{ span: 19 }}
style={{ style={{
marginBottom: '0', marginBottom: '0',
padding: '2px', padding: '2px',
borderBottom: '1px solid #ccc', borderBottom: '1px solid #ccc',
display: editMsg.NodeType === '0' ? 'flex' : 'none', display: editMsg.NodeType === '0' ? 'flex' : 'none',
}} }}
valuePropName="checked"
label={ label={
<div style={{ display: 'flex', alignItems: 'center' }}> <div style={{ display: 'flex', alignItems: 'center' }}>
{/* <Tooltip title="开始节点和结束节点不可配置中途关单"> {/* <Tooltip title="开始节点和结束节点不可配置中途关单">
...@@ -189,13 +213,24 @@ const ConfigOperate = (props, ref) => { ...@@ -189,13 +213,24 @@ const ConfigOperate = (props, ref) => {
<span>中途关单</span> <span>中途关单</span>
</div> </div>
} }
name="HalfwayClose"
> >
<Switch <Row>
disabled={editMsg.NodeType === '1' || editMsg.NodeType === '2'} <Col span={18}>
checkedChildren="是" <Form.Item name="HalfwayCloseBtnAliasName" style={{ marginBottom: '0' }}>
unCheckedChildren="否" <Input placeholder="请输入中途关单按钮别名" style={{ width: '180px' }} />
/> </Form.Item>
</Col>
<Col span={6}>
<Form.Item name="HalfwayClose" valuePropName="checked" style={{ marginBottom: '0' }}>
<Switch
disabled={editMsg.NodeType === '1' || editMsg.NodeType === '2'}
checkedChildren="是"
unCheckedChildren="否"
style={{ marginLeft: '12px' }}
/>
</Form.Item>
</Col>
</Row>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
style={{ style={{
...@@ -231,7 +266,7 @@ const ConfigOperate = (props, ref) => { ...@@ -231,7 +266,7 @@ const ConfigOperate = (props, ref) => {
<Form.Item <Form.Item
name="RollbackNode" name="RollbackNode"
wrapperCol={{ span: 24 }} wrapperCol={{ span: 24 }}
style={{ marginLeft: '5px', width: '140px', marginBottom: 0 }} style={{ marginLeft: '5px', width: '100px', marginBottom: 0 }}
> >
<Select placeholder="请选择回退节点"> <Select placeholder="请选择回退节点">
{backNodes.map(item => ( {backNodes.map(item => (
...@@ -241,6 +276,13 @@ const ConfigOperate = (props, ref) => { ...@@ -241,6 +276,13 @@ const ConfigOperate = (props, ref) => {
))} ))}
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item
name="RollbackBtnAliasName"
wrapperCol={{ span: 24 }}
style={{ marginLeft: '5px', width: '80px', marginBottom: 0 }}
>
<Input placeholder="按钮别名" style={{ width: '90px' }} />
</Form.Item>
</div> </div>
<Form.Item <Form.Item
...@@ -252,6 +294,7 @@ const ConfigOperate = (props, ref) => { ...@@ -252,6 +294,7 @@ const ConfigOperate = (props, ref) => {
checkedChildren="是" checkedChildren="是"
unCheckedChildren="否" unCheckedChildren="否"
disabled={editMsg.NodeType === '1'} disabled={editMsg.NodeType === '1'}
style={{ marginLeft: '4px' }}
/> />
</Form.Item> </Form.Item>
</div> </div>
......
...@@ -39,6 +39,11 @@ const ConfigView = (props, ref) => { ...@@ -39,6 +39,11 @@ const ConfigView = (props, ref) => {
list[edtiIndex] = val; list[edtiIndex] = val;
} }
list.map(i => {
if (Array.isArray(i.WebParam)) {
i.WebParam = i.WebParam.toString();
}
});
tableData.current = list; tableData.current = list;
nodeChage('ExtendPageList', tableData.current); nodeChage('ExtendPageList', tableData.current);
setViewModal(false); setViewModal(false);
...@@ -89,6 +94,19 @@ const ConfigView = (props, ref) => { ...@@ -89,6 +94,19 @@ const ConfigView = (props, ref) => {
), ),
}, },
]; ];
const onCancel = () => {
setViewModal(false);
let list = JSON.parse(JSON.stringify(tableData.current));
list.map(i => {
if (Array.isArray(i.WebParam)) {
i.WebParam = i.WebParam.toString();
}
});
tableData.current = list;
nodeChage('ExtendPageList', tableData.current);
};
return ( return (
<div> <div>
<Divider <Divider
...@@ -139,7 +157,7 @@ const ConfigView = (props, ref) => { ...@@ -139,7 +157,7 @@ const ConfigView = (props, ref) => {
visible={viewModal} visible={viewModal}
msg={viewMsg} msg={viewMsg}
modalType={modalType} modalType={modalType}
handleCancel={() => setViewModal(false)} handleCancel={onCancel}
onSubumit={saveView} onSubumit={saveView}
/> />
</div> </div>
......
...@@ -35,6 +35,7 @@ import { ...@@ -35,6 +35,7 @@ import {
import AddModal from './components/AddModal'; import AddModal from './components/AddModal';
import LookModal from './components/LookModal'; import LookModal from './components/LookModal';
import PushTest from './components/PushTest/PushTest'; import PushTest from './components/PushTest/PushTest';
import logWorker from './components/logWorker';
const { Option } = Select; const { Option } = Select;
let timer = null; let timer = null;
...@@ -54,6 +55,7 @@ const ScheduledTasks = () => { ...@@ -54,6 +55,7 @@ const ScheduledTasks = () => {
const listRef = useRef(); const listRef = useRef();
const [logList, setLogList] = useState([]); const [logList, setLogList] = useState([]);
const keepLength = useRef(0); const keepLength = useRef(0);
const [loadingLog, setLoadingLog] = useState(false);
const columns = [ const columns = [
{ {
...@@ -125,9 +127,9 @@ const ScheduledTasks = () => { ...@@ -125,9 +127,9 @@ const ScheduledTasks = () => {
width: 150, width: 150,
render: (text, record) => { render: (text, record) => {
if (text === true) { if (text === true) {
return <Tag color="green"></Tag>;
} else if (text === false) {
return <Tag color="blue"></Tag>; return <Tag color="blue"></Tag>;
} else if (text === false) {
return <Tag color="green"></Tag>;
} }
// return ( // return (
// <Switch // <Switch
...@@ -183,14 +185,50 @@ const ScheduledTasks = () => { ...@@ -183,14 +185,50 @@ const ScheduledTasks = () => {
getTableList(); getTableList();
setColumnsData(columns); setColumnsData(columns);
getIISAgentLog(); getIISAgentLog();
// updateInfo();
return () => { return () => {
clearInterval(timer); clearInterval(timer);
timer = null; timer = null;
}; };
}, []); }, []);
// const updateInfo = () => {
// let worker = new Worker('logWorker');
// debugger;
// worker.onmessage = m => {
// debugger;
// console.log(m);
// };
// debugger;
// worker.postMessage('123');
// };
// updateInfo(payload={}){
// debugger
// this._updateInfo(payload);
// let worker = new Worker(worker, {name: 'myWorker'});
// const {pressions} = payload;
// worker.onmessage = (event) =>{
// debugger
// const { routeMap={}, codeMap = {}} = event.data;
// console.log(routeMap, "routeMap", event.data);
// this.updateRouteMap(routeMap);
// this.updateCodeMap(codeMap);
// worker.terminate();
// }
// if(pressions&&pressions.length>0){
// debugger
// worker.postMessage(pressions);
// }
// }
const getIISAgentLog = () => { const getIISAgentLog = () => {
if (loadingLog) {
return;
}
setLoadingLog(true);
GetIISAgentLog().then(res => { GetIISAgentLog().then(res => {
setLoadingLog(false);
if (res.code === 0) { if (res.code === 0) {
let arr = []; let arr = [];
let list = res.data let list = res.data
......
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