king
2022-05-12 11745b05b3ecdd3a3dc6f64793dc83a095de2b09
src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx
@@ -58,6 +58,18 @@
      required: true
    },
    {
      type: 'radio',
      key: 'permission',
      label: '权限验证',
      initVal: card.permission || 'false',
      required: false,
      options: [
        {value: 'true', text: '启用'},
        {value: 'false', text: '禁用'},
      ],
      forbid: !appType
    },
    {
      type: 'select',
      key: 'blacklist',
      label: '黑名单',
@@ -75,6 +87,7 @@
 * @param {Array}  columns    // 显示列
 */
export function getOptionForm (card, columns) {
  let appType = sessionStorage.getItem('appType')
  let yfields = columns.filter(item => /^(Int|Decimal)/ig.test(item.datatype))
  return [
@@ -128,7 +141,33 @@
        value: 'false',
        text: '不使用'
      }]
    }, {
      type: 'radio',
      key: 'download',
      label: '导出图片',
      initVal: card.download || 'forbid',
      required: false,
      forbid: appType === 'mob',
      options: [{
        value: 'forbid',
        text: '禁用'
      }, {
        value: 'enable',
        text: '启用'
      }]
    },
    // {
    //   type: 'radio',
    //   key: 'empty',
    //   label: '空值隐藏',
    //   initVal: card.empty || 'show',
    //   tooltip: '当查询数据为空时,隐藏该组件。',
    //   required: false,
    //   options: [
    //     {value: 'show', text: '否'},
    //     {value: 'hidden', text: '是'},
    //   ],
    // },
    {
      type: 'color',
      key: 'tickColor',
@@ -152,6 +191,7 @@
 * @param {Array}  columns    // 显示列
 */
export function getRadioOptionForm (card, columns) {
  let appType = sessionStorage.getItem('appType')
  let xfields = columns.filter(item => /^Nvarchar/ig.test(item.datatype))
  let yfields = columns.filter(item => /^(Int|Decimal)/ig.test(item.datatype))
@@ -199,7 +239,7 @@
      label: '字体大小',
      initVal: card.fontSize || 28,
      min: 12,
      max: 200,
      max: 300,
      decimal: 0,
      required: true
    },
@@ -216,6 +256,20 @@
        value: 'false',
        text: '不使用'
      }]
    }, {
      type: 'radio',
      key: 'download',
      label: '导出图片',
      initVal: card.download || 'forbid',
      required: false,
      forbid: appType === 'mob',
      options: [{
        value: 'forbid',
        text: '禁用'
      }, {
        value: 'enable',
        text: '启用'
      }]
    },
    {
      type: 'color',