king
2023-10-11 6fcf54c0a4c644428c0773a9e2f5c55301a605ac
src/tabviews/custom/components/chart/antv-X6/nodeupdate/nodeform.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Radio, Tooltip, InputNumber } from 'antd'
import { Form, Row, Col, Input, Radio, Tooltip, InputNumber, Switch } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import MemberForm from './memberform'
@@ -15,13 +15,19 @@
  state = {
    flowType: this.props.data.flowType || 'approval',
    execCondition: this.props.data.execCondition || 'close',
    execCondition: this.props.data.execCondition === 'open',
  }
  handleConfirm = () => {
    return new Promise((resolve, reject) => {
      this.props.form.validateFieldsAndScroll((err, values) => {
        if (!err) {
          if (values.execCondition === true) {
            values.execCondition = 'open'
          } else if (values.execCondition === false) {
            values.execCondition = 'close'
          }
          if (values.matchVal) {
            values.matchVal = values.matchVal.replace(/\t+|\v+|\s+/g, '')
          }
@@ -162,16 +168,14 @@
          {nodetype === 'edge' && flowType !== 'reject' ? <Col span={12}>
            <Form.Item label="执行条件">
              {getFieldDecorator('execCondition', {
                valuePropName: 'checked',
                initialValue: execCondition
              })(
                <Radio.Group onChange={(e) => this.setState({execCondition: e.target.value})}>
                  <Radio value="close">关闭</Radio>
                  <Radio value="open">开启</Radio>
                </Radio.Group>
                <Switch checkedChildren="开启" unCheckedChildren="关闭" onChange={(val) => this.setState({execCondition: val})} />
              )}
            </Form.Item>
          </Col> : null}
          {nodetype === 'edge' && flowType !== 'reject' && execCondition === 'open' ? <Col span={12}>
          {nodetype === 'edge' && flowType !== 'reject' && execCondition ? <Col span={12}>
            <Form.Item label="对比方式">
              {getFieldDecorator('match', {
                initialValue: data.match || '='
@@ -187,7 +191,7 @@
              )}
            </Form.Item>
          </Col> : null}
          {nodetype === 'edge' && flowType !== 'reject' && execCondition === 'open' ? <Col span={12}>
          {nodetype === 'edge' && flowType !== 'reject' && execCondition ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="对比值中不可包含制表符、空格、换行符等。">
                <QuestionCircleOutlined className="mk-form-tip" />