king
2023-10-09 b20d0f21e53b3730de9ad1e7d96f25512620ff77
src/tabviews/custom/components/chart/antv-X6/nodeupdate/nodeform.jsx
@@ -14,13 +14,17 @@
  }
  state = {
    flowType: this.props.data.flowType || 'approval'
    flowType: this.props.data.flowType || 'approval',
    execCondition: this.props.data.execCondition || 'close',
  }
  handleConfirm = () => {
    return new Promise((resolve, reject) => {
      this.props.form.validateFieldsAndScroll((err, values) => {
        if (!err) {
          if (values.matchVal) {
            values.matchVal = values.matchVal.replace(/\t+|\v+|\s+/g, '')
          }
          resolve(values)
        } else {
          reject(err)
@@ -32,7 +36,7 @@
  render() {
    const { node, orgs } = this.props
    const { getFieldDecorator } = this.props.form
    const { flowType } = this.state
    const { flowType, execCondition } = this.state
    const formItemLayout = {
      labelCol: {
        xs: { span: 24 },
@@ -155,6 +159,62 @@
              )}
            </Form.Item>
          </Col> : null}
          {nodetype === 'edge' && flowType !== 'reject' ? <Col span={12}>
            <Form.Item label="执行条件">
              {getFieldDecorator('execCondition', {
                initialValue: execCondition
              })(
                <Radio.Group onChange={(e) => this.setState({execCondition: e.target.value})}>
                  <Radio value="close">关闭</Radio>
                  <Radio value="open">开启</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> : null}
          {nodetype === 'edge' && flowType !== 'reject' && execCondition === 'open' ? <Col span={12}>
            <Form.Item label="对比方式">
              {getFieldDecorator('match', {
                initialValue: data.match || '='
              })(
                <Radio.Group>
                  <Radio value="=">=</Radio>
                  <Radio value="<">&lt;</Radio>
                  <Radio value=">">&gt;</Radio>
                  <Radio value="<=">&lt;=</Radio>
                  <Radio value=">=">&gt;=</Radio>
                  <Radio value="!=">!=</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> : null}
          {nodetype === 'edge' && flowType !== 'reject' && execCondition === 'open' ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="对比值中不可包含制表符、空格、换行符等。">
                <QuestionCircleOutlined className="mk-form-tip" />
                对比值
              </Tooltip>
            }>
              {getFieldDecorator('matchVal', {
                initialValue: data.matchVal || ''
              })(
                <Input placeholder="" autoComplete="off"/>
              )}
            </Form.Item>
          </Col> : null}
          {nodetype === 'node' ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="标记将作为节点ID">
                <QuestionCircleOutlined className="mk-form-tip" />
                标记
              </Tooltip>
            }>
              {getFieldDecorator('sign', {
                initialValue: data.sign || ''
              })(
                <Input placeholder="" autoComplete="off"/>
              )}
            </Form.Item>
          </Col> : null}
          <Col span={24}>
            <Form.Item label="备注">
              {getFieldDecorator('remark', {