From 601dec7da88fa5fd3ffc34e4eaae6d61d64c8621 Mon Sep 17 00:00:00 2001 From: yxq Date: Fri, 14 Jun 2024 13:46:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=20=E6=8E=8C?= =?UTF-8?q?=E5=A3=B0=E8=AF=84=E6=95=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EvaluationTeach/single.vue | 48 +++++++++++++------ 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/EvaluationTeach/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/EvaluationTeach/single.vue index 1422b7176..3c9b4dfab 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/EvaluationTeach/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/EvaluationTeach/single.vue @@ -15,17 +15,25 @@ {{item.QTitle}} - + + + + @@ -107,6 +115,7 @@ export default { Eval_Questions:[] }, submitParams:null, + uText:{}, uTexts:{}, checkBoxs:{}, validate:{}, @@ -163,20 +172,21 @@ export default { return } - this.LOADING('正在提交...') + let postarray = [] this.formData.Eval_Questions.map(item=>{ let validate = {} switch (item.QType){ case 1: if(item.QMust){ - validate[item.QID] = this.checkBoxs[item.QID]?'':'此项必填!' + validate[item.QID] = item.IID?'':'此项必填!' + if(item.IID&&this.showText(item,item.IID))validate[item.QID] = this.uText[item.IID]?'':'此项必填!' } this.validate = {...this.validate,...validate} postarray.push({ QID:item.QID, IID:this.checkBoxs[item.QID]?this.checkBoxs[item.QID].toString():'', - UText:item.UText||'', + UText:this.uText[item.IID]||'', }) break; case 2: @@ -223,6 +233,7 @@ export default { postarray } console.log(postData) + this.LOADING('正在提交...') this.HTTP_POST('learun/adms/eval/savepaper', postData, '表单提交保存失败').then(success => { this.HIDE_LOADING() if (!success) { @@ -256,6 +267,15 @@ export default { default: break } }, + + // 是否展示输入框 + showText(item,IID){ + if(item.Eval_QuestionItems&&IID){ + let obj = item.Eval_QuestionItems.find(e=>e.IID == IID) + if(obj.QShowText)return true + } + return false + }, // 获取表单值 getValue(path) {