king
2023-08-27 da64ab0923bf8817fc8599a6e37b953ce38f64c8
src/mob/components/tabs/antv-tabs/options.jsx
@@ -3,8 +3,7 @@
/**
 * @description Wrap表单配置信息
 */
export function getTabForm(tab, setting) {
  // let appType = sessionStorage.getItem('appType')
export function getTabForm(tab) {
  let roleList = sessionStorage.getItem('sysRoles')
  if (roleList) {
@@ -34,14 +33,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: '当禁用字段值与隐藏标记相等时,标签页会隐藏。注:多个值请用逗号分隔。',
    //   required: false
    // },
    {
      type: 'text',
      field: 'selectVal',
@@ -67,16 +66,7 @@
        {value: 'false', label: '否'},
        {value: 'true', label: '是'},
      ],
    },
    // {
    //   type: 'multiselect',
    //   field: 'blacklist',
    //   label: '黑名单',
    //   initval: tab.blacklist || [],
    //   required: false,
    //   options: roleList,
    //   forbid: !!appType,
    // },
    }
  ]
  return tabForm
@@ -85,12 +75,14 @@
/**
 * @description tabs表单配置信息
 */
export function getTabsSetForm(setting, uuid) {
export function getTabsSetForm(setting, uuid, subtabs) {
  let modules = MenuUtils.getSupModules(window.GLOB.customMenu.components, uuid, window.GLOB.customMenu.interfaces)
  modules.push({
    value: 'preview',
    label: '上一页(url参数)'
  })
  let controlVals = subtabs.map(item => ({uuid: item.uuid, label: item.label, value: item.controlVal}))
  const tabForm = [
    {
@@ -112,22 +104,6 @@
      precision: 0,
      required: true
    },
    // {
    //   type: 'select',
    //   field: 'position',
    //   label: '标签位置',
    //   initval: setting.position || 'top',
    //   required: true,
    //   options: [
    //     {value: 'top', label: 'top'},
    //     {value: 'bottom', label: 'bottom'},
    //     {value: 'left', label: 'left'},
    //     {value: 'right', label: 'right'},
    //   ],
    //   controlFields: [
    //     {field: 'display', values: ['top', 'bottom']},
    //   ]
    // },
    {
      type: 'radio',
      field: 'display',
@@ -151,6 +127,7 @@
      options: modules,
      controlFields: [
        {field: 'controlField', notNull: true},
        {field: 'controlVals', notNull: true},
        {field: 'swiper', values: ['']},
      ],
    },
@@ -200,6 +177,33 @@
      ],
      forbid: sessionStorage.getItem('editMenuType') === 'popview'
    },
    {
      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