zhuxinbo пре 4 година
родитељ
комит
73141ff1e3

+ 12 - 2
src/mixins/JeecgListMixin.js

@@ -103,9 +103,19 @@ export const JeecgListMixin = {
         this.ipagination.current = 1;
       }
       var params = this.getQueryParams();//查询条件
-      if(params.createTime){
-        params.createTime = moment(params.createTime).format('YYYY-MM-DD')
+      if(params.createTime&&params.createTime.length>0){
+        // params.createTime = moment(params.createTime).format('YYYY-MM-DD')
+        params.startDate = moment(params.createTime[0]).format('YYYY-MM-DD')
+        params.endDate = moment(params.createTime[1]).format('YYYY-MM-DD')
+        params.createTime = null
       }
+      // if(params.startDate){
+      //   params.startDate = moment(params.startDate).format('YYYY-MM-DD')
+      // }
+      // if(params.endDate){
+      //   params.endDate = moment(params.endDate).format('YYYY-MM-DD')
+      // }
+
       this.loading = true;
       await getAction(this.url.list, params).then((res) => {
         if (res.success) {

+ 282 - 77
src/views/modules/BatchCreate/TouTiaoBatch.vue

@@ -1,17 +1,32 @@
 <template>
     <div class="toutiaoBatch">
+        <!-- <a-spin :spinning="spinning"> -->
+
         <keep-alive>
         <div class="tabs">
             <a-tabs v-model="tabkey" @change="callback">
                 <a-tab-pane key="group" tab="广告组">
                 </a-tab-pane>
                 <a-tab-pane key="plan" tab="广告计划">
+                    <a-tag color="blue" style="height:30px;line-height:30px;font-size:14px;" v-show="currentGroup.name">
+                       {{currentGroup.name}}	 <a-icon type="close"  @click="clearGroup" />
+                    </a-tag>
                 </a-tab-pane>
                 <a-tab-pane key="idea" tab="广告创意">
+                   
+                    <a-tag color="blue" style="height:30px;line-height:30px;font-size:14px;" v-show="currentPlan.name ">
+                        {{currentPlan.name }}	 <a-icon type="close" @click="clearPlan" />
+                    </a-tag>
                 </a-tab-pane>
-                <a-button type='primary'  slot="tabBarExtraContent" @click="goBatch">
+                <a-button type='primary'  slot="tabBarExtraContent" @click="goBatch" v-if="tabkey=='group'">
                    + 头条批量创建
                 </a-button>
+                <a-button type='primary'  slot="tabBarExtraContent" @click="createPlan" v-if="tabkey=='plan'">
+                   + 新建计划
+                </a-button>
+                <a-button type='primary'  slot="tabBarExtraContent" @click="createIdea" v-if="tabkey=='idea'">
+                   + 新建创意
+                </a-button>
 
             </a-tabs>
         </div>
@@ -77,7 +92,7 @@
                     </a-tooltip>
                 </span>
                 <span class="OptinItem">
-                    <a-select  style="width: 120px" @change="optChange" placeholder="请选择状态" :disabled='selectedRowKeys.length<=0'>
+                    <a-select  style="width: 120px" @change="optChange" v-model="optValue" placeholder="请选择状态" :disabled='selectedRowKeys.length<=0'>
                         <a-select-option value="open" >
                             启动
                         </a-select-option>
@@ -127,16 +142,16 @@
             </div>
             <div class="table">
                 <a-table
-                :columns="columns"
-                :data-source="data"
-                :rowSelection="{selectedRowKeys: selectedRowKeys,...rowSelection}"
-                bordered
-                :pagination="ipagination"
-                :loading="loading"
-                @change="sort"
+                    :columns="columns"
+                    :data-source="data"
+                    :rowSelection="{selectedRowKeys: selectedRowKeys,...rowSelection}"
+                    bordered
+                    :pagination="ipagination"
+                    :loading="loading"
+                    @change="sort"
                 >
                     <template slot="name" slot-scope="text,record">
-                        <a href="javascript:;" @click="goNextPage(text)">
+                        <a href="javascript:;" @click="goNextPage(record)">
                             <editableCell :text="text" slotName='name' @change="onCellChange(record.key, 'name', $event)" />
                         </a>
                     </template>
@@ -146,14 +161,31 @@
                     <span slot="bid" slot-scope="text,record">
                        <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-spin :spinning="record.spin" size="small" >
+                            <div class="spin-content">
+                                <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
+                            </div>
+                        </a-spin>    
+                        <!-- <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>                     -->
                     </span>
+
                     <span slot="createStatus" slot-scope="text,record">
-                        <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
+                         <a-spin :spinning="record.spin" size="small" >
+                            <div class="spin-content">
+                                <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
+                            </div>
+                        </a-spin>
+                        <!-- <a-switch size="default" :checked=text  @change="switchChange(text,record)"/> -->
                     </span>
                     <span slot="planStatus" slot-scope="text,record">
-                        <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
+                        <a-spin :spinning="record.spin" size="small" >
+                            <div class="spin-content">
+                                <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
+                            </div>
+                        </a-spin>
+                        <!-- <a-switch size="default" :checked=text  @change="switchChange(text,record)"/> -->
                     </span>
                    
                     <span slot="createImg" slot-scope="text,record">
@@ -161,7 +193,7 @@
                         <a-popover placement="right">
                             <template slot="content">
                                 <!-- {{record.videoId_dictText}}  -->
-                                <video :src="record.videoId_dictText" style="width:250px" controls autoplay muted ></video>
+                                <video :src="record.videoId_dictText" style="width:250px" controls  ></video>
                             </template>
                             <template slot="title">
                             <!-- <span>Title</span> -->
@@ -262,6 +294,8 @@
             </div>
 
         </a-modal>
+              
+    <!-- </a-spin> -->
     </div>
 </template>
 
@@ -525,6 +559,10 @@ export default {
     mixins: [JeecgListMixin],
     data() {
         return {
+            currentGroup:{},
+            currentPlan:{},           
+
+            spinning:false,
             moment,
             loading:false,
             accountID:undefined,
@@ -603,8 +641,75 @@ export default {
     },
     methods: {
         // 点击跳转
-        goNextPage(){
+        goNextPage(item){
+            console.log(item);
+            if(this.tabkey=='group'){
+                this.tabkey='plan';
+                this.columns=planColumns;
+                this.loading=true;
+                this.data=[];
+                this.currentGroup=item
+                console.log(item.id)
+                this.getplanList({
+                    accountId:this.accountID,
+                    name:this.optionId,
+                    status:this.statusValue,
+                    startDate:this.dateString[0],
+                    endDate:this.dateString[1],
+                    pageNo:this.ipagination.current,
+                    campaignId:item.id
+                })
 
+                let groupInfo=JSON.stringify(item)
+                localStorage.setItem('groupInfo',groupInfo)
+                
+            }else if(this.tabkey=='plan'){
+                this.tabkey='idea';
+                this.columns=ideaColumns;
+                this.loading=true;
+                this.data=[];
+                this.currentPlan=item
+                this.refreshCreativeList({
+                    accountId:this.accountID,
+                    planId:item.id,
+                    name:this.optionId,
+                    status:this.statusValue,
+                    startDate:this.dateString[0],
+                    endDate:this.dateString[1],
+                    pageNo:this.ipagination.current
+                })
+                let planInfo=JSON.stringify([item])
+                localStorage.setItem('planInfo',planInfo)
+            }
+            
+        },
+        // 清空选中的组信息
+        clearGroup(){
+            this.currentGroup={};
+            this.loading=true;
+            this.getplanList({
+                accountId:this.accountID,
+                name:this.optionId,
+                status:this.statusValue,
+                startDate:this.dateString[0],
+                endDate:this.dateString[1],
+                pageNo:this.ipagination.current,
+                campaignId:this.currentGroup.id
+            })
+        },
+        // 清空选中的计划
+        clearPlan(){
+            this.currentPlan={};
+            this.loading=true;
+            this.refreshCreativeList({
+                accountId:this.accountID,
+                name:this.optionId,
+                status:this.statusValue,
+                startDate:this.dateString[0],
+                endDate:this.dateString[1],
+                pageNo:this.ipagination.current,
+                planId:this.currentPlan.id,
+            })
         },
         // table里的函数
 
@@ -620,7 +725,14 @@ export default {
                 this.accountID=undefined;
                 this.openID=val
             }
-
+            this.treeData.forEach((item)=>{
+                item.children.forEach(ele=>{
+                    if(ele.value==val){
+                        let accountInfo=JSON.stringify(ele)
+                        localStorage.setItem('accountInfo',accountInfo)
+                    }
+                })
+            })
             this.search();
         },
 
@@ -648,14 +760,15 @@ export default {
                 this.tabkey=key;
                 this.loading=true
                 if(key=='group'){
-                    let params = {};
+                    
                     this.refreshCampaignList({
                         accountId:this.accountID,
                         name:this.optionId,
                         status:this.statusValue,
                         startDate:this.dateString[0],
                         endDate:this.dateString[1],
-                        pageNo:this.ipagination.current
+                        pageNo:this.ipagination.current,
+                        
                     });
                 }else if(key=='plan'){
                     this.getplanList({
@@ -664,13 +777,15 @@ export default {
                         toutiaoStatus:this.statusValue,
                         startDate:this.dateString[0],
                         endDate:this.dateString[1],
-                        pageNo:this.ipagination.current
+                        pageNo:this.ipagination.current,
+                        campaignId:this.currentGroup.id
                     })
 
                 }else if(key=='idea'){
                     let params = {};
                       this.refreshCreativeList({
                         accountId:this.accountID,
+                        planId:this.currentPlan.id,
                         name:this.optionId,
                         status:this.statusValue,
                         startDate:this.dateString[0],
@@ -688,6 +803,31 @@ export default {
             //      this.$router.push('/modules/BatchCreate/newCreate')
             // }
         },
+        createPlan(){
+            if(this.currentGroup.name){
+                console.log(this.currentGroup)
+                this.$router.push('/modules/BatchCreate/newPlan');
+                let groupInfo=JSON.stringify(this.currentGroup);
+                localStorage.setItem('groupInfo',groupInfo)
+            }else {
+                this.$router.push('/modules/BatchCreate/newGroup')
+            }
+        },
+        createIdea(){
+            if(this.accountID){
+                if(this.currentPlan.name){
+                    console.log(this.currentPlan)
+                    this.$router.push('/modules/BatchCreate/newCreate');
+                    let planInfo=JSON.stringify(this.currentGroup);
+                    localStorage.setItem('groupInfo',groupInfo)
+                }else if(!this.currentPlan.name){
+                    console.log('hhhh    去新建或者选择已有');
+                    this.$router.push('/modules/BatchCreate/selectPlanList');
+                }
+            }else {
+                this.$router.push('/modules/BatchCreate/newGroup')
+            }
+        },
         //状态改变
         statusChange(value){
             console.log(value);
@@ -727,10 +867,11 @@ export default {
                     this.getplanList({
                         accountId:this.accountID,
                         name:this.optionId,
-                        toutiaoStatus:this.statusValue,
+                        status:this.statusValue,
                         startDate:this.dateString[0],
                         endDate:this.dateString[1],
-                        pageNo:this.ipagination.current
+                        pageNo:this.ipagination.current,
+                        campaignId:this.currentGroup.id
                     })
                 }else if(this.tabkey=='idea'){
                     this.columns=ideaColumns;
@@ -740,7 +881,8 @@ export default {
                         status:this.statusValue,
                         startDate:this.dateString[0],
                         endDate:this.dateString[1],
-                        pageNo:this.ipagination.current
+                        pageNo:this.ipagination.current,
+                        planId:this.currentPlan.id,
                     })
                 }
             }else{
@@ -756,12 +898,7 @@ export default {
         },
         //点击分页
         sort(pagination, filters, sorter, { currentDataSource }){
-            // console.log(pagination, filters, sorter)
-            // if(sorter.order == 'ascend'){
-            //     this.HttpPost(sorter.columnKey+'+')
-            // }else if(sorter.order == 'descend'){
-            //     this.HttpPost(sorter.columnKey+'-')
-            // }
+            
             this.ipagination.current=pagination.current;
             this.search()
         },
@@ -771,10 +908,10 @@ export default {
         },
         //状态改变
         switchChange(text,record){
-
+            // this.spinning=true;
             // 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';
@@ -784,8 +921,9 @@ export default {
                    status:status,
                })).then((res)=>{
                 //    console.log(res);
+                    // this.spinning=false;
+                    record.spin=false;
                    if(res.success){
-                       this.data=[];
                        this.refreshCampaignList({
                             accountId:this.accountID,
                             name:this.optionId,
@@ -794,6 +932,9 @@ export default {
                             endDate:this.dateString[1],
                             pageNo:this.ipagination.current
                         })
+                        this.$message.success(res.message)
+                   }else{
+                       this.$message.error(res.message)
                    }
                })
            }else if(this.tabkey=='plan'){
@@ -814,19 +955,24 @@ export default {
                    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
-                        })
-                   }else{
-                       this.$message.error(res.message)
-                   }
+                
+                    if(res.success){
+                        //    this.data=[];
+                        record.spin=false;
+                            this.refreshCreativeList({
+                                accountId:this.accountID,
+                                name:this.optionId,
+                                status:this.statusValue,
+                                startDate:this.dateString[0],
+                                endDate:this.dateString[1],
+                                pageNo:this.ipagination.current,
+                                planId:this.currentPlan.id,
+                                
+                            })
+                    }else{
+                        record.spin=false;
+                        this.$message.error(res.message)
+                    }
                })
            }
 
@@ -868,18 +1014,27 @@ export default {
                 console.log(res);
                 if(res.success){
                     this.$message.success(res.message)
+                    // this.data=[];
+                    this.refreshCampaignList({
+                        accountId:this.accountID,
+                        name:this.optionId,
+                        status:this.statusValue,
+                        startDate:this.dateString[0],
+                        endDate:this.dateString[1],
+                        pageNo:this.ipagination.current
+                    })
                 }else{
+                    if(this.selectedRows.length>0){
+                        this.selectedRows.forEach(item=>{
+                            item.spin=false;
+                        })
+                    }
+                    this.selectedRowKeys=[];
+                    this.selectedRows=[];
+                    this.optValue=undefined;
                     this.$message.error(res.message)
                 }
-                this.data=[];
-                this.refreshCampaignList({
-                    accountId:this.accountID,
-                    name:this.optionId,
-                    status:this.statusValue,
-                    startDate:this.dateString[0],
-                    endDate:this.dateString[1],
-                    pageNo:this.ipagination.current
-                })
+                
                 
                 
             })
@@ -888,7 +1043,9 @@ export default {
         isOkHandle(){
             console.log(this.optValue&&this.selectedRowKeys.length>0)
             if(this.optValue&&this.selectedRowKeys.length>0){
-                
+                this.selectedRows.forEach(item=>{
+                    item.spin=true;
+                })
                 if(this.optValue=='pause'){   
                     if(this.tabkey=='group'){
                         console.log(this.selectedRows);
@@ -1061,17 +1218,39 @@ export default {
                     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
+                            pageNo:this.ipagination.current,
+                            campaignId:this.currentGroup.id
                         })
                     }
+                    // params.spin=false;
+                    params.forEach(item=>{
+                        item.spin=false;
+                    })
                     this.optValue=undefined;
-                    this.selectedRowKeys=[]
+                    this.selectedRowKeys=[];
+                    this.$message.success(res.message)
+                }else{
+                    // params.spin=false;
+                    params.forEach(item=>{
+                        item.spin=false;
+                    })
+                    this.getplanList({
+                        accountId:this.accountID,
+                        name:this.optionId,
+                        status:this.statusValue,
+                        startDate:this.dateString[0],
+                        endDate:this.dateString[1],
+                        pageNo:this.ipagination.current,
+                        campaignId:this.currentGroup.id
+                    })
+                    this.$message.error(res.message)
                 }
             })
         },
@@ -1085,11 +1264,7 @@ export default {
                 this.inputValue=0
             }
         },
-        //更改文字提示的父节点
-        // getPopupContainer(){
-        //     // console.log(this);
-        //     return this.$el
-        // },
+        
 
         //点击修改广告名
         // changecampaignName(text,record){
@@ -1166,7 +1341,8 @@ export default {
                                     status:this.statusValue,
                                     startDate:this.dateString[0],
                                     endDate:this.dateString[1],
-                                    pageNo:this.ipagination.current
+                                    pageNo:this.ipagination.current,
+                                    campaignId:this.currentGroup.id
                                 })
                             }
                         })
@@ -1195,16 +1371,22 @@ export default {
             // this.loading=true
           getAction(this.url.campaignList, params).then(res => {
             // console.log(res);
+            this.loading = false;
             if (res.success) {
                 this.ipagination.total = res.result.total
-                this.loading = false;
-                res.result.records.forEach((item)=>{
-                    item.key=item.id
-                })
-                this.data = res.result.records;
+                
+                
+                this.data = res.result.records.map(item=>{
+
+                    return {
+                        ...item,
+                        spin:false,
+                        key:item.id
+                    }
+                });
                 this.selectedRows=[];
                 this.selectedRowKeys=[];
-                this.$message.success(res.message)
+                
             } else {
             //   console.log(res.message);
                 this.selectedRows=[];
@@ -1216,16 +1398,23 @@ export default {
 
             getAction(this.url.planList,params).then((res)=>{
                 this.data=[]
-                // console.log(res)
+                console.log(res)
+                this.loading = false
                 if(res.success){
 
                     this.ipagination.total = res.result.total
-                    this.loading = false
+                    
                     res.result.records.forEach((item)=>{
                         item.key=item.id
                     })
 
-                    this.data = res.result.records;
+                    this.data = res.result.records.map(item=>{
+
+                        return {
+                            ...item,
+                            spin:false
+                        }
+                    });
                     // console.log(this.data)
                     this.selectedRowKeys=[];
                 }
@@ -1233,16 +1422,24 @@ export default {
         },
 
         refreshCreativeList(params){
+            this.loading=true;
             getAction(this.url.creativeList, params).then(res => {
                 // console.log(res);
+                this.loading=false;
                 if (res.success) {
                     this.ipagination.total = res.result.total
                     this.loading = false;
                     res.result.records.forEach((item)=>{
                             item.key=item.id
                     })
-                    this.data = res.result.records;
+                    // this.data = res.result.records;
+                    this.data = res.result.records.map(item=>{
 
+                        return {
+                            ...item,
+                            spin:false
+                        }
+                    });
                 } else {
                     // console.log(res.message);
                 }
@@ -1284,12 +1481,7 @@ export default {
         },
     },
     mounted() {
-        
 
-        // let params = {}
-        // // this.dateString=[moment().format("YYYY-MM-DD"),moment().format("YYYY-MM-DD")]
-        // //初始
-        // this.refreshCampaignList(params);
         this.accountHttp()
     },
     filters: {
@@ -1384,6 +1576,19 @@ export default {
 }
 </script>
 <style lang="scss">
+    #closeIcon{
+         color: #0E74D2;
+    }
+    .toutiaoBatch{
+        .ant-tag .anticon-close {      
+            color: #1890ff;        
+        }
+        .ant-tag .anticon-close:hover{      
+            color: rgba(0, 0, 0, 0.85);    
+        }
+
+    }
+    
     .ant-tooltip-inner,.ant-tooltip,.ant-tooltip-arrow::before{
         background-color: #fff;
         color: #333;

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

@@ -344,7 +344,7 @@ export default {
             }
             
         }
-    }
+    },
 }
 </script>
 

+ 2 - 2
src/views/modules/BatchCreate/editableCell.vue

@@ -5,14 +5,14 @@
           <a-input v-model="value" @blur="blurChange" @change="handleChange" @pressEnter="check" /><a-icon
             type="check"
             class="editable-cell-icon-check"
-            @click="check"
+            @click.stop="check"
           />
         </div>
         <div v-else class="editable-cell-text-wrapper">
           <span v-if="slotName=='budget'">{{ value*1? `日预算:${value*1}` :value }}</span>
           <span v-if="slotName=='bid'">{{ value*1? `${value*1}` :value }}</span>
           <span v-if="slotName=='name'">{{value}}</span>
-          <a-icon type="edit" class="editable-cell-icon" @click="edit" />
+          <a-icon type="edit" class="editable-cell-icon" @click.stop="edit" />
         </div>
       </div>
     </div>

+ 9 - 1
src/views/modules/BatchCreate/newCreate.vue

@@ -416,7 +416,7 @@
   export default {
     data() {
       return {
-        planInfo: {},
+        planInfo: [],
         groupInfo: {},
         accountInfo: {},
         createTip: "",
@@ -668,6 +668,14 @@
         })
       },
       
+      // 回显数据专用
+      echoData(){
+        postAction('',{
+
+        }).then(res=>{
+          console.log(res)
+        })
+      },
     },
     mounted() {
       this.initFormValue();

+ 2 - 0
src/views/modules/BatchCreate/newDirectedPackage.vue

@@ -782,6 +782,8 @@
                             <a-radio-button value="AD">广告计划</a-radio-button>
                             <a-radio-button value="CAMPAIGN">广告组</a-radio-button>
                             <a-radio-button value="ADVERTISER">广告账户</a-radio-button>
+                            <a-radio-button value="CUSTOMER">公司账户</a-radio-button>
+                            <a-radio-button value="APP">APP</a-radio-button>
                         </a-radio-group>
                         <span class="tishi"><a-icon type="exclamation-circle" class="tubiao" />过滤已转化不支持投放目标为展示、点击计划,不支持受众预估
                         </span>

+ 48 - 13
src/views/modules/BatchCreate/newGroup.vue

@@ -1,12 +1,5 @@
 <template>
     <div class="newGroup">
-        <div class="steps">
-            <!-- <a-steps direction="vertical" :current="0">
-                <a-step title="广告组" description="推广目的" />
-                <a-step title="广告计划"  description="所属广告组  投放范围  投放目标 用户定向 预算与出价 计划名称" />
-                <a-step title="广告创意" description="设置投放位置 制作创意 创意分类 监测链接" />
-            </a-steps> -->
-        </div>
         
         <div class="currentOPt">
             <div class="currentAccount">
@@ -37,7 +30,7 @@
                                     <a-radio-button value="LINK">销售线索收集</a-radio-button>                                   
                                 </a-radio-group>
                             </a-form-item>
-                            <a-form-item label="广告预算" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+                            <a-form-item label="广告预算" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
                                 <a-radio-group  v-decorator="['budgetMode',{initialValue:'BUDGET_MODE_INFINITE' }]">
                                     <a-radio-button value="BUDGET_MODE_INFINITE">不限</a-radio-button>
                                     <a-radio-button value="BUDGET_MODE_DAY">指定日预算</a-radio-button>                                   
@@ -47,7 +40,7 @@
                                 <a-input-number  :max="9999999.99" :step="1"  v-decorator="['budget',{initialValue:1000 }]" @change="budgetChange" @blur='budgetBlur' />
                                 <span class="tip" v-if="getFormData('budget')<1000">预算不少于1000.00元,不超过9999999.99元,请正确输入</span>
                             </a-form-item>
-                            <a-form-item label="广告名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+                            <a-form-item label="广告名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
                                <a-input   v-decorator="['campaignName', { rules: [{ required: true ,message: '广告组名称必须填写'}] }]" />
                             </a-form-item>
                             <a-form-item label="广告组状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
@@ -96,6 +89,7 @@
             </div>
             <div class="creatBody">
                 <a-button type='default' class="goback" @click="goback">返回</a-button>
+                <a-button type='primary' @click="goShowTable" style="margin-right:20px">保存并返回</a-button>
                 <a-button type='danger' @click="nextHandle" :loading='nextLoading'>创建并下一步</a-button>
             </div>
         </div>
@@ -286,7 +280,7 @@ export default {
                             })
                         }
                     }else{
-                        console.log(err)
+                         this.$message.error('请正确填写必填选项') 
                     }
                 });
            }else{
@@ -315,9 +309,50 @@ export default {
             this.$router.replace(`/modules/BatchCreate/newPlan`)
         },
         //分页页码改变
-        pageNoChange(){
-
-        }
+        pageNoChange(val){
+            console.log(val);
+            this.currentPage=val;
+            this.selectedCampaign()
+        },
+        goShowTable(){
+            if(this.accountID){
+                this.form.validateFields((err, values) => {
+                    if (!err) {
+                        this.nextLoading=true;
+                        console.log('Received values of form: ', values);
+                       if(values.budgetMode== "BUDGET_MODE_DAY" && (values.budget<1000||values.budget>9999999.99 )){
+                            this.$message.error('日预算不少于1000.00元,不超过9999999.99元,请正确输入')
+                        }else{
+                             postAction('/ctop/byteDanceCampaign/add',qs.stringify({
+                                accountId:this.accountID,
+                                ...values
+                            })).then(res=>{
+                                console.log(res)
+                                if(res.success){
+                                    this.nextLoading=false;
+                                    this.$message.success('广告组创建成功,即将返回批量页面');
+                                    values.id=res.campaign_id;
+                                    values.accountId=this.accountID
+                                    let groupInfo=JSON.stringify(values)
+                                    localStorage.setItem('groupInfo',groupInfo)
+                                    setTimeout(() => {
+                                        this.$router.push('/modules/BatchCreate/TouTiaoBatch')
+                                    },1000);                                
+                                }else{
+                                    this.nextLoading=false;
+                                    this.$message.error(res.message) 
+                                }
+                            })
+                        }
+                    }else{
+                        // console.log(err)
+                        this.$message.error('请正确填写必填选项') 
+                    }
+                });
+           }else{
+               this.$message.error('请选择具体的账户')
+           }
+        },
     },
     mounted() {
         this.accountHttp();

+ 112 - 79
src/views/modules/BatchCreate/newPlan.vue

@@ -155,8 +155,10 @@
               <div class="required-item"></div>
             </div>
             <div class="input-item">
-              <a-form-item>
-                <a-input v-decorator="['downloadUrl', {rules:validationRules.url}]" />
+              <!-- , {rules:validationRules.url} -->
+              <a-form-item>                  
+                <a-input v-decorator="['downloadUrl']" autocomplete="off"/>
+                <!-- <input type="text" v-decorator="['downloadUrl']" > -->
               </a-form-item>
               <span style="display:inline-block;margin-top:15px">
                 <a-checkbox
@@ -269,14 +271,14 @@
             <div class="input-item">
               <a-form-item>
                 <a-radio-group                       
-                  v-show="convertType=='AD_CONVERT_SOURCE_TYPE_NORMAL_APP_DOWNLOAD'"
+                  v-if="convertType=='AD_CONVERT_SOURCE_TYPE_NORMAL_APP_DOWNLOAD'"
                   @change="externalActionsChange"
                 > 
                   <a-radio-button v-for="item in currentConvertType.external_actions" :key="item.external_action" :value="item.external_action">
                     {{item.external_name}}</a-radio-button>
                 </a-radio-group>
-                <a-select  style="width: 335px" v-show="convertType=='AD_CONVERT_SOURCE_TYPE_APP_DOWNLOAD'"  @change="APIChange">
-                  <a-select-option v-for="item in currentConvertType.external_actions" :key="item.external_action" :value='item.external_action'>
+                <a-select  style="width: 335px" v-if="convertType=='AD_CONVERT_SOURCE_TYPE_APP_DOWNLOAD'"  @change="APIChange">
+                  <a-select-option v-for="item in currentConvertType.external_actions" :key="item.convert_id" :value='item.convert_id'>
                     {{item.external_name}}
                   </a-select-option>
                 </a-select>
@@ -316,8 +318,8 @@
                   ctions" :key="item.external_action" :value="item.external_action">
                     {{item.external_name}}</a-radio-button>
                 </a-radio-group> -->
-                <a-select  style="width: 335px" v-show="convertType=='AD_CONVERT_SOURCE_TYPE_INTERNAL'&&currentConvertType.external_actions.length>0"  @change="APIChange" placeholder="请选择转化目标">
-                  <a-select-option v-for="item in currentConvertType.external_actions"   :key="item.external_action" :value='item.external_action'>
+                <a-select  style="width: 335px" v-if="convertType=='AD_CONVERT_SOURCE_TYPE_INTERNAL'&&currentConvertType.external_actions.length>0"  @change="APIChange" placeholder="请选择转化目标">
+                  <a-select-option v-for="item in currentConvertType.external_actions"   :key="item.convert_id" :value='item.convert_id'>
                     {{item.external_name}}
                   </a-select-option>
                 </a-select>
@@ -704,6 +706,74 @@
               >请输入目标转化出价,不少于0.1元,不超过10000元</span>
             </div>
           </div>
+          
+          <div class="row-item" v-if="externalAction=='AD_CONVERT_TYPE_ACTIVE'">
+            <div class="hint-item"> </div>
+            <div class="label-item">
+              <div class="text-item">深度优化方式</div>
+              <div class="required-item"></div>
+            </div>
+            <div class="input-item">
+              <a-form-item>
+                <a-radio-group
+                  v-decorator="['deepBidType', { initialValue:'DEEP_BID_PACING' }]"
+                >
+                  <a-radio-button value="DEEP_BID_PACING" v-if="currentDeepConvert.deep_external_action=='AD_CONVERT_TYPE_NEXT_DAY_OPEN'">自动优化</a-radio-button>
+                  <a-radio-button value="DEEP_BID_MIN" v-if="currentDeepConvert.deep_external_action=='AD_CONVERT_TYPE_NEXT_DAY_OPEN'">自定义双出价</a-radio-button>
+                  <a-radio-button value="ROI_COEFFICIENT" v-if="currentDeepConvert.deep_external_action=='AD_CONVERT_TYPE_LT_ROI'">ROI系数</a-radio-button>
+                 
+                </a-radio-group>
+              </a-form-item>
+            </div>
+          </div>
+          <!-- {{currentDeepConvert}} -->
+          <div class="row-item" v-if="getFormData('smartBidType')=='SMART_BID_CUSTOM'&&getFormData('deepBidType')=='DEEP_BID_MIN'">
+            <div class="hint-item"> </div>
+            <div class="label-item">
+              <div class="text-item">深度转化出价</div>
+              <div class="required-item"></div>
+            </div>
+            <div class="input-item">
+              <a-form-item>
+                <a-input-number
+                  style="width:200px"
+                  :max="10000"
+                  :step="0.1"
+                  :min='0.1'
+                  v-decorator="['deepCpabid', {rules:validationRules.bid} ]"                 
+                />
+ 
+                <span style="margin-left:5px">元</span>
+              </a-form-item>
+              <span
+                class="tip"
+                v-if="getFormData('pricing')!='PRICING_CPA'&&getFormData('deepCpabid')<0.1"
+              >请输入深度转化出价,不少于0.1元,不超过10000元</span>
+            </div>
+          </div>
+          <div class="row-item" v-if="getFormData('smartBidType')=='SMART_BID_CUSTOM'&&getFormData('deepBidType')=='ROI_COEFFICIENT'">
+            <div class="hint-item"> </div>
+            <div class="label-item">
+              <div class="text-item">ROI系数</div>
+              <div class="required-item"></div>
+            </div>
+            <div class="input-item">
+              <a-form-item>
+                <a-input-number
+                  style="width:200px"
+                  :max="5"                 
+                  :min='0.001'
+                  v-decorator="['roiGoal', {rules:validationRules.roi} ]"                 
+                />
+ 
+                <span style="margin-left:5px">元</span>
+              </a-form-item>
+              <span
+                class="tip"
+                v-if="getFormData('pricing')!='PRICING_CPA'&&(getFormData('roiGoal')<0 || getFormData('roiGoal')>5)"
+              >请输入ROI系数,ROI系数不大于5,保留小数点后四位</span>
+            </div>
+          </div>
         </div>
       </div>
       <!-- 计划名称 -->
@@ -782,11 +852,10 @@ export default {
       names: [],
       isSelectedExist: false,
       validationRules: {
-        url: [
-         
+        url: [   
           {          
             required: true,
-            validator: this.validateURL,
+            // validator: this.validateURL,
           },
         ],
         name:[{
@@ -797,7 +866,12 @@ export default {
           required: true,
           message:'出价信息必须填写',
           // validator: this.validateBid,
-        }]
+        }],
+        roi:[{
+          required: true,
+          message:'ROI系数必须填写',
+          // validator: this.validateBid,
+        }],
       },
       isShowConversionTarget: false,
       downloadMode: '',
@@ -810,6 +884,7 @@ export default {
       convertType:'',
       currentConvertType:{},
       convertId:undefined,
+      currentDeepConvert:{},
       externalAction:'',
     }
   },
@@ -869,13 +944,26 @@ export default {
     // 应用下载API
     APIChange(val){
       console.log(val,this.currentConvertType);
+      this.convertId=val
       this.currentConvertType.external_actions.forEach(item=>{
-        if(item.external_action==val){
-          this.convertId=item.convert_id;
-          
+        if(item.convert_id==val){
+          console.log(item)
+          this.externalAction=item.external_action;
+          this.currentDeepConvert=item.deep_external_actions[0];
+          if(item.deep_external_actions[0].deep_external_action=='AD_CONVERT_TYPE_LT_ROI'){
+            this.form.getFieldDecorator('deepBidType')
+            this.form.setFieldsValue({
+              deepBidType:'ROI_COEFFICIENT'
+            })
+          }else if(item.deep_external_actions[0].deep_external_action=='AD_CONVERT_TYPE_NEXT_DAY_OPEN'){
+            this.form.getFieldDecorator('deepBidType')
+            this.form.setFieldsValue({
+              deepBidType:'DEEP_BID_PACING'
+            })
+          }
         }
       })
-      this.externalAction=val
+      
     },
     //  转化目标显示
     SelectConversionTarget() {
@@ -898,22 +986,7 @@ export default {
           })).then(res=>{
             // console.log(res)
             if(res.success){
-              // if(res.result.data){
-              //     res.result.data.list.forEach((item)=>{
-              //       if(item.convert_type=='AD_CONVERT_SOURCE_TYPE_NORMAL_APP_DOWNLOAD'){
-              //         item.convert_name='普通应用下载'
-              //       }
-              //       if(item.convert_type=='AD_CONVERT_SOURCE_TYPE_SDK'){
-              //         item.convert_name='应用下载SDK'
-              //       }
-              //       if(item.convert_type=='AD_CONVERT_SOURCE_TYPE_APP_DOWNLOAD'){
-              //         item.convert_name='应用下载API'
-              //       }
-              //       if(item.convert_type=='AD_CONVERT_SOURCE_TYPE_INTERNAL'){
-              //         item.convert_name='线索通'
-              //       }
-              //     })
-              // }
+             
               this.convertList=[];
               this.convertList=res.result.data.list;
               this.isShowConversionTarget = true
@@ -926,6 +999,10 @@ export default {
       
       
     },
+    // 深度转化方式改变
+    deepBidTypeChange(e){
+      console.log(e)
+    },
     //获取表单的某一个属性值
     getFormData(className) {
       return this.form.getFieldValue(className)
@@ -949,7 +1026,7 @@ export default {
       this.isSelectedExist = true;
       this.visible=false
       let userId = JSON.parse(localStorage.getItem('pro__Login_Userinfo')).value.id
-      getAction('/ctop/audiencePackage/list', {
+      getAction('/ctop/audiencePackage/list?pageNo=1&pageSize=100', {
         userId,
       }).then((res) => {
         // console.log(res)
@@ -1057,7 +1134,7 @@ export default {
           this.form.validateFieldsAndScroll((err, values) => {
             if (!err) {
               this.goPlanShowloading=true;
-              // console.log('Received values of form: ', values)
+              console.log('Received values of form: ', values)
               // console.log(this.names)
               values.accountId = this.groupInfo.accountId
               values.campaignId = this.groupInfo.id;
@@ -1090,7 +1167,7 @@ export default {
                        this.$router.replace(`/modules/BatchCreate/TouTiaoBatch`)
                     },2000)
                   }else{
-                    if(res.message='convert_id is required'){
+                    if(res.message=='convert_id is required'){
                         this.$message.error('转化方式必须选择!')
                     }else{
                       this.$message.error(res.message)
@@ -1202,51 +1279,7 @@ export default {
       this.directPackageValue={};
       this.directPackageValue=val;
     },
-    goHttp() {
-      // console.log(this.validatorName())
-      this.$nextTick(()=>{
-        console.log(this.$refs.directedPackage)
-        if(this.visible){
-          this.$refs.directedPackage.getValuehandle()
-        }
-        if (this.validatorName()) {
-          this.form.validateFieldsAndScroll((err, values) => {
-            if (!err) {
-              console.log('Received values of form: ', values)
-              console.log(this.names)
-              values.accountId = this.groupInfo.accountId
-              values.campaignId = this.groupInfo.id;
-              values.convertId = this.convertId;
-              values.appType=this.getFormData('appType')
-              values.externalAction=this.externalAction
-              
-              postAction('/ctop/byteDanceAdvertisePlan/add', {
-                names: this.names,
-                landingType: this.groupInfo.landingType,
-                ...values,
-                ...this.directPackageValue
-              }).then((res) => {
-                console.log(res)
-                if (res.success) {
-                  if(res.code==0){
-                     this.$message.success('广告计划创建成功,2s后将跳转到新建计划页面')
-                    let planInfo=JSON.stringify({...values,...this.directPackageValue,names:this.names,landingType: this.groupInfo.landingType,})
-                    localStorage.setItem('planInfo',planInfo) 
-                  }else{
-                    this.$message.error(res.message)
-                  }
-                 
-                } else {
-                  this.$message.error('网络开小差了,等会再试试')
-                }
-              })
-            }else{
-              console.log(err)
-            }
-          })
-        }
-      })
-    },
+    
   },
   created() {},
   beforeMount() {},

+ 389 - 0
src/views/modules/BatchCreate/selectPlanList.vue

@@ -0,0 +1,389 @@
+<template>
+  <div class="selectPlan">
+    <!-- 跳转至选择已有 -->
+    <div class="moduler">
+        <div class="moduler-title">选择广告组</div>
+        <div>
+          广告组名称:
+                 
+            <a-tree-select
+                show-search
+                allow-clear
+                dropdownMatchSelectWidth
+                v-model="groupId"
+                style="width: 60%"
+                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
+                :tree-data="treeData"
+                placeholder="请选择具体广告组"                   
+                :filterOption='filterOption'
+                treeNodeFilterProp='title'
+                @change='groupChange'                  
+            >                   
+            </a-tree-select>
+          
+
+        </div>
+    </div>
+    <div class="tabBody">
+       <a-tabs v-model="tabKey">
+          <a-tab-pane key="exist" tab="选择已有广告计划" forceRender>
+              <div class="selectedExist">
+                  <a-input v-model="selectedPlanValue" class="input" placeholder="请输入广告计划id或名称" @change="selectedPlan">
+                      <a-icon slot="addonAfter" type="search" />
+                  </a-input>
+                  <div class="campaign-have-list">
+                      <div class="campaign-have-header">列表</div>
+                      <div class="hasAccountID" v-if="groupId">
+                          <a-spin :spinning="spinning">
+                              <ul v-if="planHaveList.length>0">
+                                  <li class="ad-d-flex ad-d-flex-between" v-for="(item,index) in planHaveList" :key="index" @click="goCreate(item)">
+                                      <span class="info">{{item.name}}</span>
+                                      <!-- <span class="landing-type"></span> -->
+                                  </li>
+                              </ul>
+                              <div v-else class="noAccountID">
+                                  暂无数据
+                              </div>
+                          </a-spin>
+                      </div>
+                      <div class="noAccountID" v-else>
+                          选择广告组后,才能选择已有广告计划
+                      </div>
+                      
+                  </div>
+                  <div class="fenye" v-if="totalPage">
+                      <a-pagination :current='currentPage' size='small' :total='totalPage' :pageSize='10' @change="pageNoChange" />
+                  </div>
+              </div>             
+              <a-tab-pane key="create" tab="新建广告组">
+                
+              </a-tab-pane>
+          </a-tab-pane>      
+          <a-tab-pane key="create" tab="新建广告计划" forceRender>
+              <div class="selectedExist">
+                  
+                  <div class="campaign-have-list">
+                      <div class="campaign-have-header">操作</div>
+                      <div class="hasAccountID" v-if="groupId">
+                          <a-button type='danger' @click="newCreate" style="margin-top:150px">去新建计划</a-button>
+                      </div>
+                      <div class="noAccountID" v-else>
+                          选择广告组后,才能新建已有广告计划
+                      </div>
+                      
+                  </div>
+                 
+              </div>             
+          </a-tab-pane>      
+      </a-tabs>
+    </div>
+  </div>
+</template>
+
+<script>
+import moment from 'moment'
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
+import qs from 'qs'
+  export default {
+    data() {
+      return {
+        selectedPlanValue:undefined,
+        spinning:false,
+        currentPage:1,
+        totalPage:0,
+        tabKey:'exist',
+        planHaveList:[],
+        groupId:undefined,
+        planId:undefined,
+        treeData:[],
+        accountInfo:{},
+
+      }
+    },
+    methods: {
+      //分页页码改变
+      pageNoChange(val){
+          console.log(val);
+          this.currentPage=val;
+          this.selectedPlan()
+      },
+      selectedPlan(e){
+            // console.log(e.target.value,this.selectedPlanValue);
+            if(this.groupId){
+                this.getExsitPlanList();
+            }else{
+                this.$message.warning('请选择具体广告组后重试!')
+                this.selectedPlanValue=undefined;
+            }
+      },
+      getExsitPlanList(){
+          this.spinning=true;
+          getAction('/ctop/byteDanceAdvertisePlan/list',{
+              accountId:this.accountInfo.value,
+              pageNo:this.currentPage,
+              name:this.selectedPlanValue,
+              campaignId:this.groupId
+          }).then(res=>{
+              console.log(res)
+              if(res.success){
+                  this.spinning=false;
+                  this.totalPage=res.result.total;
+                  this.planHaveList=res.result.records;
+              }
+          })
+      },
+      filterOption(input, option){
+            console.log(input, option)
+            return (
+                option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+            );
+      },
+      groupChange(val){
+          console.log(val,this.groupId);
+          // let currentData=this.treeData.filter((item)=>{
+          //     return item.value==val
+          // })
+          // // console.log(currentData);
+          // if(currentData.length>0){
+          //     this.groupId=undefined;
+          //     this.openID=val
+          // }
+          this.getExsitPlanList();
+          console.log(this.treeData)
+          this.treeData.forEach((item)=>{
+              
+            if(item.value==val){
+                let groupInfo=JSON.stringify(item)
+                localStorage.setItem('groupInfo',groupInfo)
+            }
+          })
+         
+      },
+      
+      goCreate(item){
+          // console.log(item)
+          let planInfo=JSON.stringify([item])
+          localStorage.setItem('planInfo',planInfo);
+          this.$router.replace(`/modules/BatchCreate/newCreate`);
+
+      },
+      newCreate(){
+        this.$router.replace(`/modules/BatchCreate/newPlan`);
+      },
+      groupHttp(){
+        this.treeData=[];
+        this.groupId=undefined;
+        getAction('/ctop/byteDanceCampaign/list', {
+           accountId:this.accountInfo.value,
+           pageSize:1000,
+        }).then(res => {
+          console.log(res);
+          if(res.success){
+              
+            if(res.result){
+              // this.treeData=res.result.records
+                let treeData=[]
+                res.result.records.forEach((element,index) => {
+                  if(element){
+                      element.title=element.name+'_('+element.landingType_dictText+')';
+                      element.value=element.id;
+                      element.key=element.id;        
+                  }
+                });
+                // console.log(this.treeData)
+                this.treeData=res.result.records
+            }
+          }
+        })
+      },
+    },
+    mounted() {
+      let accountInfo = localStorage.getItem('accountInfo');
+      if(accountInfo){
+        this.accountInfo=accountInfo
+      }
+      this.groupHttp()
+    },
+    beforeDestroy() {
+      this.$bus.$emit('remove', '/modules/BatchCreate/selectPlanList')
+    },
+  }
+</script>
+
+<style lang="less" scoped>
+.selectPlan{
+  ul,li{
+    margin: 0;
+    padding:0
+  }
+  .moduler {
+    background: #fff;
+    margin-bottom: 16px;
+    position: relative;
+    padding: 32px 24px 48px 32px;
+    border-radius: 4px;
+    box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.05);
+    .moduler-title {
+      display: flex;
+      align-items: center;
+      font-size: 22px;
+      margin-bottom: 20px;
+    }
+    .row-item {
+      display: flex;
+      justify-content: flex-start;
+      align-items: center;
+      margin-bottom: 32px;
+    }
+    .row-item:last-of-type {
+      margin-bottom: 0;
+    }
+    .row-item .hint-item {
+      width: 24px;
+      min-width: 24px;
+      align-self: flex-start;
+      line-height: 20px;
+      height: 20px;
+      margin-top: 5px;
+    }
+    .row-item .label-item {
+      position: relative;
+      align-items: flex-start;
+      align-self: flex-start;
+      line-height: 20px;
+      height: 20px;
+      margin-top: 7px;
+      width: 80px;
+      min-width: 80px;
+      .text-item {
+        font-size: 14px;
+        width: 60px;
+      }
+    }
+    .row-item .required-item {
+      width: 4px;
+      height: 4px;
+      border-radius: 2px;
+      background: #f45858;
+      position: absolute;
+      right: 10px;
+      top: 50%;
+      transform: translateY(-50%);
+    }
+    .row-item .input-item {
+      min-width: 480px;
+      position: relative;
+      // height: 35px;
+      .tip {
+        font-size: 12px;
+        color: tomato;
+      }
+    }
+  }
+  
+        .tabBody{
+            background: #fff;
+            margin-bottom: 20px;
+            padding: 20px 30px;
+            .tip{
+                font-size: 12px;
+                color: tomato;
+                display: block;
+                margin-top: 5px;
+                height: 20px;
+                line-height: 20px;
+                
+            }
+            .selectedExist{
+                width: 600px;
+                .input{
+                    margin-bottom:16px ;
+                }
+                .campaign-have-list{
+                    font-family: PingFangSC-Regular;
+                    font-size: 14px;
+                    color: #333;
+                    border: 1px solid #DADFE3;
+                    border-radius: 4px;
+                    margin-bottom: 16px;
+                    height: 388px;
+                    .campaign-have-header {
+                        height: 38px;
+                        width: 100%;
+                        padding-left: 13px;
+                        line-height: 38px;
+                        background: #f8f9fa;
+                        border-radius: 4px 4px 0px 0px;
+                        border-bottom: 1px solid #DADFE3;
+                    }
+                    .campaign-have-list ul {
+                        width: 100%;
+                        height: 350px;
+                        padding-top: 6px;
+                        
+                    }
+                    li{
+                        padding: 6px 10px;
+                        cursor: pointer;
+                    }
+                    li:hover{
+                        background: #EDF1F5;
+                    }
+                    .ad-d-flex-between {
+                        justify-content: space-between !important;
+                    }
+
+                    .ad-d-flex, .ad-btn {
+                        display: flex;
+                        align-items: center;
+                    }
+                    .byted-loading-v {
+                        position: absolute;
+                        top: 0;
+                        right: 0;
+                        bottom: 0;
+                        left: 0;
+                        z-index: 996;
+                        background-color: hsla(0,0%,96%,.9);
+                    }
+                    .info{
+                        width: 60%;
+                        overflow: hidden;
+                        text-overflow: ellipsis;
+                        white-space: nowrap;
+                        text-align: left;
+                    }
+                    .landing-type {
+                        color: #999;
+                        font-size: 12px;
+                        white-space: nowrap;
+                    }
+                }
+                .noAccountID{
+                    font-size: 14px;
+                    text-align: center;
+                    color: #999;
+                    line-height: 388px;
+                }
+                .fenye{
+                    height: 60px;
+                    padding-top: 12px;
+                    text-align: right;
+                }
+                .hasAccountID{
+                  text-align: center;
+                }
+            }
+        }
+        .creatBody{
+            background: #fff;
+            margin-bottom: 20px;
+            padding: 20px 30px;
+            text-align: right;
+            .goback{
+                margin-right: 20px;
+            }
+        }
+    
+}
+</style>

+ 17 - 3
src/views/modules/Statistics/effectReport.vue

@@ -15,7 +15,7 @@
       </a-select>     
       <a-range-picker v-model="dateRange" @change="dateChange" style="width:200px" />      
       <div class="opt">
-        <a-button type='primary' @click="search">查询</a-button>
+        <a-button type='primary' @click="(ipagination.current=1);(projectId = null);( unitId = null );(campaignId = null);(accountId = null) ;search()">查询</a-button>
       </div>
     </div>
     <div class="moduler">
@@ -501,10 +501,13 @@ export default {
         //table的改变(页码改变请求数据,也可以写排序)
       tableChange(pagination, filters, sorter, { currentDataSource }){
           // this.searchHandle();
+          
           this.search();
       },
       projectChange(val){
-        console.log(val)
+        console.log(val);
+          this.tabKey=1;
+          this.search();
       },
       dateChange(date,dateString){
         console.log(date,dateString)
@@ -519,13 +522,18 @@ export default {
         // }else if(){
 
         // }
+        this.projectId = null
+        this.unitId = null
+        this.campaignId = null
+        this.accountId = null
+        this.ipagination.current=1;
         this.search();
       },
       // x项目的table值
       getTableProjectList(paramse){   
         this.loading=true;     
         this.spinning=true;
-        // this.ipagination.current=0;
+        
         this.columns= [...projectColumns,...publicColumns]  
         postAction('/kuaishou/getKuaishouProjectInfo',paramse).then(res=>{
           console.log(res);
@@ -575,6 +583,7 @@ export default {
             startDate:this.dateRange[0].format('YYYY-MM-DD'),
             endDate:this.dateRange[1].format('YYYY-MM-DD'),
             projectId:this.projectId,
+            projectList:this.projectValue.length==0?null:this.projectValue,
             pageNum:this.ipagination.current,
             pageSize:'10'
           }).then(res=>{
@@ -598,6 +607,7 @@ export default {
           startDate:this.dateRange[0].format('YYYY-MM-DD'),
           endDate:this.dateRange[1].format('YYYY-MM-DD'),
           accountId:this.accountId,
+          projectList:this.projectValue.length==0?null:this.projectValue,
           pageNum:this.ipagination.current,
           pageSize:'10'
         }).then(res=>{
@@ -620,6 +630,7 @@ export default {
           startDate:this.dateRange[0].format('YYYY-MM-DD'),
           endDate:this.dateRange[1].format('YYYY-MM-DD'),
           campaignId:this.campaignId,
+          projectList:this.projectValue.length==0?null:this.projectValue,
           pageNum:this.ipagination.current,
           pageSize:'10'
         }).then(res=>{
@@ -643,6 +654,7 @@ export default {
           startDate:this.dateRange[0].format('YYYY-MM-DD'),
           endDate:this.dateRange[1].format('YYYY-MM-DD'),
           unitId:this.unitId,
+          projectList:this.projectValue.length==0?null:this.projectValue,
           pageNum:this.ipagination.current,
           pageSize:'10'
         }).then(res=>{
@@ -659,6 +671,8 @@ export default {
       },
 
       search(){
+
+        
         if(this.tabKey==1){
           this.getTableProjectList({
             startDate:this.dateRange[0].format('YYYY-MM-DD'),

+ 170 - 5
src/views/modules/Statistics/refuseData.vue

@@ -13,13 +13,13 @@
     <a-row :gutter="10" style="margin-top:10px">
       <a-col :span="24">
         <a-card style="width:100%;">
-          <div style="display:flex;margin:0 0 20px 0">
+          <!-- <div style="display:flex;margin:0 0 20px 0">
             <a-input placeholder="请输出要查找的创意名称" style="width:300px;" v-model="keyWord" />
             <a-button type="primary" style="margin-left:10px" @click="addUserKey">搜索</a-button>
             <a-button type="primary" style="margin-left:10px" @click="clickAgain" v-if="selectedRowKeys.length>0"
               :loading="loadingList">一键重提
             </a-button>
-          </div>
+          </div> -->
 
           <a-table :columns="columns" :dataSource="dataList" bordered :loading="loading" size="middle"
             :pagination="ipagination" :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
@@ -28,6 +28,33 @@
                 您的浏览器不支持 video 标签。
               </video>
             </div> -->
+            <template slot="campaignName" slot-scope="text, record">
+              <div style="display:flex;justify-content: center;">
+                <a @click="toDetail(record)" class="count" v-show="!record.editName">{{ text }}</a>
+              </div>
+            </template>
+
+            <span slot="campaignType" slot-scope="text">
+              {{ text | typeStatus }}
+            </span>
+            <span slot="status" slot-scope="text">
+              {{ text | status }}
+            </span>
+            <span slot="putStatus" slot-scope="text">
+              {{ text | putStatus }}
+            </span>
+            <span slot="createChannel" slot-scope="text">
+              {{ text | createChannel }}
+            </span>
+
+            <template slot="dayBudget" slot-scope="text, record">
+              <div style="display:flex;justify-content: center;">
+                <span class="count">{{ text ? (text / 1000).toFixed(2) : '不限制预算' }}</span>
+              </div>
+            </template>
+
+
+
             <div slot="coverUrl" slot-scope="coverUrl">
               <img :src="coverUrl" controls="controls" style="height:200px;width:112.5px" />
             </div>
@@ -159,6 +186,84 @@
     }
   ]
 
+
+  var columnsCam = [{
+      title: '广告计划名称',
+      align: 'center',
+      dataIndex: 'campaignName',
+      fixed: 'left',
+      width: 300,
+      scopedSlots: {
+        customRender: 'campaignName'
+      }
+    },
+    {
+      title: '计划单日预算金额',
+      align: 'center',
+      dataIndex: 'dayBudget',
+      scopedSlots: {
+        customRender: 'dayBudget'
+      },
+      width: 200
+    },
+    {
+      title: '计划状态',
+      align: 'center',
+      dataIndex: 'status',
+      scopedSlots: {
+        customRender: 'status'
+      }
+    },
+    {
+      title: '计划类型',
+      align: 'center',
+      dataIndex: 'campaignType',
+      scopedSlots: {
+        customRender: 'campaignType'
+      }
+    },
+
+    {
+      title: '渠道',
+      align: 'center',
+      dataIndex: 'createChannel',
+      scopedSlots: {
+        customRender: 'createChannel'
+      }
+    },
+    {
+      title: '投放状态',
+      align: 'center',
+      dataIndex: 'putStatus',
+      scopedSlots: {
+        customRender: 'putStatus'
+      },
+      filters: [{
+          text: '投放中',
+          value: '1'
+        },
+        {
+          text: '暂停',
+          value: '2'
+        }
+      ],
+      onFilter: (value, record) =>
+        record.putStatus
+        .toString()
+        .toLowerCase()
+        .includes(value.toLowerCase()),
+    },
+    {
+      title: '创建时间',
+      align: 'center',
+      dataIndex: 'putCreateTime'
+    },
+    {
+      title: '更新时间',
+      align: 'center',
+      dataIndex: 'putUpdateTime'
+    }
+  ]
   export default {
     name: 'refuse-data',
     components: {
@@ -173,7 +278,7 @@
         fail: null,
         appId: null,
         loading: false,
-        columns,
+        columns: columnsCam,
         dataList: [],
         keyWord: '',
         editTitle: '',
@@ -204,7 +309,40 @@
         }
       }
     },
-    filters: {},
+    filters: {
+      typeStatus(type) {
+        // 2 - 提升应用安装;
+        // 3 - 获取电商下单;
+        // 4 - 推广品牌活动;
+        // 5 - 收集销售线索;
+        var data = ['', '', '提升应用安装', '获取电商下单', '推广品牌活动', '收集销售线索']
+        return data[type]
+      },
+      status(sta) {
+        var data = {
+          '-1': '不限',
+          1: '已暂停',
+          3: '计划超预算',
+          4: '有效',
+          6: '余额不足'
+        }
+        return data[sta]
+      },
+      putStatus(sta) {
+        var data = {
+          1: '投放中',
+          2: '暂停'
+        }
+        return data[sta]
+      },
+      createChannel(sta) {
+        var data = {
+          0: '投放后台',
+          1: '汇创助手'
+        }
+        return data[sta]
+      }
+    },
     watch: {
       appId(n, o) {
         console.log(n, o)
@@ -214,6 +352,19 @@
       }
     },
     methods: {
+      toDetail(record) {
+
+        localStorage.setItem('accountIdCreat', record.campaignId)
+        localStorage.setItem('accountIdCreatNow', this.appId)
+
+
+        this.$router.replace({
+          path: '/Statistics/refuseDataCreat'
+        })
+
+      },
+
+
       clickAgain() {
         this.loadingList = true
         var params = {}
@@ -284,7 +435,8 @@
         params.pageSize = this.ipagination.pageSize
         params.pageNo = this.ipagination.current
         if (this.appId) {
-          getAction('/MaterialRefuse/getRefuseCreative', params).then(res => {
+
+          getAction('/kuaishou/kuaiShouCampaign/list', params).then(res => {
             if (res.code == 0) {
               this.dataList = res.result.records.map((v, index) => {
                 return {
@@ -297,6 +449,19 @@
               this.ipagination.total = res.result.total
             }
           })
+          //   getAction('/MaterialRefuse/getRefuseCreative', params).then(res => {
+          //     if (res.code == 0) {
+          //       this.dataList = res.result.records.map((v, index) => {
+          //         return {
+          //           ...v,
+          //           key: index
+          //         }
+          //       })
+          //       this.list = this.dataList
+          //       this.loading = false
+          //       this.ipagination.total = res.result.total
+          //     }
+          //   })
         } else {
           this.$message.error('请选择账户')
         }

+ 619 - 0
src/views/modules/Statistics/refuseDataCreat.vue

@@ -0,0 +1,619 @@
+<style></style>
+<template>
+  <div class="data-refuse-statistics">
+    <!-- <a-row class="image-list-heading vm-panel">
+      <a-row type="flex" align="middle" justify="space-between" class="panel-body">
+        <div class="search-bar" style="width:100%;display:flex">
+          <span style="line-height:35px;margin-left:15px">账户选择:</span>
+          <treeselect :appId.sync="appId" :multiple="false" />
+          <a-button type="primary" style="margin-left:10px" @click="(ipagination.current=1);addUser()">搜索</a-button>
+        </div>
+      </a-row>
+    </a-row> -->
+    <a-row :gutter="10" style="margin-top:10px">
+      <a-col :span="24">
+        <a-card style="width:100%;">
+          <div style="display:flex;margin:0 0 20px 0;position:relative">
+            <a-input placeholder="请输出要查找的创意名称" style="width:300px;" v-model="keyWord" />
+            <a-button type="primary" style="margin-left:10px" @click="addUserKey">搜索</a-button>
+            <a-button type="primary" style="margin-left:10px" @click="reset()">刷新列表</a-button>
+            <a-button type="primary" style="margin-left:10px" @click="clickAgain" v-if="selectedRowKeys.length>0"
+              :loading="loadingList">一键重提
+            </a-button>
+            <a-button type="primary" style="position:absolute;right:0" @click="syncCreative"
+              :loading="loadingSyncCreative">
+              同步创意
+            </a-button>
+          </div>
+          <!-- /MaterialRefuse/syncCreative -->
+          <a-table :columns="columns" :dataSource="dataList" bordered :loading="loading" size="middle"
+            :pagination="ipagination" :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
+            <!-- <div slot="videoUrl" slot-scope="videoUrl">
+              <video class="video" :src="videoUrl" controls="controls" style="height:200px;width:112.5px">
+                您的浏览器不支持 video 标签。
+              </video>
+            </div> -->
+
+
+            <div slot="coverUrl" slot-scope="coverUrl">
+              <img :src="coverUrl" controls="controls" style="height:200px;width:112.5px" />
+            </div>
+            <template slot="creativeName" slot-scope="text, record">
+              <div>
+                {{ text }}
+                <a-icon type="edit" style="cursor: pointer;" @click="onCellChange(record, 'creativeName')" />
+              </div>
+            </template>
+            <template slot="description" slot-scope="text, record">
+              <div>
+                {{ text }}
+                <a-icon type="edit" style="cursor: pointer;" @click="onCellChange(record, 'description')" />
+              </div>
+            </template>
+          </a-table>
+        </a-card>
+      </a-col>
+    </a-row>
+    <a-modal :title="editTitle" :visible="visible" @ok="handleOk" :confirmLoading="confirmLoading"
+      @cancel="handleCancel">
+      <a-textarea v-model="editWord" autosize />
+    </a-modal>
+    <a-modal title="一键重提" @cancel="handleClose" :visible="visibleAgain" @ok="handleOkAgain"
+      :confirmLoading="againLoading">
+      <a-form :form="form">
+        <a-form-item label="是否修改" :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }">
+          <a-radio-group buttonStyle="solid" v-decorator="[
+          'type',
+           { initialValue: 0} ]">
+            <a-radio-button :value="0">否</a-radio-button>
+            <a-radio-button :value="1">是</a-radio-button>
+          </a-radio-group>
+        </a-form-item>
+        <a-form-item label="广告语" :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }" v-if="getData('type')==1">
+          <a-input v-decorator="[
+          'updateDescription'
+        ]" :max="10" :min="1" style="width:100%">
+          </a-input>
+          <a @click="showTitle()">推荐标题</a><a style="margin-left:10px" @click="showCunTitle()">标题收藏</a>
+        </a-form-item>
+        <a-form-item label="行动号召" :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }" v-if="getData('type')==1">
+          <a-select v-decorator="['updateActionBarText']" showSearch allowClear placeholder="选择行动号召按钮文案"
+            optionFilterProp="children" :filterOption="filterOption">
+            <a-select-option v-for="appModel in appList" :key="appModel.id" :value="appModel.actionBarText">
+              {{ appModel.actionBarText }}
+            </a-select-option>
+          </a-select>
+        </a-form-item>
+      </a-form>
+    </a-modal>
+    <a-modal v-model="visibleFail" title="重提信息" :footer="null">
+      <div v-if="fail">
+        修改成功条数:{{ fail.successCount }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;失败条数:{{
+              fail.failCount
+            }}
+        <div style="margin-top:20px">
+          <p v-for="(item, index) of fail.failInfo" :key="index">
+            <span>名称:{{ item.campaignName?item.campaignName:item.unitName }}</span><br />
+            <span>错误信息:{{ item.message }}</span>
+          </p>
+        </div>
+      </div>
+    </a-modal>
+    <a-modal title="推荐标题" v-model="titleVisible" :width="1000" :footer="null">
+      <a-row :gutter="10">
+        <a-col :sm="10" style="margin-bottom: 20px;z-index: 10">
+          <a-card class="search-box" style="min-height:500px">
+            <div style="margin-bottom:30px">
+              <span style="display:inline-block;width:80px">行业</span>
+              <a-cascader style="margin-top: 1rem;width:300px" v-model="dataOne" :options="options"
+                :showSearch="{ filter }" expandTrigger="hover" @change="onChangeTitle" placeholder="请选择行业">
+                <a-icon type="smile" slot="suffixIcon" class="test" />
+              </a-cascader>
+            </div>
+            <div style="margin-bottom:30px">
+              <span style="display:inline-block;width:80px">关键词</span>
+              <a-input placeholder="请输入关键词" v-model="value" style="width: 300px" />
+            </div>
+            <span style="display:inline-block;width:80px;float:left"></span>
+            <a-button type="primary" @click="searchQuery" :disabled="value == ''">生成</a-button>
+          </a-card>
+        </a-col>
+        <a-col :sm="14" style="margin-bottom: 20px;z-index: 10">
+          <a-card class="search-box" style="over-flow:auto">
+            <a-list size="large" bordered :dataSource="title">
+              <a-list-item slot="renderItem" slot-scope="item">
+                <a slot="actions" @click="okTitle(item)">选择</a>
+
+
+                {{ item }}
+              </a-list-item>
+            </a-list>
+          </a-card>
+        </a-col>
+      </a-row>
+    </a-modal>
+    <a-modal title="收藏标题" v-model="cunTitleVisible" :width="1000" :footer="null">
+      <a-row :gutter="10">
+        <a-col :sm="24" style="margin-bottom: 20px;z-index: 10">
+          <a-card class="search-box" style="over-flow:auto">
+            <a-list size="large" bordered :dataSource="cunTitleList">
+              <a-list-item slot="renderItem" slot-scope="item">
+
+                <div slot="actions">
+                  <a @click="okTitleCun(item)">选择</a>
+                  <!-- <a-divider type="vertical" />
+                  <a @click="removeTitleCun(item)">删除</a> -->
+                </div>
+                {{ item.title }}
+              </a-list-item>
+            </a-list>
+          </a-card>
+        </a-col>
+      </a-row>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+  import moment from 'moment'
+  import {
+    getRefuseCreative,
+    updateCreative,
+    selectByCreateName
+  } from '@api/statistics'
+  import axios from 'axios'
+  import EditableCell from './components/EditableCell'
+  import {
+    mapGetters
+  } from 'vuex'
+  import {
+    deleteAction,
+    getAction,
+    postAction
+  } from '@/api/manage'
+  import Treeselect from './components/Treeselect.vue'
+
+  import {
+    stopOtherVideo,
+    closeAllVideoFun
+  } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
+  const columns = [{
+      title: '账号Id',
+      dataIndex: 'accountId',
+      key: 'accountId',
+      align: 'center'
+    },
+    {
+      title: '计划Id',
+      dataIndex: 'campaignId',
+      key: 'campaignId',
+      align: 'center'
+    },
+    {
+      title: '广告组id',
+      dataIndex: 'unitId',
+      key: 'unitId',
+      align: 'center'
+    },
+    {
+      title: '创意id',
+      dataIndex: 'creativeId',
+      key: 'photoClick',
+      align: 'center'
+    },
+    {
+      title: '创意名称',
+      dataIndex: 'creativeName',
+      key: 'creativeName',
+      align: 'left',
+      scopedSlots: {
+        customRender: 'creativeName'
+      }
+    },
+    // {
+    //   title: '视频',
+    //   dataIndex: 'videoUrl',
+    //   key: 'videoUrl',
+    //   align: 'center',
+    //   scopedSlots: {
+    //     customRender: 'videoUrl'
+    //   }
+    // },
+    {
+      title: '封面',
+      dataIndex: 'coverUrl',
+      key: 'coverUrl',
+      align: 'center',
+      scopedSlots: {
+        customRender: 'coverUrl'
+      }
+    },
+    {
+      title: '拒绝原因',
+      dataIndex: 'reviewDetail',
+      key: 'reviewDetail',
+      align: 'left'
+    },
+
+    {
+      title: '广告语',
+      dataIndex: 'description',
+      key: 'description',
+      align: 'left',
+      scopedSlots: {
+        customRender: 'description'
+      }
+    }
+  ]
+
+  export default {
+    name: 'refuse-data',
+    components: {
+      EditableCell,
+      Treeselect
+    },
+
+    data: function () {
+      return {
+        title: '被拒创意列表',
+        visibleFail: false,
+        visibleAgain: false,
+        againLoading: false,
+        fail: null,
+        appId: null,
+        loading: false,
+        columns,
+        dataList: [],
+        titleVisible: false,
+        cunTitleVisible: false,
+        keyWord: '',
+        editTitle: '',
+        confirmLoading: false,
+        visible: false,
+        editWord: '',
+        nowData: null,
+        selectedRowKeys: [],
+        selectedRowKeysValue: [],
+        loadingList: false,
+        loadingSyncCreative: false,
+        ipagination: {
+          current: 1,
+          pageSize: 50,
+          showTotal: (total, range) => {
+            return range[0] + '-' + range[1] + ' 共' + total + '条'
+          },
+          showQuickJumper: true,
+          //   showSizeChanger: true,
+          total: 0,
+          onChange: current => {
+            // 切换分页时的回调,
+            // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+            this.ipagination.current = current
+            this.selectedRowKeys = []
+            this.selectedRowKeysValue = []
+            this.addUser()
+          }
+        },
+        form: this.$form.createForm(this),
+        appList: [],
+        options: [],
+        cunTitleList: [],
+        title: [],
+        dataOne: [],
+        value: ''
+      }
+    },
+    filters: {
+      typeStatus(type) {
+        // 2 - 提升应用安装;
+        // 3 - 获取电商下单;
+        // 4 - 推广品牌活动;
+        // 5 - 收集销售线索;
+        var data = ['', '', '提升应用安装', '获取电商下单', '推广品牌活动', '收集销售线索']
+        return data[type]
+      },
+      status(sta) {
+        var data = {
+          '-1': '不限',
+          1: '已暂停',
+          3: '计划超预算',
+          4: '有效',
+          6: '余额不足'
+        }
+        return data[sta]
+      },
+      putStatus(sta) {
+        var data = {
+          1: '投放中',
+          2: '暂停'
+        }
+        return data[sta]
+      },
+      createChannel(sta) {
+        var data = {
+          0: '投放后台',
+          1: '汇创助手'
+        }
+        return data[sta]
+      }
+    },
+    watch: {
+      appId(n, o) {
+        console.log(n, o)
+        if (n != o) {
+          this.ipagination.current = 1
+        }
+      },
+      visibleFail(n, o) {
+        if (!n) {
+          this.visibleAgain = false
+          this.selectedRowKeys = []
+          this.selectedRowKeysValue = []
+          this.addUser()
+        }
+      }
+    },
+    methods: {
+      filter(inputValue, path) {
+        return path.some(option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1)
+      },
+      onChangeTitle(value, selectedOptions) {
+        console.log(value, selectedOptions)
+        this.dataOne = value
+        this.value = ''
+        this.title = []
+      },
+      okTitleCun(item) {
+        console.log(item)
+        this.form.setFieldsValue({
+          updateDescription: item.title
+        })
+        this.cunTitleVisible = false;
+        this.cunTitleList = []
+      },
+
+      okTitle(item) {
+        this.form.setFieldsValue({
+          updateDescription: item
+        })
+        this.titleVisible = false;
+        this.dataOne = []
+        this.value = ""
+        this.title = []
+      },
+      searchQuery() {
+        // /ctop/creativeTitle/titleSuggestion
+        console.log(this.value)
+        getAction('/ctop/creativeTitle/titleSearch', {
+          firstCategory: this.dataOne[0],
+          secondCategory: this.dataOne[1],
+          keywords: this.value
+        }).then(res => {
+          console.log(res)
+          this.title = res.result ? res.result : []
+        })
+        // firstCategory,secondCategory,keywords
+      },
+      filterOption(input, option) {
+        return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      },
+      getData(className) {
+        return this.form.getFieldValue(className)
+      },
+      syncCreative() {
+
+        this.loadingSyncCreative = true
+        var params = {}
+        //  localStorage.setItem('accountIdCreat', record.campaignId)
+        // localStorage.setItem('accountIdCreatNow', this.appId)
+        params.accountId = localStorage.getItem('accountIdCreatNow')
+        params.campaignId = localStorage.getItem('accountIdCreat')
+        getAction('/MaterialRefuse/syncCreative', params).then(res => {
+          if (res.success) {
+            this.loadingSyncCreative = false
+            this.$message.success("同步成功")
+          } else {
+            this.loadingSyncCreative = false
+            this.$message.error(res.message)
+          }
+        })
+      },
+      clickAgain() {
+        // this.loadingList = true
+        this.visibleAgain = true
+        getAction('/kuaishou/batch/getActionBarText', {
+          campaignId: localStorage.getItem('accountIdCreat')
+        }).then(res => {
+          if (res.success) {
+            this.appList = res.result
+          }
+        })
+        // var params = {}
+        // params.accountId = this.appId + ''
+        // params.creativeArr = this.selectedRowKeysValue
+        // postAction('/MaterialRefuse/batchUpdateCreative', params).then(res => {
+        //   if (res.success) {
+        //     this.loadingList = false
+        //     this.selectedRowKeysValue = []
+        //     this.selectedRowKeys = []
+        //     this.visibleFail = true
+        //     this.fail = res.result
+        //     this.addUser()
+        //   } else {
+        //     this.loadingList = false
+        //     this.visibleFail = true
+        //     this.fail = res.result
+        //     this.$message.error(res.message)
+        //   }
+        // })
+      },
+      showTitle() {
+        this.titleVisible = true;
+        this.getHangye()
+      },
+      showCunTitle() {
+        this.cunTitleVisible = true
+        this.getCunTitle()
+      },
+      getCunTitle() {
+        var params = {}
+        params.accountId = localStorage.getItem('accountIdCreatNow')
+        params.userId = this.userInfo().id
+        params.pageNo = 1
+        params.pageSize = 500
+        getAction('/kuaishou/kuaiShouTitleCollection/list', params).then(res => {
+          if (res.success) {
+            console.log(res.result)
+            this.cunTitleList = res.result.records
+          }
+        })
+      },
+      getHangye() {
+        getAction('/ctop/creativeTitle/getTitleLabel', '').then(res => {
+          console.log(res)
+          if (res.success) {
+            this.options = res.result.map(item => {
+              return {
+                label: item.label,
+                value: item.value,
+                children: item.children.length > 0 ? [{
+                  label: '不限',
+                  value: 0
+                }].concat(item.children) : [{
+                  label: '不限',
+                  value: 0
+                }]
+              }
+            })
+            this.options = [{
+              label: '不限',
+              value: 0
+            }].concat(this.options)
+            if (this.dataOne.length > 0) {
+              return
+            } else {
+              this.dataOne = [0]
+            }
+
+          }
+        })
+      },
+      onSelectChange(selectedRowKeys, selectionRows) {
+        this.selectedRowKeys = selectedRowKeys
+        this.selectedRowKeysValue = selectionRows.map(item => {
+          return {
+            description: item.description,
+            creativeId: item.creativeId
+          }
+        })
+        //    this.selectedRowKeysValue.length > 0 ? this.selectedRowKeysValue :
+      },
+      handleOkAgain(e) {
+        this.againLoading = true
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            var params = {
+
+              ...values,
+              accountId: localStorage.getItem('accountIdCreatNow'),
+              creativeArr: this.selectedRowKeysValue
+            }
+            postAction('/MaterialRefuse/batchUpdateCreative', params).then(res => {
+              if (res.success) {
+                // this.visibleFail = true
+                this.visibleAgain = false
+                this.selectedRowKeys = []
+                this.selectedRowKeysValue = []
+                this.addUser()
+                this.againLoading = false
+                this.$message.success(res.message)
+              } else {
+                this.againLoading = false
+                this.$message.error(res.message)
+              }
+            })
+          }
+        })
+      },
+      handleOk(e) {
+        this.confirmLoading = true
+        var params = {}
+        params.accountId = this.nowData.accountId
+        params.campaignId = this.nowData.campaignId
+        params.unitId = this.nowData.unitId
+        params.creativeId = this.nowData.creativeId
+        params.creativeName = this.editTitle == '创意名称修改' ? this.editWord : this.nowData.creativeName
+        params.description = this.editTitle == '广告语修改' ? this.editWord : this.nowData.description
+        updateCreative(params).then(res => {
+          if (res.code == 0) {
+            this.addUser()
+            this.visible = false
+            this.confirmLoading = false
+          } else {
+            this.$message.error(res.message)
+            this.visible = false
+            this.confirmLoading = false
+          }
+        })
+      },
+      handleCancel(e) {
+        this.visible = false
+      },
+      handleClose(e) {
+        this.visibleAgain = false
+        this.form.resetFields()
+      },
+      onCellChange(item, dataIndex) {
+        this.editWord = item[dataIndex]
+        this.editTitle = dataIndex == 'creativeName' ? '创意名称修改' : '广告语修改'
+        this.nowData = item
+        this.visible = true
+      },
+      moment,
+      ...mapGetters(['nickname', 'avatar', 'userInfo']),
+      addUser() {
+        this.loading = true
+        var params = {}
+        //  localStorage.setItem('accountIdCreat', record.campaignId)
+        // localStorage.setItem('accountIdCreatNow', this.appId)
+        params.accountId = localStorage.getItem('accountIdCreatNow')
+        params.campaignId = localStorage.getItem('accountIdCreat')
+        params.pageSize = this.ipagination.pageSize
+        params.pageNo = this.ipagination.current
+        getAction('/MaterialRefuse/getRefuseCreative', params).then(res => {
+          if (res.code == 0) {
+            this.dataList = res.result.records.map((v, index) => {
+              return {
+                ...v,
+                key: index
+              }
+            })
+            this.list = this.dataList
+            this.loading = false
+            this.ipagination.total = res.result.total
+          }
+        })
+      },
+      addUserKey() {
+        this.dataList = this.list.filter(item => {
+          return item.creativeName.toLowerCase().indexOf(this.keyWord.toLowerCase()) > -1
+        })
+      },
+      reset() {
+        this.addUser()
+      }
+    },
+    distoryed() {},
+    updated() {
+      stopOtherVideo()
+    },
+    mounted: function () {
+      this.$nextTick(() => {
+        this.addUser()
+      })
+    }
+  }
+</script>

+ 7 - 4
src/views/modules/Statistics/videoStatics/vSummary.vue

@@ -712,11 +712,14 @@ export default {
 // .ant-table .ant-table-fixed-left .ant-table-thead {
 //   height: 108px !important ;
 // }
-.ant-table .ant-table-thead .ant-table-header-column .ant-table-column-title {
-  // display:block;
-  white-space: normal;
-  word-break: break-all;
+.vsummary{
+  .ant-table .ant-table-thead .ant-table-header-column .ant-table-column-title {
+    // display:block;
+    white-space: normal;
+    word-break: break-all;
+  }
 }
+
 </style>
 
 <style lang="scss" scoped>

+ 51 - 6
src/views/modules/Statistics/xiaoshouStatistics.vue

@@ -24,8 +24,8 @@
         </div>
         <a-spin :spinning="spinning">
           <a-table :columns="columns" :data-source="tableData" :scroll="{ x: 4000 }" bordered size="middle"
-            :laoding='loading' :pagination='ipagination' @change="tableChange">
-            <a slot="projectName" slot-scope="text,records" @click="showClick(records)">{{text}}</a>
+            :laoding='loading' :pagination='ipagination' @change="tableChange" :customRow="click">
+            <a slot="projectName" slot-scope="text">{{text}}</a>
             <!-- <a slot="projectName" slot-scope="text,records" @click="goAccount(records)">{{text}}</a>
             <a slot="authName" slot-scope="text,records" @click="goCampaign(records)">{{text}}</a>
             <a slot="campaignName" slot-scope="text,records" @click="goUnit(records)">{{text}}</a>
@@ -121,7 +121,7 @@
     <div>
       <a-modal v-model="visible" title="账户详情" :footer="null" :width='1200'>
         <a-table :columns="columnsChildren" :data-source="tableDataChild" :scroll="{ x: 3500 }" bordered size="middle"
-          :laoding='loadingChild' :pagination='ipaginationCount' :customRow="click">
+          :laoding='loadingChild' :pagination='ipaginationCount' :customRow="click" style="word-break: break-all;">
 
           <!-- <a slot="projectName" slot-scope="text,records" @click="goAccount(records)">{{text}}</a>
           <a slot="authName" slot-scope="text,records" @click="goCampaign(records)">{{text}}</a>
@@ -705,7 +705,7 @@
       customRender: 'cpm'
     }
   }, {
-    title: '互动数据-点赞数',
+    title: '点赞数',
     dataIndex: 'likeMaterial',
     align: 'center',
     scopedSlots: {
@@ -788,7 +788,7 @@
         tableData: [],
         tableDataChild: [],
         columns: [...projectColumns, ...publicColumns],
-        columnsChildren: [],
+        columnsChildren:  [],
         ipaginationCount: {
           current: 1,
           pageSize: 10,
@@ -870,7 +870,50 @@
         return {
           on: {
             click: () => {
-
+              this.visible = true
+              this.loadingChild = true
+              if (this.tabKey == 1) {
+
+                this.columnsChildren = [...accountColumns, ...bytedanceColumns]
+                var params = {
+                  startDate: this.dateRange[0].format('YYYY-MM-DD'),
+                  endDate: this.dateRange[1].format('YYYY-MM-DD'),
+                  projectId: record.projectId,
+                  pageNum: '1',
+                  pageSize: '10'
+                }
+                postAction('/ctop/report/getBytedanceAccountInfoByProjectId', params).then(res => {
+
+                  if (res.success) {
+                    this.loadingChild = false
+                    this.tableDataChild = res.result.list
+                    this.ipaginationCount.total = res.result.total
+                  } else {
+                    this.loadingChild = false
+                  }
+                })
+
+
+              } else if (this.tabKey == 2) {
+                this.columnsChildren = [...accountColumns, ...publicColumns]
+                var params = {
+                  startDate: this.dateRange[0].format('YYYY-MM-DD'),
+                  endDate: this.dateRange[1].format('YYYY-MM-DD'),
+                  projectId: record.projectId,
+                  pageNum: '1',
+                  pageSize: '10'
+                }
+                postAction('/kuaishou/getKuaishouSaleAccountInfoByProjectId', params).then(res => {
+
+                  if (res.success) {
+                    this.loadingChild = false
+                    this.tableDataChild = res.result.list
+                    this.ipaginationCount.total = res.result.total
+                  } else {
+                    this.loadingChild = false
+                  }
+                })
+              }
 
             }
           }
@@ -909,6 +952,7 @@
         this.projectValue = []
         // console.log(key)
         if (key == 1) {
+          this.columnsChildren = [...accountColumns, ...bytedanceColumns]
           postAction('/ctop/projectMember/getSaleOwnProjects', {
             mediaIds: [1, 3], //头条
 
@@ -917,6 +961,7 @@
             this.projectData = res.result
           });
         } else if (key == 2) {
+          this.columnsChildren = [...accountColumns, ...publicColumns]
           postAction('/ctop/projectMember/getSaleOwnProjects', {
             mediaIds: [2, 4], //头条
 

+ 3 - 2
src/views/modules/material/supplierMaterial.vue

@@ -324,8 +324,9 @@
           </a-col>
           <!--  -->
           <a-col :md="8" :sm="8">
-            <a-form-item label="时间选择">
-              <a-date-picker v-model="queryParam.createTime" format="YYYY-MM-DD" style="width:100%" />
+            <a-form-item label="搜索时间">
+              <a-range-picker  v-model="queryParam.createTime"  format="YYYY-MM-DD" style="width:100%"/>
+              <!--              <a-date-picker v-model="queryParam.startDate" format="YYYY-MM-DD" style="width:100%" />-->
               <!-- <a-input placeholder="请输入查询时间" v-model="queryParam.createTime"></a-input> -->
             </a-form-item>
           </a-col>

Разлика између датотеке није приказан због своје велике величине
+ 1397 - 1367
src/views/modules/material/videoMaterial.vue