魏志佳 4 лет назад
Родитель
Сommit
bd70abba0d

+ 223 - 50
src/views/modules/BatchCreate/TouTiaoBatch.vue

@@ -1,13 +1,22 @@
 <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">
                    + 头条批量创建
@@ -77,7 +86,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 +136,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 +155,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 +187,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 +288,8 @@
             </div>
 
         </a-modal>
+              
+    <!-- </a-spin> -->
     </div>
 </template>
 
@@ -525,6 +553,10 @@ export default {
     mixins: [JeecgListMixin],
     data() {
         return {
+            currentGroup:{},
+            currentPlan:{},           
+
+            spinning:false,
             moment,
             loading:false,
             accountID:undefined,
@@ -603,8 +635,69 @@ 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
+                })
+            }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
+                })
+            }
+            
+        },
+        // 清空选中的组信息
+        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里的函数
 
@@ -648,14 +741,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 +758,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],
@@ -727,10 +823,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 +837,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{
@@ -771,10 +869,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 +882,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 +893,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'){
@@ -815,16 +917,19 @@ export default {
                })).then((res)=>{
                 //    console.log(res);
                    if(res.success){
-                       this.data=[];
-                       this.refreshCreativeList({
+                    //    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
+                            pageNo:this.ipagination.current,
+                            planId:this.currentPlan.id,
                         })
                    }else{
+                       record.spin=false;
                        this.$message.error(res.message)
                    }
                })
@@ -868,18 +973,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 +1002,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 +1177,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)
                 }
             })
         },
@@ -1166,7 +1304,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 +1334,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 +1361,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 +1385,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);
                 }
@@ -1384,6 +1544,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>

+ 7 - 6
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
@@ -782,11 +784,10 @@ export default {
       names: [],
       isSelectedExist: false,
       validationRules: {
-        url: [
-         
+        url: [   
           {          
             required: true,
-            validator: this.validateURL,
+            // validator: this.validateURL,
           },
         ],
         name:[{
@@ -949,7 +950,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)

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

@@ -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)

+ 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>

+ 7 - 5
src/views/modules/Statistics/xiaoshouStatistics.vue

@@ -25,7 +25,7 @@
         <a-spin :spinning="spinning">
           <a-table :columns="columns" :data-source="tableData" :scroll="{ x: 4000 }" bordered size="middle"
             :laoding='loading' :pagination='ipagination' @change="tableChange" :customRow="click">
-            <a slot="projectName" slot-scope="text,records">{{text}}</a>
+            <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,
@@ -857,7 +857,7 @@
                   pageNum: '1',
                   pageSize: '10'
                 }
-                postAction('/kuaishou/getKuaishouAccountInfoByProjectId', params).then(res => {
+                postAction('/kuaishou/getKuaishouSaleAccountInfoByProjectId', params).then(res => {
 
                   if (res.success) {
                     this.loadingChild = false
@@ -906,6 +906,7 @@
         this.projectValue = []
         // console.log(key)
         if (key == 1) {
+          this.columnsChildren = [...accountColumns, ...bytedanceColumns]
           postAction('/ctop/projectMember/getSaleOwnProjects', {
             mediaIds: [1, 3], //头条
 
@@ -914,6 +915,7 @@
             this.projectData = res.result
           });
         } else if (key == 2) {
+          this.columnsChildren = [...accountColumns, ...publicColumns]
           postAction('/ctop/projectMember/getSaleOwnProjects', {
             mediaIds: [2, 4], //头条
 

+ 3 - 4
vue.config.js

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