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/commontable/index.jsx |   55 ++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 32 insertions(+), 23 deletions(-)

diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx
index 2a4f260..f224e98 100644
--- a/src/tabviews/commontable/index.jsx
+++ b/src/tabviews/commontable/index.jsx
@@ -36,7 +36,8 @@
     param: PropTypes.any,        // 鍏朵粬椤甸潰浼犻�掔殑鎼滅储鏉′欢绛夊弬鏁�
     MenuID: PropTypes.string,    // 鑿滃崟Id
     MenuNo: PropTypes.string,    // 鑿滃崟鍙傛暟
-    MenuName: PropTypes.string   // 鑿滃崟鍚嶇О
+    MenuName: PropTypes.string,  // 鑿滃崟鍚嶇О
+    changeTemp: PropTypes.func
   }
 
   state = {
@@ -91,13 +92,34 @@
 
       try { // 閰嶇疆淇℃伅瑙f瀽
         config = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam)))
-        config.MenuID = MenuID
-        config.MenuName = MenuName
-        config.setting.MenuName = MenuName
-        config.setting.$name = MenuName
       } catch (e) {
         console.warn('Parse Failure')
         config = ''
+      }
+
+      // 椤甸潰閰嶇疆瑙f瀽閿欒鏃舵彁绀�
+      if (!config) {
+        this.setState({
+          loadingview: false,
+          viewlost: true
+        })
+        return
+      }
+
+      // 椤甸潰鏈惎鐢ㄦ椂锛屾樉绀烘湭鍚敤椤甸潰
+      if (!config.enabled) {
+        this.setState({
+          loadingview: false,
+          viewlost: true,
+          lostmsg: this.state.dict['main.view.unenabled']
+        })
+        return
+      }
+
+      // 妯℃澘閿欒
+      if (config.Template === 'BaseTable' || config.Template === 'CustomPage') {
+        this.props.changeTemp(MenuID, config.Template)
+        return
       }
       
       // HS涓嶄娇鐢ㄨ嚜瀹氫箟璁剧疆
@@ -136,24 +158,11 @@
         }
       }
 
-      // 椤甸潰閰嶇疆瑙f瀽閿欒鏃舵彁绀�
-      if (!config) {
-        this.setState({
-          loadingview: false,
-          viewlost: true
-        })
-        return
-      }
-
-      // 椤甸潰鏈惎鐢ㄦ椂锛屾樉绀烘湭鍚敤椤甸潰
-      if (!config.enabled) {
-        this.setState({
-          loadingview: false,
-          viewlost: true,
-          lostmsg: this.state.dict['main.view.unenabled']
-        })
-        return
-      }
+      // 淇℃伅鍒濆鍖栬祴鍊�
+      config.MenuID = MenuID
+      config.MenuName = MenuName
+      config.setting.MenuName = MenuName
+      config.setting.$name = MenuName
 
       // 鐗堟湰鍏煎
       config = updateCommonTable(config)

--
Gitblit v1.8.0