From 34e7681fd12b1c4e4994d3bea1a553870e10bc50 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 11 三月 2023 17:58:54 +0800
Subject: [PATCH] 2023-03-11

---
 src/views/mobdesign/index.jsx |   77 ++++++++++++++++----------------------
 1 files changed, 33 insertions(+), 44 deletions(-)

diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx
index 1091b21..7e740f5 100644
--- a/src/views/mobdesign/index.jsx
+++ b/src/views/mobdesign/index.jsx
@@ -34,6 +34,7 @@
 const TableNodes = asyncComponent(() => import('@/menu/tablenodes'))
 const BgController = asyncComponent(() => import('@/pc/bgcontroller'))
 const ReplaceField = asyncComponent(() => import('@/menu/replaceField'))
+const NormalCss = asyncComponent(() => import('@/menu/normalCss'))
 const SysInterface = asyncComponent(() => import('@/menu/sysinterface'))
 const Quotecomponent = asyncComponent(() => import('@/pc/quotecomponent'))
 const PasteController = asyncComponent(() => import('@/menu/pastecontroller'))
@@ -147,7 +148,6 @@
     MKEmitter.addListener('changeEditMenu', this.changeEditMenu)
     setTimeout(() => {
       this.getAppPictures()
-      this.getSmStemp()
       this.getRoleFields()
       setGLOBFuncs()
     }, 1000)
@@ -336,41 +336,6 @@
       return false
     }
     return true
-  }
-
-  getSmStemp = () => {
-    if (!sessionStorage.getItem('msgTemplate')) {
-      let _sql = `select聽ID,TemplateCode,SignName+'_'+describe as SignName from (select * from bd_msn_sms_temp where deleted=0 and status=20 ) a 
-        inner join (select openid from sapp where id='${window.GLOB.appkey}') b 
-        on a.openid=b.openid`
-  
-      _sql = Utils.formatOptions(_sql)
-  
-      let param = {
-        func: 'sPC_Get_SelectedList',
-        LText: _sql,
-        obj_name: 'data',
-        arr_field: 'ID,TemplateCode,SignName'
-      }
-      
-      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 => {
-        let msgs = []
-        if (!res.status) {
-          notification.warning({
-            top: 92,
-            message: res.message,
-            duration: 5
-          })
-        } else if (res.data) {
-          msgs = res.data
-        }
-        sessionStorage.setItem('msgTemplate', JSON.stringify(msgs))
-      })
-    }
   }
 
   changeEditMenu = (menu) => {
@@ -841,16 +806,15 @@
           }
         }
       } else {
-        let uuids = {} // 閲嶇疆鍏叡鏁版嵁婧�
+        let commonId = Utils.getuuid()
         if (config.interfaces && config.interfaces.length > 0) {
           config.interfaces = config.interfaces.map(inter => {
-            uuids[inter.uuid] = this.getuuid()
-            inter.uuid = uuids[inter.uuid]
+            inter.uuid = md5(commonId + inter.uuid)
             return inter
           })
         }
 
-        config.components = MenuUtils.resetConfig(config.components, uuids, urlParam.clearMenu)
+        config.components = MenuUtils.resetConfig(config.components, commonId, urlParam.clearMenu)
 
         if (config.version !== 2.0) {
           config.components = this.collectTB(config.components)
@@ -1060,6 +1024,17 @@
           })
           item.subcards.forEach(card => {
             card.elements && card.elements.forEach(cell => {
+              if (cell.eleType !== 'button' || cell.hidden === 'true') return
+
+              m.children.push({
+                key: cell.uuid,
+                title: cell.label,
+              })
+            })
+
+            if (item.subtype !== 'dualdatacard') return
+            
+            card.backElements && card.backElements.forEach(cell => {
               if (cell.eleType !== 'button' || cell.hidden === 'true') return
 
               m.children.push({
@@ -1595,14 +1570,14 @@
                     }
 
                     resolve(result)
-                  })
+                  }, this.netError)
                 } else {
                   resolve(res)
                 }
               } else {
                 resolve(res)
               }
-            })
+            }, this.netError)
           }
         }
       }).then(res => { // 椤甸潰淇濆瓨
@@ -1640,8 +1615,21 @@
             duration: 5
           })
         }
-      })
+      }, this.netError)
     }, 300 + (+sessionStorage.getItem('mkDelay')))
+  }
+
+  netError = (error) => {
+    this.setState({
+      menuloading: false
+    })
+    if (!error) {
+      notification.warning({
+        top: 92,
+        message: '淇濆瓨澶辫触锛岃妫�鏌ョ綉缁滄槸鍚︽甯搞��',
+        duration: 5
+      })
+    }
   }
 
   getRoleFields = () => {
@@ -2026,6 +2014,7 @@
                     {config ? <TableComponent config={config} updatetable={this.updateConfig}/> : null}
                     {config ? <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>鑿滃崟ID</Paragraph> : null}
                     {config ? <Paragraph style={{padding: '10px 0px 0px 18px'}} copyable={{ text:  `${window.GLOB.baseurl}mob/index.html#/index/${sessionStorage.getItem('kei_no')}/${sessionStorage.getItem('typename')}/${sessionStorage.getItem('lang')}/${MenuId}/@BID@` }}>鑿滃崟閾炬帴</Paragraph> : null}
+                    {config ? <NormalCss config={config} updateConfig={this.updateConfig}/> : null}
                   </Panel>
                   {/* 缁勪欢娣诲姞 */}
                   <Panel header="缁勪欢" className="component" key="component">
@@ -2034,7 +2023,7 @@
                   <Panel header="鍏冪礌" key="element">
                     <Modulecell />
                   </Panel>
-                  <Panel header={'椤甸潰鏍峰紡'} key="background">
+                  <Panel header="椤甸潰鏍峰紡" key="background">
                     {config ? <BgController config={config} updateConfig={this.updateConfig} /> : null}
                   </Panel>
                 </Collapse>

--
Gitblit v1.8.0