king
2023-08-17 c7aece35a62b6e91fd98a625bf0e53f64bfbd18d
src/templates/zshare/modalform/index.jsx
@@ -32,7 +32,7 @@
  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'],
@@ -222,7 +222,7 @@
        }
      } else {
        shows.push('fieldlength', 'checkAll')
        reTooltip.initval = '添加多个初始值请使用逗号分隔。'
        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: '开'},
@@ -588,7 +596,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 +650,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} />