NodeEdit.jsx 22.9 KB
Newer Older
邓超's avatar
邓超 committed
1 2 3 4 5 6 7 8
import React, { useEffect, useState } from 'react';
import {
  getFlowNode,
  loadRollbackNodes,
  loadEventTypeTable,
  loadEventFields,
  loadFeedbackType,
  editFlowNodeExtend,
邓超's avatar
邓超 committed
9
} from '@/services/flow/flow';
邓超's avatar
邓超 committed
10 11 12 13 14 15 16 17 18

import {
  Form,
  Input,
  Radio,
  Select,
  notification,
  Checkbox,
  Button,
19
  message,
皮倩雯's avatar
皮倩雯 committed
20 21
  Drawer,
  Space,
22
  Tooltip,
23
  Switch,
皮倩雯's avatar
皮倩雯 committed
24 25
  Row,
  Col,
邓超's avatar
邓超 committed
26
} from 'antd';
27
import { PlusOutlined, InfoCircleOutlined } from '@ant-design/icons';
邓超's avatar
邓超 committed
28 29 30 31 32 33 34 35 36 37 38 39 40
import Fieldselection from './nodeEditComponents/Fieldselection';
import styles from '../flowNode.less';
const { Option } = Select;

const NodeEdit = props => {
  const { onSubumit, handleCancel, visible, msg } = props;
  const [fieldList, setFieldList] = useState([]); // 当前选择库字段列表
  const [showField, setShowField] = useState(false); // 选择字段弹窗
  const [fieldName, setFieldName] = useState(); // 编辑的字段
  const [backNodes, setBackNodes] = useState([]); // 允许返回的节点
  const [backType, setBackType] = useState([]); // 反馈类型
  const [eventTable, setEventTable] = useState([]); // 表名
  const [isDisable, setIsDisable] = useState(); // 允许回退是否可选择
41
  const [filedData, setFiledData] = useState([]); // 已选字段列表
42
  const [filedList, setFiledList] = useState([]); // 当前选择表的所有字段
43 44 45 46
  const [visibleChecked, setVisibleChecked] = useState('');
  const [visibleChecked1, setVisibleChecked1] = useState('');
  const [visibleChecked2, setVisibleChecked2] = useState('');
  const [visibleChecked3, setVisibleChecked3] = useState('');
皮倩雯's avatar
皮倩雯 committed
47
  const [visibleChecked5, setVisibleChecked5] = useState('');
48
  const [visibleChecked6, setVisibleChecked6] = useState('');
49
  const [autoClose, setAutoClose] = useState(false);
50
  const [transfer, setTransfer] = useState(false);
51
  const [half, setHalf] = useState(false);
52

邓超's avatar
邓超 committed
53 54 55 56 57 58 59 60 61 62 63
  const [form] = Form.useForm();
  useEffect(() => {
    if (visible) {
      // 获取表单回显
      getFormData();
      // 获取返回步骤
      rollBackNodes();
      // 获取表名
      getTableName();
      // 获取反馈类型
      getFeedbackName();
64 65
    } else {
      form.resetFields();
66 67 68 69
      setVisibleChecked(false);
      setVisibleChecked1(false);
      setVisibleChecked2(false);
      setVisibleChecked3(false);
皮倩雯's avatar
皮倩雯 committed
70
      setVisibleChecked5(false);
71
      setVisibleChecked6(false);
72
      setTransfer(false);
邓超's avatar
邓超 committed
73 74 75 76 77 78
    }
  }, [visible]);
  // 获取表单回显
  const getFormData = () => {
    getFlowNode({ flowNodeId: msg.ID }).then(res => {
      if (res.code === 0) {
79 80
        // 结束节点
        if (res.data.Type == 2) {
81
          if (res.data.Extend && res.data.Extend.AutoClose === '是') {
82 83
            res.data.Extend.AutoClose = true;
            setVisibleChecked3(true);
84
          } else if (res.data.Extend && res.data.Extend.AutoClose === '否') {
85 86 87
            res.data.Extend.AutoClose = false;
            setVisibleChecked3(false);
          }
88 89 90 91
          setAutoClose(true);
        } else {
          setAutoClose(false);
        }
92 93 94 95 96
        if (res.data.Type == 1) {
          setTransfer(true);
        } else {
          setTransfer(false);
        }
97 98 99 100 101
        if (res.data.Type != 2 && res.data.Type != 1) {
          setHalf(false);
        } else {
          setHalf(true);
        }
邓超's avatar
邓超 committed
102 103 104 105
        let obj = {
          ...res.data.Extend,
          FlowName: res.data.FlowName,
        };
邓超's avatar
邓超 committed
106
        if (res.data.Extend && res.data.Extend.Rollbackable) {
邓超's avatar
邓超 committed
107 108 109 110
          setIsDisable(false);
        } else {
          setIsDisable(true);
        }
111
        changTable(obj.TableName);
112 113 114 115
        if (res.data.Extend != null) {
          obj.NodeAliasName = obj.NodeAliasName || res.data.Name;
          obj.Transferable = obj.Transferable == 1;
          setVisibleChecked(obj.Transferable == 1);
皮倩雯's avatar
皮倩雯 committed
116 117
          obj.IsSave = obj.IsSave == 1;
          setVisibleChecked5(obj.IsSave == 1);
118
          setVisibleChecked6(obj.halfwayClose == 1);
119
          if (obj.EventsInformation) {
120 121 122 123 124 125 126
            if (obj.EventsInformation == 1) {
              obj.EventsInformation = true;
              setVisibleChecked1(true);
            } else {
              obj.EventsInformation = false;
              setVisibleChecked1(false);
            }
127 128 129 130
          } else {
            obj.EventsInformation = true;
            setVisibleChecked1(true);
          }
131 132 133 134 135 136 137 138
          if (obj.IsSendMessage == 0 || obj.IsSendMessage == 1) {
            if (obj.IsSendMessage == 1) {
              obj.IsSendMessage = true;
              setVisibleChecked2(true);
            } else {
              obj.IsSendMessage = false;
              setVisibleChecked2(false);
            }
139 140 141 142 143 144 145 146
          } else {
            obj.IsSendMessage = true;
            setVisibleChecked2(true);
          }

          if (!obj.Handover) {
            obj.Handover = '移交选择人';
          }
皮倩雯's avatar
皮倩雯 committed
147
          console.log(obj);
148 149 150 151 152
          form.setFieldsValue(obj);
        } else {
          setVisibleChecked(false);
          setVisibleChecked1(true);
          setVisibleChecked2(true);
皮倩雯's avatar
皮倩雯 committed
153
          setVisibleChecked5(false);
154
          setVisibleChecked6(false);
155

156 157 158 159 160 161
          form.setFieldsValue({
            FlowName: res.data.FlowName,
            NodeAliasName: res.data.Name,
            Handover: '移交选择人',
          });
        }
162 163 164 165 166 167
      } else {
        notification.error({
          message: '提示',
          duration: 3,
          description: res.msg,
        });
邓超's avatar
邓超 committed
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
      }
    });
  };
  // 获取反馈类型
  const getFeedbackName = () => {
    loadFeedbackType().then(res => {
      if (res.code === 0) {
        setBackType(res.data);
      }
    });
  };
  // 获取表名
  const getTableName = () => {
    loadEventTypeTable({ flowNodeId: msg.ID }).then(res => {
      if (res.code === 0) {
        setEventTable(res.data);
      }
    });
  };
  // 加载修改流程节点配置允许退回列表
  const rollBackNodes = () => {
    loadRollbackNodes({ flowNodeId: msg.ID }).then(res => {
      if (res.code === 0) {
        setBackNodes(res.data);
      }
    });
  };
  // 字段配置
  const deployField = val => {
197 198 199 200 201
    let value = form.getFieldsValue(true);
    if (!value.TableName) {
      message.error('请先选择表');
      return;
    }
邓超's avatar
邓超 committed
202
    setFieldName(val);
203 204
    loadEventFields({ eventTableName: value.TableName }).then(res => {
      if (res.code === 0) {
205
        let defaultCheckedList = value[val] ? value[val].split(',') : [];
206 207 208

        // 保存所有的字段用于右侧显示
        setFiledData(defaultCheckedList);
209
        let allFields = []; // 所有得字段用来判断是否为外部字段
皮倩雯's avatar
皮倩雯 committed
210 211 212
        // 处理树形结构
        let checkList = res.data.map(item => {
          let plainOptions = [];
213
          // 存入没个组得字段
皮倩雯's avatar
皮倩雯 committed
214 215 216
          item.root.forEach(ele => {
            plainOptions = [...plainOptions, ele.fieldName];
          });
217 218
          // 存所有得字段
          allFields = [...allFields, ...plainOptions];
皮倩雯's avatar
皮倩雯 committed
219 220 221 222 223
          return {
            groupName: item.groupName,
            plainOptions,
            defaultCheckedList: [],
          };
224
        });
225 226 227 228 229 230 231
        let externalFields = {
          groupName: '外部字段',
          indeterminate: false,
          checkAll: true,
          plainOptions: [],
          defaultCheckedList: [],
        }; // 外部字段
232
        defaultCheckedList.forEach(item => {
233 234 235 236 237 238
          // 添加外部字段
          let isExternal = allFields.some(checkName => checkName === item);
          if (!isExternal) {
            externalFields.plainOptions.push(item);
            externalFields.defaultCheckedList.push(item);
          }
239 240
          checkList.forEach(element => {
            // 当前得模块是否有当前字段
241
            let indeterminate = element.plainOptions.some(checkName => checkName === item);
242 243
            // 处理已选中的字段
            if (indeterminate) {
皮倩雯's avatar
皮倩雯 committed
244
              element.defaultCheckedList.push(item);
245 246
            }
            if (
皮倩雯's avatar
皮倩雯 committed
247 248
              element.defaultCheckedList.length > 0 &&
              element.defaultCheckedList.length < element.plainOptions.length
249
            ) {
皮倩雯's avatar
皮倩雯 committed
250
              element.indeterminate = true;
251
            } else {
皮倩雯's avatar
皮倩雯 committed
252
              element.indeterminate = false;
253 254
            }
            // 处理是否全选字段
255
            if (element.defaultCheckedList.length === element.plainOptions.length) {
皮倩雯's avatar
皮倩雯 committed
256
              element.checkAll = true;
257
            } else {
皮倩雯's avatar
皮倩雯 committed
258
              element.checkAll = false;
259
            }
邓超's avatar
邓超 committed
260
          });
261
        });
262 263 264 265
        // 添加外部字段
        if (externalFields.plainOptions.length > 0) {
          checkList.push(externalFields);
        }
266 267 268 269 270
        setFieldList(checkList);
        setTimeout(() => {
          setShowField(true);
        }, 0);
      }
邓超's avatar
邓超 committed
271 272 273 274 275 276 277 278 279
    });
  };
  // 字段修改后回调函数
  const setFiled = val => {
    let Fields = '';
    val.forEach((item, index) => {
      if (index === val.length - 1) {
        Fields = `${Fields + item}`;
      } else {
280
        Fields = `${Fields + item},`;
邓超's avatar
邓超 committed
281 282 283 284 285
      }
    });
    let obj = {};
    obj[fieldName] = Fields;
    form.setFieldsValue(obj);
286
    saveOutFieldsLength(fieldName, filedList);
邓超's avatar
邓超 committed
287 288 289 290 291 292
    setShowField(false);
  };
  // 提交表单
  const onFinish = () => {
    form.validateFields().then(validate => {
      if (validate) {
293
        console.log(validate);
294 295 296
        validate.Transferable = visibleChecked ? 1 : 0;
        validate.EventsInformation = visibleChecked1 ? 1 : 0;
        validate.IsSendMessage = visibleChecked2 ? 1 : 0;
皮倩雯's avatar
皮倩雯 committed
297
        validate.IsSave = visibleChecked5 ? 1 : 0;
298
        validate.AutoClose = visibleChecked3 ? '是' : '否';
299
        validate.halfwayClose = visibleChecked6 ? 1 : 0;
300
        console.log(validate);
邓超's avatar
邓超 committed
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337
        editFlowNodeExtend({ ...validate, flowNodeId: msg.ID })
          .then(res => {
            if (res.code === 0) {
              notification.success({
                message: '提示',
                duration: 3,
                description: '编辑成功',
              });
              onSubumit();
            } else {
              notification.error({
                message: '提示',
                duration: 3,
                description: res.msg,
              });
            }
          })
          .catch(() => {
            notification.error({
              message: '提示',
              duration: 3,
              description: '网络异常',
            });
          });
      }
    });
  };
  // 表单监听
  const onValuesChange = val => {
    if (Object.keys(val)[0] === 'Rollbackable') {
      if (val.Rollbackable) {
        setIsDisable(false);
      } else {
        setIsDisable(true);
      }
    }
  };
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386
  // 表切换
  const changTable = val => {
    loadEventFields({ eventTableName: val }).then(res => {
      if (res.code === 0) {
        let initList = [];
        res.data.forEach(item => {
          item.root.forEach(ele => {
            initList.push(ele.fieldName);
          });
        });
        // 处理外部字段
        Object.keys(form.getFieldsValue()).forEach(key => {
          saveOutFieldsLength(key, initList);
        });
        setFiledList(initList);
      }
    });
  };
  // 保存外部字段个数
  const saveOutFieldsLength = (key, initList) => {
    switch (key) {
      case 'Fields':
        form.setFieldsValue({ OutFields: dealExternal(key, initList) });
        break;
      case 'SeeFields':
        form.setFieldsValue({ OutSeeFields: dealExternal(key, initList) });
        break;
      default:
        break;
    }
  };
  // 处理外部字段
  const dealExternal = (fileds, list) => {
    let isExternal;
    let externalLength = 0;
    if (form.getFieldValue(fileds)) {
      form
        .getFieldValue(fileds)
        .split(',')
        .forEach(item => {
          isExternal = list.some(val => val === item);
          if (!isExternal && item !== '') {
            // eslint-disable-next-line no-plusplus
            externalLength++;
          }
        });
    }
    return externalLength;
  };
387 388 389 390 391 392 393 394 395 396 397 398
  const change = e => {
    console.log(e);
    setVisibleChecked(e);
  };
  const change1 = e => {
    console.log(e);
    setVisibleChecked1(e);
  };
  const change2 = e => {
    console.log(e);
    setVisibleChecked2(e);
  };
399 400 401 402
  const change3 = e => {
    console.log(e);
    setVisibleChecked3(e);
  };
皮倩雯's avatar
皮倩雯 committed
403 404 405 406
  const change5 = e => {
    console.log(e);
    setVisibleChecked5(e);
  };
407

408 409 410 411 412
  const change6 = e => {
    console.log(e);
    setVisibleChecked6(e);
  };

邓超's avatar
邓超 committed
413
  return (
皮倩雯's avatar
皮倩雯 committed
414
    <Drawer
邓超's avatar
邓超 committed
415
      title="流程节点配置"
皮倩雯's avatar
皮倩雯 committed
416 417
      width="500px"
      onClose={handleCancel}
418
      destroyOnClose
邓超's avatar
邓超 committed
419
      visible={visible}
皮倩雯's avatar
皮倩雯 committed
420 421 422 423 424 425 426 427
      footer={
        <Space>
          <Button onClick={handleCancel}>取消</Button>
          <Button onClick={onFinish} type="primary">
            确定
          </Button>
        </Space>
      }
邓超's avatar
邓超 committed
428 429 430 431 432 433 434 435 436 437 438 439
    >
      <Form
        form={form}
        labelCol={{ span: 5 }}
        wrapperCol={{ span: 18 }}
        initialValues={{ remember: true }}
        className={styles.formData}
        onValuesChange={onValuesChange}
      >
        <Form.Item label="流程节点" name="FlowName">
          <Input disabled />
        </Form.Item>
440 441 442 443 444
        <Form.Item
          label="节点别名"
          name="NodeAliasName"
          rules={[{ required: true, message: '请填写节点别名' }]}
        >
邓超's avatar
邓超 committed
445
          <Input placeholder="请输入节点别名" />
邓超's avatar
邓超 committed
446
        </Form.Item>
皮倩雯's avatar
皮倩雯 committed
447 448
        <Form.Item>
          {/* <Form.Item name="NodeType" style={{ marginBottom: '10px' }}>
邓超's avatar
邓超 committed
449
            <Select placeholder="请选择节点类型">
邓超's avatar
邓超 committed
450 451 452 453 454 455 456
              <Option value="办理">办理</Option>
              <Option value="上报">上报</Option>
              <Option value="分派">分派</Option>
              <Option value="审核">审核</Option>
              <Option value="办理关单">办理关单</Option>
            </Select>
          </Form.Item>
457
          <Form.Item name="EditableLater" valuePropName="checked" style={{ marginBottom: 0 }}>
邓超's avatar
邓超 committed
458
            <Checkbox>允许补正(事后修改)</Checkbox>
皮倩雯's avatar
皮倩雯 committed
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482
          </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>
            </Col>
            <Col span={9}>
              <Form.Item name="RollbackNode" style={{ marginBottom: 0 }} initialValue="(上一节点)">
                <Select
                  disabled={isDisable}
                  placeholder="请选择回退节点"
                  style={{ width: '218px' }}
                >
                  {backNodes.map(item => (
                    <Option value={item.Name} key={item.ID}>
                      {item.Name}
                    </Option>
                  ))}
                </Select>
              </Form.Item>
            </Col>
          </Row>
邓超's avatar
邓超 committed
483
        </Form.Item>
邓超's avatar
邓超 committed
484
        <Form.Item label="工单主表" name="TableName">
485
          <Select placeholder="请选择工单主表" onChange={changTable} showSearch>
邓超's avatar
邓超 committed
486 487 488 489 490 491 492
            {eventTable.map(item => (
              <Option value={item.Name} key={item.ID}>
                {item.Name}
              </Option>
            ))}
          </Select>
        </Form.Item>
邓超's avatar
邓超 committed
493
        <Form.Item label="移交方式" name="Handover">
494 495 496 497 498 499
          <Radio.Group>
            <Radio value="移交选择人">移交选择人</Radio>
            <Radio value="自处理">自处理</Radio>
            <Radio value="移交默认人">移交默认人</Radio>
            <Radio value="移交发起人">移交发起人</Radio>
            {/* <Option value="移交选择人">移交选择人</Option>
邓超's avatar
邓超 committed
500 501 502
            <Option value="自处理">自处理</Option>
            <Option value="自处理或者移交选择人">自处理或者移交选择人</Option>
            <Option value="移交默认人">移交默认人</Option>
503
            <Option value="移交发起人">移交发起人</Option>
邓超's avatar
邓超 committed
504 505
            <Option value="跨站移交">跨站移交</Option>
            <Option value="处理站点移交">处理站点移交</Option>
506 507
            <Option value="本人站点移交">本人站点移交</Option> */}
          </Radio.Group>
邓超's avatar
邓超 committed
508
        </Form.Item>
509
        {/* <Form.Item label="检查前面在办" name="aheadHandle">
邓超's avatar
邓超 committed
510 511 512 513 514 515 516 517 518 519 520
          <Select>
            <Option value={0}>前面有在办也能移交</Option>
            <Option value={1}>前面有在办不能移交</Option>
          </Select>
        </Form.Item>
        <Form.Item label="节点办理情况" name="NodeHandling">
          <Select>
            <Option value={0}>多人接收,多人办理</Option>
            <Option value={1}>多人接收,一人办理</Option>
            <Option value={2}>一人接收,一人办理</Option>
          </Select>
521
        </Form.Item> */}
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538
        <Form.Item
          label={
            <div style={{ display: 'flex', alignItems: 'center' }}>
              {transfer ? (
                <>
                  <Tooltip title="开始节点不允许转单">
                    <InfoCircleOutlined style={{ color: '#1890ff', marginRight: '3px' }} />
                  </Tooltip>
                  <span>转单</span>
                </>
              ) : (
                <span>转单</span>
              )}
            </div>
          }
          name="Transferable"
        >
539 540 541 542 543
          <Switch
            checkedChildren="是"
            unCheckedChildren="否"
            checked={visibleChecked}
            onChange={change}
544
            disabled={transfer}
545
          />
546
        </Form.Item>
皮倩雯's avatar
皮倩雯 committed
547 548 549 550 551 552 553
        <Form.Item label="暂存" name="IsSave">
          <Switch
            checkedChildren="是"
            unCheckedChildren="否"
            checked={visibleChecked5}
            onChange={change5}
          />
554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578
        </Form.Item>
        <Form.Item
          label={
            <div style={{ display: 'flex', alignItems: 'center' }}>
              {half == true ? (
                <>
                  <Tooltip title="开始节点和结束节点不可配置中途关单">
                    <InfoCircleOutlined style={{ color: '#1890ff', marginRight: '3px' }} />
                  </Tooltip>
                  <span>中途关单</span>
                </>
              ) : (
                <span>中途关单</span>
              )}
            </div>
          }
          name="halfwayClose"
        >
          <Switch
            checkedChildren="是"
            unCheckedChildren="否"
            checked={visibleChecked6}
            onChange={change6}
            disabled={half}
          />
皮倩雯's avatar
皮倩雯 committed
579
        </Form.Item>
580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604

        <Form.Item
          label={
            <div style={{ display: 'flex', alignItems: 'center' }}>
              {autoClose == false ? (
                <>
                  <Tooltip title="结束节点可配置自动关单">
                    <InfoCircleOutlined style={{ color: '#1890ff', marginRight: '3px' }} />
                  </Tooltip>
                  <span>自动关单</span>
                </>
              ) : (
                <span>自动关单</span>
              )}
            </div>
          }
          name="AutoClose"
        >
          <Switch
            checkedChildren="是"
            unCheckedChildren="否"
            checked={visibleChecked3}
            onChange={change3}
            disabled={!autoClose}
          />
邓超's avatar
邓超 committed
605
        </Form.Item>
606

607
        <Form.Item label="显示事件信息" name="EventsInformation">
608 609 610 611 612 613 614
          <Switch
            checkedChildren="是"
            unCheckedChildren="否"
            checked={visibleChecked1}
            onChange={change1}
          />
          {/* <Radio.Group>
邓超's avatar
邓超 committed
615 616
            <Radio value="0">否</Radio>
            <Radio value="1">是</Radio>
617
          </Radio.Group> */}
邓超's avatar
邓超 committed
618
        </Form.Item>
619
        <Form.Item label="是否发送短信" name="IsSendMessage">
620 621 622 623 624 625 626
          <Switch
            checkedChildren="是"
            unCheckedChildren="否"
            checked={visibleChecked2}
            onChange={change2}
          />
          {/* <Radio.Group>
627 628
            <Radio value={0}>否</Radio>
            <Radio value={1}>是</Radio>
629
          </Radio.Group> */}
630
        </Form.Item>
邓超's avatar
邓超 committed
631

632 633 634
        <Form.Item
          label={
            <div className={styles.formData_label}>
635
              {form.getFieldValue('OutFields') ? (
636 637 638 639 640 641 642 643 644 645
                <Tooltip title={`外部字段${form.getFieldValue('OutFields')}个`}>
                  <InfoCircleOutlined style={{ color: 'red', padding: '0.2rem 0.2rem 0 0' }} />
                </Tooltip>
              ) : (
                ''
              )}
              <span>字段编辑</span>
            </div>
          }
        >
邓超's avatar
邓超 committed
646 647
          <div className={styles.filedListItem}>
            <Form.Item name="Fields" style={{ marginBottom: 0, width: '100%' }}>
648
              <Input placeholder="请选编辑字段" allowClear />
邓超's avatar
邓超 committed
649 650 651 652 653 654 655 656 657 658
            </Form.Item>
            <Button
              type="dashed"
              icon={<PlusOutlined />}
              onClick={() => {
                deployField('Fields');
              }}
            />
          </div>
        </Form.Item>
659
        {/* <Form.Item
660 661
          label={
            <div className={styles.formData_label}>
662 663
              {form.getFieldValue('OutSeeFields') ? (
                <Tooltip title={`外部字段${form.getFieldValue('OutSeeFields')}个`}>
664 665 666 667 668 669 670 671 672
                  <InfoCircleOutlined style={{ color: 'red', padding: '0.2rem 0.2rem 0 0' }} />
                </Tooltip>
              ) : (
                ''
              )}
              <span>查看字段</span>
            </div>
          }
        >
邓超's avatar
邓超 committed
673
          <div className={styles.filedListItem}>
674
            <Form.Item name="SeeFields" style={{ marginBottom: 0, width: '100%' }}>
皮倩雯's avatar
皮倩雯 committed
675
              <Input placeholder="请选择查看字段(工程模型)" allowClear />
邓超's avatar
邓超 committed
676 677 678 679 680 681 682 683 684
            </Form.Item>
            <Button
              type="dashed"
              icon={<PlusOutlined />}
              onClick={() => {
                deployField('SeeFields');
              }}
            />
          </div>
685
        </Form.Item> */}
686
        <Form.Item label="前端视图" name="WebPage">
邓超's avatar
邓超 committed
687 688
          <Input placeholder="请配置前端视图" />
        </Form.Item>
689
        {/* <Form.Item label="手持视图" name="MobilePage">
邓超's avatar
邓超 committed
690 691 692 693
          <Input placeholder="请配置手持视图" />
        </Form.Item>
        <Form.Item label="视图参数" name="PageParam">
          <Input placeholder="请配置视图参数" />
694
        </Form.Item> */}
邓超's avatar
邓超 committed
695
        <Form.Item label="反馈类型" name="FeedbackName">
696
          <Select placeholder="请选择反馈类型" allowClear>
邓超's avatar
邓超 committed
697 698 699 700 701 702 703
            {backType.map(item => (
              <Option value={item.value} key={item.value}>
                {item.value}
              </Option>
            ))}
          </Select>
        </Form.Item>
704
        {/* <Form.Item
邓超's avatar
邓超 committed
705 706 707 708 709
          name="FeedbackToEvent"
          valuePropName="checked"
          wrapperCol={{ offset: 5, span: 18 }}
        >
          <Checkbox>将反馈信息显示到事件级别</Checkbox>
710
        </Form.Item> */}
邓超's avatar
邓超 committed
711 712 713 714 715 716 717
      </Form>
      {/* 字段集选择 */}
      <Fieldselection
        visible={showField}
        handleCancel={() => setShowField(false)}
        fieldList={fieldList}
        onSubumit={val => setFiled(val)}
718
        filedData={filedData}
邓超's avatar
邓超 committed
719
      />
皮倩雯's avatar
皮倩雯 committed
720
    </Drawer>
邓超's avatar
邓超 committed
721 722 723
  );
};
export default NodeEdit;