From d70c5b0eee48808b9a42d1f7685640f5bafc2ad3 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 13 三月 2023 10:03:53 +0800
Subject: [PATCH] 2023-03-13

---
 src/utils/utils-custom.js |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index 3d8f378..c07d64c 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -429,6 +429,9 @@
         if (item.wrap.datatype === 'public' && item.wrap.publicId) {
           item.wrap.publicId = md5(commonId + item.wrap.publicId)
         }
+        if (item.wrap.autoExec) {
+          item.wrap.autoExec = md5(commonId + item.wrap.autoExec)
+        }
 
         if (item.supNodes && item.supNodes.length > 0) {
           item.supNodes = item.supNodes.map(cell => {
@@ -671,6 +674,14 @@
    * @description 鎸夐挳閲嶇疆
    */
   static resetBtn (btn, commonId) {
+    if (btn.OpenType === 'pop' || (btn.OpenType === 'funcbutton' && btn.execMode === 'pop')) {
+      if (btn.modal && btn.modal.fields.length > 0) {
+        btn.modal.fields = btn.modal.fields.map(m => {
+          m.uuid = this.getuuid()
+          return m
+        })
+      }
+    }
     if (btn.switchTab && btn.switchTab.length > 0) {
       btn.switchTab = btn.switchTab.map(m => md5(commonId + m))
     }
@@ -729,6 +740,10 @@
         return cell
       })
     } else if (['card', 'carousel', 'timeline'].includes(item.type)) {
+      if (item.wrap.autoExec) {
+        item.wrap.autoExec = md5(commonId + item.wrap.autoExec)
+      }
+      
       item.subcards.forEach(card => {
         card.uuid = this.getuuid()
 
@@ -743,6 +758,15 @@
           card.elements = card.elements.map(cell => {
             if (cell.eleType === 'button') {
               cell.uuid = md5(commonId + cell.uuid)
+
+              if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
+                if (cell.modal && cell.modal.fields.length > 0) {
+                  cell.modal.fields = cell.modal.fields.map(m => {
+                    m.uuid = this.getuuid()
+                    return m
+                  })
+                }
+              }
             } else {
               cell.uuid = this.getuuid()
             }
@@ -756,6 +780,14 @@
           card.backElements = card.backElements.map(cell => {
             if (cell.eleType === 'button') {
               cell.uuid = md5(commonId + cell.uuid)
+              if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
+                if (cell.modal && cell.modal.fields.length > 0) {
+                  cell.modal.fields = cell.modal.fields.map(m => {
+                    m.uuid = this.getuuid()
+                    return m
+                  })
+                }
+              }
             } else {
               cell.uuid = this.getuuid()
             }
@@ -774,6 +806,14 @@
         item.elements = item.elements.map(cell => {
           if (cell.eleType === 'button') {
             cell.uuid = md5(commonId + cell.uuid)
+            if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
+              if (cell.modal && cell.modal.fields.length > 0) {
+                cell.modal.fields = cell.modal.fields.map(m => {
+                  m.uuid = this.getuuid()
+                  return m
+                })
+              }
+            }
           } else {
             cell.uuid = this.getuuid()
           }
@@ -815,6 +855,14 @@
           }
           col.elements = col.elements.map(cell => {
             cell.uuid = md5(commonId + cell.uuid)
+            if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
+              if (cell.modal && cell.modal.fields.length > 0) {
+                cell.modal.fields = cell.modal.fields.map(m => {
+                  m.uuid = this.getuuid()
+                  return m
+                })
+              }
+            }
 
             return cell
           })
@@ -851,6 +899,14 @@
       }
       item.action = item.action.map(cell => {
         cell.uuid = md5(commonId + cell.uuid)
+        if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
+          if (cell.modal && cell.modal.fields.length > 0) {
+            cell.modal.fields = cell.modal.fields.map(m => {
+              m.uuid = this.getuuid()
+              return m
+            })
+          }
+        }
 
         return cell
       })

--
Gitblit v1.8.0