king
2024-05-16 b69b5f6329ca5f87932436b7a6c1ddfc3377e10f
src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx
@@ -5,6 +5,8 @@
export function getBaseForm (card, columns) {
  let appType = sessionStorage.getItem('appType')
  let roleList = sessionStorage.getItem('sysRoles')
  let isprint = sessionStorage.getItem('MenuType') === 'billPrint'
  let ispop = sessionStorage.getItem('editMenuType') === 'popview'
  if (roleList) {
    try {
      roleList = JSON.parse(roleList)
@@ -87,7 +89,19 @@
        {value: 'true', label: '启用'},
        {value: 'false', label: '禁用'},
      ],
      forbid: !appType
      forbid: !appType || ispop || isprint
    },
    {
      type: 'radio',
      field: 'cacheLocal',
      label: '本地缓存',
      initval: card.cacheLocal || 'true',
      required: false,
      options: [
        {value: 'true', label: '继承菜单'},
        {value: 'false', label: '禁用'},
      ],
      forbid: ispop || isprint
    },
    {
      type: 'multiselect',
@@ -96,17 +110,17 @@
      initval: card.blacklist || [],
      required: false,
      options: roleList,
      forbid: !!appType
      forbid: !!appType || isprint
    },
    {
      type: 'radio',
      field: 'click',
      label: '点击事件',
      initval: card.click || '',
      initval: card.click || 'switch',
      tooltip: '点击节点时触发的事件。',
      required: false,
      options: [
        {value: '', label: '数据切换'},
        {value: 'switch', label: '数据切换'},
        {value: 'menu', label: '菜单'},
        {value: 'menus', label: '菜单组'}
      ],
@@ -115,7 +129,6 @@
        {field: 'menus', values: ['menus']},
        {field: 'menuType', values: ['menus']},
        {field: 'open', values: ['menu', 'menus']},
        {field: 'joint', values: ['menu', 'menus']},
      ]
    },
    {
@@ -148,24 +161,13 @@
      forbid: appType !== 'pc'
    },
    {
      type: 'radio',
      field: 'joint',
      label: '参数拼接',
      initval: card.joint || 'true',
      required: false,
      options: [
        {value: 'true', label: '是'},
        {value: 'false', label: '否'},
      ],
    },
    {
      type: 'table',
      field: 'menus',
      label: '菜单组',
      initval: card.menus || [],
      required: true,
      span: 24,
      actions: appType === 'pc' ? ['view'] : [],
      actions: ['edit', 'del', 'add', 'move', 'view'],
      columns: [
        {
          title: '标识',
@@ -218,7 +220,7 @@
      controlFields: [
        {field: 'dirField', values: ['mindmap']},
        {field: 'nodeColor', values: ['mindmap']},
        {field: 'collapsed', values: ['indentTree', 'kapmap']},
        // {field: 'collapsed', values: ['indentTree', 'kapmap']},
      ]
    },
    {
@@ -236,7 +238,7 @@
        label: '上级组件'
      }, {
        value: 'line',
        label: '行'
        label: '数据源'
      }],
      controlFields: [
        {field: 'rootLabel', values: ['fixed', 'supvalue']},
@@ -249,6 +251,7 @@
      field: 'rootValue',
      label: '根节点值',
      initval: card.rootValue || '',
      tooltip: '根节点使用上级组件时,请填写上级组件中对应的字段。',
      required: true
    },
    {
@@ -256,6 +259,7 @@
      field: 'rootLabel',
      label: '根节点文本',
      initval: card.rootLabel || '',
      tooltip: '根节点使用上级组件时,请填写上级组件中对应的字段。',
      required: true
    },
    {
@@ -316,7 +320,7 @@
      label: '节点颜色',
      initval: card.nodeColor || '#1890ff',
      tooltip: '右侧节点的标记颜色。',
      isHex: true,
      colorType: 'hex',
      required: false
    },
    {
@@ -325,7 +329,7 @@
      label: '左节点颜色',
      initval: card.leftColor || '#26C281',
      tooltip: '左侧节点的标记颜色。',
      isHex: true,
      colorType: 'hex',
      required: false
    },
    {
@@ -345,7 +349,7 @@
      field: 'collapsed',
      label: '节点合并',
      initval: card.collapsed || 'false',
      tooltip: '一级节点是否合并。',
      tooltip: '初始化时,一级节点是否合并。',
      required: false,
      options: [
        {value: 'false', label: '否'},