From 74e5d38d9a0e94421ceceea37c4677e5b57364ba Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 14 十月 2022 00:33:18 +0800 Subject: [PATCH] 2022-10-14 --- src/menu/components/form/simple-form/index.jsx | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/menu/components/form/simple-form/index.jsx b/src/menu/components/form/simple-form/index.jsx index 7aa4c24..7d659ad 100644 --- a/src/menu/components/form/simple-form/index.jsx +++ b/src/menu/components/form/simple-form/index.jsx @@ -9,7 +9,7 @@ import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' import { getModalForm } from '@/templates/zshare/formconfig' -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' @@ -63,7 +63,6 @@ format: 'object', // 缁勪欢灞炴�� - 鏁版嵁鏍煎紡 pageable: false, // 缁勪欢灞炴�� - 鏄惁鍙垎椤� switchable: false, // 缁勪欢灞炴�� - 鏁版嵁鏄惁鍙垏鎹� - dataName: card.dataName || '', width: card.width || 24, name: card.name, subtype: card.subtype, @@ -160,7 +159,6 @@ 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: '鏈缃暟鎹簮锛�'}) @@ -174,22 +172,26 @@ card.errors.push({ level: 0, detail: '鏈缃笂绾х粍浠讹紒'}) } + if (card.errors.length === 0) { + card.$tables = getTables(card) + } + card.subcards.forEach(item => { item.fields.forEach(m => { if (m.type === 'linkMain' && !supModule) { - card.errors.push({ level: 1, detail: `鍏宠仈涓昏〃琛ㄥ崟鈥�${m.label}鈥濇棤鏁坄}) - // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { - // card.errors.push({ level: 1, detail: `琛ㄥ崟鈥�${m.label}鈥濆ぇ灏忓啓涓庡瓧娈甸泦涓嶄竴鑷碻}) + card.errors.push({ level: 1, detail: `璇锋鏌ュ叧鑱斾富琛ㄢ��${m.label}鈥濇槸鍚︽湁鏁坄}) } }) }) } else { let supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : '' + card.$tables = getTables(card) + card.subcards.forEach(item => { item.fields.forEach(m => { if (m.type === 'linkMain' && !supModule) { - card.errors.push({ level: 1, detail: `鍏宠仈涓昏〃琛ㄥ崟鈥�${m.label}鈥濇棤鏁坄}) + card.errors.push({ level: 1, detail: `璇锋鏌ュ叧鑱斾富琛ㄢ��${m.label}鈥濇槸鍚︽湁鏁坄}) } }) }) -- Gitblit v1.8.0