king
2023-06-28 f07c42a322f41e14ef5b1bf8f2fd66fc5d338cdd
src/menu/components/chart/antv-X6/chartcompile/formconfig.jsx
@@ -1,3 +1,6 @@
import MenuUtils from '@/utils/utils-custom.js'
/**
 * @description 获取图表视图配置表单
 * @param {object} card       // 图表对象
@@ -197,12 +200,15 @@
 * @param {object} card       // 图表对象
 * @param {Array}  columns    // 显示列
 */
export function getOptionForm (card, columns) {
export function getOptionForm (card, uuid) {
  let menu = window.GLOB.customMenu
  let modules = MenuUtils.getSupModules(menu.components, uuid, menu.interfaces)
  return [
    {
      type: 'select',
      field: 'subtype',
      label: '类型',
      label: '图表类型',
      initval: card.subtype || 'xflow',
      required: true,
      options: [{
@@ -219,26 +225,26 @@
    },
    {
      type: 'radio',
      field: 'export',
      label: '下载',
      initval: card.export || 'png',
      required: false,
      field: 'function',
      label: '功能',
      initval: card.function || 'show',
      required: true,
      options: [
        {value: 'none', label: '禁用'},
        {value: 'png', label: 'PNG图'},
        {value: 'edit', label: '流程编辑'},
        {value: 'show', label: '流程展示'},
      ],
      controlFields: [
        {field: 'empty', values: ['show']}
      ]
    },
    {
      type: 'radio',
      field: 'empty',
      label: '空值隐藏',
      initval: card.empty || 'show',
      tooltip: '当查询数据为空时,隐藏该组件。',
      type: 'cascader',
      field: 'supModule',
      label: '上级组件',
      initval: card.supModule || [],
      required: false,
      options: [
        {value: 'show', label: '否'},
        {value: 'hidden', label: '是'},
      ],
      options: modules,
      allowClear: true
    },
    {
      type: 'radio',
@@ -259,6 +265,18 @@
      initval: card.backgroundColor || '',
      required: false,
      allowClear: true
    },
    {
      type: 'radio',
      field: 'empty',
      label: '空值隐藏',
      initval: card.empty || 'show',
      tooltip: '当查询数据为空时,隐藏该组件。',
      required: false,
      options: [
        {value: 'show', label: '否'},
        {value: 'hidden', label: '是'},
      ],
    }
  ]
}