Przeglądaj źródła

修改批量删除

17767204043 3 lat temu
rodzic
commit
ac27e431c2
1 zmienionych plików z 8 dodań i 7 usunięć
  1. 8 7
      src/views/Agreement/edit.vue

+ 8 - 7
src/views/Agreement/edit.vue

@@ -551,14 +551,15 @@ export default {
                    title:'批量删除确认?',
                    content:"是否确定批量删除?",
                    then: ()=>{
-                         let url_numbers = [];
-           this.selectData.forEach(v=>{
-               url_numbers.push(v.url_number);
-           })
               for(let i = 0;i<this.tableData.length;i++){
-                   if(url_numbers.indexOf(this.tableData[i].url_number)>=0){
-                       console.log(url_numbers);
-                       console.log(this.tableData[i].url_number);
+                  let  obj ={};
+                  obj.region= this.tableData[i].region;
+                  obj.product_title = this.tableData[i].product_title;
+                  let arr=[];
+                  arr = this.selectData.filter(v=>{
+                      return v.region == obj.region&&v.product_title==obj.product_title;
+                  })
+                   if(arr.length==1){
                        this.tableData.splice(i,1);
                        i--;
                    }