diff --git a/src/views/Transaction.vue b/src/views/Transaction.vue
index 14365f8..43a2f86 100644
--- a/src/views/Transaction.vue
+++ b/src/views/Transaction.vue
@@ -50,10 +50,28 @@
判分规则
+ 批量新增
新增
-
+
+
+
+
0){
+ for (var i=0;i 0){
+
+ }else{
+ this.SelectedObj.checkedNodes[i].resultOperation = 0
+ if (this.SelectedObj.checkedNodes[i].id) {
+ list.push(this.SelectedObj.checkedNodes[i])
+ }
+ }
+ }
+ }
+ this.tableData = []
+ this.anewPosttingDatas(list)
+ this.tableData.forEach(async (item, index) => {
+ // 勾选树节点
+ // console.log(item)
+ if (item.id) {
+ this.$nextTick(() => {
+ this.$refs[`tree-${index}`].setCheckedKeys([item.id]);
+ })
+ }
+ })
+ this.configVisible = false
+ },
+ anewPosttingDatas(judgmentRuleList){
+ let length = judgmentRuleList.length;
+ let tempArr = [];
+ judgmentRuleList.forEach((item, index) => {
+ let obj = {
+ ...item,
+ isSubject: true,
+ isDisabled: true, // 已禁用
+ isSave: true // 已保存
+ };
+ //题目类型(1选择 2判断 3填空 4问答 5指标结果)
+ if (item.type == 1 || item.type == 2) {
+ obj.subjectId = Number(item.emptyOne);
+ obj.value1 = item.itemId;
+ } else if (item.type == 3) {
+ obj.subjectId = Number(item.emptyOne);
+ obj.value1 = item.emptyTwo;
+ } else if (item.type == 4) {
+ // 需要提目id
+ if (item.emptyOne === "无限制") {
+ obj.value1 = item.emptyOne;
+ obj.value2 = "";
+ } else {
+ obj.value1 = item.emptyOne.substring(0, item.emptyOne.indexOf(","));
+ obj.value2 = item.emptyOne.substring(item.emptyOne.indexOf(",") + 1, item.emptyOne.length);
+ }
+ obj.value3 = item.emptyTwo;
+ } else if (item.type == 5) {
+ obj.subjectId = Number(item.emptyOne);
+ obj.value2 = item.emptyTwo[0];
+ obj.value3 = item.emptyTwo.substring(1, item.emptyTwo.indexOf("~"));
+ obj.value4 = item.emptyTwo.substring(item.emptyTwo.indexOf("~") + 1, item.emptyTwo.length - 1);
+ obj.value5 = item.emptyTwo[item.emptyTwo.length - 1];
+ }
+ tempArr.push(obj);
+ if (length > 1 && index !== (length - 1)) {
+ if(item.ruleOperation){
+ tempArr.push({ruleOperation: item.ruleOperation});
+ }else{
+ tempArr.push({ruleOperation: 0});
+ }
+ }
+ this.tableData = tempArr;
+ });
},
// 重新封装数据
anewPosttingData(judgmentRuleList){
@@ -544,7 +648,7 @@ export default {
let result = [];
data.forEach(item => {
if (item.isNode === 0) {
- item.disabled = true;
+ // item.disabled = true;
item.showCheckbox = false;
} else {
item.showCheckbox = true;
@@ -668,6 +772,9 @@ export default {
});
}
},
+ addRules(){
+ this.configVisible = true
+ },
addRule() { // 新增规则
this.changeArr.splice(0, this.changeArr.length)
this.checkChange.push(false)