From 5891206952e2ff63e87aed2f47df5324b019d32e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 25 十月 2022 00:39:38 +0800
Subject: [PATCH] 2022-10-25

---
 src/utils/utils-custom.js |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index b783fc3..19c7836 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -939,7 +939,7 @@
 /**
  * @description 鑾峰彇琛ㄥ悕
  */
-export function getTables (config) {
+export function getTables (config, pops) {
   let tables = []
   let cuts = []
   let cutreg = /(from|update|insert\s+into)\s+(@db@)?[a-z_]+/ig
@@ -973,15 +973,21 @@
   } else if (config.subcards) {
     config.subcards.forEach(item => {
       item.elements.forEach(cell => {
-        if (cell.eleType === 'button' && ['form', 'pop', 'prompt', 'exec', 'excelIn', 'excelOut'].includes(cell.OpenType)) {
+        if (cell.eleType !== 'button') return
+        if (['form', 'pop', 'prompt', 'exec', 'excelIn', 'excelOut'].includes(cell.OpenType)) {
           action.push(cell)
+        } else if (pops && cell.OpenType === 'popview') {
+          pops.push({...cell, parentId: config.uuid})
         }
       })
   
       if (item.backElements && item.setting.type === 'multi') {
         item.backElements.forEach(cell => {
-          if (cell.eleType === 'button' && ['form', 'pop', 'prompt', 'exec', 'excelIn', 'excelOut'].includes(cell.OpenType)) {
+          if (cell.eleType !== 'button') return
+          if (['form', 'pop', 'prompt', 'exec', 'excelIn', 'excelOut'].includes(cell.OpenType)) {
             action.push(cell)
+          } else if (pops && cell.OpenType === 'popview') {
+            pops.push({...cell, parentId: config.uuid})
           }
         })
       }
@@ -992,20 +998,27 @@
       col.elements.forEach(cell => {
         if (['form', 'pop', 'prompt', 'exec', 'excelIn', 'excelOut'].includes(cell.OpenType)) {
           action.push(cell)
+        } else if (pops && cell.OpenType === 'popview') {
+          pops.push({...cell, parentId: config.uuid})
         }
       })
     }
   })
 
   config.elements && config.elements.forEach(cell => {
-    if (cell.eleType === 'button' && ['form', 'pop', 'prompt', 'exec', 'excelIn', 'excelOut'].includes(cell.OpenType)) {
+    if (cell.eleType !== 'button') return
+    if (['form', 'pop', 'prompt', 'exec', 'excelIn', 'excelOut'].includes(cell.OpenType)) {
       action.push(cell)
+    } else if (pops && cell.OpenType === 'popview') {
+      pops.push({...cell, parentId: config.uuid})
     }
   })
 
   config.action && config.action.forEach(cell => {
     if (['pop', 'prompt', 'exec', 'excelIn', 'excelOut'].includes(cell.OpenType)) {
       action.push(cell)
+    } else if (pops && cell.OpenType === 'popview') {
+      pops.push({...cell, parentId: config.uuid})
     }
   })
 

--
Gitblit v1.8.0