魏志佳 4 éve
szülő
commit
8ccaf7354d
2 módosított fájl, 72 hozzáadás és 27 törlés
  1. 70 25
      src/views/modules/BatchCreate/TouTiaoBatch.vue
  2. 2 2
      vue.config.js

+ 70 - 25
src/views/modules/BatchCreate/TouTiaoBatch.vue

@@ -148,6 +148,9 @@
                     <span slot="campaignStatus" slot-scope="text,record">
                     <span slot="campaignStatus" slot-scope="text,record">
                         <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
                         <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
                     </span>
                     </span>
+                    <span slot="createStatus" slot-scope="text,record">
+                        <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
+                    </span>
                     <span slot="status" slot-scope="text,record">
                     <span slot="status" slot-scope="text,record">
                         <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
                         <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
                     </span>
                     </span>
@@ -414,10 +417,10 @@ const planColumns = [
 const ideaColumns = [
 const ideaColumns = [
   {
   {
     title: '状态',
     title: '状态',
-    dataIndex: 'status',
+    dataIndex: 'createStatus',
     key: 'status',
     key: 'status',
     align: 'center',
     align: 'center',
-    scopedSlots: { customRender: 'status' }
+    scopedSlots: { customRender: 'createStatus' }
   },
   },
     //   {
     //   {
     //     title: '操作',
     //     title: '操作',
@@ -434,6 +437,12 @@ const ideaColumns = [
   },
   },
   {
   {
     title: '广告创意',
     title: '广告创意',
+    dataIndex: 'img',
+    key: 'img',
+    align: 'center',
+  },
+  {
+    title: '创意标题',
     dataIndex: 'title',
     dataIndex: 'title',
     key: 'title',
     key: 'title',
     align: 'center',
     align: 'center',
@@ -471,13 +480,6 @@ const ideaColumns = [
     align: 'center',
     align: 'center',
     scopedSlots: { customRender: 'planId_dictText' }
     scopedSlots: { customRender: 'planId_dictText' }
   },
   },
-  {
-    title: '所属广告组',
-    dataIndex: 'parentGroup',
-    key: 'parentGroup',
-    align: 'center',
-    scopedSlots: { customRender: 'parentGroup' }
-  },
 ];
 ];
 
 
 
 
@@ -595,7 +597,7 @@ export default {
             console.log(key);
             console.log(key);
             this.tabkey=key;
             this.tabkey=key;
            
            
-            this.columns=[];
+            // this.columns=[];
             if(key=='group'){
             if(key=='group'){
                 this.columns=columns;              
                 this.columns=columns;              
             }else if(key=='plan'){                              
             }else if(key=='plan'){                              
@@ -603,6 +605,7 @@ export default {
             }else if(key=='idea'){
             }else if(key=='idea'){
                 this.columns=ideaColumns;
                 this.columns=ideaColumns;
             }
             }
+
             if(this.accountID){
             if(this.accountID){
                 this.tabkey=key;
                 this.tabkey=key;
                 this.loading=true
                 this.loading=true
@@ -758,12 +761,53 @@ export default {
                     recordData.toutiaoStatus='AD_STATUS_DELIVERY_OK'
                     recordData.toutiaoStatus='AD_STATUS_DELIVERY_OK'
                 }
                 }
                 // console.log(recordData)
                 // console.log(recordData)
-                postAction('/ctop/byteDanceAdvertisePlan/edit',recordData).then((res)=>{
-                    console.log(res);
-                    if(res.success){
-                        record.status=!text;                   
-                    }
-                })
+                // postAction('/ctop/byteDanceAdvertisePlan/edit',recordData).then((res)=>{
+                //     console.log(res);
+                //     if(res.success){
+                //         record.status=!text;                   
+                //     }
+                // })
+                this.batchEditHttp('status',[recordData])
+            //     postAction(`/ctop/byteDanceAdvertisePlan/batchEdit/${type}`,params).then((res)=>{
+            //     console.log(res);
+            //     if(res.success){
+            //         if(res.result.length>0){
+            //             this.modifyTableData=[]
+            //             this.modifyTableData=res.result
+            //             this.getplanList({
+            //                 accountId:this.accountID,
+            //                 name:this.optionId,
+            //                 status:this.statusValue,
+            //                 startDate:this.dateString[0],
+            //                 endDate:this.dateString[1],
+            //                 pageNo:this.ipagination.current
+            //             })
+            //         }
+            //         this.optValue=undefined;
+            //         this.selectedRowKeys=[]
+            //     }
+            // })
+           }else if(this.tabkey=='idea'){
+               let ids=record.id;
+               let status=text?'disable':'enable';
+                postAction('/ctop//byteDanceCreative/editStatus',qs.stringify({
+                   accountId:this.accountID,
+                   ids:`${ids}`,
+                   status:status,
+               })).then((res)=>{
+                   console.log(res);
+                   if(res.success){
+                       this.data=[];
+                       this.refreshCreativeList({
+                            accountId:this.accountID,
+                            name:this.optionId,
+                            status:this.statusValue,
+                            startDate:this.dateString[0],
+                            endDate:this.dateString[1],
+                            pageNo:this.ipagination.current
+                        })
+                   }
+               })
            }
            }
            
            
         },
         },
@@ -778,7 +822,7 @@ export default {
             console.log(value)
             console.log(value)
             this.optValue=value;
             this.optValue=value;
         },
         },
-        editGroupStatus(){
+        editGroupStatus(url){
             let ids='';
             let ids='';
             this.selectedRows.forEach((item,index)=>{
             this.selectedRows.forEach((item,index)=>{
                 if(index==0){
                 if(index==0){
@@ -796,7 +840,7 @@ export default {
             }else if(this.optValue=='delete'){
             }else if(this.optValue=='delete'){
                 status='delete'
                 status='delete'
             }
             }
-            postAction('/ctop/byteDanceCampaign/editStatus',qs.stringify({
+            postAction(url,qs.stringify({
                 accountId:this.accountID,
                 accountId:this.accountID,
                 ids,
                 ids,
                 status,
                 status,
@@ -821,12 +865,13 @@ export default {
         //批量操作的确定按钮
         //批量操作的确定按钮
         isOkHandle(){
         isOkHandle(){
             this.selectDisable=true;
             this.selectDisable=true;
-            console.log(0)
+          
             if(this.optValue){
             if(this.optValue){
+                
                 if(this.optValue=='pause'){   
                 if(this.optValue=='pause'){   
                     if(this.tabkey=='group'){
                     if(this.tabkey=='group'){
                         console.log(this.selectedRows);
                         console.log(this.selectedRows);
-                        this.editGroupStatus()
+                        this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
                         
                         
                     }else if(this.tabkey=='plan'){
                     }else if(this.tabkey=='plan'){
                         console.log(0)
                         console.log(0)
@@ -838,12 +883,12 @@ export default {
                         console.log(0)
                         console.log(0)
                         this.batchEditHttp('status',this.selectedRows)
                         this.batchEditHttp('status',this.selectedRows)
                     }else if(this.tabkey=='idea'){
                     }else if(this.tabkey=='idea'){
-
+                        this.editGroupStatus('/ctop/byteDanceCreative/editStatus')
                     }               
                     }               
                     
                     
                 }else if(this.optValue=='open'){
                 }else if(this.optValue=='open'){
                     if(this.tabkey=='group'){
                     if(this.tabkey=='group'){
-                        this.editGroupStatus();
+                        this.editGroupStatus('/ctop/byteDanceCampaign/editStatus');
                     }else if(this.tabkey=='plan'){
                     }else if(this.tabkey=='plan'){
                         if(this.selectedRowKeys.length>0){                       
                         if(this.selectedRowKeys.length>0){                       
                             this.selectedRows.forEach((item)=>{
                             this.selectedRows.forEach((item)=>{
@@ -852,7 +897,7 @@ export default {
                         }
                         }
                         this.batchEditHttp('status',this.selectedRows)
                         this.batchEditHttp('status',this.selectedRows)
                     }else if(this.tabkey=='idea'){
                     }else if(this.tabkey=='idea'){
-
+                         this.editGroupStatus('/ctop/byteDanceCreative/editStatus');
                     }    
                     }    
                   
                   
                 }
                 }
@@ -866,7 +911,7 @@ export default {
             // console.log(e);
             // console.log(e);
                 if(this.optValue=='delete'){
                 if(this.optValue=='delete'){
                      if(this.tabkey=='group'){
                      if(this.tabkey=='group'){
-                         this.editGroupStatus()
+                         this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
                     }else if(this.tabkey=='plan'){
                     }else if(this.tabkey=='plan'){
                         if(this.selectedRowKeys.length>0){                        
                         if(this.selectedRowKeys.length>0){                        
                             this.selectedRows.forEach((item)=>{
                             this.selectedRows.forEach((item)=>{
@@ -876,7 +921,7 @@ export default {
                         this.batchEditHttp('status',this.selectedRows)
                         this.batchEditHttp('status',this.selectedRows)
                         this.$message.success('删除成功');
                         this.$message.success('删除成功');
                     }else if(this.tabkey=='idea'){
                     }else if(this.tabkey=='idea'){
-
+                        this.editGroupStatus('/ctop/byteDanceCreative/editStatus');
                     }    
                     }    
                     
                     
                 }
                 }

+ 2 - 2
vue.config.js

@@ -57,11 +57,11 @@ module.exports = {
     proxy: {
     proxy: {
       '/jeecg-boot': {
       '/jeecg-boot': {
         // target: 'http://192.168.1.90:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.1.90:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
-        target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
+        // target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.1.94:8804', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.1.94:8804', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.0.230:8088', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.0.230:8088', //请求本地 需要jeecg-boot后台项目  孙震
-        // target: 'http://192.168.1.51:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
+        target: 'http://192.168.1.51:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.165:8848', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.165:8848', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
         // target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目