king
2022-12-19 102be577a7f8df2ae30045d55a1a5fc584f90363
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -6,6 +6,7 @@
import { formRule } from '@/utils/option.js'
import asyncComponent from '@/utils/asyncComponent'
import KeyInterface from '@/components/keyInterface'
import './index.scss'
const { TextArea } = Input
@@ -177,7 +178,7 @@
        reReadonly.interface = false
        reRequired.interface = true
      } else if (intertype === 'outer') {
        shows.push('procMode', 'sysInterface', 'interface', 'outerFunc', 'callbackType', 'output')
        shows.push('procMode', 'sysInterface', 'outerFunc', 'callbackType', 'output')
        if (this.record.procMode === 'system') {
          shows.push('sql', 'sqlType')
        } else if (this.record.procMode === 'inner') {
@@ -194,10 +195,14 @@
          reReadonly.interface = false
          reRequired.interface = true
          shows.push('proInterface')
        } else {
          shows.push('interface', 'proInterface')
        } else if (this.record.sysInterface === 'true') {
          reReadonly.interface = true
          reRequired.interface = false
          shows.push('interface')
        } else if (this.record.sysInterface === 'external') {
          shows.push('exInterface', 'exProInterface')
        }
      } else if (intertype === 'inner') {
        shows.push('innerFunc', 'output')
@@ -244,7 +249,7 @@
      reOptions.intertype = this.state.interTypeOptions.filter(item => item.value !== 'custom')
      if (intertype === 'outer') {
        shows.push('procMode', 'sysInterface', 'interface', 'outerFunc', 'callbackType')
        shows.push('procMode', 'sysInterface', 'outerFunc', 'callbackType')
        if (this.record.procMode === 'system') {
          shows.push('sql', 'sqlType')
        } else if (this.record.procMode === 'inner') {
@@ -261,10 +266,14 @@
          reReadonly.interface = false
          reRequired.interface = true
          shows.push('proInterface')
        } else {
          shows.push('interface', 'proInterface')
        } else if (this.record.sysInterface === 'true') {
          reReadonly.interface = true
          reRequired.interface = false
          shows.push('interface')
        } else if (this.record.sysInterface === 'external') {
          shows.push('exInterface', 'exProInterface')
        }
      } else if (intertype === 'inner') {
        shows.push('innerFunc')
@@ -293,7 +302,7 @@
      reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value))
      if (this.record.intertype === 'outer') {
        shows.push('innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc')
        shows.push('innerFunc', 'sysInterface', 'outerFunc', 'callbackFunc')
        reRequired.innerFunc = false
        reRequired.callbackFunc = false
@@ -301,10 +310,14 @@
          reReadonly.interface = false
          reRequired.interface = true
          shows.push('proInterface')
        } else {
          shows.push('interface', 'proInterface')
        } else if (this.record.sysInterface === 'true') {
          reReadonly.interface = true
          reRequired.interface = false
          shows.push('interface')
        } else if (this.record.sysInterface === 'external') {
          shows.push('exInterface', 'exProInterface')
        }
      } else if (this.record.intertype === 'inner') {
        shows.push('innerFunc')
@@ -317,17 +330,21 @@
      reOptions.intertype = this.state.interTypeOptions.filter(op => op.value !== 'custom')
      if (this.record.intertype === 'outer') {
        shows.push('innerFunc', 'sysInterface', 'interface', 'outerFunc')
        shows.push('innerFunc', 'sysInterface', 'outerFunc')
        reRequired.innerFunc = false
        if (this.record.sysInterface === 'false') {
          reReadonly.interface = false
          reRequired.interface = true
          shows.push('proInterface')
        } else {
          shows.push('interface', 'proInterface')
        } else if (this.record.sysInterface === 'true') {
          reReadonly.interface = true
          reRequired.interface = false
          shows.push('interface')
        } else if (this.record.sysInterface === 'external') {
          shows.push('exInterface', 'exProInterface')
        }
      } else if (this.record.intertype === 'inner') {
        shows.push('innerFunc')
@@ -379,18 +396,22 @@
      if (_funcType === 'print') {
        shows.push('execMode', 'intertype', 'Ot', 'execSuccess', 'execError')
        if (this.record.intertype === 'outer') {
          shows.push('innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc')
          shows.push('innerFunc', 'sysInterface', 'outerFunc', 'callbackFunc')
          reRequired.innerFunc = false
          reRequired.callbackFunc = false
          if (this.record.sysInterface === 'false') {
            reReadonly.interface = false
            reRequired.interface = true
            shows.push('proInterface')
          } else {
            shows.push('interface', 'proInterface')
          } else if (this.record.sysInterface === 'true') {
            reReadonly.interface = true
            reRequired.interface = false
            shows.push('interface')
          } else if (this.record.sysInterface === 'external') {
            shows.push('exInterface', 'exProInterface')
          }
        } else if (this.record.intertype === 'inner') {
          shows.push('innerFunc')
@@ -528,14 +549,13 @@
      } else if (value === 'excelIn') {
        _fieldval.intertype = 'system'
        _fieldval.Ot = 'notRequired'
        _fieldval.execSuccess = 'grid'
        _fieldval.label = '导入Excel'
        _fieldval.class = 'dgreen'
        this.record.Ot = 'notRequired'
        this.record.label = '导入Excel'
        this.record.class = 'dgreen'
        this.record.execSuccess = 'grid'
      } else if (value === 'excelOut') {
        _fieldval.intertype = 'system'
        _fieldval.label = '导出Excel'
@@ -734,7 +754,7 @@
          )
        } else if (item.key === 'sql' || item.key === 'sheet') {
          rules.push(
            { pattern: /^[a-zA-Z_]+$/, message: '表名只可使用字母以及_' },
            { pattern: /^[a-zA-Z0-9@_]+$/, message: '表名只可使用字母、数字以及_' },
            { max: formRule.func.max, message: formRule.func.maxMessage }
          )
        } else if (item.key === 'outerFunc' || item.key === 'callbackFunc') {
@@ -786,7 +806,7 @@
            getPopupContainer={() => document.getElementById('winter')}
          >
            {item.options.map((option, index) =>
              <Select.Option key={index} extend={option[item.extendName] || ''} value={(option.value || option.field)}>
              <Select.Option key={index} title={option.text || option.label} extend={option[item.extendName] || ''} value={(option.value || option.field)}>
                {(option.text || option.label)}
              </Select.Option>
            )}
@@ -800,7 +820,7 @@
            getPopupContainer={() => document.getElementById('winter')}
          >
            {item.options.map((option, index) =>
              <Select.Option key={index} value={(option.value || option.field)}>
              <Select.Option key={index} title={option.text || option.label} value={(option.value || option.field)}>
                {(option.text || option.label)}
              </Select.Option>
            )}
@@ -843,6 +863,14 @@
        ]
        content = <TextArea rows={2} readOnly={item.readonly}/>
      } else if (item.type === 'keyinterface') {
        span = 24
        className = 'textarea'
        rules = [
          { required: item.required, message: '请输入' + item.label + '!' }
        ]
        content = <KeyInterface type={item.key === 'exInterface' ? 'develop' : 'product'}/>
      }
      fields.push(
@@ -884,6 +912,7 @@
          values.uuid = card.uuid
          values.verify = card.verify || null
          values.modal = card.modal || null
          values.config = card.config || null
          if (values.OpenType === 'form') {
            if (values.formType !== 'scan') {