king
2023-08-27 da64ab0923bf8817fc8599a6e37b953ce38f64c8
src/templates/zshare/modalform/index.jsx
@@ -28,11 +28,11 @@
  multiselect: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom', 'dropdown'],
  link: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', 'setAll', 'linkField', 'linkSubField', 'span', 'place', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom', 'pickerMode'],
  fileupload: ['readonly', 'required', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'compress', 'miniSet', 'splitline', 'marginTop', 'marginBottom', 'maxSize'],
  switch: ['initval', 'openVal', 'closeVal', 'openText', 'closeText', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom'],
  switch: ['initval', 'openVal', 'closeVal', 'openText', 'closeText', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'linkSubField', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom'],
  check: ['initval', 'openVal', 'closeVal', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom', 'checkTip'],
  date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'place', 'marginTop', 'marginBottom', 'minDate', 'maxDate', 'precision'],
  datemonth: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'place', 'marginTop', 'marginBottom'],
  datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom', 'minDate', 'maxDate'],
  // datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom', 'minDate', 'maxDate'],
  textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'span', 'labelwidth', 'maxRows', 'encryption', 'interception', 'tooltip', 'extra', 'place', 'count', 'placeholder', 'marginTop', 'marginBottom'],
  cascader: ['readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'place', 'splitline', 'marginTop', 'marginBottom', 'separator'],
  color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'colorType', 'extra', 'marginTop', 'marginBottom'],
@@ -221,8 +221,8 @@
          shows.push('decimal')
        }
      } else {
        shows.push('fieldlength')
        reTooltip.initval = '添加多个初始值请使用逗号分隔。'
        shows.push('fieldlength', 'checkAll')
        reTooltip.initval = '添加多个初始值请使用逗号分隔。'
      }
      shows.push('linkField')
@@ -234,9 +234,17 @@
      if (this.record.readonly === 'true' && this.record.hidden !== 'true') {
        shows.push('unchecked')
      }
    } else if (['date', 'datemonth', 'datetime'].includes(type)) {
    } else if (['date', 'datemonth'].includes(type)) {
      reOptions.initval = dateOptions[type]
      reTypes.initval = 'select'
      if (type === 'date') {
        if (this.record.minDate === 'custom') {
          shows.push('minDateField')
        }
        if (this.record.maxDate === 'custom') {
          shows.push('maxDateField')
        }
      }
    } else if (type === 'switch' || type === 'check') {
      reOptions.initval = [
        {value: true, text: '开'},
@@ -408,6 +416,8 @@
          this.record.resourceType = '0'
          _fieldval.resourceType = '0'
        }
      } else if (this.record.type === 'funcvar' && value !== 'funcvar') {
        this.record.readonly = 'false'
      }
      if (this.record.options.length > 0) {
@@ -588,7 +598,7 @@
    this.props.form.setFieldsValue({dataSource: resource})
  }
  complete = (key, option) => {
  complete = (option) => {
    let label = option.props.label
    this.props.form.setFieldsValue({label: label})
@@ -642,13 +652,13 @@
          })
        }
        if (item.key === 'field' && item.options && item.options.length > 0) {
        if (['field', 'minDateField', 'maxDateField'].includes(item.key) && item.options && item.options.length > 0) {
          content = <AutoComplete
            dataSource={item.options.map((cell) => <AutoComplete.Option label={cell.label} value={cell.field} key={cell.uuid}>
              {cell.field}
            </AutoComplete.Option>)}
            filterOption={(input, option) => option.props.children.indexOf(input) > -1}
            onSelect={this.complete}
            onSelect={(val, option) => item.key === 'field' && this.complete(option)}
            placeholder=""
          >
            <Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />
@@ -986,7 +996,7 @@
          ['linkField', 'valueField', 'valueText', 'orderBy'].forEach(item => {
            if (values[item]) {
              values[item] = values[item].replace(/\s*|\t*|\v*|\r*/ig, '')
              values[item] = values[item].replace(/\s+|\t+|\v+|\r+/ig, '')
            }
          })