king
2022-11-14 5ec0f02101cb4255c6398856bbf17a2a0b2c9a7e
src/menu/components/chart/antv-scatter/chartcompile/formconfig.jsx
@@ -3,6 +3,7 @@
 * @param {object} card       // 图表对象
 */
export function getBaseForm (card) {
  let appType = sessionStorage.getItem('appType')
  let roleList = sessionStorage.getItem('sysRoles')
  if (roleList) {
    try {
@@ -42,14 +43,25 @@
      required: true
    },
    {
      type: 'number',
      type: 'styleInput',
      key: 'height',
      label: '高度',
      label: '图表高度',
      initVal: card.height,
      min: 100,
      max: 1000,
      decimal: 0,
      required: true
      tooltip: '图表绘图区域的高度,不包括标题及内外边距。',
      required: true,
      options: ['px', 'vh', 'vw']
    },
    {
      type: 'radio',
      key: 'permission',
      label: '权限验证',
      initVal: card.permission || 'false',
      required: false,
      options: [
        {value: 'true', text: '启用'},
        {value: 'false', text: '禁用'},
      ],
      forbid: !appType
    },
    {
      type: 'select',
@@ -58,7 +70,8 @@
      initVal: card.blacklist || [],
      multi: true,
      required: false,
      options: roleList
      options: roleList,
      forbid: !!appType
    }
  ]
}
@@ -125,6 +138,32 @@
        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: 'text',