From da64ab0923bf8817fc8599a6e37b953ce38f64c8 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 27 八月 2023 18:37:36 +0800
Subject: [PATCH] 2023-08-27

---
 src/mob/components/tabs/antv-tabs/options.jsx |   78 ++++++++++++++++++++------------------
 1 files changed, 41 insertions(+), 37 deletions(-)

diff --git a/src/mob/components/tabs/antv-tabs/options.jsx b/src/mob/components/tabs/antv-tabs/options.jsx
index 9c4ddc7..3fe37fb 100644
--- a/src/mob/components/tabs/antv-tabs/options.jsx
+++ b/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

--
Gitblit v1.8.0