wyh 1 vuosi sitten
vanhempi
commit
8ff982ade8
1 muutettua tiedostoa jossa 36 lisäystä ja 7 poistoa
  1. 36 7
      src/views/module_kzks/projectCostList/ProjectCostList.vue

+ 36 - 7
src/views/module_kzks/projectCostList/ProjectCostList.vue

@@ -893,7 +893,16 @@
               this.chooseStatus = true
               this.$message.error("请选择同级项进行对比");
             } else{
-              this.chooseStatus = false
+              // this.chooseStatus = false
+              for (let i = 0; i < selectedRows.length; i++) {
+                const element = selectedRows[i].ji;
+                console.log(888,this.chooseRowType,element)
+                if (this.chooseRowType != element) {
+                  this.chooseStatus = true
+                } else {
+                  this.chooseStatus = false
+                }
+              }
             }
           }
         } else{
@@ -902,13 +911,33 @@
             this.chooseRowType = this.selectionRows[0].ji
             this.chooseStatus = true
           } else {
-            if (this.chooseRowType != record.ji) {
-              this.chooseRowType = this.chooseRowType
-              this.chooseStatus = true
-              this.$message.error("请选择同级项进行对比");
-            }else{
-              this.chooseStatus = false
+            for (let i = 0; i < selectedRows.length; i++) {
+              const element = selectedRows[i].ji;
+              console.log(888,this.chooseRowType,element)
+              if (this.chooseRowType != element) {
+                this.chooseStatus = true
+                this.$message.error("请选择同级项进行对比");
+              } else {
+                this.chooseStatus = false
+              }
             }
+            // 第一版
+            // if (this.chooseRowType != record.ji) {
+            //   this.chooseRowType = this.chooseRowType
+            //   this.chooseStatus = true
+            //   this.$message.error("请选择同级项进行对比");
+            // }else{
+            //   // this.chooseStatus = false
+            //   for (let i = 0; i < selectedRows.length; i++) {
+            //     const element = selectedRows[i].ji;
+            //     console.log(888,this.chooseRowType,element)
+            //     if (this.chooseRowType != element) {
+            //       this.chooseStatus = true
+            //     } else {
+            //       this.chooseStatus = false
+            //     }
+            //   }
+            // }
           }
         }
         // console.log(record.ji)