From 53b9fb93d0376eb02bb996935f1720b4e95cd897 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 12 十月 2022 14:41:06 +0800
Subject: [PATCH] 2022-10-12

---
 src/menu/components/carousel/data-card/index.jsx |   20 +++++---------------
 1 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/src/menu/components/carousel/data-card/index.jsx b/src/menu/components/carousel/data-card/index.jsx
index a1f1edf..9d5f891 100644
--- a/src/menu/components/carousel/data-card/index.jsx
+++ b/src/menu/components/carousel/data-card/index.jsx
@@ -6,7 +6,7 @@
 
 import asyncComponent from '@/utils/asyncComponent'
 import asyncIconComponent from '@/utils/asyncIconComponent'
-import { resetStyle } from '@/utils/utils-custom.js'
+import { resetStyle, getTables } from '@/utils/utils-custom.js'
 import MKEmitter from '@/utils/events.js'
 import Utils from '@/utils/utils.js'
 import getWrapForm from './options'
@@ -125,13 +125,7 @@
 
     card.errors = []
 
-    // let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : ''
-    // if (supModule === 'empty') {
-    //   supModule = ''
-    // }
-
     let columns = card.columns.map(c => c.field)
-    // let lowcols = card.columns.map(c => c.field.toLowerCase())
 
     if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) {
       card.errors.push({ level: 0, detail: '鏈缃暟鎹簮锛�'})
@@ -145,20 +139,16 @@
       card.errors.push({ level: 0, detail: '鏈缃笂绾х粍浠讹紒'})
     }
 
+    if (card.errors.length === 0) {
+      card.$tables = getTables(card)
+    }
+
     card.subcards.forEach((item, i) => {
       item.elements.forEach(cell => {
         if (cell.eleType === 'button') {
           if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
             if (!cell.modal || cell.modal.fields.length === 0) {
               card.errors.push({ level: 1, detail: `鎸夐挳鈥�${cell.label}鈥濅腑琛ㄥ崟灏氭湭娣诲姞`})
-            // } else {
-            //   cell.modal.fields.forEach(m => {
-            //     if (m.type === 'linkMain' && !supModule) {
-            //       card.errors.push({ level: 1, detail: `鎸夐挳鈥�${cell.label}鈥濅腑鍏宠仈涓昏〃琛ㄥ崟鈥�${m.label}鈥濇棤鏁坄})
-            //     } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) {
-            //       card.errors.push({ level: 1, detail: `鎸夐挳鈥�${cell.label}鈥濅腑琛ㄥ崟鈥�${m.label}鈥濆ぇ灏忓啓涓庡瓧娈甸泦涓嶄竴鑷碻})
-            //     }
-            //   })
             }
           }
         } else if (cell.datatype === 'dynamic' && cell.field && !columns.includes(cell.field)) {

--
Gitblit v1.8.0