king
2023-06-14 08cce3334a2dc81d690b518136b0aaea64e48b0b
src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx
@@ -114,8 +114,7 @@
    })
    this.props.form.setFieldsValue({
      sql: record.sql,
      position: record.position || 'back'
      sql: record.sql
    })
  }
@@ -163,6 +162,13 @@
            duration: 5
          })
          return
        } else if (/,,/ig.test(values.sql)) {
          notification.warning({
            top: 92,
            message: '自定义sql语句中,不可出现连续的英文逗号(,,)',
            duration: 5
          })
          return
        }
        let error = Utils.verifySql(values.sql, 'customscript')
@@ -187,7 +193,7 @@
              editItem: null
            })
            this.props.form.setFieldsValue({
              sql: ''
              sql: ' '
            })
          } else {
            this.setState({
@@ -205,7 +211,7 @@
    })
    
    this.props.form.setFieldsValue({
      sql: ''
      sql: ' '
    })
  }
@@ -225,6 +231,9 @@
    }
    let _sql = this.props.form.getFieldValue('sql')
    if (/^\s+$/.test(_sql)) {
      _sql = ''
    }
    if (_sql) {
      _sql = _sql + ` 
@@ -261,43 +270,25 @@
      <Form {...formItemLayout} className="verify-form" id="verify-excelin-custom-scripts">
        <Row gutter={24}>
          <Col span={8}>
            <Form.Item label={'表名'} style={{whiteSpace: 'nowrap', margin: 0}}>
            <Form.Item label="表名" style={{whiteSpace: 'nowrap', margin: 0}}>
              {sheet}
            </Form.Item>
          </Col>
          <Col span={10}>
            <Form.Item label={'报错字段'} style={{margin: 0, whiteSpace: 'nowrap'}}>
            <Form.Item label="报错字段" style={{margin: 0, whiteSpace: 'nowrap'}}>
              ErrorCode(增加后缀NT表示数据不回滚,如ENT、NNT、FNT、NMNT), retmsg
            </Form.Item>
          </Col>
          <Col span={24} className="sqlfield">
            <Form.Item label={'可用字段'}>
            <Form.Item label="可用字段">
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id, typename</span></Tooltip>,&nbsp;
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'系统变量,系统会定义变量并赋值。'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>
              {usefulfields ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'搜索条件,请按照@xxx@格式使用。'}>,&nbsp;{usefulfields}</Tooltip> : null}
              {linefields ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'表单及行变量,系统会定义变量并赋值。'}>,&nbsp;{linefields}</Tooltip> : null}
            </Form.Item>
          </Col>
          {/* <Col span={8} style={{whiteSpace: 'nowrap'}}>
            <Form.Item style={{marginBottom: 0}} label={
              <Tooltip placement="bottomLeft" title={'自定义脚本与默认sql位置关系。'}>
                <QuestionCircleOutlined className="mk-form-tip" />
                执行位置
              </Tooltip>
            }>
              {getFieldDecorator('position', {
                initialValue: 'front'
              })(
                <Radio.Group>
                  <Radio value="init">初始化</Radio>
                  <Radio value="front">sql前</Radio>
                  <Radio value="back">sql后</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> */}
          <Col span={8}>
            <Form.Item style={{marginBottom: 0}} label={'快捷添加'}>
            <Form.Item style={{marginBottom: 0}} label="快捷添加">
              <Select
                showSearch
                filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
@@ -327,7 +318,7 @@
            </Button>
          </Col>
          <Col span={24} className="sql">
            <Form.Item label={'sql'}>
            <Form.Item label="sql">
              {getFieldDecorator('sql', {
                initialValue: '',
                rules: [