From 23cb54bbb041413ba327d046a4b396267ef2ecfe Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 13 一月 2021 19:31:56 +0800
Subject: [PATCH] 2021-01-13

---
 src/tabviews/subtable/index.jsx |   39 ++++++++++++++-------------------------
 1 files changed, 14 insertions(+), 25 deletions(-)

diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx
index 6bee37b..6e798b6 100644
--- a/src/tabviews/subtable/index.jsx
+++ b/src/tabviews/subtable/index.jsx
@@ -174,31 +174,6 @@
       }
 
       let chartId = config.charts[0] ? config.charts[0].uuid : ''
-      let userConfig = null
-      if (window.GLOB.UserCacheMap.has(Tab.uuid)) {
-        userConfig = window.GLOB.UserCacheMap.get(Tab.uuid)
-      }
-
-      if (userConfig) {
-        config.action = config.action.map(item => {
-          if (userConfig[item.uuid]) {
-            item = {...item, ...userConfig.action[item.uuid]}
-          }
-
-          if (item.OpenType === 'funcbutton' && item.funcType === 'print' && item.verify && item.printer) {
-            item.verify.defaultPrinter = item.printer.defaultPrinter || ''
-            if (item.verify.printerTypeList && item.printer.printerList) {
-              item.verify.printerTypeList = item.verify.printerTypeList.map(cell => {
-                cell.printer = item.printer.printerList[cell.Value] || ''
-                
-                return cell
-              })
-            }
-          }
-
-          return item
-        })
-      }
 
       // 1銆佺瓫閫夊瓧娈甸泦锛�2銆佽繃婊ら殣钘忓垪鍙婂悎骞跺垪涓殑瀛楁uuid
       config.columns.forEach(col => {
@@ -260,6 +235,20 @@
         item.logLabel = Tab.label + '-' + item.label // 鐢ㄤ簬sPC_TableData_InUpDe璁板綍鎿嶄綔鎸夐挳
         item.$menuId = this.props.MenuID
 
+        if (item.OpenType === 'funcbutton' && item.funcType === 'print' && item.verify) { // 鎵撳嵃鏈鸿缃�
+          let _item = window.GLOB.UserCacheMap.get(Tab.uuid + item.uuid)
+
+          if (_item) {
+            item.verify.defaultPrinter = _item.printer || ''
+            if (item.verify.printerTypeList && _item.printerList) {
+              item.verify.printerTypeList = item.verify.printerTypeList.map(cell => {
+                cell.printer = _item.printerList[cell.Value] || ''
+  
+                return cell
+              })
+            }
+          }
+        }
         if (item.position === 'toolbar') {
           _actions.push(item)
         } else if (item.position === 'grid') {

--
Gitblit v1.8.0