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

fix: 添加暂存按钮

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