From 72c3f2f085e56890df01f4835774146c02cfe967 Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Thu, 2 Dec 2021 12:01:53 +0800
Subject: [PATCH] 12.2
---
src/views/Transaction.vue | 87 +++++++++++++++++++++------------------
1 file changed, 47 insertions(+), 40 deletions(-)
diff --git a/src/views/Transaction.vue b/src/views/Transaction.vue
index 1a7b0e5..0c54ead 100644
--- a/src/views/Transaction.vue
+++ b/src/views/Transaction.vue
@@ -50,7 +50,7 @@
判分规则
- 新增
+ 新增
@@ -302,7 +302,7 @@
- {{ checkChange? '需点击' : '' }}
+ {{ checkChange[scope.$index]? '需点击' : '' }}
@@ -338,7 +338,7 @@ export default {
components: {quill, MyTree},
data() {
return {
- checkChange: false,
+ checkChange: [false],
lcId: "", // 流程类判分点id
isAdd: Boolean(this.$route.query.isAdd), // 添加
@@ -375,6 +375,7 @@ export default {
});
this.getTreeData();
+ console.log(this.treeData)
if (this.$route.query.systemId) {
this.formData.lcJudgmentPoint.systemId = this.$route.query.systemId;
}
@@ -489,7 +490,8 @@ export default {
});
},
handleCheckChange(data, checked, indeterminate, row, index) { // 处理勾选
- this.checkChange = true
+ this.checkChange[this.checkChange.length -1 ] = true
+ this.checkChange.push(false)
if (checked && data.isNode === 1) {
this.tableData[index].operationIds = data.id; // 操作id串
// for ()
@@ -655,42 +657,47 @@ export default {
}
},
addRule() { // 新增规则
- this.isAddRule = true;
- // this.tableData.length && this.tableData.push({ruleOperation: 0, indexNo: ""});
- if (this.tableData.length > 0){
- this.tableData.push({
- ruleOperation: 0
- },{
- indexNo: this.tableData.length +1,
- isSubject: true,
- isDisabled: false, // 不禁用
- isSave: false, // 未保存
- lcId: this.lcId,
- resultOperation: 0,
- ruleOperation: 0,
- operationIds: "",
- value1: "",
- value2: "",
- value3: "",
- value4: "",
- value5: ""
- });
- }else{
- this.tableData.push({
- indexNo: this.tableData.length +1,
- isSubject: true,
- isDisabled: false, // 不禁用
- isSave: false, // 未保存
- lcId: this.lcId,
- resultOperation: 0,
- ruleOperation: 0,
- operationIds: "",
- value1: "",
- value2: "",
- value3: "",
- value4: "",
- value5: ""
- });
+
+ if(!this.isAddRule) {
+ this.isAddRule = true;
+ // this.tableData.length && this.tableData.push({ruleOperation: 0, indexNo: ""});
+ if (this.tableData.length > 0){
+ this.tableData.push({
+ ruleOperation: 0
+ },{
+ indexNo: this.tableData.length +1,
+ isSubject: true,
+ isDisabled: false, // 不禁用
+ isSave: false, // 未保存
+ lcId: this.lcId,
+ resultOperation: 0,
+ ruleOperation: 0,
+ operationIds: "",
+ value1: "",
+ value2: "",
+ value3: "",
+ value4: "",
+ value5: ""
+ });
+ }else{
+ this.tableData.push({
+ indexNo: this.tableData.length +1,
+ isSubject: true,
+ isDisabled: false, // 不禁用
+ isSave: false, // 未保存
+ lcId: this.lcId,
+ resultOperation: 0,
+ ruleOperation: 0,
+ operationIds: "",
+ value1: "",
+ value2: "",
+ value3: "",
+ value4: "",
+ value5: ""
+ });
+ }
+ }else {
+ this.$message('请保存当前判分规则再新增!');
}
// anewPosttingData(judgmentRuleList)
},