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

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

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