From deb328a813ac2bc5c941672938935f8d9c43b211 Mon Sep 17 00:00:00 2001 From: dengbf Date: Thu, 28 Dec 2023 16:54:24 +0800 Subject: [PATCH 1/3] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=20=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E7=BC=96=E8=BE=91-=E8=A1=A8=E5=8D=95=E7=9A=84?= =?UTF-8?q?=E9=80=89=E9=A1=B9=E5=8D=A1=E5=B5=8C=E5=A5=97=E5=AD=90=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=EF=BC=8C=E5=AD=90=E8=A1=A8=E5=8D=95=E5=9C=A8=E5=90=8E?= =?UTF-8?q?=E5=B1=82tab=E9=87=8C=EF=BC=8C=E4=BF=9D=E5=AD=98=E5=AD=90?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=EF=BC=8C=E5=AD=90=E8=A1=A8=E5=8D=95=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E8=A1=A8=E5=8D=95=E9=85=8D=E7=BD=AE=20=20=20=20-=20[?= =?UTF-8?q?=E5=85=B3=E8=81=94]=20#[1056504512217088]=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E7=BC=96=E8=BE=91-=E8=A1=A8=E5=8D=95=E7=9A=84=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E5=8D=A1=E5=B5=8C=E5=A5=97=E5=AD=90=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=EF=BC=8C=E5=AD=90=E8=A1=A8=E5=8D=95=E5=9C=A8=E5=90=8E=E5=B1=82?= =?UTF-8?q?tab=E9=87=8C=EF=BC=8C=E4=BF=9D=E5=AD=98=E5=AD=90=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=EF=BC=8C=E5=AD=90=E8=A1=A8=E5=8D=95=E8=A6=86=E7=9B=96?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E9=85=8D=E7=BD=AE=20http://192.168.0.96:8090?= =?UTF-8?q?/demo/rdm.html#/bug-detail/939050947543040/939050947543057/1056?= =?UTF-8?q?504512217088?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/plugins/TsSheet/subformconfig.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/resources/plugins/TsSheet/subformconfig.vue b/src/resources/plugins/TsSheet/subformconfig.vue index 97279679b..8c41befc5 100644 --- a/src/resources/plugins/TsSheet/subformconfig.vue +++ b/src/resources/plugins/TsSheet/subformconfig.vue @@ -63,7 +63,8 @@ export default { let formConfig = this.$refs.sheet.getFormConfig(); this.isFormLoaded = false; this.formDataQueue.pop(); - this.currentFormData = this.formDataQueue[this.formDataQueue.length - 1]; + let currentFormData = this.formDataQueue[this.formDataQueue.length - 1]; + this.currentFormData = this.$utils.deepClone(currentFormData); if (this.currentFormData.formConfig && this.currentFormData.formConfig.tableList) { this.currentFormData.formConfig.tableList.forEach(t => { if (t.component) { -- Gitee From fe3255c4e403692e4095b0775a37f636372e0589 Mon Sep 17 00:00:00 2001 From: dengbf Date: Thu, 28 Dec 2023 16:58:40 +0800 Subject: [PATCH 2/3] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=20=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E7=BC=96=E8=BE=91-=E5=8F=A6=E5=AD=98=E4=B8=BA?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC=E6=97=B6=EF=BC=8C=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E7=9A=84=E6=8F=90=E7=A4=BA=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=81=9C=E7=95=99=E6=97=B6=E9=97=B4=E5=BE=88=E7=9F=AD=20=20=20?= =?UTF-8?q?=20-=20[=E5=85=B3=E8=81=94]=20#[1055838037311488]=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E7=BC=96=E8=BE=91-=E5=8F=A6=E5=AD=98=E4=B8=BA?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC=E6=97=B6=EF=BC=8C=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E7=9A=84=E6=8F=90=E7=A4=BA=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=81=9C=E7=95=99=E6=97=B6=E9=97=B4=E5=BE=88=E7=9F=AD=20http:/?= =?UTF-8?q?/192.168.0.96:8090/demo/rdm.html#/bug-detail/939050947543040/93?= =?UTF-8?q?9050947543057/1055838037311488?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/plugins/TsSheet/form-edit.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/resources/plugins/TsSheet/form-edit.vue b/src/resources/plugins/TsSheet/form-edit.vue index baf7ffa36..46d9c65ac 100644 --- a/src/resources/plugins/TsSheet/form-edit.vue +++ b/src/resources/plugins/TsSheet/form-edit.vue @@ -147,15 +147,15 @@
- +
- +
@@ -990,7 +990,7 @@ export default { } return isValid; }, - jumpToItem(uuid) { + jumpToItem(uuid, item) { this.currentFormItem = null; this.$nextTick(() => { this.formData.formConfig.tableList.forEach(d => { @@ -998,6 +998,13 @@ export default { if (!this.$utils.isEmpty(component) && component.uuid === uuid) { this.currentFormItem = component; this.$refs.sheet.selectCell(d); + if (item.uuid && !this.$utils.isEmpty(this.currentFormItem.component)) { + this.currentFormItem.component.forEach(c => { + if (c.uuid === item.uuid) { + this.currentFormItem = c; + } + }); + } } }); }); -- Gitee From d65bd114e67d6a6fa3d35dba31613a2580177c9d Mon Sep 17 00:00:00 2001 From: dengbf Date: Thu, 28 Dec 2023 17:00:34 +0800 Subject: [PATCH 3/3] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=20=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E7=BC=96=E8=BE=91-=E6=8A=98=E5=8F=A0=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E5=92=8C=E9=80=89=E9=A1=B9=E5=8D=A1=E5=86=85=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/TsSheet/child-form-item.vue | 25 +++++++++++++++++++ .../plugins/TsSheet/form/component/base.vue | 8 ++++++ .../TsSheet/form/component/formcollapse.vue | 22 ++++++++++++++++ .../TsSheet/form/component/formtab.vue | 22 ++++++++++++++++ .../TsSheet/form/config/formcheckbox-conf.vue | 14 +++++++++-- .../TsSheet/form/config/formradio-conf.vue | 14 +++++++++-- .../TsSheet/form/config/formselect-conf.vue | 14 +++++++++-- 7 files changed, 113 insertions(+), 6 deletions(-) diff --git a/src/resources/plugins/TsSheet/child-form-item.vue b/src/resources/plugins/TsSheet/child-form-item.vue index f3d4a40b0..35055725b 100644 --- a/src/resources/plugins/TsSheet/child-form-item.vue +++ b/src/resources/plugins/TsSheet/child-form-item.vue @@ -117,6 +117,31 @@ export default { } } return errorList; + }, + validConfig() { + const errorList = []; + if (this.$refs) { + for (let name in this.$refs) { + if (this.$refs[name]) { + let formitem = this.$refs[name]; + if (this.$refs[name] instanceof Array) { + formitem = this.$refs[name][0]; + } else { + formitem = this.$refs[name]; + } + if (formitem) { + const err = formitem.validConfig(); + if (err && err.length > 0) { + errorList.push({ + uuid: formitem.formItem.uuid, + errorList: err + }); + } + } + } + } + } + return errorList; } }, filter: {}, diff --git a/src/resources/plugins/TsSheet/form/component/base.vue b/src/resources/plugins/TsSheet/form/component/base.vue index 659b55c1f..851e59926 100644 --- a/src/resources/plugins/TsSheet/form/component/base.vue +++ b/src/resources/plugins/TsSheet/form/component/base.vue @@ -50,6 +50,14 @@ export default { subErrorList.forEach(e => { if (e.field && e.error) { errorList.push(e); + } else if (!this.$utils.isEmpty(e.errorList)) { + //选项卡和折叠面板校验 + e.errorList.forEach(s => { + errorList.push({ + uuid: e.uuid, + ...s + }); + }); } }); } diff --git a/src/resources/plugins/TsSheet/form/component/formcollapse.vue b/src/resources/plugins/TsSheet/form/component/formcollapse.vue index 708be60c8..1313ed456 100644 --- a/src/resources/plugins/TsSheet/form/component/formcollapse.vue +++ b/src/resources/plugins/TsSheet/form/component/formcollapse.vue @@ -129,6 +129,28 @@ export default { } } return errorList; + }, + validConfig() { + const errorList = []; + if (this.$refs) { + for (let name in this.$refs) { + if (this.$refs[name]) { + let formitem = this.$refs[name]; + if (this.$refs[name] instanceof Array) { + formitem = this.$refs[name][0]; + } else { + formitem = this.$refs[name]; + } + if (formitem) { + const err = formitem.validConfig(); + if (err && err.length > 0) { + errorList.push(...err); + } + } + } + } + } + return errorList; } }, filter: {}, diff --git a/src/resources/plugins/TsSheet/form/component/formtab.vue b/src/resources/plugins/TsSheet/form/component/formtab.vue index 30a87c228..f8a378c41 100644 --- a/src/resources/plugins/TsSheet/form/component/formtab.vue +++ b/src/resources/plugins/TsSheet/form/component/formtab.vue @@ -132,6 +132,28 @@ export default { }, changeTab() { this.$emit('resize'); + }, + validConfig() { + const errorList = []; + if (this.$refs) { + for (let name in this.$refs) { + if (this.$refs[name]) { + let formitem = this.$refs[name]; + if (this.$refs[name] instanceof Array) { + formitem = this.$refs[name][0]; + } else { + formitem = this.$refs[name]; + } + if (formitem) { + const err = formitem.validConfig(); + if (err && err.length > 0) { + errorList.push(...err); + } + } + } + } + } + return errorList; } }, filter: {}, diff --git a/src/resources/plugins/TsSheet/form/config/formcheckbox-conf.vue b/src/resources/plugins/TsSheet/form/config/formcheckbox-conf.vue index 9143a2ced..4b9cebe29 100644 --- a/src/resources/plugins/TsSheet/form/config/formcheckbox-conf.vue +++ b/src/resources/plugins/TsSheet/form/config/formcheckbox-conf.vue @@ -15,12 +15,22 @@ @change="changDataSource" > - +
- +
- +
- +
- +
- +