master
e 3 years ago
parent cdd60873d3
commit 45d4954ae2
  1. 32
      src/views/Transaction.vue

@ -58,6 +58,7 @@
<el-table <el-table
:data="tableData" :data="tableData"
:stripe="true" :stripe="true"
:key="itemkey"
:cell-style="rowClass" :cell-style="rowClass"
header-align="center" header-align="center"
:header-cell-style="headClass" :header-cell-style="headClass"
@ -108,6 +109,7 @@
<p class="p">交易结果一致性规则用户交易结果需要与下面设置的交易结果指标要求一致</p> <p class="p">交易结果一致性规则用户交易结果需要与下面设置的交易结果指标要求一致</p>
<div class="block"> <div class="block">
<!-- type: 题目类型(1选择 2判断 3填空 4问答 5指标结果) --> <!-- type: 题目类型(1选择 2判断 3填空 4问答 5指标结果) -->
<div v-if="scope.row.type == ''" 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">
@ -356,7 +358,8 @@ export default {
}, // }, //
tableData: [], // tableData: [], //
tableDataCopy: [], // tableDataCopy: [], //
isAddRule: false // isAddRule: false, //
itemkey:'',
}; };
}, },
mounted() { mounted() {
@ -483,6 +486,7 @@ export default {
if (res.status === 200 && res.list) { if (res.status === 200 && res.list) {
if (res.list.length) { if (res.list.length) {
this.treeData = this.toTreeId(res.list, res.list[0].parentId); this.treeData = this.toTreeId(res.list, res.list[0].parentId);
console.log(this.treeData)
} }
} else { } else {
this.$message.warning(res.message); this.$message.warning(res.message);
@ -709,22 +713,30 @@ export default {
} }
}, },
handleDelete(row, index) { // handleDelete(row, index) { //
this.$confirm("此操作将永久删除该规则, 是否继续?", "提示", { this.$confirm("此操作将永久删除该规则, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
center: true center: true
}).then(() => { }).then(() => {
console.log(this.tableData) if(index+1 == this.tableData.length){
console.log(index) index = index-1
console.log(this.tableData[0]) }
console.log(this.tableData.splice(index,2))
this.tableData.splice(index,2); this.tableData.splice(index,2);
console.log(this.tableData) this.itemkey = Math.random()
// console.log() this.tableData.forEach(async (item, index) => {
// index ? this.tableData.splice(index - 1, 1) : this.tableData.splice(0, 1); //
// this.isAddRule = false; if (item.operationIds) {
this.$nextTick(() => {
this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]);
});
}
// id,
if (item.isSubject && item.type && item.type != 4 && item.emptyOne) {
await this.getSubjectData(item.emptyOne, index);
}
});
this.isAddRule = false;
}).catch(() => { }).catch(() => {
}); });
}, },

Loading…
Cancel
Save