Kaynağa Gözat

中间列表添加提交

baijunde 2 yıl önce
ebeveyn
işleme
a9913e8e1f
1 değiştirilmiş dosya ile 6 ekleme ve 5 silme
  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.$api.dept.findDeptTree("9", "").then((res) => {
       this.treedata = res.data;
       this.treedata = res.data;
-      console.log(this.treedata);
-      
     });
     });
   },
   },
   methods: {
   methods: {
@@ -1327,7 +1325,8 @@ export default {
         })
         })
         let numId = +row.id
         let numId = +row.id
         let containsItem = temp.indexOf(numId);
         let containsItem = temp.indexOf(numId);
-        if(containsItem>0){
+        
+        if(containsItem>-1){
             this.rightList = this.rightList.filter((_, index) => index !== containsItem)
             this.rightList = this.rightList.filter((_, index) => index !== containsItem)
         }else{
         }else{
             this.rightList.push(row)
             this.rightList.push(row)
@@ -1478,9 +1477,11 @@ export default {
     },
     },
     sumbitInstitution() {
     sumbitInstitution() {
       this.$api.sys
       this.$api.sys
+      //   costIdList: this.costIdList.map((val) => val.id),
         .sysChannelGroupCostSet({
         .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) => {
         .then((res) => {
           if (res.code == 200) {
           if (res.code == 200) {