From 97abf7be71f356c0f2e67be069a79d18e90bb7fa Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 26 九月 2024 17:40:06 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/index.js                                             |   14 +++---
 src/tabviews/custom/popview/index.jsx                    |    2 +
 src/views/billprint/index.jsx                            |   12 ++---
 src/menu/components/share/actioncomponent/formconfig.jsx |    8 ++--
 src/tabviews/zshare/actionList/normalbutton/index.jsx    |   41 +++++++++++++++++---
 src/utils/utils-custom.js                                |    2 
 src/utils/utils.js                                       |    6 ++
 7 files changed, 59 insertions(+), 26 deletions(-)

diff --git a/src/index.js b/src/index.js
index 78cea1c..89c1f87 100644
--- a/src/index.js
+++ b/src/index.js
@@ -188,14 +188,14 @@
       GLOB.baseurl = GLOB.location + '/' + GLOB.service
       GLOB.linkurl = GLOB.baseurl + 'index.html'
       GLOB.dataFormat = false
-
-      let mark = sessionStorage.getItem('system_mark')
-      let _mark = `sys_${GLOB.service.replace('/', '') || 'service'}`
-      if (mark && mark !== _mark) {
-        sessionStorage.clear()
-      }
-      sessionStorage.setItem('system_mark', _mark)
     }
+    
+    let mark = sessionStorage.getItem('system_mark')
+    let _mark = `sys_${GLOB.service.replace('/', '') || 'service'}`
+    if (mark && mark !== _mark) {
+      sessionStorage.clear()
+    }
+    sessionStorage.setItem('system_mark', _mark)
 
     if (config.mainkey && GLOB.sysType !== 'cloud' && config.mainkey !== options.cakey) {
       GLOB.localkey = GLOB.appkey
diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index 5dc2f82..e1544de 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -803,7 +803,7 @@
       key: 'execError',
       label: '澶辫触鍚�',
       initVal: card.execError || 'never',
-      tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳锛堝脊绐楁寜閽級涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級銆�' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂扮粍浠讹紱閫夋嫨鍒锋柊琛� / 缁勪欢鏃讹紝濡傛灉褰撳墠琛屾暟鎹笉瀛樺湪浼氬埛鏂扮粍浠躲�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級銆�',
+      tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳锛堝脊绐楁寜閽級涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級锛汙open_target_menu@ 鍙墽琛屾墦寮�鑿滃崟銆�' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂扮粍浠讹紱閫夋嫨鍒锋柊琛� / 缁勪欢鏃讹紝濡傛灉褰撳墠琛屾暟鎹笉瀛樺湪浼氬埛鏂扮粍浠躲�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級锛汙open_target_menu@ 鍙墽琛屾墦寮�鑿滃崟銆�',
       required: true,
       options: [{
         value: 'never',
@@ -1073,7 +1073,7 @@
       type: !appType ? 'cascader' : 'select',
       key: 'openmenu',
       label: '鎵撳紑鑿滃崟',
-      tooltip: '鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勮彍鍗曘��',
+      tooltip: '鎵ц鎴愬姛鍚庯紙鎴栧け璐ユ椂杩斿洖@open_target_menu@锛夐渶瑕佹墦寮�鐨勮彍鍗曘��',
       initVal: card.openmenu || (!appType ? [] : ''),
       help: appType === 'mob' || appType === 'pc' ? '鍙繑鍥炰笂涓�椤点��' : null,
       extendName: 'MenuNo',
@@ -2235,7 +2235,7 @@
       key: 'execError',
       label: '澶辫触鍚�',
       initVal: card.execError || 'never',
-      tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳锛堝脊绐楁寜閽級涓缃叧闂悗鍒锋柊鍝竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級銆�' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂扮粍浠讹紱閫夋嫨鍒锋柊琛� / 缁勪欢鏃讹紝濡傛灉褰撳墠琛屾暟鎹笉瀛樺湪浼氬埛鏂扮粍浠躲�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級銆�',
+      tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳锛堝脊绐楁寜閽級涓缃叧闂悗鍒锋柊鍝竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級锛汙open_target_menu@ 鍙墽琛屾墦寮�鑿滃崟銆�' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂扮粍浠讹紱閫夋嫨鍒锋柊琛� / 缁勪欢鏃讹紝濡傛灉褰撳墠琛屾暟鎹笉瀛樺湪浼氬埛鏂扮粍浠躲�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級锛汙open_target_menu@ 鍙墽琛屾墦寮�鑿滃崟銆�',
       required: true,
       options: [{
         value: 'never',
@@ -2437,7 +2437,7 @@
       type: 'cascader',
       key: 'openmenu',
       label: '鎵撳紑鑿滃崟',
-      tooltip: '鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勮彍鍗曘��',
+      tooltip: '鎵ц鎴愬姛鍚庯紙鎴栧け璐ユ椂杩斿洖@open_target_menu@锛夐渶瑕佹墦寮�鐨勮彍鍗曘��',
       initVal: card.openmenu || [],
       extendName: 'MenuNo',
       required: false,
diff --git a/src/tabviews/custom/popview/index.jsx b/src/tabviews/custom/popview/index.jsx
index de34bf6..71b9453 100644
--- a/src/tabviews/custom/popview/index.jsx
+++ b/src/tabviews/custom/popview/index.jsx
@@ -895,6 +895,8 @@
 
       if (component.setting.interType !== 'system') return component
 
+      component.setting.uuid = component.uuid
+      
       // dataName 绯荤粺鐢熸垚鐨勬暟鎹簮鍚嶇О
       if (component.setting.sync === 'true') {
         component.dataName = 'mk' + component.uuid.slice(-18)
diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index 930e5db..eb53b14 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -2864,9 +2864,9 @@
         res.ErrCode = '-1'
       }
     }
-    if (/@close_tab@|@close_popup@|@goback@|@no_target_menu@/i.test(res.message)) {
-      sign = res.message.match(/@close_tab@|@close_popup@|@goback@|@no_target_menu@/i)[0].toLowerCase()
-      res.message = res.message.replace(/@close_tab@|@close_popup@|@goback@|@no_target_menu@/i, '')
+    if (/@close_tab@|@close_popup@|@goback@|@no_target_menu@|@open_target_menu@/i.test(res.message)) {
+      sign = res.message.match(/@close_tab@|@close_popup@|@goback@|@no_target_menu@|@open_target_menu@/i)[0].toLowerCase()
+      res.message = res.message.replace(/@close_tab@|@close_popup@|@goback@|@no_target_menu@|@open_target_menu@/i, '')
     }
 
     let id = ''
@@ -3601,9 +3601,9 @@
       if (!res.message) {
         res.ErrCode = '-1'
       }
-    } else if (/@close_tab@|@close_popup@|@goback@/i.test(res.message)) {
-      sign = res.message.match(/@close_tab@|@close_popup@|@goback@/i)[0].toLowerCase()
-      res.message = res.message.replace(/@close_tab@|@close_popup@|@goback@/i, '')
+    } else if (/@close_tab@|@close_popup@|@goback@|@open_target_menu@/i.test(res.message)) {
+      sign = res.message.match(/@close_tab@|@close_popup@|@goback@|@open_target_menu@/i)[0].toLowerCase()
+      res.message = res.message.replace(/@close_tab@|@close_popup@|@goback@|@open_target_menu@/i, '')
     }
 
     if (res.ErrCode === 'E') {
@@ -3734,6 +3734,35 @@
       MKEmitter.emit('refreshDebugTable')
     }
 
+    if (sign === '@open_target_menu@' && btn.openmenu && Array.isArray(btn.openmenu) && btn.openmenu.length > 0) {
+      let id = ''
+      if (this.state.selines && this.state.selines.length > 0 && btn.Ot !== 'notRequired') {
+        if (btn.Ot === 'requiredOnce') {
+          id = this.state.selines.map(d => d.$$uuid).filter(Boolean).join(',')
+        } else {
+          id = this.state.selines[0].$$uuid
+        }
+      }
+
+      let menuId = btn.openmenu.slice(-1)[0]
+      let menu = null
+
+      if (window.GLOB.mkThdMenus.has(menuId)) {
+        menu = {...window.GLOB.mkThdMenus.get(menuId), param: { $BID: id || '' }}
+      } else if (btn.MenuID) {
+        menu = {
+          MenuID: btn.MenuID,
+          MenuName: btn.MenuName,
+          type: btn.tabType,
+          param: { $BID: id || '' }
+        }
+      }
+
+      if (menu) {
+        MKEmitter.emit('modifyTabs', menu, true)
+      }
+    }
+
     if (btn.execError === 'popclose' && btn.$tabId) { // 鏍囩鍏抽棴鍒锋柊
       MKEmitter.emit('refreshPopButton', btn.$tabId)
     }
diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index b95f217..3d88af4 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -3083,7 +3083,7 @@
             if (['select', 'link', 'multiselect', 'checkcard', 'radio'].includes(cell.type) && cell.resourceType === '1' && cell.dataSource) {
               let msg = getFormSql(cell, '鎼滅储')
       
-              sqls.push({uuid: cell.uuid, type: 'sForm', ...msg})
+              sqls.push({uuid: md5(item.uuid + cell.uuid), type: 'sForm', ...msg})
             }
           })
         }
diff --git a/src/utils/utils.js b/src/utils/utils.js
index 48c79b6..47394e2 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -416,7 +416,11 @@
           item.$first = true
         }
       }
-      
+
+      if (window.backend && ['select', 'link', 'multiselect', 'checkcard', 'radio'].includes(item.type) && item.resourceType === '1') {
+        item.uuid = md5(config.uuid + item.uuid)
+      }
+
       item.oriInitval = item.initval
 
       if (values) {
diff --git a/src/views/billprint/index.jsx b/src/views/billprint/index.jsx
index 5b7ea20..183f6cb 100644
--- a/src/views/billprint/index.jsx
+++ b/src/views/billprint/index.jsx
@@ -962,7 +962,6 @@
 
     let deffers = params.map(item => {
       let componentId = item.componentId
-      let ispublic = item.public
       delete item.componentId
       delete item.public
       return new Promise(resolve => {
@@ -984,13 +983,12 @@
           } else {
             res.componentId = componentId
 
-            if (ispublic) {
-              let _data = { $$empty: true }
-              if (res.data && res.data[0]) {
-                _data = res.data[0]
-              }
-              window.GLOB.CacheData.set(componentId, _data)
+            let _data = { $$empty: true }
+            if (res.data && res.data[0]) {
+              _data = res.data[0]
             }
+            window.GLOB.CacheData.set(componentId, _data)
+
             resolve(res)
           }
         })

--
Gitblit v1.8.0