From f9816a4078fdba44115c69025d9982997f23b484 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 29 四月 2024 16:00:49 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/tabviews/basetable/index.jsx |   35 +++++++++++++++++++++--------------
 1 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/src/tabviews/basetable/index.jsx b/src/tabviews/basetable/index.jsx
index 83f496c..56d1f89 100644
--- a/src/tabviews/basetable/index.jsx
+++ b/src/tabviews/basetable/index.jsx
@@ -213,18 +213,6 @@
       config.components.forEach(component => {
         if (component.type === 'tabs') return
 
-        if (param.$searchkey) {
-          component.search = component.search.map(item => {
-            if (['text', 'select', 'link', 'checkcard'].includes(item.type) && param.$searchkey === item.field) {
-              item.initval = param.$searchval
-            }
-  
-            return item
-          })
-
-          component.$searches = Utils.initMainSearch(component.search)
-        }
-
         if (component.$searches.length) {
           component.$main = true
           
@@ -358,6 +346,14 @@
       // 鎼滅储鏉′欢鍒濆鍖�
       Utils.initSearchVal(item)
 
+      if (urlparam.$searchkey) {
+        item.search.forEach(cell => {
+          if (urlparam.$searchkey === cell.field.toLowerCase() && ['text', 'select', 'link', 'checkcard'].includes(cell.type)) {
+            cell.initval = urlparam.$searchval
+          }
+        })
+      }
+
       item.$searches = Utils.initMainSearch(item.search)
 
       let statFields = []
@@ -397,7 +393,7 @@
                   cell = this.getPrinter(cell, item.uuid)
                 }
 
-                return skip || permAction[cell.uuid]
+                return skip || permAction[cell.uuid] || cell.permission === 'false'
               } else if (['text', 'number', 'formula'].includes(cell.eleType)) {
                 if (!cell.height) {
                   cell.innerHeight = 'auto'
@@ -410,8 +406,19 @@
                 }
               }
 
+              if (cell.linkmenu && cell.linkmenu.length > 0) {
+                let menu_id = cell.linkmenu.pop()
+                cell.linkThdMenu = window.GLOB.mkThdMenus.get(menu_id) || ''
+                if (!cell.linkThdMenu) {
+                  cell.link = ''
+                }
+              }
+
               if (cell.marks && cell.marks.length === 0) {
                 cell.marks = null
+              }
+              if (cell.anchors && cell.anchors.length === 0) {
+                cell.anchors = null
               }
 
               return true
@@ -453,7 +460,7 @@
             cell = this.getPrinter(cell, item.uuid)
           }
 
-          return skip || permAction[cell.uuid]
+          return skip || permAction[cell.uuid] || cell.permission === 'false'
         })
       }
       

--
Gitblit v1.8.0