From 88a1a1369d031527ef4b84c0e95286fe83bab325 Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Tue, 22 Feb 2022 10:09:35 +0800
Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/Program.vue.copy20210903 | 665 -----------------
src/views/Transaction.vue | 69 +-
src/views/Transaction.vue.copy20210901 | 521 --------------
src/views/Transaction.vue.copy20211021 | 960 -------------------------
4 files changed, 54 insertions(+), 2161 deletions(-)
delete mode 100644 src/views/Program.vue.copy20210903
delete mode 100644 src/views/Transaction.vue.copy20210901
delete mode 100644 src/views/Transaction.vue.copy20211021
diff --git a/src/views/Program.vue.copy20210903 b/src/views/Program.vue.copy20210903
deleted file mode 100644
index 59892c3..0000000
--- a/src/views/Program.vue.copy20210903
+++ /dev/null
@@ -1,665 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/Transaction.vue b/src/views/Transaction.vue
index 2da5360..4520a62 100644
--- a/src/views/Transaction.vue
+++ b/src/views/Transaction.vue
@@ -52,8 +52,8 @@
判分规则
+ 批量删除
新增
-
@@ -79,11 +79,17 @@
+
+
{{ scope.row.isSubject && scope.row.index + 1 }}
@@ -351,7 +357,7 @@ export default {
fromCountIndex: -999,
checkChange: [],
changeArr: [],
-
+ multipleSelection: [],
lcId: "", // 流程类判分点id
isAdd: Boolean(this.$route.query.isAdd), // 添加
isEdit: Boolean(this.$route.query.isEdit), // 编辑
@@ -446,6 +452,9 @@ export default {
// console.log(err);
});
},
+ handleSelectionChange(val){
+ this.multipleSelection = val
+ },
cxk(arr, obj, needObj) {
if(arr.length === 0) {
return obj
@@ -620,7 +629,6 @@ export default {
...res.subject,
lcItems: res.items
};
- console.log(res)
this.$set(this.tableData, index, item);
}
}).catch(err => {
@@ -629,18 +637,11 @@ export default {
}
},
handleCheckChange(data, checked, indeterminate, row, index) { // 处理勾选
-
if (checked && data.isNode === 1) {
- console.log(data)
if (!data.type){
this.getSubjectData(data.subjectId, index);
}
this.tableData[index].operationIds = data.operationIds; // 操作id串
- // row.value1 = "";
- // row.value2 = "";
- // row.value3 = "";
- // row.value4 = "";
- // row.value5 = "";
if (data.subjectId) { // 是否有题目id
this.currentNodeData = data;
this.$refs[`tree-${index}`].setCheckedNodes([data]);
@@ -997,6 +998,38 @@ export default {
}).catch(() => {
});
},
+ // 批量删除
+ batchDel() {
+ if(this.multipleSelection.length){
+ this.$confirm("此操作将永久删除该规则, 是否继续?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ center: true
+ }).then(() => {
+ const ids = this.multipleSelection.map(e => e.id)
+ const list = this.tableData
+ const len = list.length - 1
+ ids.map((e, i) => {
+ const index = list.findIndex(j => j.id === e)
+ if (index !== -1) {
+ this.tableData.splice(index === this.tableData.length - 1 ? index - 1 : index, 2)
+ }
+ })
+ this.setIndex()
+ this.itemkey = Math.random()
+ this.tableData.forEach(async (item, index) => {
+ // 根据题目id,获取题目信息
+ if (item.isSubject && item.type && item.type != 4 && item.emptyOne) {
+ await this.getSubjectData(item.emptyOne, index);
+ }
+ });
+ this.isAddRule = false;
+ }).catch(() => {})
+ } else {
+ this.$message.error('请先选择数据 !')
+ }
+ },
// 表头样式设置
headClass() {
return "text-align: center;";
@@ -1141,7 +1174,13 @@ export default {
z-index: 99999;
}
}
-
+/deep/.lc-table {
+ .el-table__body {
+ tr:nth-child(even) .el-checkbox {
+ display: none;
+ }
+ }
+}
@mixin block {
padding: 10px;
border: 1px solid #e4e7ed;
diff --git a/src/views/Transaction.vue.copy20210901 b/src/views/Transaction.vue.copy20210901
deleted file mode 100644
index c221509..0000000
--- a/src/views/Transaction.vue.copy20210901
+++ /dev/null
@@ -1,521 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/Transaction.vue.copy20211021 b/src/views/Transaction.vue.copy20211021
deleted file mode 100644
index 7ef8fe5..0000000
--- a/src/views/Transaction.vue.copy20211021
+++ /dev/null
@@ -1,960 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 操作一致性规则:用户完成的功能操作与下方设置的操作点一致
-
-
- {
- handleCheckChange(data, checked, indeterminate, scope.row, scope.$index);
- }"
- >
-
-
-
-
-
-
-
-
- {{ scope.row.resultOperation === 0 ? "且" : "或" }}
-
-
- {{ scope.row.ruleOperation === 0 ? "且" : "或" }}
-
-
-
-
-
- 交易结果一致性规则:用户交易结果需要与下面设置的交易结果指标要求一致
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 字数要求
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{{ scope.row.name }}
-
-
-
-
交易指标区间
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 编辑
-
- 保存
-
- 取消
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-