Przeglądaj źródła

中间列表添加提交

baijunde 2 lat temu
rodzic
commit
a9913e8e1f
1 zmienionych plików z 6 dodań i 5 usunięć
  1. 6 5
      src/views/AgreementManage/ChannelCost.vue

+ 6 - 5
src/views/AgreementManage/ChannelCost.vue

@@ -1190,8 +1190,6 @@ export default {
 
     this.$api.dept.findDeptTree("9", "").then((res) => {
       this.treedata = res.data;
-      console.log(this.treedata);
-      
     });
   },
   methods: {
@@ -1327,7 +1325,8 @@ export default {
         })
         let numId = +row.id
         let containsItem = temp.indexOf(numId);
-        if(containsItem>0){
+        
+        if(containsItem>-1){
             this.rightList = this.rightList.filter((_, index) => index !== containsItem)
         }else{
             this.rightList.push(row)
@@ -1478,9 +1477,11 @@ export default {
     },
     sumbitInstitution() {
       this.$api.sys
+      //   costIdList: this.costIdList.map((val) => val.id),
         .sysChannelGroupCostSet({
-          costIdList: this.costIdList.map((val) => val.id),
-          id: this.rowId,
+          costIdList:this.rightList.map((val) => val.id),
+          id:this.rowId
+        //   id:this.rowId,
         })
         .then((res) => {
           if (res.code == 200) {