魏志佳 4 年之前
父节点
当前提交
1998ab2d95

+ 18 - 10
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"
@@ -108,9 +108,9 @@
 
      
       <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;height:380px">
+      <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="padding-bottom:15px">
+          <li v-for="(item,index) of dataSource" :key="index" class="chouzhen" >
 
             <!-- <video class="video" :src="item.url" controls="controls" style="width:100%">
                   您的浏览器不支持 video 标签。
@@ -155,9 +155,9 @@
     </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" >
+          <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 标签。
@@ -320,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"
@@ -333,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)
         }
       },
@@ -351,6 +354,8 @@
         this.visibleMatemalImage = true
 
         this.ipagination.current = 1
+
+        this.isImg=true;
         var params = {}
         params.accountId = '1649600126891015'
         params.pageSize = this.ipagination.pageSize
@@ -391,7 +396,7 @@
         this.checkVideo = []
         this.nowItem = item
         this.visibleMatemal = true
-
+        this.isImg=false
         this.ipagination.current = 1
         var params = {}
         params.accountId = '1649600126891015'
@@ -966,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')
    

+ 1 - 1
src/views/modules/BatchCreate/newPlan.vue

@@ -1121,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: '时间',