From 6de5ea0a0c6f06e0321ae41846473118fb85de48 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 20 十月 2022 15:04:24 +0800
Subject: [PATCH] 2022-10-20

---
 src/menu/components/tabs/table-tabs/options.jsx |  219 +-----------------------------------------------------
 1 files changed, 4 insertions(+), 215 deletions(-)

diff --git a/src/menu/components/tabs/table-tabs/options.jsx b/src/menu/components/tabs/table-tabs/options.jsx
index bc2db9d..3793f20 100644
--- a/src/menu/components/tabs/table-tabs/options.jsx
+++ b/src/menu/components/tabs/table-tabs/options.jsx
@@ -1,10 +1,7 @@
-import MenuUtils from '@/utils/utils-custom.js'
-
 /**
  * @description tab琛ㄥ崟閰嶇疆淇℃伅
  */
-export function getTabForm(tab, setting) {
-  let appType = sessionStorage.getItem('appType')
+export function getTabForm(tab) {
   let roleList = sessionStorage.getItem('sysRoles')
 
   if (roleList) {
@@ -24,7 +21,7 @@
       label: '鍚嶇О',
       initval: tab.label || '',
       required: true,
-      focus: true,
+      focus: true
     },
     {
       type: 'mkicon',
@@ -32,43 +29,7 @@
       label: '鍥炬爣',
       initval: tab.icon || '',
       required: false,
-      allowClear: true,
-    },
-    // {
-    //   type: 'radio',
-    //   field: 'hasSearch',
-    //   label: '鎼滅储',
-    //   initval: tab.hasSearch || 'false',
-    //   required: false,
-    //   options: [
-    //     {value: 'false', label: '鏃�'},
-    //     {value: 'icon', label: '鏈�'},
-    //   ],
-    //   forbid: appType !== 'mob' || setting.position !== 'top' || setting.display !== 'inline-block',
-    //   span: 22
-    // },
-    {
-      type: 'text',
-      field: 'controlVal',
-      label: '闅愯棌鏍囪',
-      initval: tab.controlVal || '',
-      tooltip: '褰撶鐢ㄥ瓧娈靛�间笌闅愯棌鏍囪鐩哥瓑鏃讹紝鏍囩椤典細闅愯棌銆傛敞锛氬涓�艰鐢ㄩ�楀彿鍒嗛殧銆�',
-      required: false,
-    },
-    {
-      type: 'text',
-      field: 'selectVal',
-      label: '閫変腑鏍囪',
-      initval: tab.selectVal || '',
-      tooltip: '褰撻�変腑瀛楁鍊间笌閫変腑鏍囪鐩哥瓑鏃讹紝鏍囩椤甸粯璁ら�変腑銆�',
-      required: false
-    },
-    {
-      type: 'color',
-      field: 'backgroundColor',
-      label: '鑳屾櫙(鍐呭鍖�)',
-      initval: tab.backgroundColor || 'transparent',
-      required: false,
+      allowClear: true
     },
     {
       type: 'radio',
@@ -87,181 +48,9 @@
       label: '榛戝悕鍗�',
       initval: tab.blacklist || [],
       required: false,
-      options: roleList,
-      forbid: !!appType,
+      options: roleList
     },
   ]
 
   return tabForm
 }
-
-/**
- * @description tabs琛ㄥ崟閰嶇疆淇℃伅
- */
-export function getTabsSetForm(setting, uuid) {
-  let appType = sessionStorage.getItem('appType')
-  let roleList = sessionStorage.getItem('sysRoles')
-
-  let modules = MenuUtils.getSupModules(window.GLOB.customMenu.components, uuid) || []
-  modules.push({
-    value: 'preview',
-    label: '涓婁竴椤碉紙url鍙傛暟锛�'
-  })
-
-  if (roleList) {
-    try {
-      roleList = JSON.parse(roleList)
-    } catch (e) {
-      roleList = []
-    }
-  } else {
-    roleList = []
-  }
-
-  const tabForm = [
-    {
-      type: 'text',
-      field: 'name',
-      label: '缁勪欢鍚嶇О',
-      initval: setting.name || '',
-      tooltip: '鐢ㄤ簬缁勪欢闂寸殑鍖哄垎銆�',
-      required: true
-    },
-    {
-      type: 'number',
-      field: 'width',
-      label: '瀹藉害',
-      initval: setting.width || 24,
-      tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��',
-      min: 1,
-      max: 24,
-      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: 'tabStyle',
-      label: '椤电鏍峰紡',
-      initval: setting.tabStyle || 'line',
-      tooltip: '鏍囩浣嶇疆涓簍op鏃舵湁鏁堬紝榛樿鍊间负line銆�',
-      required: true,
-      options: [
-        {value: 'line', label: 'line'},
-        {value: 'card', label: 'card'},
-      ],
-    },
-    {
-      type: 'radio',
-      field: 'autoSwitch',
-      label: '鑷姩鍒囨崲',
-      initval: setting.autoSwitch || 'false',
-      tooltip: '瀛樺湪涓や釜鍙婁互涓婃爣绛炬椂鏈夋晥銆�',
-      required: false,
-      options: [
-        {value: 'true', label: '鏄�'},
-        {value: 'false', label: '鍚�'},
-      ],
-      controlFields: [
-        {field: 'interval', values: ['true']},
-        {field: 'tabLabel', values: ['true']},
-      ]
-    },
-    {
-      type: 'number',
-      field: 'interval',
-      label: '闂撮殧锛坰锛�',
-      initval: setting.interval || 5,
-      min: 1,
-      max: 1000,
-      precision: 0,
-      required: true
-    },
-    {
-      type: 'radio',
-      field: 'tabLabel',
-      label: '鏍囩鏍�',
-      initval: setting.tabLabel || 'show',
-      required: false,
-      options: [
-        {value: 'show', label: '鏄剧ず'},
-        {value: 'hide', label: '闅愯棌'},
-      ]
-    },
-    {
-      type: 'cascader',
-      field: 'supModule',
-      label: '涓婄骇缁勪欢',
-      initval: setting.supModule || [],
-      tooltip: '鏍囩缁勫彲浠ラ�夋嫨涓婄骇缁勪欢锛屽~鍏ョ鐢ㄥ瓧娈碉紝鐢ㄤ簬鎺у埗鏍囩闅愯棌銆�',
-      help: '鐢ㄤ簬鎺у埗鏍囩椤甸殣钘忋��',
-      required: false,
-      allowClear: true,
-      options: modules,
-      controlFields: [
-        {field: 'controlField', notNull: true},
-      ],
-    },
-    {
-      type: 'text',
-      field: 'controlField',
-      label: '绂佺敤瀛楁',
-      initval: setting.controlField || '',
-      tooltip: '鐢ㄤ簬鎺у埗鏍囩闅愯棌鐨勫瓧娈碉紝鍦ㄦ爣绛句腑濉叆闅愯棌鏍囪銆�',
-      required: true,
-    },
-    {
-      type: 'text',
-      field: 'selectField',
-      label: '閫変腑瀛楁',
-      initval: setting.selectField || '',
-      tooltip: '鐢ㄤ簬鎺у埗鏍囩椤靛垵濮嬪寲閫変腑锛屽湪鏍囩涓~鍏ラ�変腑鏍囪锛屾敞锛氭暟鎹簮浜巙rl鍙傛暟銆�',
-      required: false
-    },
-    {
-      type: 'color',
-      field: 'backgroundColor',
-      label: '鑳屾櫙(鏍囬鏍�)',
-      initval: setting.backgroundColor || 'transparent',
-      required: false
-    },
-    {
-      type: 'radio',
-      field: 'permission',
-      label: '鏉冮檺楠岃瘉',
-      initval: setting.permission || 'false',
-      required: false,
-      options: [
-        {value: 'true', label: '鍚敤'},
-        {value: 'false', label: '绂佺敤'},
-      ],
-      forbid: !appType
-    },
-    {
-      type: 'multiselect',
-      field: 'blacklist',
-      label: '榛戝悕鍗�',
-      initval: setting.blacklist || [],
-      required: false,
-      options: roleList,
-      forbid: !!appType
-    },
-  ]
-
-  return tabForm
-} 
\ No newline at end of file

--
Gitblit v1.8.0