weirenchun 2 rokov pred
rodič
commit
28f0799e28
1 zmenil súbory, kde vykonal 7 pridanie a 4 odobranie
  1. 7 4
      src/views/project/componens/info6.vue

+ 7 - 4
src/views/project/componens/info6.vue

@@ -208,10 +208,13 @@ export default {
         this.updateItem.push(item)
       }
 
-      const index = this.data.findIndex(ele => ele.month === item.month)
-      if (index != -1) {
-        this.data.splice(this.data.indexOf(index), 1)
-      }
+      let index = this.data.findIndex(ele => {
+        if (ele.month === item.month) {
+          return true
+        }
+      })
+      this.data.splice(index, 1)
+
       this.data.push(item)
       //重新计算合计
       this.allPlanInvestment = 0