king
2023-06-14 08cce3334a2dc81d690b518136b0aaea64e48b0b
src/menu/components/card/data-card/options.jsx
@@ -103,10 +103,11 @@
      ],
      linkFields: ['priKeyType'],
      controlFields: [
        {field: 'goback', values: ['dynamic']},
        {field: 'goback', values: ['dynamic', 'public']},
        {field: 'empty', values: ['dynamic', 'public']},
        {field: 'jump', values: ['dynamic']},
        {field: 'autoExec', values: ['dynamic']},
        {field: 'jump', values: ['dynamic', 'public']},
        {field: 'broadcast', values: ['dynamic', 'public']},
        {field: 'autoExec', values: ['dynamic', 'public']},
        {field: 'supModule', values: ['static']},
        {field: 'publicId', values: ['public']},
      ],
@@ -119,7 +120,42 @@
      initval: wrap.publicId || '',
      required: true,
      options: interfaces,
      forbid: subtype !== 'propcard'
      reset_source: true,
      forbid: subtype !== 'propcard',
      callback: (map, record) => {
        if (!record.publicId) return
        let interfaces = window.GLOB.customMenu.interfaces || []
        let d = interfaces.filter(m => m.uuid === record.publicId && m.status === 'true')[0]
        if (!d || !d.columns) return
        let columns = JSON.parse(JSON.stringify(d.columns))
        let _broadcast = map.get('broadcast')
        if (_broadcast && !_broadcast.forbid) {
          _broadcast.options = columns
          _broadcast.oriOptions = columns
          map.set('broadcast', _broadcast)
        }
        let _jumpField = map.get('jumpField')
        if (_jumpField && !_jumpField.forbid) {
          _jumpField.options = columns
          _jumpField.oriOptions = columns
          map.set('jumpField', _jumpField)
        }
        let _link = map.get('link')
        if (_link && !_link.forbid) {
          _link.options = columns
          _link.oriOptions = columns
          map.set('link', _link)
        }
      }
    },
    {
      type: 'radio',
@@ -149,7 +185,7 @@
      options: [
        {value: 'page', label: '页码'},
        {value: 'switch', label: '左右切换', forbid: appType === 'mob' || subtype === 'tablecard'},
        {value: 'slide', label: '滑动加载', forbid: appType !== 'mob'},
        {value: 'slide', label: '滑动加载', forbid: appType !== 'mob' || sessionStorage.getItem('editMenuType') === 'popview'},
        {value: 'more', label: '查看更多'},
      ],
      controlFields: [
@@ -237,7 +273,10 @@
        {value: 'backFont', label: '背景+文字'},
        {value: 'font', label: '文字'},
        {value: 'tabs', label: '标签页'},
        ...(subtype === 'datacard' && appType === 'mob' ? [{value: 'check', label: '勾选'}] : [])
        ...(subtype === 'datacard' ? [
          {value: 'check', label: '勾选(圆框)'},
          {value: 'check square', label: '勾选(方框)'}
        ] : [])
      ],
      forbid: subtype === 'tablecard'
    },
@@ -282,6 +321,19 @@
    },
    {
      type: 'radio',
      field: 'parity',
      label: '奇偶背景',
      initval: wrap.parity || 'false',
      tooltip: '偶数行会添加背景色。',
      required: false,
      options: [
        {value: 'false', label: '无'},
        {value: 'true', label: '有'},
      ],
      forbid: subtype === 'propcard'
    },
    {
      type: 'radio',
      field: 'printType',
      label: '组件类型',
      initval: wrap.printType || 'content',
@@ -310,7 +362,7 @@
      field: 'broadcast',
      label: '语音播报',
      initval: wrap.broadcast || '',
      tooltip: '语音播报在移动端app中有效。注:使用语音播报时,数据源不要使用同步查询,添加定时器时,可循环播报',
      tooltip: '语音播报在移动端有效。注:在H5中请使用音频链接,添加定时器时,可循环播报',
      required: false,
      options: columns,
      forbid: !columns || appType !== 'mob' || subtype !== 'propcard'
@@ -333,6 +385,7 @@
      field: 'display',
      label: '显示控制',
      initval: wrap.display || 'normal',
      tooltip: '当使用属性卡进行某些业务操作,且不需要展示卡片信息时,可设置为不可见。',
      required: false,
      options: [
        {value: 'normal', label: '正常显示'},
@@ -381,6 +434,7 @@
      controlFields: [
        {field: 'jumpField', values: ['menu', 'link']},
        {field: 'joint', values: ['menu', 'link']},
        {field: 'open', values: ['menu', 'link']},
        {field: 'menu', values: ['menu']},
        {field: 'link', values: ['link']},
      ],
@@ -391,7 +445,7 @@
      field: 'jumpField',
      label: '控制字段',
      initval: wrap.jumpField || '',
      tooltip: '当字段值为true时',
      tooltip: '当字段值为true时触发跳转。',
      required: true,
      options: columns,
      forbid: subtype !== 'propcard' || appType !== 'mob'
@@ -424,6 +478,18 @@
      options: [
        {value: 'true', label: '是'},
        {value: 'false', label: '否'},
      ],
      forbid: subtype !== 'propcard' || appType !== 'mob'
    },
    {
      type: 'radio',
      field: 'open',
      label: '打开方式',
      initval: wrap.open || 'blank',
      required: false,
      options: [
        {value: 'blank', label: '新窗口'},
        {value: 'self', label: '当前窗口'},
      ],
      forbid: subtype !== 'propcard' || appType !== 'mob'
    },
@@ -493,13 +559,13 @@
      type: 'radio',
      field: 'permission',
      label: '权限验证',
      initval: wrap.permission || 'false',
      initval: wrap.permission || (!appType ? 'true' : 'false'),
      required: false,
      options: [
        {value: 'true', label: '启用'},
        {value: 'false', label: '禁用'},
      ],
      forbid: !appType
      forbid: sessionStorage.getItem('editMenuType') === 'popview'
    },
    {
      type: 'multiselect',