From 7a327daeddd9b585eb9242241daf1a6151761129 Mon Sep 17 00:00:00 2001 From: cxx Date: Tue, 7 May 2024 14:13:45 +0800 Subject: [PATCH] =?UTF-8?q?fig=20Bug=EF=BC=9A=E6=96=B0=E5=BB=BA=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/component/flow/editNode.html | 1 - app/view/component/tpl/formItemListGenerator.html | 7 +++---- app/view/component/tpl/tplFormDesign.html | 4 ++-- app/view/component/workflowEditorDrawer.html | 15 ++++++--------- 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/app/view/component/flow/editNode.html b/app/view/component/flow/editNode.html index 778e3bd..950cc21 100644 --- a/app/view/component/flow/editNode.html +++ b/app/view/component/flow/editNode.html @@ -446,7 +446,6 @@ this.$set(item, 'option', null) } this.$forceUpdate() - console.log('changeExpress', item, express); }, closeConditionGroupDialog(){ this.$forceUpdate() diff --git a/app/view/component/tpl/formItemListGenerator.html b/app/view/component/tpl/formItemListGenerator.html index b7d6127..575d3d7 100644 --- a/app/view/component/tpl/formItemListGenerator.html +++ b/app/view/component/tpl/formItemListGenerator.html @@ -260,12 +260,11 @@ Vue.component("form-item-list-generator", { return this.formItemList; }, - dataValidate(){ - console.log('formItemListGenerator-dataValidate', this.formItemList); + async dataValidate(){ // 检查单选多选是否还有选项 - this.formItemList.forEach(async element => { + this.formItemList.forEach(element => { if(['single', 'multiple'].includes(element.type) && !(element.optionList && element.optionList.length)){ - await window.vtoast.fail("存在选择题没有选项!"); + window.vtoast.fail("存在选择题没有选项!"); throw new Error("存在选择题没有选项!") } }); diff --git a/app/view/component/tpl/tplFormDesign.html b/app/view/component/tpl/tplFormDesign.html index ced0577..fa5c697 100644 --- a/app/view/component/tpl/tplFormDesign.html +++ b/app/view/component/tpl/tplFormDesign.html @@ -54,8 +54,8 @@ break; } }, - dataValidate(){ - this.$refs.formItemListGenerator.dataValidate() + async dataValidate(){ + await this.$refs.formItemListGenerator.dataValidate() } } }) diff --git a/app/view/component/workflowEditorDrawer.html b/app/view/component/workflowEditorDrawer.html index f79dd05..2cb2d4b 100644 --- a/app/view/component/workflowEditorDrawer.html +++ b/app/view/component/workflowEditorDrawer.html @@ -299,16 +299,13 @@ Vue.component("workflow-editor-drawer", { }, 300) }, - prepareValidate(){ - const { id, workflowId, workflowInfo, workflowForm } = this.formObj; - var submitAble = false - - // 判断info的数据 ==> - this.$refs.basicInfo.doUiAction('dataValidate') - // 判断form的数据 ==> 判断单选多选是否有选项 - this.$refs.tplFormDesign.doUiAction('dataValidate') + async prepareValidate(){ + // 判断info的数据 + await this.$refs.basicInfo.doUiAction('dataValidate') + // 判断form的数据 + await this.$refs.tplFormDesign.doUiAction('dataValidate') // 判断流程图的数据 - this.$refs.processFlow.doUiAction('dataValidate') + await this.$refs.processFlow.doUiAction('dataValidate') }, prepareFormSubmitData() {