修改点击选择判分点时正确答案展示问题

master
e 3 years ago
parent 6e04008b08
commit 7b8e481911
  1. 68
      src/views/Transaction.vue

@ -110,6 +110,7 @@
<p class="p" style="margin-top: 1px">交易结果一致性规则用户交易结果需要与下面设置的交易结果指标要求一致</p> <p class="p" style="margin-top: 1px">交易结果一致性规则用户交易结果需要与下面设置的交易结果指标要求一致</p>
<div class="block"> <div class="block">
<!-- type: 题目类型(1选择 2判断 3填空 4问答 5指标结果) --> <!-- type: 题目类型(1选择 2判断 3填空 4问答 5指标结果) -->
<div v-if="scope.row.operationIds && scope.row.type == null" style="line-height: 65px">需点击</div>
<template v-if="scope.row.type == 1"> <template v-if="scope.row.type == 1">
<div class="box"> <div class="box">
<div class="line"> <div class="line">
@ -137,7 +138,7 @@
</div> </div>
</template> </template>
<template v-else-if="scope.row.type == 2"> <template v-if="scope.row.type == 2">
<div class="box"> <div class="box">
<div class="line"> <div class="line">
<div>{{ scope.row.name }}</div> <div>{{ scope.row.name }}</div>
@ -163,7 +164,7 @@
</div> </div>
</template> </template>
<template v-else-if="scope.row.type == 3"> <template v-if="scope.row.type == 3">
<div class="box"> <div class="box">
<div class="line" style="min-height: 100%;"> <div class="line" style="min-height: 100%;">
<span class="label"> <span class="label">
@ -185,7 +186,7 @@
</div> </div>
</template> </template>
<template v-else-if="scope.row.type == 4"> <template v-if="scope.row.type == 4">
<div class="box"> <div class="box">
<div class="line"> <div class="line">
<span class="label"> <span class="label">
@ -238,7 +239,7 @@
</div> </div>
</template> </template>
<template v-else-if="scope.row.type == 5"> <template v-if="scope.row.type == 5">
<div class="box"> <div class="box">
<div class="line"> <div class="line">
<!-- <!--
@ -300,14 +301,6 @@
</div> </div>
</div> </div>
</template> </template>
<template v-else-if="scope.row.type == 7">
<div style="line-height: 65px">需点击7</div>
</template>
<template v-else>
<div style="line-height: 65px">{{ checkChange[scope.$index] ? '需点击' : '' }}</div>
</template>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -489,58 +482,33 @@ export default {
}); });
}, },
handleCheckChange(data, checked, indeterminate, row, index) { // handleCheckChange(data, checked, indeterminate, row, index) { //
// console.log(this.fromChange) // this.changeArr.push(checked)
// console.log(row.operationIds) // if(this.changeArr.length === 4) {
// console.log(checked) // this.checkChange.splice(index, 1, this.changeArr[2])
// console.log(this.count) // this.changeArr.splice(0, this.changeArr.length)
// if(this.fromChange === row.operationIds) { // }else if(this.changeArr.length === 2) {
// this.count++
// }else {
// this.fromChange = row.operationIds
// }
// if(this.count === 2 || this.count === 0) {
// this.checkChange.splice(index, 1, false)
// this.count = 0;
// }else {
// this.checkChange.splice(index, 1, true)
// }
// if(this.fromChange === row.operationIds) {
// this.count++
// this.checkChange.splice(index, 1, checked)
// }else {
// this.checkChange.splice(index, 1, true) // this.checkChange.splice(index, 1, true)
// this.fromChange = row.operationIds
// } // }
this.changeArr.push(checked) if (checked){
console.log(this.changeArr) }else{
if(this.changeArr.length === 4) { row.operationIds = null
this.checkChange.splice(index, 1, this.changeArr[2]) row.type = null
this.changeArr.splice(0, this.changeArr.length)
}else if(this.changeArr.length === 2) {
this.checkChange.splice(index, 1, true)
} }
let divTree = '#divTree'+index;
let dom = document.querySelector(divTree)
let depTree = '#depTree'+index;
let dom1 = document.querySelector(depTree)
let nodeHight =26
dom1.style.height = (data.number * nodeHight) + "px"
let contHeight=(data.number * nodeHight)//,
dom.scrollTo(0, contHeight)
if (checked && data.isNode === 1) { if (checked && data.isNode === 1) {
this.tableData[index].operationIds = data.id; // id this.tableData[index].operationIds = data.id; // id
// for ()
row.value1 = ""; row.value1 = "";
row.value2 = ""; row.value2 = "";
row.value3 = ""; row.value3 = "";
row.value4 = ""; row.value4 = "";
row.value5 = ""; row.value5 = "";
// console.log(data)
if (data.subjectId) { // id if (data.subjectId) { // id
this.currentNodeData = data; this.currentNodeData = data;
this.$refs[`tree-${index}`].setCheckedNodes([data]); this.$refs[`tree-${index}`].setCheckedNodes([data]);
this.getSubjectData(data.subjectId, index); this.getSubjectData(data.subjectId, index);
} else { } else {
row.type = null;
// console.log(row.type)
this.currentNodeData = {}; this.currentNodeData = {};
this.$refs[`tree-${index}`].setCheckedNodes([data]); this.$refs[`tree-${index}`].setCheckedNodes([data]);
} }
@ -647,7 +615,7 @@ export default {
id: "", id: "",
lcId: i.lcId, lcId: i.lcId,
itemId:'', itemId:'',
type: i.type ? i.type : "7", type: i.type ? i.type : "",
operationIds: i.operationIds, operationIds: i.operationIds,
resultOperation: i.resultOperation, resultOperation: i.resultOperation,
ruleOperation: i.ruleOperation ruleOperation: i.ruleOperation

Loading…
Cancel
Save