소스 검색

Merge branch 'master' of http://git.tjyourong.com.cn/ctop/adsp-vue

zhuxinbo 4 년 전
부모
커밋
d422bbd07a

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

@@ -41,13 +41,13 @@
                     <a-select-option value=" " >
                         不限
                     </a-select-option>
-                    <a-select-option value="CAMPAIGN_STATUS_ENABLE" >
+                    <a-select-option value="ENABLE" >
                         启用
                     </a-select-option>
-                    <a-select-option value="CAMPAIGN_STATUS_DISABLE" >
+                    <a-select-option value="DISABLE" >
                         暂停
                     </a-select-option>
-                    <a-select-option value="CAMPAIGN_STATUS_DELETE">
+                    <a-select-option value="DELETE">
                         删除
                     </a-select-option>
                 </a-select>
@@ -146,13 +146,13 @@
                        <editableCell :text="text" slotName='bid' @change="onCellChange(record.key, 'bid', $event)" />
                     </span>
                     <span slot="campaignStatus" slot-scope="text,record">
-                        <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
+                        <a-switch size="default" :checked=text  @change.stop="switchChange(text,record)"/>
                     </span>
                     <span slot="createStatus" slot-scope="text,record">
-                        <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
+                        <a-switch size="default" :checked=text  @change.stop="switchChange(text,record)"/>
                     </span>
                     <span slot="status" slot-scope="text,record">
-                        <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
+                        <a-switch size="default" :checked=text  @change.stop="switchChange(text,record)"/>
                     </span>
                     <!-- <span slot="options" slot-scope="record">
                         <a href="javascript:;" style="margin-right:10px">编辑</a>
@@ -455,8 +455,8 @@ const ideaColumns = [
   },
   {
     title: '账户',
-    dataIndex: 'accountName',
-    key: 'promotionPurpose',
+    dataIndex: 'accountId_dictText',
+    key: 'accountId_dictText',
     align: 'center',
   },
   {
@@ -568,6 +568,10 @@ export default {
         },
     },
     methods: {
+        // 点击跳转
+        goNextPage(){
+
+        },
         // table里的函数
         
         // table里的函数在上
@@ -609,7 +613,6 @@ export default {
             if(this.accountID){
                 this.tabkey=key;
                 this.loading=true
-                this.columns=[];
                 if(key=='group'){         
                     let params = {};
                     this.refreshCampaignList({
@@ -632,7 +635,14 @@ export default {
    
                 }else if(key=='idea'){
                     let params = {};
-                      this.refreshCreativeList();
+                      this.refreshCreativeList({
+                        accountId:this.accountID,
+                        name:this.optionId,
+                        status:this.statusValue,
+                        startDate:this.dateString[0],
+                        endDate:this.dateString[1],
+                        pageNo:this.ipagination.current
+                      });
                 }
             }
             
@@ -760,33 +770,8 @@ export default {
                 }else{
                     recordData.toutiaoStatus='AD_STATUS_DELIVERY_OK'
                 }
-                // console.log(recordData)
-                // 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';
@@ -806,6 +791,8 @@ export default {
                             endDate:this.dateString[1],
                             pageNo:this.ipagination.current
                         })
+                   }else{
+                       this.$message.error(res.message)
                    }
                })
            }
@@ -1078,7 +1065,7 @@ export default {
             const dataSource = [...this.data];
             const target = dataSource.find(item => item.key === key);
             if (target) {
-                
+                target[dataIndex] = value;
                 console.log(target)
                 //单独修改预算
                 if(this.tabkey=='group'){
@@ -1090,8 +1077,7 @@ export default {
                         }).then((res)=>{
                             console.log(res);
                             if(res.success){
-                                // this.data = dataSource;
-                                target[dataIndex] = value;
+                                this.data=dataSource
                                 this.$message.success({
                                    content:res.message,
                                     duration:2
@@ -1101,7 +1087,7 @@ export default {
                                     content:res.message,
                                     duration:2
                                 })
-                                 this.data=[];
+                                this.data=[];
                                 this.refreshCampaignList({
                                         accountId:this.accountID,
                                         name:this.optionId,
@@ -1135,12 +1121,11 @@ export default {
                         })
                     }
                     
-                }else if(this.tabkey=='plan'){
+                }else if(this.tabkey=='plan'){                   
                     postAction('/ctop/byteDanceAdvertisePlan/edit',target).then((res)=>{
                         console.log(res);
                         if(res.success){
-                            // this.data = dataSource;
-                            target[dataIndex] = value;
+                            this.data = dataSource;                      
                             this.$message.success({
                                 content:'修改成功!',
                                 duration:2

+ 26 - 13
src/views/modules/BatchCreate/components/material.vue

@@ -63,7 +63,7 @@
                         :bucket="bucket" :accept="acceptImage" :size="102400" :accessKeyId="accessKeyId"
                         :accessKeySecret="accessKeySecret"></upload-to-ali> -->
                       <a @click="getImageList(item)" v-if="item.imageUrl==''">选择图片</a>
-                      <img :src="item.imageUrl" alt="" v-else>
+                      <img :src="item.imageUrl" alt="" v-else style="width:120px">
                     </a-form-item>
 
                     <a-form-item label="创意标题" :labelCol="labelCol" :wrapperCol="wrapperCol"
@@ -103,11 +103,14 @@
     </div>
     <!-- 创建大图横图创意 -->
 
-    <a-modal :maskClosable="false" title="选择素材" v-model="visibleMatemal" @ok="handleOkShow" :width="1000">
+    <a-modal :maskClosable="false" title="选择素材" v-model="visibleMatemal" @ok="handleOkShow" :width="1000" :height='500'>
+      <div >
+
+     
       <a-range-picker name="buildTime" style="width: 400px;margin:10px 0" v-model="time" />
-      <ul v-if="dataSource.length>0" style="overflow:auto;padding-left:0">
+      <ul v-if="dataSource.length>0" :style="{height:materialType == 'CREATIVE_IMAGE_MODE_VIDEO'?'200px':'380px'}">
         <a-checkbox-group v-model="checkVideo" @change="onChangeVideo" style="width:100%">
-          <li v-for="(item,index) of dataSource" :key="index" class="chouzhen" style="height:350px;">
+          <li v-for="(item,index) of dataSource" :key="index" class="chouzhen" >
 
             <!-- <video class="video" :src="item.url" controls="controls" style="width:100%">
                   您的浏览器不支持 video 标签。
@@ -147,12 +150,14 @@
           showQuickJumper :pageSize.sync="ipagination.pageSize" :total="ipagination.total" v-model="ipagination.current"
           @change="getDataSource" />
       </div>
+       </div>
+
     </a-modal>
     <a-modal :maskClosable="false" title="选择素材" v-model="visibleMatemalImage" @ok="handleOkShowImage" :width="1000">
       <a-range-picker name="buildTime" style="width: 400px;margin:10px 0" v-model="time" />
-      <ul v-if="dataSource.length>0" style="overflow:auto;padding-left:0">
+      <ul v-if="dataSource.length>0" style="overflow:auto;padding-left:0;">
         <a-checkbox-group v-model="checkVideo" @change="onChangeVideo" style="width:100%">
-          <li v-for="(item,index) of dataSource" :key="index" class="chouzhen" style="height:350px;">
+          <li v-for="(item,index) of dataSource" :key="index" class="chouzhen" style="height:350px">
 
             <!-- <video class="video" :src="item.url" controls="controls" style="width:100%">
                   您的浏览器不支持 video 标签。
@@ -315,10 +320,12 @@
             this.ipagination.current = current
           }
         },
+        isImg:false,
       }
     },
     methods: {
       getDataSource(page, pageSize) {
+        console.log(this.isImg)
         this.ipagination.current = page
         var params = {}
         params.accountId = "1649600126891015"
@@ -328,15 +335,16 @@
           params.startDate = moment(this.time[0]).format('YYYY-MM-DD')
           params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
         }
-        if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO' || this.materialType ==
-          'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL') {
+        if ((this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO' || this.materialType ==
+          'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL')&&!this.isImg) {
           if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO') {
             params.type = 2
           } else {
             params.type = 1
           }
           this.showVideoList('/bytedance/batch/getVideoList', params)
-        } else {
+        } else if(this.isImg){
+          console.log(this.isImg)
           this.showVideoList('/bytedance/batch/getImageList', params)
         }
       },
@@ -346,6 +354,8 @@
         this.visibleMatemalImage = true
 
         this.ipagination.current = 1
+
+        this.isImg=true;
         var params = {}
         params.accountId = '1649600126891015'
         params.pageSize = this.ipagination.pageSize
@@ -386,7 +396,7 @@
         this.checkVideo = []
         this.nowItem = item
         this.visibleMatemal = true
-
+        this.isImg=false
         this.ipagination.current = 1
         var params = {}
         params.accountId = '1649600126891015'
@@ -399,9 +409,9 @@
         if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO' || this.materialType ==
           'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL') {
           if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO') {
-            params.type = 1
+            params.type = 2
           } else {
-            params.type = 0
+            params.type = 1
           }
 
           this.showVideoList('/bytedance/batch/getVideoList', params)
@@ -961,7 +971,10 @@
   .opt {
     text-align: right;
   }
-
+  ul{
+    overflow:auto;
+    padding-left:0
+  }
   .chouzhen {
     border-style: solid;
     border-width: 1px;

+ 33 - 12
src/views/modules/BatchCreate/newCreate.vue

@@ -356,7 +356,16 @@
         </div>
       </div>
     </a-form>
-
+      <div class="infoModal">
+         <a-modal v-model="visible" title="提示
+         "  @ok="handleOk">
+            <ul>
+              <li v-for="(item,index) in errorInfo" :key="index">
+                  <span>第{{index+1}}条:</span>{{item.message}}
+              </li>
+            </ul>
+          </a-modal>
+      </div>
   </div>
 </template>
 
@@ -433,13 +442,20 @@
         },
         thirdIndustryId:undefined,
         adposition:'smartInventorys',
-        sceneInventory:'VIDEO_SCENE'
+        sceneInventory:'VIDEO_SCENE',
+
+        errorInfo:[],
+        visible:false,
       }
     },
     components: {
       material
     },
     methods: {
+      handleOk(e) {
+        // console.log(e);
+        this.visible = false;
+      },
       handleClose(removedTag) {
         const tags = this.createTipList.filter(tag => tag !== removedTag)
         this.createTipList = tags
@@ -609,24 +625,27 @@
                   values.sceneInventory=this.sceneInventory
                   
                 }
+                values.adKeywords=this.createTipList;
 
+                let adIds=[];
+                this.planInfo.forEach(item=>{
+                    adIds.push(item.id)
+                })
                 postAction('/bytedance/batch/create/creative', {
                   accountId:this.accountInfo.value,
-                  adIds: ["1673732908509245"],
+                  adIds,
                   ...values,
                   creatives: dataCreatives
                 }).then((res) => {
                   console.log(res)
                   if (res.success) {
-                     console.log(res)
-                    if (res.code == 0) {
-                     
-                    } else {
-                      this.$message.error(res.message)
-                    }
-
+                    this.errorInfo=res.data;
+                    this.visible=true;
+                    // res.data.forEach((item)=>{
+                    //   this.$message.error(item.message)
+                    // })
                   } else {
-                    this.$message.error('网络开小差了,等会再试试')
+
                   }
                 })
             } else {
@@ -635,7 +654,8 @@
           })
 
         })
-      }
+      },
+      
     },
     mounted() {
       this.initFormValue();
@@ -651,6 +671,7 @@
       if (planInfo) {
         this.planInfo = JSON.parse(planInfo)
       }
+      
       console.log(this.planInfo)
       let groupInfo = localStorage.getItem('groupInfo')
    

+ 6 - 2
src/views/modules/BatchCreate/newPlan.vue

@@ -528,7 +528,7 @@
             <div class="input-item">
               <a-form-item>
                 <a-radio-group v-decorator="['scheduleTime', { initialValue:'' }]">
-                  <a-radio-button value>不限</a-radio-button>
+                  <a-radio-button value=''>不限</a-radio-button>
                   <a-radio-button value="SpecifiedTImePeriod">指定时间段</a-radio-button>
                 </a-radio-group>
                 <div
@@ -1108,6 +1108,10 @@ export default {
               values.externalAction=this.externalAction
               values.startTime=this.dateRange[0].format('YYYY-MM-DD HH:mm');
               values.endTime= this.dateRange[1].format('YYYY-MM-DD HH:mm');
+              if(this.getFormData('scheduleTime')!=''){
+                  values.scheduleTime=this.scheduleTimeData
+              }
+
               postAction('/ctop/byteDanceAdvertisePlan/add', {
                 names: this.names,
                 landingType: this.groupInfo.landingType,
@@ -1117,7 +1121,7 @@ export default {
                 console.log(res)
                 if (res.success) {
                   if(res.code==0){
-                     this.$message.success('广告计划创建成功,2s后将跳转到新建计划页面')
+                     this.$message.success('广告计划创建成功,2s后将跳转到新建创意页面')
                     let planInfo=JSON.stringify(res.result)
                     localStorage.setItem('planInfo',planInfo);
                     setTimeout(()=>{

+ 6 - 4
src/views/modules/Statistics/effectReport.vue

@@ -36,6 +36,7 @@
              @change="tableChange"
             >
                 <a slot="projectName" slot-scope="text,records" @click="goAccount(records)">{{text}}</a>
+                <a slot="authNAme" slot-scope="text,records" @click="goAccount(records)">{{text}}</a>
                 <span slot="charge" slot-scope="charge"> {{charge|decimalsHandle}}</span>
                 <span slot="activationCost" slot-scope="activationCost"> {{activationCost|decimalsHandle}}</span>
                 <span slot="eventNextDayStayCost" slot-scope="eventNextDayStayCost"> {{eventNextDayStayCost|decimalsHandle}}</span>
@@ -290,6 +291,7 @@ const accountColumns = [
     title: '账户id',
     dataIndex: 'accountId',
     align:'center',
+    width:200,
     scopedSlots: { customRender: 'accountId' },
     fixed: 'left'
   },
@@ -354,7 +356,8 @@ const unitColumns = [
     dataIndex: 'campaignId',
     align:'center',
     scopedSlots: { customRender: 'campaignId' },
-    fixed: 'left'
+    fixed: 'left',
+    width:200,
   },
   {
     title: '广告组id',
@@ -389,7 +392,8 @@ const ideaColumns = [
     dataIndex: 'coverUrl',
     align:'center',
     scopedSlots: { customRender: 'coverUrl' },
-    fixed: 'left'
+    fixed: 'left',
+    width:200,
   },
   {
     title: '广告组名称',
@@ -398,8 +402,6 @@ const ideaColumns = [
     scopedSlots: { customRender: 'campaignId' },
     fixed: 'left'
   },
- 
- 
 
   {
     title: '时间',

+ 1 - 1
vue.config.js

@@ -57,7 +57,7 @@ module.exports = {
     proxy: {
       '/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.1.94:8804', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.0.230:8088', //请求本地 需要jeecg-boot后台项目  孙震