魏志佳 před 4 roky
rodič
revize
1f388ceb41

+ 34 - 1
src/views/modules/Statistics/xiaoshouStatistics.vue

@@ -19,7 +19,9 @@
           </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="search" style="margin-right:15px">查询</a-button>
+            <a-button type='primary' @click="exportExcel" :loading='exportLoading'>导出报表</a-button>
+
           </div>
         </div>
         <a-spin :spinning="spinning">
@@ -782,6 +784,7 @@
     mixins: [JeecgListMixin],
     data() {
       return {
+        exportLoading:false,
         projectValue: [],
         dateRange: [moment().subtract(1, 'days'), moment()],
         projectData: [],
@@ -820,6 +823,36 @@
       }
     },
     methods: {
+      //导出报表
+      exportExcel() {
+        this.exportLoading=true;
+        let url=''
+        if (this.tabKey == 1) {
+          url='/ctop/report/exportBytedanceSaleProjectInfo'
+         
+        } else if (this.tabKey == 2) {
+          url='/kuaishou/exportKuaishouSaleProjectInfo'
+        }
+        downFilePost(url, {
+          startDate: this.dateRange[0].format('YYYY-MM-DD'),
+          endDate: this.dateRange[1].format('YYYY-MM-DD'),
+          projectList: this.projectValue,
+          
+        }).then(res => {
+          this.exportLoading=false;
+          let blob = new Blob([res], {
+            type:'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
+          })
+          let downloadElement = document.createElement('a')
+          let href = window.URL.createObjectURL(blob) //创建下载的链接
+          downloadElement.href = href
+          downloadElement.download = `${this.dateRange[0].format('YYYY-MM-DD')}~${this.dateRange[1].format('YYYY-MM-DD')}销售报表.xlsx`   //下载后文件名
+          document.body.appendChild(downloadElement)
+          downloadElement.click() //点击下载
+          document.body.removeChild(downloadElement) //下载完成移除元素
+          window.URL.revokeObjectURL(href) //释放掉blob对象
+        })
+      },
       showClick(record) {
         this.visible = true
         this.loadingChild = true

+ 12 - 12
src/views/modules/material/videoMaterial.vue

@@ -553,24 +553,24 @@ a {
                     style="display:flex;justify-content:space-between;"
                     @click.stop="showData(items)"
                   >
-                    <div v-if="items.byteDance" class="show-data">
+                    <div class="show-data">
                       <span>抖音</span>
-                      <span>消耗:{{ items.byteDance.cost }}</span>
-                      <span>封面点击:{{ items.byteDance.click }}</span>
-                      <span>封面展示:{{ items.byteDance.showNum }}</span>
+                      <span>消耗:{{ items.bytedanceCost || 0}}</span>
+                      <!-- <span>封面点击:{{ items.byteDance.click }}</span> -->
+                      <!-- <span>封面展示:{{ items.byteDance.showNum }}</span> -->
                     </div>
-                    <div v-else style="line-height:100px;" class="show-data">
+                    <!-- <div v-else style="line-height:100px;" class="show-data">
                       <span>抖音:无</span>
-                    </div>
-                    <div v-if="items.kuaiShou" class="show-data">
+                    </div> -->
+                    <div class="show-data">
                       <span>快手</span>
-                      <span>消耗:{{ items.kuaiShou.charge }}</span>
-                      <span>封面点击:{{ items.kuaiShou.photoClick }}</span>
-                      <span>封面展示:{{ items.kuaiShou.photoShow }}</span>
+                      <span>消耗:{{ items.cost || 0}}</span>
+                      <!-- <span>封面点击:{{ items.kuaiShou.photoClick }}</span> -->
+                      <!-- <span>封面展示:{{ items.kuaiShou.photoShow }}</span> -->
                     </div>
-                    <div v-else style="line-height:100px;" class="show-data">
+                    <!-- <div v-else style="line-height:100px;" class="show-data">
                       <span>快手:无</span>
-                    </div>
+                    </div> -->
                   </div>
                   <div
                     style="width:100%;height:1px;border-bottom:1px solid #f2f2f2;margin-top:5px"

+ 2 - 2
vue.config.js

@@ -73,11 +73,11 @@ module.exports = {
         // target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
 
-        target: 'http://192.168.1.74:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
+        // target: 'http://192.168.1.74:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.170:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
 
-        // target: 'http://192.168.1.94:8080', //请求本地 需要jeecg-boot后台项目  赵西安
+        target: 'http://192.168.1.94:8080', //请求本地 需要jeecg-boot后台项目  赵西安
 
 
         //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目