Commit 22267bd5 authored by 皮倩雯's avatar 皮倩雯

fix: 添加暂存按钮

parent 0d706c08
......@@ -21,6 +21,8 @@ import {
Space,
Tooltip,
Switch,
Row,
Col,
} from 'antd';
import { PlusOutlined, InfoCircleOutlined } from '@ant-design/icons';
import Fieldselection from './nodeEditComponents/Fieldselection';
......@@ -42,6 +44,7 @@ const NodeEdit = props => {
const [visibleChecked1, setVisibleChecked1] = useState('');
const [visibleChecked2, setVisibleChecked2] = useState('');
const [visibleChecked3, setVisibleChecked3] = useState('');
const [visibleChecked5, setVisibleChecked5] = useState('');
const [autoClose, setAutoClose] = useState(false);
const [transfer, setTransfer] = useState(false);
......@@ -62,6 +65,7 @@ const NodeEdit = props => {
setVisibleChecked1(false);
setVisibleChecked2(false);
setVisibleChecked3(false);
setVisibleChecked5(false);
setTransfer(false);
}
}, [visible]);
......@@ -101,6 +105,8 @@ const NodeEdit = props => {
obj.NodeAliasName = obj.NodeAliasName || res.data.Name;
obj.Transferable = obj.Transferable == 1;
setVisibleChecked(obj.Transferable == 1);
obj.IsSave = obj.IsSave == 1;
setVisibleChecked5(obj.IsSave == 1);
if (obj.EventsInformation) {
if (obj.EventsInformation == 1) {
obj.EventsInformation = true;
......@@ -129,11 +135,13 @@ const NodeEdit = props => {
if (!obj.Handover) {
obj.Handover = '移交选择人';
}
console.log(obj);
form.setFieldsValue(obj);
} else {
setVisibleChecked(false);
setVisibleChecked1(true);
setVisibleChecked2(true);
setVisibleChecked5(false);
form.setFieldsValue({
FlowName: res.data.FlowName,
......@@ -270,6 +278,7 @@ const NodeEdit = props => {
validate.Transferable = visibleChecked ? 1 : 0;
validate.EventsInformation = visibleChecked1 ? 1 : 0;
validate.IsSendMessage = visibleChecked2 ? 1 : 0;
validate.IsSave = visibleChecked5 ? 1 : 0;
validate.AutoClose = visibleChecked3 ? '是' : '否';
console.log(validate);
editFlowNodeExtend({ ...validate, flowNodeId: msg.ID })
......@@ -374,6 +383,10 @@ const NodeEdit = props => {
console.log(e);
setVisibleChecked3(e);
};
const change5 = e => {
console.log(e);
setVisibleChecked5(e);
};
return (
<Drawer
......@@ -409,8 +422,8 @@ const NodeEdit = props => {
>
<Input placeholder="请输入节点别名" />
</Form.Item>
<Form.Item label="节点类型">
<Form.Item name="NodeType" style={{ marginBottom: '10px' }}>
<Form.Item>
{/* <Form.Item name="NodeType" style={{ marginBottom: '10px' }}>
<Select placeholder="请选择节点类型">
<Option value="办理">办理</Option>
<Option value="上报">上报</Option>
......@@ -421,21 +434,21 @@ const NodeEdit = props => {
</Form.Item>
<Form.Item name="EditableLater" valuePropName="checked" style={{ marginBottom: 0 }}>
<Checkbox>允许补正(事后修改)</Checkbox>
</Form.Item> */}
<Row span={24}>
<Col span={6} />
<Col span={9}>
<Form.Item name="Rollbackable" valuePropName="checked" style={{ marginBottom: 0 }}>
<Checkbox style={{ marginLeft: '10px' }}>允许回退至</Checkbox>
</Form.Item>
<div style={{ display: 'flex' }}>
<Form.Item
name="Rollbackable"
valuePropName="checked"
style={{ marginBottom: 0, width: '150px' }}
>
<Checkbox>允许回退至</Checkbox>
</Form.Item>
<Form.Item
name="RollbackNode"
style={{ marginBottom: 0, width: '100%' }}
initialValue="(上一节点)"
</Col>
<Col span={9}>
<Form.Item name="RollbackNode" style={{ marginBottom: 0 }} initialValue="(上一节点)">
<Select
disabled={isDisable}
placeholder="请选择回退节点"
style={{ width: '218px' }}
>
<Select disabled={isDisable} placeholder="请选择回退节点">
{backNodes.map(item => (
<Option value={item.Name} key={item.ID}>
{item.Name}
......@@ -443,7 +456,8 @@ const NodeEdit = props => {
))}
</Select>
</Form.Item>
</div>
</Col>
</Row>
</Form.Item>
<Form.Item label="工单主表" name="TableName">
<Select placeholder="请选择工单主表" onChange={changTable} showSearch>
......@@ -508,6 +522,18 @@ const NodeEdit = props => {
disabled={transfer}
/>
</Form.Item>
<Form.Item label="暂存" name="IsSave">
<Switch
checkedChildren="是"
unCheckedChildren="否"
checked={visibleChecked5}
onChange={change5}
/>
{/* <Radio.Group>
<Radio value={0}>否</Radio>
<Radio value={1}>是</Radio>
</Radio.Group> */}
</Form.Item>
<Form.Item
label={
......
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