From da64ab0923bf8817fc8599a6e37b953ce38f64c8 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 27 八月 2023 18:37:36 +0800
Subject: [PATCH] 2023-08-27

---
 src/views/tabledesign/index.jsx |   58 ++++++----------------------------------------------------
 1 files changed, 6 insertions(+), 52 deletions(-)

diff --git a/src/views/tabledesign/index.jsx b/src/views/tabledesign/index.jsx
index 759be21..4696876 100644
--- a/src/views/tabledesign/index.jsx
+++ b/src/views/tabledesign/index.jsx
@@ -42,7 +42,6 @@
 const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent'))
 const PasteBaseTable = asyncComponent(() => import('@/menu/components/share/pastebasetable'))
 
-sessionStorage.setItem('isEditState', 'true')
 sessionStorage.setItem('appType', '')          // 搴旂敤绫诲瀷
 document.body.className = ''
 
@@ -71,7 +70,6 @@
     }
     
     if (!sessionStorage.getItem('UserID')) {
-      sessionStorage.removeItem('isEditState')
       sessionStorage.removeItem('appType')
       this.props.history.replace('/login')
       return
@@ -116,7 +114,6 @@
     MKEmitter.addListener('changePopview', this.initPopview)
     MKEmitter.addListener('triggerMenuSave', this.triggerMenuSave)
     setTimeout(() => {
-      this.getPrintTemp()
       this.getRoleFields()
       setGLOBFuncs()
     }, 1000)
@@ -193,50 +190,6 @@
     if (this.state.view === 'popview') return
     
     this.submitConfig()
-  }
-
-  getPrintTemp = () => {
-    if (!sessionStorage.getItem('printTemps')) {
-      let _sql = `select ID,Images,PrintTempNO+PrintTempName as PN from sPrintTemplate 
-      where appkey= @appkey@ and Deleted=0 and typechartwo='web_print'
-      union select ID,Images,a.PrintTempNO+PrintTempName as PN 
-      from (select * from sPrintTemplate where appkey= '' and Deleted=0 and typechartwo='web_print') a 
-      left join (select PrintTempNO from sPrintTemplate where appkey= @appkey@ and Deleted=0 ) b 
-      on a.PrintTempNO=b.PrintTempNO 
-      left join (select Srcid from sPrintTemplate_Log where appkey='' and apicode= @appkey@ and Deleted=0 ) c 
-      on a.ID=c.Srcid where b.PrintTempNO is null and c.Srcid is null`
-  
-      let param = {
-        func: 'sPC_Get_SelectedList',
-        LText: Utils.formatOptions(_sql),
-        obj_name: 'data',
-        arr_field: 'PN,ID,Images'
-      }
-  
-      param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-      param.secretkey = Utils.encrypt(param.LText, param.timestamp)
-  
-      param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉
-  
-      Api.getSystemConfig(param).then(res => {
-        if (res.status) {
-          let temps = res.data.map(temp => {
-            return {
-              value: temp.ID,
-              text: temp.PN
-            }
-          })
-  
-          sessionStorage.setItem('printTemps', JSON.stringify(temps))
-        } else {
-          notification.warning({
-            top: 92,
-            message: res.message,
-            duration: 5
-          })
-        }
-      })
-    }
   }
 
   initPopview = (card, btn) => {
@@ -390,7 +343,7 @@
       MenuID: MenuId
     }
 
-    Api.getSystemConfig(param).then(result => {
+    Api.getCloudConfig(param).then(result => {
       if (result.status) {
         let config = null
 
@@ -666,7 +619,7 @@
       btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
 
       new Promise(resolve => {
-        Api.getSystemConfig(param).then(res => {
+        Api.getCloudConfig(param).then(res => {
           resolve(res)
         }, this.netError)
       }).then(res => {
@@ -680,7 +633,7 @@
           oriConfig: fromJS(config).toJS(),
         })
 
-        return Api.getSystemConfig(btnParam)
+        return Api.getCloudConfig(btnParam)
       }).then(res => {
         this.setState({
           menuloading: false
@@ -694,7 +647,6 @@
             message: '淇濆瓨鎴愬姛',
             duration: 2
           })
-          MKEmitter.emit('completeSave')
         } else {
           notification.warning({
             top: 92,
@@ -702,6 +654,7 @@
             duration: 5
           })
         }
+        MKEmitter.emit('completeSave')
       }, this.netError)
     }, 300 + (+sessionStorage.getItem('mkDelay')))
   }
@@ -718,11 +671,12 @@
         duration: 5
       })
     }
+    MKEmitter.emit('completeSave')
   }
 
   getRoleFields = () => {
     if (sessionStorage.getItem('sysRoles')) return
-    Api.getSystemConfig({func: 'sPC_Get_Roles_sModular'}).then(res => {
+    Api.getCloudConfig({func: 'sPC_Get_Roles_sModular'}).then(res => {
       if (res.status) {
         let _permFuncField = []
         let _sysRoles = []

--
Gitblit v1.8.0