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

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>
<div class="block">
<!-- 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">
<div class="box">
<div class="line">
@ -137,7 +138,7 @@
</div>
</template>
<template v-else-if="scope.row.type == 2">
<template v-if="scope.row.type == 2">
<div class="box">
<div class="line">
<div>{{ scope.row.name }}</div>
@ -163,7 +164,7 @@
</div>
</template>
<template v-else-if="scope.row.type == 3">
<template v-if="scope.row.type == 3">
<div class="box">
<div class="line" style="min-height: 100%;">
<span class="label">
@ -185,7 +186,7 @@
</div>
</template>
<template v-else-if="scope.row.type == 4">
<template v-if="scope.row.type == 4">
<div class="box">
<div class="line">
<span class="label">
@ -238,7 +239,7 @@
</div>
</template>
<template v-else-if="scope.row.type == 5">
<template v-if="scope.row.type == 5">
<div class="box">
<div class="line">
<!--
@ -300,14 +301,6 @@
</div>
</div>
</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>
</template>
</el-table-column>
@ -489,58 +482,33 @@ export default {
});
},
handleCheckChange(data, checked, indeterminate, row, index) { //
// console.log(this.fromChange)
// console.log(row.operationIds)
// console.log(checked)
// console.log(this.count)
// if(this.fromChange === row.operationIds) {
// 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.changeArr.push(checked)
// if(this.changeArr.length === 4) {
// this.checkChange.splice(index, 1, this.changeArr[2])
// this.changeArr.splice(0, this.changeArr.length)
// }else if(this.changeArr.length === 2) {
// 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.fromChange = row.operationIds
// }
this.changeArr.push(checked)
console.log(this.changeArr)
if(this.changeArr.length === 4) {
this.checkChange.splice(index, 1, this.changeArr[2])
this.changeArr.splice(0, this.changeArr.length)
}else if(this.changeArr.length === 2) {
this.checkChange.splice(index, 1, true)
if (checked){
}else{
row.operationIds = null
row.type = null
}
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) {
this.tableData[index].operationIds = data.id; // id
// for ()
row.value1 = "";
row.value2 = "";
row.value3 = "";
row.value4 = "";
row.value5 = "";
// console.log(data)
if (data.subjectId) { // id
this.currentNodeData = data;
this.$refs[`tree-${index}`].setCheckedNodes([data]);
this.getSubjectData(data.subjectId, index);
} else {
row.type = null;
// console.log(row.type)
this.currentNodeData = {};
this.$refs[`tree-${index}`].setCheckedNodes([data]);
}
@ -647,7 +615,7 @@ export default {
id: "",
lcId: i.lcId,
itemId:'',
type: i.type ? i.type : "7",
type: i.type ? i.type : "",
operationIds: i.operationIds,
resultOperation: i.resultOperation,
ruleOperation: i.ruleOperation

Loading…
Cancel
Save