Commit 5befb917 authored by 涂伟's avatar 涂伟

fix: '1.新建事件类型使用方式默认标准用法手持前端全都勾上2.流程中心节点配置优化 高级配置新增工单配置'

parent 5196e089
......@@ -640,7 +640,7 @@ const AddModal = props => {
setFiled1({});
form.resetFields();
setEditable(false);
setReportFromMobile(false);
setReportFromMobile(true);
form.setFieldsValue({
ImageExpression: 'assets/images/caseCenter/events/通用问题1.png',
});
......
......@@ -8,6 +8,7 @@ import ConfigNodeMsg from './nodeModalComponents/ConfigNodeMsg';
import ConfgUndertake from './nodeModalComponents/ConfgUndertake';
import ConfigCopyPerson from './nodeModalComponents/ConfigCopyPerson';
import ConfigOperate from './nodeModalComponents/ConfigOperate';
import ConfigCase from './nodeModalComponents/ConfigCase';
import ConfigView from './nodeModalComponents/ConfigView';
import ConfigTimeLimit from './nodeModalComponents/ConfigTimeLimit';
import CongfigHeightMsg from './nodeModalComponents/CongfigHeightMsg';
......@@ -33,6 +34,7 @@ const NodeModal = props => {
const refConfgUndertake = useRef();
const refConfigCopyPerson = useRef();
const refConfigOperate = useRef();
const refConfigCase = useRef();
const refConfigView = useRef();
const refConfigTimeLimit = useRef();
const refCongfigHeightMsg = useRef();
......@@ -51,11 +53,11 @@ const NodeModal = props => {
...refConfgUndertake.current?.getParmar(),
...refConfigCopyPerson.current?.getParmar(),
...refConfigOperate.current?.getParmar(),
...refConfigCase.current?.getParmar(),
...refConfigSubprocess.current?.getParmar(),
...refConfigView.current?.getParmar(),
...refConfigTimeLimit.current?.getParmar(),
};
console.log(obj);
for (let i = 0; i < obj.RuleList.length; i++) {
if (!obj.RuleList[i].RuleName) {
......@@ -177,6 +179,26 @@ const NodeModal = props => {
editMsg={editMsg}
flowID={flowID}
/>
{/* 工单配置 */}
<div
style={{
display:
editMsg.NodeType === '1' ||
editMsg.NodeType === '20' ||
editMsg.NodeType === '21' ||
editMsg.NodeType === '22' ||
editMsg.NodeType === '30'
? 'none'
: 'block',
}}
>
<ConfigCase
ref={refConfigCase}
nodeChage={nodeChage}
editMsg={editMsg}
flowID={flowID}
/>
</div>
<CongfigHeightMsg
ref={refCongfigHeightMsg}
nodeChage={nodeChage}
......
import React, { useState, useEffect, forwardRef, useImperativeHandle } from 'react';
import { Form, Input, Select, Divider, Tooltip, message, Switch, Row, Col, Checkbox } from 'antd';
import { InfoCircleOutlined } from '@ant-design/icons';
import { loadRollbackNodes } from '@/services/flow/flow';
const { Option } = Select;
const ConfigCase = (props, ref) => {
const { nodeChage, editMsg } = props;
const [form] = Form.useForm();
const [backNodes, setBackNodes] = useState([]); // 允许返回的节点
useEffect(() => {
form.resetFields();
const { EventsInformation, IsSendMessage } = editMsg;
const obj = {
EventsInformation: EventsInformation === 1,
IsSendMessage: IsSendMessage === 1,
};
form.setFieldsValue({ ...editMsg, ...obj });
rollBackNodes();
}, [editMsg]);
useImperativeHandle(ref, () => ({
getParmar,
}));
const getParmar = () => {
let obj = form.getFieldsValue();
obj.EventsInformation = obj.Transferable ? 1 : 0;
obj.IsSendMessage = obj.Transferable ? 1 : 0;
return obj;
};
// 加载修改流程节点配置允许退回列表
const rollBackNodes = () => {
if (!editMsg.ActivityId) {
return;
}
loadRollbackNodes({ flowNodeId: editMsg.ActivityId }).then(res => {
if (res.code === 0) {
setBackNodes(res.data);
}
});
};
// 节点配置表单监听
const changeValue = (changedFields, allFields) => {
let value;
switch (changedFields[0].name[0]) {
case 'EventsInformation':
value = changedFields[0].value ? 1 : 0;
break;
case 'IsSendMessage':
value = changedFields[0].value ? 1 : 0;
break;
default:
value = changedFields[0].value;
break;
}
nodeChage(changedFields[0].name[0], value);
};
return (
<div>
<Divider
orientation="left"
style={{
borderTopColor: '#99bbe8',
color: '#15428b',
fontWeight: 700,
}}
>
工单配置
</Divider>
<Form
form={form}
labelCol={{ span: 20 }}
wrapperCol={{ span: 4 }}
onFieldsChange={changeValue}
colon={false}
labelAlign="left"
>
<Form.Item
valuePropName="checked"
style={{ marginBottom: '0', padding: '2px', borderBottom: '1px solid #ccc' }}
label="显示事件信息"
name="EventsInformation"
>
<Switch checkedChildren="是" unCheckedChildren="否" />
</Form.Item>
<Form.Item
valuePropName="checked"
style={{
marginBottom: '0',
padding: '2px',
borderBottom: '1px solid #ccc',
display: editMsg.NodeType === '0' ? 'flex' : 'none',
}}
label="是否发送短信"
name="IsSendMessage"
>
<Switch checkedChildren="是" unCheckedChildren="否" />
</Form.Item>
</Form>
</div>
);
};
export default forwardRef(ConfigCase);
......@@ -13,16 +13,16 @@ const ConfigOperate = (props, ref) => {
form.resetFields();
const {
Transferable,
EventsInformation,
IsSendMessage,
// EventsInformation,
// IsSendMessage,
IsSave,
AutoClose,
HalfwayClose,
} = editMsg;
const obj = {
Transferable: Transferable === 1,
EventsInformation: EventsInformation === 1,
IsSendMessage: IsSendMessage === 1,
// EventsInformation: EventsInformation === 1,
// IsSendMessage: IsSendMessage === 1,
IsSave: IsSave === 1,
AutoClose: AutoClose === '是',
HalfwayClose: HalfwayClose === 1,
......@@ -38,8 +38,8 @@ const ConfigOperate = (props, ref) => {
const getParmar = () => {
let obj = form.getFieldsValue();
obj.Transferable = obj.Transferable ? 1 : 0;
obj.EventsInformation = obj.Transferable ? 1 : 0;
obj.IsSendMessage = obj.Transferable ? 1 : 0;
// obj.EventsInformation = obj.Transferable ? 1 : 0;
// obj.IsSendMessage = obj.Transferable ? 1 : 0;
obj.IsSave = obj.Transferable ? 1 : 0;
obj.AutoClose = obj.Transferable ? 1 : 0;
obj.HalfwayClose = obj.Transferable ? 1 : 0;
......@@ -63,12 +63,12 @@ const ConfigOperate = (props, ref) => {
case 'Transferable':
value = changedFields[0].value ? 1 : 0;
break;
case 'EventsInformation':
value = changedFields[0].value ? 1 : 0;
break;
case 'IsSendMessage':
value = changedFields[0].value ? 1 : 0;
break;
// case 'EventsInformation':
// value = changedFields[0].value ? 1 : 0;
// break;
// case 'IsSendMessage':
// value = changedFields[0].value ? 1 : 0;
// break;
case 'IsSave':
value = changedFields[0].value ? 1 : 0;
break;
......@@ -226,15 +226,15 @@ const ConfigOperate = (props, ref) => {
/>
</Form.Item>
</div>
<Form.Item
{/* <Form.Item
valuePropName="checked"
style={{ marginBottom: '0', padding: '2px', borderBottom: '1px solid #ccc' }}
label="显示事件信息"
name="EventsInformation"
>
<Switch checkedChildren="是" unCheckedChildren="是" />
</Form.Item>
<Form.Item
</Form.Item> */}
{/* <Form.Item
valuePropName="checked"
style={{
marginBottom: '0',
......@@ -246,7 +246,7 @@ const ConfigOperate = (props, ref) => {
name="IsSendMessage"
>
<Switch checkedChildren="是" unCheckedChildren="否" />
</Form.Item>
</Form.Item> */}
</Form>
</div>
);
......
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