From f3167f8371d19d0ea8fe7d0e7af5517ff0b08cd2 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 07 四月 2021 23:25:29 +0800
Subject: [PATCH] 2021-04-07

---
 src/templates/calendarconfig/index.jsx |   24 +++++++-----------------
 1 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/src/templates/calendarconfig/index.jsx b/src/templates/calendarconfig/index.jsx
index 506fe3d..10dec96 100644
--- a/src/templates/calendarconfig/index.jsx
+++ b/src/templates/calendarconfig/index.jsx
@@ -23,6 +23,7 @@
 const { Panel } = Collapse
 const { confirm } = Modal
 
+const UrlFieldComponent = asyncComponent(() => import('@/menu/urlfieldcomponent'))
 const EditComponent = asyncComponent(() => import('@/templates/zshare/editcomponent'))
 const SettingComponent = asyncComponent(() => import('@/templates/sharecomponent/settingcalcomponent'))
 const TabComponent = asyncComponent(() => import('./tabcomponent'))
@@ -39,10 +40,9 @@
   }
 
   state = {
-    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,        // 瀛楀吀
+    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,        // 瀛楀吀
     config: null,            // 椤甸潰閰嶇疆
     visible: false,          // 鎼滅储鏉′欢銆佹寜閽�佹樉绀哄垪锛屾ā鎬佹鏄剧ず鎺у埗
-    tableFields: [],         // 宸查�夎〃瀛楁闆�
     fields: null,            // 鎼滅储鏉′欢鍙婃樉绀哄垪锛屽彲閫夊瓧娈�
     formlist: null,          // 鎼滅储鏉′欢銆佹寜閽�佹樉绀哄垪琛ㄥ崟瀛楁
     menuloading: false,      // 鑿滃崟淇濆瓨涓�
@@ -710,18 +710,6 @@
       config: config
     })
   }
-  
-  /**
-   * @description 鏇存柊甯哥敤琛ㄤ俊鎭紝蹇嵎娣诲姞鍚庢洿鏂伴厤缃俊鎭�
-   */
-  updatetable = (config, fields) => {
-    const { tableFields } = this.state
-
-    this.setState({
-      config: config,
-      tableFields: fields ? fields : tableFields
-    })
-  }
 
   // 骞村垏鎹㈡椂閲嶆柊鐢熸垚鏁版嵁
   changeDate = (year) => {
@@ -749,11 +737,15 @@
                   dict={this.state.dict}
                   updatemenu={this.updateconfig}
                 />
+                {config ? <UrlFieldComponent
+                  config={config}
+                  updateConfig={this.updateconfig}
+                /> : null}
                 {/* 琛ㄥ悕娣诲姞 */}
                 <TableComponent
                   config={config}
                   containerId="subtable-basedata"
-                  updatetable={this.updatetable}
+                  updatetable={this.updateconfig}
                 />
               </Panel>
               {/* 鎼滅储鏉′欢娣诲姞 */}
@@ -766,7 +758,6 @@
                 <FieldsComponent
                   config={config}
                   type="search"
-                  tableFields={this.state.tableFields}
                   updatefield={this.updateconfig}
                 />
               </Panel>
@@ -789,7 +780,6 @@
               <SettingComponent
                 config={config}
                 MenuID={menu.MenuID}
-                tableFields={this.state.tableFields}
                 updateConfig={this.updateconfig}
               />
               <SearchComponent

--
Gitblit v1.8.0