king
2021-12-30 09e0de52a398dd08a0dc3f4b43e4589d211e9c27
src/templates/zshare/formconfig.jsx
@@ -364,23 +364,30 @@
    }
  }
  let options = card.options || []
  if (['select', 'link'].includes(card.type) && card.setAll === 'true') { // 兼容
    options.unshift({
      key: 'empty',
      Value: '',
      Text: '全部',
      ParentID: ''
    })
  }
  return [
    {
      type: 'text',
      key: 'label',
      label: Formdict['model.name'],
      initVal: card.label || '',
      required: true,
      readonly: false
      required: true
    },
    {
      type: 'text',
      key: 'field',
      label: Formdict['model.form.field'],
      initVal: card.field || '',
      tooltipClass: 'middle',
      required: true,
      readonly: false
      required: true
    },
    {
      type: 'select',
@@ -395,8 +402,7 @@
      key: 'datefield',
      label: '时间字段',
      initVal: card.datefield || '',
      required: true,
      readonly: false
      required: true
    },
    {
      type: 'text',
@@ -420,19 +426,19 @@
        text: Formdict['header.form.datasource']
      }]
    },
    {
      type: 'radio',
      key: 'setAll',
      label: '设置全部',
      initVal: card.setAll || 'true',
      options: [{
        value: 'true',
        text: Formdict['model.true']
      }, {
        value: 'false',
        text: Formdict['model.false']
      }]
    },
    // {
    //   type: 'radio',
    //   key: 'setAll',
    //   label: '设置全部',
    //   initVal: card.setAll || 'true',
    //   options: [{
    //     value: 'true',
    //     text: Formdict['model.true']
    //   }, {
    //     value: 'false',
    //     text: Formdict['model.false']
    //   }]
    // },
    {
      type: 'radio',
      key: 'display',
@@ -463,16 +469,14 @@
      key: 'cardValField',
      label: '值·字段',
      initVal: card.cardValField || 'Value',
      required: true,
      readonly: false
      required: true
    },
    {
      type: 'text',
      key: 'urlField',
      label: '地址字段',
      initVal: card.urlField || '',
      required: true,
      readonly: false
      required: true
    },
    {
      type: 'radio',
@@ -499,24 +503,21 @@
      key: 'fields',
      label: '字段集',
      initVal: card.fields || [],
      required: true,
      readonly: false
      required: true
    },
    {
      type: 'textarea',
      key: 'dataSource',
      label: Formdict['header.form.datasource'],
      initVal: card.dataSource || '',
      required: true,
      readonly: false
      required: true
    },
    {
      type: 'options',
      key: 'options',
      label: '选项',
      initVal: card.options || [],
      required: true,
      readonly: false
      initVal: options,
      required: true
    },
    {
      type: 'checkbox',
@@ -524,7 +525,6 @@
      label: '选项',
      initVal: card.items || ['day', 'week', 'month', 'quarter', 'year', 'customized'],
      required: true,
      readonly: false,
      options: [{
        value: 'day',
        label: '日'
@@ -546,12 +546,26 @@
      }]
    },
    {
      type: 'radio',
      key: 'multiple',
      label: '选择形式',
      initVal: card.multiple || 'false',
      required: true,
      options: [{
        value: 'false',
        text: '单选'
      }, {
        value: 'true',
        text: '多选'
      }]
    },
    {
      type: 'select',
      key: 'linkField',
      label: '关联字段',
      initVal: card.linkField || '',
      required: true,
      readonly: false,
      allowClear: true,
      options: linkableFields
    },
    {
@@ -559,24 +573,21 @@
      key: 'valueField',
      label: '值·字段',
      initVal: card.valueField || '',
      required: true,
      readonly: false
      required: true
    },
    {
      type: 'text',
      key: 'valueText',
      label: '文本·字段',
      initVal: card.valueText || '',
      required: true,
      readonly: false
      required: true
    },
    {
      type: 'text',
      key: 'orderBy',
      label: '排序·字段',
      initVal: card.orderBy || '',
      required: false,
      readonly: false
      required: false
    },
    {
      type: 'select',
@@ -637,20 +648,6 @@
      initVal: card.ratio || 6,
      forbid: appType === 'mob',
      required: false
    },
    {
      type: 'radio',
      key: 'multiple',
      label: '可多选',
      initVal: card.multiple || 'false',
      required: true,
      options: [{
        value: 'true',
        text: '是'
      }, {
        value: 'false',
        text: '否'
      }]
    },
    {
      type: 'radio',
@@ -2554,11 +2551,11 @@
      initVal: card.multiple || 'false',
      required: true,
      options: [{
        value: 'true',
        text: '多选'
      }, {
        value: 'false',
        text: '单选'
      }, {
        value: 'true',
        text: '多选'
      }]
    },
    {