diff --git a/src/resources/plugins/TsSheet/child-form-item.vue b/src/resources/plugins/TsSheet/child-form-item.vue index f3d4a40b0c7d538591f63b23ff51582327aa9c93..35055725be610d463dec88305c1bdf08a23cd998 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-edit.vue b/src/resources/plugins/TsSheet/form-edit.vue index baf7ffa364bcf74f38ad2265c161e97362da1b58..46d9c65acbad1a523b2f57ec4d4c59b9b94c39e2 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; + } + }); + } } }); }); diff --git a/src/resources/plugins/TsSheet/form/component/base.vue b/src/resources/plugins/TsSheet/form/component/base.vue index 659b55c1fbb4ae1fcf2638ea137a507d5457b8f9..851e599261f79427dc046a253ca46d84decf11ca 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 708be60c88e08b27c35b9dd6d489163baec823b7..1313ed45667a8a760ed531913c9b3a62201cc688 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 30a87c2286fed71bac5cc81362739b2579e2176f..f8a378c41c0872352d352889da3702d688b33e51 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 9143a2ced4f7a9c1446306b0cefd9d7d5503a991..4b9cebe29151a6a8a96ea981403aaa74e7f54d92 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" > - +
- +
- +
- +
- +
- +
{ if (t.component) {