king
2023-08-27 da64ab0923bf8817fc8599a6e37b953ce38f64c8
src/menu/components/chart/antv-X6/chartcompile/formconfig.jsx
@@ -1,3 +1,6 @@
import MenuUtils from '@/utils/utils-custom.js'
/**
 * @description 获取图表视图配置表单
 * @param {object} card       // 图表对象
@@ -107,6 +110,7 @@
      required: false,
      options: [
        {value: '', label: '无'},
        {value: 'switch', label: '数据切换'},
        {value: 'menu', label: '菜单'},
        {value: 'menus', label: '菜单组'}
      ],
@@ -115,7 +119,6 @@
        {field: 'menus', values: ['menus']},
        {field: 'menuType', values: ['menus']},
        {field: 'open', values: ['menu', 'menus']},
        {field: 'joint', values: ['menu', 'menus']},
      ]
    },
    {
@@ -146,17 +149,6 @@
        {value: 'self', label: '当前窗口'},
      ],
      forbid: appType !== 'pc'
    },
    {
      type: 'radio',
      field: 'joint',
      label: '参数拼接',
      initval: card.joint || 'true',
      required: false,
      options: [
        {value: 'true', label: '是'},
        {value: 'false', label: '否'},
      ],
    },
    {
      type: 'table',
@@ -197,12 +189,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 +214,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 +254,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: '是'},
      ],
    }
  ]
}