试卷管理调整new11

This commit is contained in:
joylink_fanyuhong 2021-12-22 17:23:34 +08:00
parent e15460322b
commit f906fe891f

View File

@ -8,7 +8,14 @@
<span>{{ getOperateName(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="num" :label="$t('publish.questionsNumber')" width="100" />
<el-table-column prop="num" :label="$t('publish.questionsNumber')" width="100">
<template slot-scope="scope">
<span>{{ scope.row.num }}</span>
<el-tooltip v-if="checkNum(scope.row)" effect="dark" content="题库数量不足" placement="top">
<span style="color:red;cursor: pointer;">!</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column prop="point" :label="$t('publish.eachScore')" width="100" />
<el-table-column :label="$t('publish.totalScore')" width="100">
<template slot-scope="scope">
@ -253,7 +260,18 @@ export default {
getTopicNum(row) {
//this.operationTypeNums
//console.log(row, this.operationTypeNums);
return this.operationTypeNums[row.trainingType] ? this.operationTypeNums[row.trainingType][row.operateType]: 0;
return this.operationTypeNums[row.trainingType] ? (this.operationTypeNums[row.trainingType][row.operateType]||0): 0;
},
checkNum(row) {
if(!this.operationTypeNums[row.trainingType]) {
return true;
} else if(!this.operationTypeNums[row.trainingType][row.operateType]){
return true;
} else if(row.num > this.operationTypeNums[row.trainingType][row.operateType]) {
return true;
} else {
return false;
}
},
handleForm(data) {
this.indexCourse = data.$index;