From 35f51aad9824b55bbe67c0fb21bd3d3d24381c2f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 16 七月 2023 21:42:33 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/menu/components/form/simple-form/index.jsx | 42 +++++++++++++++++++----------------------- 1 files changed, 19 insertions(+), 23 deletions(-) diff --git a/src/menu/components/form/simple-form/index.jsx b/src/menu/components/form/simple-form/index.jsx index 9cacce7..f113cc2 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, getTables } from '@/utils/utils-custom.js' +import { resetStyle, getTables, checkComponent } from '@/utils/utils-custom.js' import MKEmitter from '@/utils/events.js' import Utils from '@/utils/utils.js' import getWrapForm from './options' @@ -69,7 +69,7 @@ scripts: [], subcards: [{ uuid: Utils.getuuid(), - setting: {title: '绌�', align: 'left_right', enable: 'true'}, + setting: {title: '', align: 'left_right', enable: 'true'}, style: {}, fields: [], subButton: {label: '鎻愪氦', type: 'submit', intertype: 'system', reload: 'false', sqlType: 'update', sql: '', Ot: 'notRequired', execSuccess: 'never', enable: 'true', style: {backgroundColor: '#1890ff', color: '#ffffff', paddingLeft: '25px', paddingRight: '25px', paddingTop: '5px', paddingBottom: '5px'}}, @@ -132,19 +132,9 @@ if (supModule === 'empty') { supModule = '' } - let columns = card.columns.map(c => c.field) - if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) { - card.errors.push({ level: 0, detail: '鏈缃暟鎹簮锛�'}) - } else if (card.setting.interType === 'system' && card.setting.execute === 'false' && card.scripts.filter(script => script.status !== 'false').length === 0) { - card.errors.push({ level: 0, detail: '鏁版嵁婧愪腑鏃犲彲鐢ㄨ剼鏈紒'}) - } else if (!card.setting.primaryKey) { - card.errors.push({ level: 0, detail: '鏈缃富閿紒'}) - } else if (!columns.includes(card.setting.primaryKey)) { - card.errors.push({ level: 0, detail: '涓婚敭宸插け鏁堬紒'}) - } else if (!card.setting.supModule) { - card.errors.push({ level: 0, detail: '鏈缃笂绾х粍浠讹紒'}) - } + card.$c_ds = true + card.errors = checkComponent(card) if (card.errors.length === 0) { card.$tables = getTables(card) @@ -354,6 +344,8 @@ index = i } + if (!item.field) return + if (['text', 'number', 'textarea', 'color'].includes(item.type) && _item.field !== item.field) { _inputfields.push({ field: item.field, @@ -367,25 +359,28 @@ }) } - if (item.type === 'switch') { + if (item.type === 'switch' || item.type === 'check') { _linksupFields.push({ field: item.field, label: item.label }) } - if (!['select', 'link', 'radio', 'checkcard'].includes(item.type)) return - if (item.type === 'checkcard' && item.multiple === 'true') return // 閫夐」鍗″閫� - if (item.field && !uniq.has(item.field)) { + if (!['select', 'link', 'radio', 'checkcard', 'multiselect'].includes(item.type)) return + + _linksupFields.push({ + field: item.field, + label: item.label + }) + + if (item.type === 'multiselect' || (item.type === 'checkcard' && item.multiple === 'true')) return + + if (!uniq.has(item.field)) { uniq.set(item.field, true) _linkableFields.push({ field: item.field, label: item.label + '-琛ㄥ崟' - }) - _linksupFields.push({ - field: item.field, - label: item.label }) } }) @@ -673,7 +668,7 @@ <div className="center"> <div className="title" onDoubleClick={() => { let oInput = document.createElement('input') - oInput.value = card.uuid + oInput.value = 'anchor' + card.uuid document.body.appendChild(oInput) oInput.select() document.execCommand('Copy') @@ -693,6 +688,7 @@ </div> <Modal title="缂栬緫" + wrapClassName="mk-scroll-modal" visible={this.state.visible} width={950} maskClosable={false} -- Gitblit v1.8.0