Browse Source

修改头条批量接口界面

syh 5 years ago
parent
commit
81c0b80898
1 changed files with 20 additions and 43 deletions
  1. 20 43
      src/views/modules/BatchCreate/TouTiaoBatch.vue

+ 20 - 43
src/views/modules/BatchCreate/TouTiaoBatch.vue

@@ -229,10 +229,10 @@ let modifyTableCol=[
 const columns = [
 const columns = [
   {
   {
     title: '状态',
     title: '状态',
-    dataIndex: 'status',
-    key: 'status',
+    dataIndex: 'campaignStatus',
+    key: 'campaignStatus',
     align: 'center',
     align: 'center',
-    scopedSlots: { customRender: 'status' }
+    scopedSlots: { customRender: 'campaignStatus' }
   },
   },
   {
   {
     title: '广告组名称',
     title: '广告组名称',
@@ -390,8 +390,6 @@ const ideaColumns = [
     key: 'promotionPurpose',
     key: 'promotionPurpose',
     align: 'center',
     align: 'center',
   },
   },
-
-
   {
   {
     title: '投放时间',
     title: '投放时间',
     dataIndex: 'LaunchTime',
     dataIndex: 'LaunchTime',
@@ -423,38 +421,6 @@ const ideaColumns = [
 ];
 ];
 
 
 
 
-
-let data=[
-    {
-        status:true,
-        campaignName:'有缘有相聚',
-        advantageID:28856,
-        promotionPurpose:'-',
-        groupBudget:12563,
-        creatTime:'2020-01-03',
-        key:28856
-    },
-    {
-        status:false,
-        campaignName:'有缘有相聚',
-        advantageID:27856,
-        promotionPurpose:'-',
-        groupBudget:'不限',
-        key:27856,
-        creatTime:'2020-03-03'
-    },
-    {
-        status:true,
-        campaignName:'有缘有相聚',
-        advantageID:24856,
-        promotionPurpose:'-',
-        groupBudget:14563,
-        creatTime:'2020-04-03',
-        key:24856,
-    },
-]
-
-
 export default {
 export default {
     components: {
     components: {
         editableCell,
         editableCell,
@@ -527,12 +493,14 @@ export default {
             console.log(key);
             console.log(key);
             if(key=='plan'){
             if(key=='plan'){
                 this.columns=planColumns;
                 this.columns=planColumns;
-                let params = {};
-                this.refreshCampaignList();
             }else if(key=='group'){
             }else if(key=='group'){
-                this.columns=columns;
+              this.columns=columns;
+              let params = {};
+              this.refreshCampaignList();
             }else if(key=='idea'){
             }else if(key=='idea'){
-                this.columns=ideaColumns;
+              this.columns=ideaColumns;
+              let params = {};
+              this.refreshCreativeList();
             }
             }
         },
         },
         //跳转到批量页面
         //跳转到批量页面
@@ -710,12 +678,21 @@ export default {
             console.log(res);
             console.log(res);
             if (res.success) {
             if (res.success) {
               this.data = res.result.records;
               this.data = res.result.records;
-
             } else {
             } else {
               console.log(res.message);
               console.log(res.message);
             }
             }
           })
           })
-        }
+        },
+      refreshCreativeList(params){
+        getAction(this.url.creativeList, params).then(res => {
+          console.log(res);
+          if (res.success) {
+            this.data = res.result.records;
+          } else {
+            console.log(res.message);
+          }
+        })
+      }
     },
     },
     mounted() {
     mounted() {
         console.log(this);
         console.log(this);