Преглед изворни кода

移动端 掌声评教

娄底高职分支
yxq пре 5 месеци
родитељ
комит
601dec7da8
1 измењених фајлова са 34 додато и 14 уклоњено
  1. +34
    -14
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/EvaluationTeach/single.vue

+ 34
- 14
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/EvaluationTeach/single.vue Прегледај датотеку

@@ -15,17 +15,25 @@
{{item.QTitle}}
</view>
<!-- 单选 -->
<l-select
v-if="item.QType == 1"
v-model="item.IID"
@change="(e)=>{checkBoxGroupChange(item.QID,e)}"
:range="item.Eval_QuestionItems"
title=""
placeholder="请选择"
:disabled="false"
textField="ITitle"
valueField="IID"
/>
<view v-if="item.QType == 1">
<l-select
v-model="item.IID"
@change="(e)=>{checkBoxGroupChange(item.QID,e)}"
:range="item.Eval_QuestionItems"
title=""
placeholder="请选择"
:disabled="false"
textField="ITitle"
valueField="IID"
/>
<l-textarea
simpleMode
v-if="showText(item,item.IID)"
v-model="uText[item.IID]"
style="margin-top: 1px;"
placeholder="请输入原因"
/>
</view>
<!-- 多选 -->
<view v-if="item.QType == 2">
<checkbox-group v-model="item.checked" @change="(e)=>{checkBoxGroupChange(item.QID,e.detail.value)}">
@@ -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) {


Loading…
Откажи
Сачувај