From 6bbf496f57d1a6da1d9d1142a806600504567f35 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 13 九月 2024 23:40:20 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/views/rolemanage/index.jsx                        |    4 +-
 src/tabviews/custom/popview/index.jsx                 |    2 
 src/tabviews/zshare/mutilform/index.jsx               |   16 ++++++--
 src/tabviews/basetable/index.jsx                      |    2 
 src/tabviews/custom/index.jsx                         |    2 
 src/tabviews/zshare/actionList/normalbutton/index.jsx |    2 
 src/utils/utils-custom.js                             |   37 +++++++++++-------
 7 files changed, 41 insertions(+), 24 deletions(-)

diff --git a/src/tabviews/basetable/index.jsx b/src/tabviews/basetable/index.jsx
index d066c57..9af687c 100644
--- a/src/tabviews/basetable/index.jsx
+++ b/src/tabviews/basetable/index.jsx
@@ -521,7 +521,7 @@
     if (cell.OpenType === 'excelOut') { // 瀵煎嚭
       cell.$menuName = item.$menuname
     } else if (cell.OpenType === 'pop' && cell.modal) {
-      cell.modal.uuid = cell.uuid + 'pop'
+      cell.modal.uuid = cell.uuid + '_pop'
     }
 
     if (cell.verify) {
diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx
index 333a938..8e29805 100644
--- a/src/tabviews/custom/index.jsx
+++ b/src/tabviews/custom/index.jsx
@@ -981,7 +981,7 @@
         cell.modal.$cache = item.$cache
         cell.modal.$time = item.$time
       }
-      cell.modal.uuid = cell.uuid + 'pop'
+      cell.modal.uuid = cell.uuid + '_pop'
     }
 
     if (cell.verify) {
diff --git a/src/tabviews/custom/popview/index.jsx b/src/tabviews/custom/popview/index.jsx
index 9e557fc..de34bf6 100644
--- a/src/tabviews/custom/popview/index.jsx
+++ b/src/tabviews/custom/popview/index.jsx
@@ -672,7 +672,7 @@
     if (cell.OpenType === 'excelOut') { // 瀵煎嚭
       cell.$menuName = item.$menuname
     } else if (cell.OpenType === 'pop' && cell.modal) {
-      cell.modal.uuid = cell.uuid + 'pop'
+      cell.modal.uuid = cell.uuid + '_pop'
     }
 
     if (cell.verify) {
diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index 6918303..930e5db 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -836,7 +836,7 @@
 
     let formkeys = []
     formdata && formdata.forEach(form => {
-      if (!ex.reps.includes(form.key)) return
+      // if (!ex.reps.includes(form.key)) return
 
       formkeys.push(form.key)
 
diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx
index 15d2493..bf3c61e 100644
--- a/src/tabviews/zshare/mutilform/index.jsx
+++ b/src/tabviews/zshare/mutilform/index.jsx
@@ -4,6 +4,7 @@
 import { Form, Row, Col, notification, Tooltip, Rate } from 'antd'
 import { QuestionCircleOutlined, StarFilled } from '@ant-design/icons'
 import moment from 'moment'
+import md5 from 'md5'
 
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
@@ -782,7 +783,7 @@
   resetFocus = (id, field) => {
     const { action } = this.props
 
-    if (id !== action.uuid) return
+    if (id !== action.uuid.replace(/_pop$/, '')) return
 
     let focusId = ''
 
@@ -851,7 +852,7 @@
   }
 
   getFormData = (deForms) => {
-    if (window.backend && window.GLOB.CacheData.has('sql_' + deForms[0].uuid)) {
+    if (window.backend && window.GLOB.CacheData.has('sql_' + md5(this.props.action.uuid.replace(/_pop$/, '') + deForms[0].uuid))) {
       this.improveBackActionForm(deForms)
     } else if (deForms.length === 1) {
       this.improveSimpleActionForm(deForms)
@@ -889,9 +890,16 @@
     let skip = false
 
     deForms.forEach(item => {
-      let ex = window.GLOB.CacheData.get('sql_' + item.uuid)
+      let ex = window.GLOB.CacheData.get('sql_' + md5(action.uuid.replace(/_pop$/, '') + item.uuid))
       
-      if (!ex) return
+      if (!ex) {
+        notification.warning({
+          top: 92,
+          message: '琛ㄥ崟锛�' + item.label + '锛夋棤鍙墽琛岃剼鏈��',
+          duration: 5
+        })
+        return
+      }
       
       let exps = []
       ex.reps.forEach(n => {
diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index 501e159..968cc1c 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -3214,8 +3214,8 @@
           // 鏁版嵁婧恠ql璇彞锛岄澶勭悊锛屾潈闄愰粦鍚嶅崟瀛楁璁剧疆涓洪殣钘忚〃鍗�
           if (['select', 'link', 'multiselect', 'radio', 'checkbox', 'checkcard'].includes(form.type) && form.resourceType === '1') {
             let msg = getFormSql(form, '琛ㄥ崟')
-  
-            sqls.push({uuid: form.uuid, type: 'form', ...msg})
+
+            sqls.push({uuid: md5(cell.uuid + form.uuid), type: 'form', ...msg})
           } else if (form.type === 'popSelect') {
             let msg = getPopSelectSql(form)
         
@@ -3248,7 +3248,7 @@
             if (['select', 'link', 'multiselect', 'radio', 'checkbox', 'checkcard'].includes(form.type) && form.resourceType === '1') {
               let msg = getFormSql(form, '琛ㄥ崟')
     
-              sqls.push({uuid: form.uuid, type: 'form', ...msg})
+              sqls.push({uuid: md5(cell.uuid + form.uuid), type: 'form', ...msg})
             } else if (form.type === 'popSelect') {
               let msg = getPopSelectSql(form)
           
@@ -3797,7 +3797,11 @@
         let _key = item.key.toLowerCase()
   
         keys.push(_key)
-        values.push('@mk_' + _key + '_mk@')
+        if (item.type === 'number' || item.type === 'rate') {
+          values.push('@mk_' + _key + '_mk@')
+        } else {
+          values.push(`'@mk_${_key}_mk@'`)
+        }
       })
   
       if (!keys.includes(primaryKey.toLowerCase())) {
@@ -3841,7 +3845,11 @@
         let _key = item.key.toLowerCase()
         
         _arr.push(_key)
-        _form.push(_key + '=@mk_' + _key + '_mk@')
+        if (item.type === 'number' || item.type === 'rate') {
+          _form.push(`${_key}=@mk_${_key}_mk@`)
+        } else {
+          _form.push(`${_key}='@mk_${_key}_mk@'`)
+        }
       })
   
       if (_actionType === 'audit') {
@@ -4190,8 +4198,8 @@
       columns.forEach(col => {
         let _key = col.field.toLowerCase()
 
-        if (formkeys.includes(_key) || !new RegExp('@' + _key + '[^0-9a-z_]', 'ig').test(_sql)) return
-        if (_key === 'id' && !/@id[^0-9a-z_@]/ig.test(_sql)) return
+        if (formkeys.includes(_key) || !new RegExp('@' + _key + '[^0-9a-z_@]', 'ig').test(_sql)) return
+        // if (_key === 'id' && !/@id[^0-9a-z_@]/ig.test(_sql)) return
 
         colreps.push(col.field)
   
@@ -4301,6 +4309,7 @@
       return true
     })
 
+    colreps = Array.from(new Set(colreps))
     reps = [...reps, ...colreps]
     
     return { LText: _sql, md5: md5(_sql), reps }
@@ -4447,7 +4456,7 @@
         `
     }
 
-    let testSql = _prev + _back
+    let testSql = _prev + _back + (btn.output || '')
 
     // 娣诲姞鏁版嵁涓瓧娈碉紝琛ㄥ崟鍊间紭鍏�(鎸夐挳涓嶉�夎鎴栧琛屾嫾鎺ユ椂璺宠繃)
     if (btn.Ot !== 'notRequired' && columns.length > 0) {
@@ -4455,8 +4464,8 @@
       columns.forEach(col => {
         let _key = col.field.toLowerCase()
 
-        if (formkeys.includes(_key) || !new RegExp('@' + _key + '[^0-9a-z_]', 'ig').test(testSql)) return
-        if (_key === 'id' && !/@id[^0-9a-z_@]/ig.test(testSql)) return
+        if (formkeys.includes(_key) || !new RegExp('@' + _key + '[^0-9a-z_@]', 'ig').test(testSql)) return
+        // if (_key === 'id' && !/@id[^0-9a-z_@]/ig.test(testSql)) return
 
         colreps.push(col.field)
   
@@ -5544,8 +5553,8 @@
       component.columns.forEach(col => {
         let _key = col.field.toLowerCase()
 
-        if (formkeys.includes(_key) || !new RegExp('@' + _key + '[^0-9a-z_]', 'ig').test(msg.LText)) return
-        if (_key === 'id' && !/@id[^0-9a-z_@]/ig.test(msg.LText)) return
+        if (formkeys.includes(_key) || !new RegExp('@' + _key + '[^0-9a-z_@]', 'ig').test(msg.LText)) return
+        // if (_key === 'id' && !/@id[^0-9a-z_@]/ig.test(msg.LText)) return
 
         colreps.push(col.field)
   
@@ -5631,8 +5640,8 @@
     component.columns.forEach(col => {
       let _key = col.field.toLowerCase()
 
-      if (syses.includes(_key) || !new RegExp('@' + _key + '[^0-9a-z_]', 'ig').test(_sql)) return
-      if (_key === 'id' && !/@id[^0-9a-z_@]/ig.test(_sql)) return
+      if (syses.includes(_key) || !new RegExp('@' + _key + '[^0-9a-z_@]', 'ig').test(_sql)) return
+      // if (_key === 'id' && !/@id[^0-9a-z_@]/ig.test(_sql)) return
 
       colreps.push(col.field)
       
diff --git a/src/views/rolemanage/index.jsx b/src/views/rolemanage/index.jsx
index 5049c9c..bb9d731 100644
--- a/src/views/rolemanage/index.jsx
+++ b/src/views/rolemanage/index.jsx
@@ -196,10 +196,10 @@
         })
 
         if (!im) {
-          menus.push({nodes: '', type: 'none', extra: true, MenuID: app.instantMessage, MenuName: '鍗虫椂閫氫俊'})
+          menus.push({nodes: '', type: 'none', backend: 'level1', extra: true, MenuID: app.instantMessage, MenuName: '鍗虫椂閫氫俊'})
         }
         if (!ub) {
-          menus.push({nodes: '', type: 'none', extra: true, MenuID: app.userbind, MenuName: '鐢ㄦ埛缁戝畾'})
+          menus.push({nodes: '', type: 'none', backend: 'level1', extra: true, MenuID: app.userbind, MenuName: '鐢ㄦ埛缁戝畾'})
         }
 
         this.setState({

--
Gitblit v1.8.0