瀏覽代碼

'改状态'

魏志佳 4 年之前
父節點
當前提交
2c02012ed3
共有 1 個文件被更改,包括 41 次插入34 次删除
  1. 41 34
      src/views/modules/BatchCreate/TouTiaoBatch.vue

+ 41 - 34
src/views/modules/BatchCreate/TouTiaoBatch.vue

@@ -467,6 +467,13 @@ const planColumns = [
     align: 'center',
     scopedSlots: { customRender: 'campaignId_dictText' }
   },
+  {
+    title: '创建时间',
+    dataIndex: 'adCreateTime',
+    key: 'adCreateTime',
+    align: 'center',
+    scopedSlots: { customRender: 'adCreateTime' }
+  },
 ];
 const ideaColumns = [
   {
@@ -913,37 +920,37 @@ export default {
             // console.log(text,record);
             let recordData=JSON.parse(JSON.stringify(record))
             record.spin=true;
-           if(this.tabkey=='group'){
-               let ids=record.id;
-               let status=text?'disable':'enable';
-               postAction('/ctop/byteDanceCampaign/editStatus',qs.stringify({
-                   accountId:this.accountID,
-                   ids:`${ids}`,
-                   status:status,
-               })).then((res)=>{
-                //    console.log(res);
-                    // this.spinning=false;
-                    record.spin=false;
-                   if(res.success){
-                       this.refreshCampaignList({
-                            accountId:this.accountID,
-                            name:this.optionId,
-                            status:this.statusValue,
-                            startDate:this.dateString[0],
-                            endDate:this.dateString[1],
-                            pageNo:this.ipagination.current
-                        })
-                        this.$message.success(res.message)
-                   }else{
-                       this.$message.error(res.message)
-                   }
-               })
+            if(this.tabkey=='group'){
+                let ids=record.id;
+                let status=text?'disable':'enable';
+                postAction('/ctop/byteDanceCampaign/editStatus',qs.stringify({
+                    accountId:this.accountID,
+                    ids:`${ids}`,
+                    status:status,
+                })).then((res)=>{
+                    //    console.log(res);
+                        // this.spinning=false;
+                        record.spin=false;
+                    if(res.success){
+                        this.refreshCampaignList({
+                                accountId:this.accountID,
+                                name:this.optionId,
+                                status:this.statusValue,
+                                startDate:this.dateString[0],
+                                endDate:this.dateString[1],
+                                pageNo:this.ipagination.current
+                            })
+                            this.$message.success(res.message)
+                    }else{
+                        this.$message.error(res.message)
+                    }
+                })
            }else if(this.tabkey=='plan'){
 
                 if(text){
-                    recordData.toutiaoStatus='AD_STATUS_DISABLE';
+                    recordData.optStatus='AD_STATUS_DISABLE';
                 }else{
-                    recordData.toutiaoStatus='AD_STATUS_DELIVERY_OK'
+                    recordData.optStatus='AD_STATUS_ENABLE'
                 }
                 this.batchEditHttp('status',[recordData])
 
@@ -1050,19 +1057,19 @@ export default {
                 // this.selectedRows.forEach(item=>{
                 //     item.spin=true;
                 // })
-                // this.loading=true;
+            
                 if(this.optValue=='pause'){   
-                    
+                    this.loading=true;
                     if(this.tabkey=='group'){
                         console.log(this.selectedRows);                       
                         this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
 
                     }else if(this.tabkey=='plan'){
-                        console.log(0)
+                        // console.log(0)
                         this.loading=true;
                         if(this.selectedRowKeys.length>0){
                             this.selectedRows.forEach((item)=>{
-                                item.toutiaoStatus='AD_STATUS_DISABLE'
+                                item.optStatus='AD_STATUS_DISABLE'
                             })
                         }
                         console.log(0)
@@ -1073,13 +1080,13 @@ export default {
                     }
 
                 }else if(this.optValue=='open'){
-                    
+                    this.loading=true;
                     if(this.tabkey=='group'){
                         this.editGroupStatus('/ctop/byteDanceCampaign/editStatus');
                     }else if(this.tabkey=='plan'){
                         if(this.selectedRowKeys.length>0){
                             this.selectedRows.forEach((item)=>{
-                                item.toutiaoStatus='AD_STATUS_DELIVERY_OK'
+                                item.optStatus='AD_STATUS_ENABLE'
                             })
                         }
                         this.batchEditHttp('status',this.selectedRows)
@@ -1106,7 +1113,7 @@ export default {
                     }else if(this.tabkey=='plan'){
                         if(this.selectedRowKeys.length>0){
                             this.selectedRows.forEach((item)=>{
-                                item.toutiaoStatus='AD_STATUS_DELETE'
+                                item.optStatus='AD_STATUS_DELETE'
                             })
                         }
                         this.batchEditHttp('status',this.selectedRows)