From 55a89127d14a20a96720d9050295743f2090f046 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 09 九月 2024 22:29:37 +0800
Subject: [PATCH] 2024-09-09

---
 src/views/pcdesign/index.jsx |   51 +++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 49 insertions(+), 2 deletions(-)

diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx
index db2af66..6162466 100644
--- a/src/views/pcdesign/index.jsx
+++ b/src/views/pcdesign/index.jsx
@@ -10,7 +10,7 @@
 
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
-import { getTables, getFuncsAndInters, getLangTrans } from '@/utils/utils-custom.js'
+import { getTables, getFuncsAndInters, getOutMessage, getLangTrans, getAllSqls } from '@/utils/utils-custom.js'
 import MKEmitter from '@/utils/events.js'
 import MenuUtils from '@/utils/utils-custom.js'
 import asyncComponent from '@/utils/asyncComponent'
@@ -1207,6 +1207,51 @@
         delete config.force
       }
 
+      let long_data = ''
+      if (window.backend && config.enabled) {
+        let sqls = getAllSqls(config)
+        let _t = moment().format('YYYYMMDDHHmmss')
+        let getguid = () => {
+          let uuid = ''
+          for (let i = 0; i < 18; i++) {
+            uuid += String.fromCharCode(Math.floor(Math.random() * 26) + 65)
+          }
+          return uuid
+        }
+
+        long_data = []
+        let oriIds = {}
+        if (config.allSqls) {
+          config.allSqls.forEach(item => {
+            if (!item.md5) return
+            oriIds[item.uuid + item.md5] = item.v_id
+          })
+        }
+        
+        config.allSqls = sqls.map(item => {
+          let v_id = _t + getguid()
+
+          if (oriIds[item.uuid + item.md5]) {
+            v_id = oriIds[item.uuid + item.md5]
+          }
+          
+          long_data.push(`${md5(window.GLOB.appkey + v_id)},${item.uuid},${v_id},${window.btoa(window.encodeURIComponent(item.LText))}`)
+          
+          return {
+            uuid: item.uuid,
+            v_id: v_id,
+            type: item.type,
+            reps: item.reps,
+            md5: item.md5 || '',
+            luser: item.luser === true
+          }
+        })
+
+        long_data = long_data.join(';')
+      } else {
+        delete config.allSqls
+      }
+
       if (config.cacheUseful !== 'true') {
         config.components = this.resetSyncQuery(config.components)
       }
@@ -1257,6 +1302,7 @@
       }
 
       let interfaces = getFuncsAndInters(config)
+      let msg = getOutMessage(config)
       roleParam.interfaces = interfaces
       let langSql = getLangTrans(config)
 
@@ -1272,9 +1318,10 @@
         TypeCharOne: sessionStorage.getItem('kei_no'),
         Typename: 'pc',
         MenuName: config.MenuName || '',
-        PageParam: JSON.stringify({Template: 'webPage', interfaces}),
+        PageParam: JSON.stringify({Template: 'webPage', interfaces, msg}),
         menus_rolelist: window.btoa(window.encodeURIComponent(JSON.stringify(roleParam))),
         open_edition: config.open_edition,
+        long_data: long_data,
         // LText: '',
         // LTexttb: '',
         menus_used_list,

--
Gitblit v1.8.0