From 0d02adec030ac8654ab97ec078b0746d19cf889e Mon Sep 17 00:00:00 2001 From: bb_pan Date: Tue, 27 May 2025 09:19:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/lessor/equipment/equipType/index.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/views/lessor/equipment/equipType/index.vue b/src/views/lessor/equipment/equipType/index.vue index b1a483b9..2007cab6 100644 --- a/src/views/lessor/equipment/equipType/index.vue +++ b/src/views/lessor/equipment/equipType/index.vue @@ -1365,16 +1365,17 @@ export default { parentId, maTypeProperties:this.maTypeProperties, }; - this.$refs["addFormParamsRef"].validate( async(valid) => { if (valid) { - await this.$refs["maTypeRef"].forEach((formRef)=>{ - formRef.validate((validTemp)=>{ - if(!validTemp){ - this.allPass = false; - } + if (this.$refs["maTypeRef"] && this.$refs["maTypeRef"].length > 0) { + await this.$refs["maTypeRef"].forEach((formRef)=>{ + formRef.validate((validTemp)=>{ + if(!validTemp){ + this.allPass = false; + } + }) }) - }) + } if(this.allPass==true){ if (this.addTitle === "新增") { const res = await addMaType(addParams);