From 3c50bfdd8d605b3dd449adcb54cdf7f7c25d6c16 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 04 十一月 2022 15:46:05 +0800
Subject: [PATCH] 2022-11-04

---
 src/tabviews/basetable/index.jsx |   48 ++++++++++++++++++++++++++++++++----------------
 1 files changed, 32 insertions(+), 16 deletions(-)

diff --git a/src/tabviews/basetable/index.jsx b/src/tabviews/basetable/index.jsx
index a82ed69..f788565 100644
--- a/src/tabviews/basetable/index.jsx
+++ b/src/tabviews/basetable/index.jsx
@@ -25,7 +25,8 @@
     Tab: PropTypes.string,       // 寮圭獥鏍囩
     MenuID: PropTypes.string,    // 鑿滃崟Id
     MenuNo: PropTypes.string,    // 鑿滃崟鍙傛暟
-    MenuName: PropTypes.string   // 鑿滃崟鍚嶇О
+    MenuName: PropTypes.string,  // 鑿滃崟鍚嶇О
+    changeTemp: PropTypes.func
   }
 
   state = {
@@ -62,25 +63,11 @@
 
       try { // 閰嶇疆淇℃伅瑙f瀽
         config = window.decodeURIComponent(window.atob(result.LongParam))
+        config = config.replace(/@mywebsite@\//ig, window.GLOB.baseurl)
         config = JSON.parse(config)
       } catch (e) {
         console.warn('Parse Failure')
         config = ''
-      }
-
-      // HS涓嶄娇鐢ㄨ嚜瀹氫箟璁剧疆
-      if (result.LongParamUser && !window.GLOB.mkHS) {
-        try { // 閰嶇疆淇℃伅瑙f瀽
-          let userConfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParamUser)))
-          if (userConfig) {
-            shortcuts = userConfig.action
-            userConfig.printers.forEach(item => {
-              window.GLOB.UserCacheMap.set(item.parentId + item.uuid, item)
-            })
-          }
-        } catch (e) {
-          console.warn('Parse Failure')
-        }
       }
 
       // 椤甸潰閰嶇疆瑙f瀽閿欒鏃舵彁绀�
@@ -102,6 +89,35 @@
         return
       }
 
+      // 妯℃澘閿欒
+      if (config.Template !== 'BaseTable') {
+        if (config.Template === 'CustomPage' || config.Template === 'CommonTable') {
+          this.props.changeTemp(MenuID, config.Template)
+        } else {
+          this.setState({
+            viewlost: true,
+            loadingview: false,
+            lostmsg: '鑿滃崟淇℃伅閿欒锛屽彲鑳藉師鍥狅細1銆佸綋鍓嶇敤鎴锋棤鏉冮檺锛�2銆佹墦寮�姝よ彍鍗曠殑鎸夐挳闇�瑕佹洿鏂般��'
+          })
+        }
+        return
+      }
+
+      // HS涓嶄娇鐢ㄨ嚜瀹氫箟璁剧疆
+      if (result.LongParamUser && !window.GLOB.mkHS) {
+        try { // 閰嶇疆淇℃伅瑙f瀽
+          let userConfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParamUser)))
+          if (userConfig) {
+            shortcuts = userConfig.action
+            userConfig.printers.forEach(item => {
+              window.GLOB.UserCacheMap.set(item.parentId + item.uuid, item)
+            })
+          }
+        } catch (e) {
+          console.warn('Parse Failure')
+        }
+      }
+
       // 鏉冮檺杩囨护
       let roleId = sessionStorage.getItem('role_id') || '' // 瑙掕壊ID
       let skip = window.GLOB.mkHS

--
Gitblit v1.8.0