king
2023-08-27 da64ab0923bf8817fc8599a6e37b953ce38f64c8
src/menu/components/tabs/antv-tabs/options.jsx
@@ -3,7 +3,7 @@
/**
 * @description tab表单配置信息
 */
export function getTabForm(tab, setting) {
export function getTabForm(tab) {
  let appType = sessionStorage.getItem('appType')
  let roleList = sessionStorage.getItem('sysRoles')
@@ -34,14 +34,14 @@
      required: false,
      allowClear: true,
    },
    {
      type: 'text',
      field: 'controlVal',
      label: '隐藏标记',
      initval: tab.controlVal || '',
      tooltip: '当禁用字段值与隐藏标记相等时,标签页会隐藏。注:多个值请用逗号分隔。',
      required: false,
    },
    // {
    //   type: 'text',
    //   field: 'controlVal',
    //   label: '隐藏标记',
    //   initval: tab.controlVal || '',
    //   tooltip: '当禁用字段值与隐藏标记相等时,标签页会隐藏。注:1、多个值请用逗号分隔,2、@pass@值表示忽略此设置(始终显示),2、@pass_empty@值表示忽略空值,即未获取上级组件信息时显示(可与其他值拼接)。',
    //   required: false,
    // },
    {
      type: 'text',
      field: 'selectVal',
@@ -85,7 +85,7 @@
/**
 * @description tabs表单配置信息
 */
export function getTabsSetForm(setting, uuid) {
export function getTabsSetForm(setting, uuid, subtabs) {
  let appType = sessionStorage.getItem('appType')
  let roleList = sessionStorage.getItem('sysRoles')
@@ -104,6 +104,8 @@
  } else {
    roleList = []
  }
  let controlVals = subtabs.map(item => ({uuid: item.uuid, label: item.label, value: item.controlVal}))
  const tabForm = [
    {
@@ -202,6 +204,7 @@
      options: modules,
      controlFields: [
        {field: 'controlField', notNull: true},
        {field: 'controlVals', notNull: true},
      ],
    },
    {
@@ -209,7 +212,7 @@
      field: 'controlField',
      label: '禁用字段',
      initval: setting.controlField || '',
      tooltip: '用于控制标签隐藏的字段,在标签中填入隐藏标记。',
      tooltip: '用于控制标签隐藏的字段。注:树形组件中不同层级会自动生成mk_floor(层级字段1、2、3...)。',
      required: true,
    },
    {
@@ -217,7 +220,7 @@
      field: 'selectField',
      label: '选中字段',
      initval: setting.selectField || '',
      tooltip: '用于控制标签页初始化选中,在标签中填入选中标记,注:数据源于url参数。',
      tooltip: '用于控制标签页初始化选中,在标签中填入选中标记,注:数据来源于url参数。',
      required: false
    },
    {
@@ -248,6 +251,33 @@
      options: roleList,
      forbid: !!appType
    },
    {
      type: 'table',
      field: 'controlVals',
      label: '标签组',
      initval: controlVals,
      tooltip: '当禁用字段值与隐藏标记相等时,标签页会隐藏。注:1、多个值请用逗号分隔,2、@pass@值表示忽略此设置(始终显示),2、@pass_empty@值表示忽略空值,即未获取上级组件信息时显示(可与其他值拼接)。',
      required: false,
      fixed: true,
      span: 24,
      columns: [
        {
          title: '标签名称',
          dataIndex: 'label',
          editable: false,
          required: false,
          width: '30%'
        },
        {
          title: '隐藏标记',
          dataIndex: 'value',
          inputType: 'input',
          editable: true,
          required: false,
          width: '50%'
        }
      ]
    }
  ]
  return tabForm