Browse Source

'修改视频报表'

魏志佳 4 years ago
parent
commit
6d0f188b01

BIN
src/assets/work.png


+ 56 - 73
src/views/modules/Statistics/videoStatics/KSvideoStatics.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="vsummary">
     <div class="xiangmuxuanze" >
-        <span style="margin-top:">项目选择:</span>
-        <Treeselect  :appId.sync="appId" request="2,4"   style="display: inline-block;position: relative;"/>
+        <span >项目选择:</span>
+        <Treeselect  :appId.sync="appId" request="2,4"   style="display: inline-block;position: relative;margin-left: 0px;"/>
     </div>
     <div class="timeDiv">
       <div style='display:flex;align-items: center;'>
@@ -115,13 +115,14 @@
                  @customHeaderCell="customHeaderCell(columns)"
               >
              
-                <div slot="videoU" slot-scope="test,records">
+                <div slot="converUrl" slot-scope="test,records">
+                  <!-- {{test}} -->
                     <img
-                    :src="records.coverUrl"
+                    :src="test"
                     alt
                     style="width:80px"
                     @click="openVideo(records.url)"
-                    @load="loadShow"
+                   
                     />
                 </div>
                 <span slot="operation" slot-scope="text, record">
@@ -223,9 +224,9 @@
                 <!-- <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span> -->
                 <span slot="relativePeople" slot-scope="text,record">
                     <!-- <a href="javascript:;" @click.stop="showRelevantPeople(record)">查看相关人员</a> -->
-                    <span>剪辑:{{record.clip | '暂无数据'}}</span>
-                    <span>拍摄:{{record.shot | '暂无数据'}}</span>
-                    <span>编导:{{record.plan | '暂无数据'}}</span>
+                    <p>剪辑:{{record.clip || '暂无数据'}}</p>
+                    <p>拍摄:{{record.shot || '暂无数据'}}</p>
+                    <p>编导:{{record.plan || '暂无数据'}}</p>
                 </span>
 
                 
@@ -238,7 +239,7 @@
 
       <!-- 明细表 -->
 
-      <a-modal v-model="visibleDetail" title="详细信息" width="60%" :footer="null" >
+      <a-modal v-model="visibleDetail" title="详细信息" width="50%" :footer="null" >
         <a-button type="default" @click="exportExcel('exportDetail')" id="mybtn" >导出报表</a-button>
         <a-table
           :columns="detailColumn"
@@ -246,9 +247,13 @@
           bordered
           tableLayout="auto"
           :pagination="false"
+          :loading='detailLoading'
           style="word-break: break-all;"
         >
-          <span slot="huanbi" slot-scope="huanbi">{{ huanbi | toPercentage }}</span>
+          <!-- <span slot="huanbi" slot-scope="huanbi">{{ huanbi | toPercentage }}</span> -->
+
+           <span slot="advertiserName" slot-scope="text">{{ text || '暂未填写该数据' }}</span>
+          <span slot="cost" slot-scope="cost">{{ cost | decimalsHandle }}</span>
         </a-table>
       </a-modal>
   </div>
@@ -265,12 +270,12 @@ import customColumn from '../components/customColumn.vue'
 const columnsFixd = [
   {
     title: '视频',
-    dataIndex: 'videoU',
+    dataIndex: 'converUrl',
     align: 'center',
     width: 100,
     fixed: 'left',
-    key: 'videoU',
-    scopedSlots: { customRender: 'videoU' }
+    key: 'converUrl',
+    scopedSlots: { customRender: 'converUrl' }
   },
   {
     title: '视频名称',
@@ -302,15 +307,15 @@ const columnsFixd = [
     width:120,
     fixed: 'left'
   },
-  //   {
-  //   title:'操作',
-  //   dataIndex:'operation',
-  //   key:'operation',
-  //   scopedSlots: { customRender: 'operation' },
-  //   align: 'center',
-  //   width:90,
-  //   fixed: 'left'
-  // },
+    {
+    title:'操作',
+    dataIndex:'operation',
+    key:'operation',
+    scopedSlots: { customRender: 'operation' },
+    align: 'center',
+    width:90,
+    fixed: 'left'
+  },
 
   {
     title: '创建时间',
@@ -416,46 +421,23 @@ const columnsFixd = [
 ]
 let show = 0
 
-let detailColumn = [
-  {
+
+let detailColumn=[
+   {
     title: '客户',
     dataIndex: 'advertiserName',
     align: 'center',
-
-    customRender: (value, row, index) => {
-      const obj = {
-        children: value,
-        attrs: {}
-      }
-      if (index === 0) {
-        obj.attrs.rowSpan = 7
-      } else {
-        obj.attrs.rowSpan = 0
-      }
-      return obj
-    }
+     scopedSlots: { customRender: 'advertiserName' },
   },
   {
     title: '项目名称',
     dataIndex: 'projectName',
     align: 'center',
-    width:150,
-    customRender: (value, row, index) => {
-      const obj = {
-        children: value,
-        attrs: {}
-      }
-      if (index == 0) {
-        obj.attrs.rowSpan = 7
-      }else {
-        obj.attrs.rowSpan = 0
-      }
-      return obj
-    }
+    width: 150,
   },
-  {
+   {
     title: '时间',
-    dataIndex: 'statDatetime',
+    dataIndex: 'statDate',
     align: 'center',
     width: 120
   },
@@ -463,19 +445,15 @@ let detailColumn = [
     title: '消耗',
     dataIndex: 'cost',
     scopedSlots: { customRender: 'cost' },
-    align: 'center'
+    align: 'center',
+    
   },
-  {
-    title: '环比',
-    dataIndex: 'huanbi',
-    scopedSlots: { customRender: 'huanbi' },
-    align: 'center'
-  }
 ]
 
 export default {
   data() {
     return {
+       detailLoading:false,
       clip:undefined,
       shot:undefined,
       plan:undefined,
@@ -565,15 +543,17 @@ export default {
       console.log(text, record)
       this.visibleDetail = true
       this.detailData = []
-      // this.signature=record.signature
+      this.detailLoading=true;
+      this.signature=record.signature
       // console.log(this.signature)
-      postAction('/toutiao/videoReportDaily/bytedanceVideoInfoListDetail', {
+      postAction('/ctop/kuaishou/videoReport/detail', {
         startDate: this.dateValue[0].format('YYYY-MM-DD'),
         endDate: this.dateValue[1].format('YYYY-MM-DD'),
         signature: record.signature,
         accountIds:this.appId
       }).then(res => {
         console.log(res)
+        this.detailLoading=false;
         if (res.success) {
           let result = res.result
           // this.detailData.push({ ...result, key: 1 })
@@ -686,11 +666,11 @@ export default {
         this.data=[];
         this.loading = false
         if (res.success) {
-        //   let result = res.result
-        //   this.data.push({ ...result, key: 1 })
-        //   result.map((item, index) => {
-        //     item.key = index
-        //   })
+          // let result = res.result
+          // this.data.push({ ...result, key: 1 })
+          // result.map((item, index) => {
+          //   item.key = index
+          // })
           this.data = res.result.list.map((item,index)=>{
               return {
                   ...item,
@@ -708,13 +688,14 @@ export default {
     //导出报表
     exportExcel(exportType) {
       this.exportLoading=true;
-       let column = this.columns.map((item, index) => {
-        return item.dataIndex
-      })
-      
-      let columns=column.splice(5)
-        
-      downFilePost('/ctop/kuaishou/videoReport/report/excel', {
+      let columns=[]
+      if(exportType=='exportTable'){
+        let column = this.columns.map((item, index) => {
+          return item.dataIndex
+        })      
+        columns=column.splice(7)
+      }
+      downFilePost('/ctop/kuaishou/videoReport/excel', {
         columns,
         target:this.target,
         order:this.order,
@@ -722,6 +703,8 @@ export default {
         endDate: this.dateValue[1].format('YYYY-MM-DD'),
         accountIds:this.appId,
         exportType,
+        signature: this.signature,
+        signature: this.signature,
         clip:this.clip?this.clip:'',
         shot:this.shot?this.shot:'',
         plan:this.plan?this.plan:'',

+ 67 - 23
src/views/modules/Statistics/videoStatics/TTvideoStatics.vue

@@ -162,9 +162,9 @@
       
         <span slot="relativePeople" slot-scope="text,record">
            <!-- <a href="javascript:;" @click.stop="showRelevantPeople(record)">查看相关人员</a> -->
-            <span>剪辑:{{record.clip | '暂无数据'}}</span>
-            <span>拍摄:{{record.shot | '暂无数据'}}</span>
-            <span>编导:{{record.plan | '暂无数据'}}</span>
+            <p>剪辑:{{record.clip || '暂无数据'}}</p>
+            <p>拍摄:{{record.shot || '暂无数据'}}</p>
+            <p>编导:{{record.plan ||'暂无数据'}}</p>
        </span>
 
     </a-table>
@@ -187,17 +187,19 @@
 
     <!-- 明细表 -->
 
-      <a-modal v-model="visibleDetail" title="详细信息" width="60%" :footer="null" >
+      <a-modal v-model="visibleDetail" title="详细信息" width="50%" :footer="null" >
         <a-button type="default" @click="exportExcel('exportDetail')" id="mybtn">导出报表</a-button>
         <a-table
           :columns="detailColumn"
           :data-source="detailData"
           bordered
           tableLayout="auto"
+          :loading='detailLoading'
           :pagination="false"
           style="word-break: break-all;"
         >
-          <span slot="huanbi" slot-scope="huanbi">{{ huanbi | toPercentage }}</span>
+          <span slot="advertiserName" slot-scope="text">{{ text || '暂未填写该数据' }}</span>
+          <span slot="cost" slot-scope="cost">{{ cost | decimalsHandle }}</span>
         </a-table>
       </a-modal>
   </div>
@@ -251,15 +253,15 @@ const columnsFixd = [
     width:120,
     fixed: 'left'
   },
-  //   {
-  //   title:'操作',
-  //   dataIndex:'operation',
-  //   key:'operation',
-  //   scopedSlots: { customRender: 'operation' },
-  //   align: 'center',
-  //   width:120,
-  //   fixed: 'left'
-  // },
+    {
+    title:'操作',
+    dataIndex:'operation',
+    key:'operation',
+    scopedSlots: { customRender: 'operation' },
+    align: 'center',
+    width:120,
+    fixed: 'left'
+  },
 
   {
     title: '创建时间',
@@ -321,11 +323,39 @@ const columnsFixd = [
 ]
 let show = 0
 
-let detailColumn=[]
+let detailColumn=[
+   {
+    title: '客户',
+    dataIndex: 'advertiserName',
+    align: 'center',
+    scopedSlots: { customRender: 'advertiserName' },
+    align: 'center',
+  },
+  {
+    title: '项目名称',
+    dataIndex: 'projectName',
+    align: 'center',
+    width: 150,
+  },
+   {
+    title: '时间',
+    dataIndex: 'statDate',
+    align: 'center',
+    width: 120
+  },
+  {
+    title: '消耗',
+    dataIndex: 'cost',
+    scopedSlots: { customRender: 'cost' },
+    align: 'center',
+    
+  },
+]
 
 export default {
   data() {
     return {
+      detailLoading:false,
       clip:undefined,
       shot:undefined,
       plan:undefined,
@@ -413,15 +443,17 @@ export default {
       console.log(text, record)
       this.visibleDetail = true
       this.detailData = []
-      // this.signature=record.signature
+      this.signature=record.signature
       // console.log(this.signature)
-      postAction('/toutiao/videoReportDaily/bytedanceVideoInfoListDetail', {
+      this.detailLoading=true
+      postAction('/ctop/byteDance/videoReport/detail', {
         startDate: this.dateValue[0].format('YYYY-MM-DD'),
         endDate: this.dateValue[1].format('YYYY-MM-DD'),
         signature: record.signature,
         accountIds:this.appId
       }).then(res => {
         console.log(res)
+        this.detailLoading=false;
         if (res.success) {
           let result = res.result
           // this.detailData.push({ ...result, key: 1 })
@@ -550,23 +582,30 @@ export default {
     //导出报表
     exportExcel(exportType) {
       this.exportLoading=true;
-      let column = this.columns.map((item, index) => {
-        return item.dataIndex
-      })
+      let columns=[]
+      if(exportType=='exportTable'){
+        let column = this.columns.map((item, index) => {
+          return item.dataIndex
+        })
       
-      let columns=column.splice(5)
-      downFilePost('/ctop/byteDance/videoReport/report/excel', {
+        columns=column.splice(7)
+      }else{
+        
+      }
+      
+      downFilePost('/ctop/byteDance/videoReport/excel', {
         columns,
         target:this.target,
         order:this.order,
         startDate: this.dateValue[0].format('YYYY-MM-DD'),
         endDate: this.dateValue[1].format('YYYY-MM-DD'),
         accountIds:this.appId,
-        
+        signature: this.signature,
         exportType,
         clip:this.clip?this.clip:'',
         shot:this.shot?this.shot:'',
         plan:this.plan?this.plan:'',
+
       }).then(res => {
         this.exportLoading=false;
         let blob = new Blob([res], {
@@ -783,6 +822,8 @@ export default {
         
       }
     })
+    
+    
     this.tableHandle();
   },
   deactivated() {
@@ -932,6 +973,9 @@ export default {
 </style>
 
 <style lang="scss" scoped>
+span{
+  margin-left: 0;
+}
 .vsummary {
   width: 100%;
   height: 100%;

+ 62 - 4
src/views/modules/workBench/index.vue

@@ -24,18 +24,37 @@
             <div class="sectionBody">
                 <div class="sectionLeftBox">
                     <div class="leftTop">
-
+                        <div class="sectionHead">
+                            我的工作内容
+                        </div>
+                        <div class="zhanshiBox">
+                            <div class="item">
+                                <div class="title">
+                                    <img src="@/assets/work.png" alt="" class="iconImg">
+                                    <span>我发起的</span>
+                                </div>
+                                <div class="itemBody">
+                                    <p class="count">60 <span>个</span></p>
+                                </div>
+                            </div>
+                        </div>  
                     </div>
                     <div class="leftBottom">
-
+                        <div class="sectionHead">
+                            订单进度
+                        </div>
                     </div>
                 </div>
                 <div class="sectionRightBox">
                     <div class="rightTop">
-
+                        <div class="sectionHead">
+                            操作记录
+                        </div>
                     </div>
                     <div class="rightBottom">
-
+                        <div class="sectionHead">
+                            本周项目燃尽图
+                        </div>
                     </div>
                 </div>
                 
@@ -110,11 +129,50 @@ export default {
     .section{
         .sectionBody{
             display: flex;
+            .sectionHead{
+                padding: 15px 20px;
+                // height: 24px;
+                font-size: 16px;
+                font-family: PingFangSC-Medium, PingFang SC;
+                font-weight: 500;
+                color: rgba(0, 0, 0, 0.85);
+                line-height: 24px;
+                border-bottom: 1px solid  #E9E9E9;;
+            }
             .sectionLeftBox{
                 width: 60%;
                 .leftTop{
                     height: 370px;
                 }
+                .zhanshiBox{
+                    display: flex;
+                    flex-wrap: wrap;
+                    .item{
+                        flex: 4;
+                        background: brown;
+                        padding: 20px;
+                        .title{
+                            padding-bottom: 20px;
+                        }
+                        .itemBody{
+                            text-align: center;
+                            .count{
+                                
+                                font-size: 24px;
+                                font-family: PingFangSC-Medium, PingFang SC;
+                                font-weight: 500;
+                                color: #000000;
+                                line-height: 32px;
+                                span{
+                                    font-size: 16px;
+                                }
+                            }
+                            .count:hover{                                
+                                color: #1890FF;
+                            }
+                        }
+                    }
+                }
             }
             .sectionRightBox{
                 width: 40%;