Browse Source

'视频报表'

魏志佳 4 years ago
parent
commit
668bfbd4d0

+ 33 - 19
src/mixins/JeecgListMixin.js

@@ -121,26 +121,40 @@ export const JeecgListMixin = {
       this.loading = true;
       await getAction(this.url.list, params).then((res) => {
         if (res.success) {
-          if(res.result.records){
-            this.dataSource = res.result.records.map(item=>{
-              return {
-                  ...item,
-                  innerData:[],
-                  showVideo:false
-              }
-            })
-            this.ipagination.total = res.result.total;
-          }else{
-            this.dataSource = res.result.map(item=>{
-              return {
-                  ...item,
-                  innerData:[],
-                  showVideo:false
-              }
-            })
-            // this.ipagination = null;
-            this.ipagination.pageSize=res.result.length
+          if(res.result){
+            if(res.result.records){
+              this.dataSource = res.result.records.map(item=>{
+                return {
+                    ...item,
+                    innerData:[],
+                    showVideo:false
+                }
+              })
+              this.ipagination.total = res.result.total;
+            }else{
+              this.dataSource = res.result.map(item=>{
+                return {
+                    ...item,
+                    innerData:[],
+                    showVideo:false
+                }
+              })
+              // this.ipagination = null;
+              this.ipagination.pageSize=res.result.length
+            }
+          }else if(res.data){
+            if(res.data.list){
+              this.dataSource = res.data.list.map(item=>{
+                return {
+                    ...item,
+                    innerData:[],
+                    showVideo:false
+                }
+              })
+              this.ipagination.total = res.data.total;
+            }
           }
+          
           this.spinning= false
         }
         if (res.code === 510) {

+ 10 - 6
src/views/modules/LaunchHousekeeper/LaunchHousekeeperList.vue

@@ -17,7 +17,8 @@
                     :allowClear="true"
                     :maxTagCount='1'   
                     @change="treeChange"                                                        
-                    :tree-data="treeData"                   
+                    :tree-data="treeData"   
+                    :load-data="accountHttp"                
                 />
               
             </span>
@@ -594,11 +595,14 @@ export default {
             console.log(records);
             let accountName='';
             this.treeData.forEach(item=>{
-                item.children.forEach(ele=>{
-                    if(ele.value==records.accountId){
-                        records.accountName=ele.title
-                    }
-                })
+                if(item.children){
+                    item.children.forEach(ele=>{
+                        if(ele.value==records.accountId){
+                            records.accountName=ele.title
+                        }
+                    })
+                }
+                
             })
             // getAction('/adlab/ctopAdlabProjectDetail/queryById',{
             //     id:records.id

+ 3 - 0
src/views/modules/Statistics/KSAccountReport.vue

@@ -197,6 +197,7 @@
                 <span slot="bClick" slot-scope="bClick">{{ bClick | formatCurrency }}</span>
                 <span slot="active" slot-scope="active">{{ active | formatCurrency }}</span>
                 <span slot="submit" slot-scope="submit">{{ submit | formatCurrency }}</span>
+                <span slot="nextDayOpen" slot-scope="nextDayOpen">{{ nextDayOpen | formatCurrency }}</span>
                 <span slot="eventCreditGrantLandingPage" slot-scope="eventCreditGrantLandingPage">{{ eventCreditGrantLandingPage | formatCurrency }}</span>
                 <span slot="submitCost" slot-scope="submitCost">{{ submitCost | decimalsHandle }}</span>
                 <span slot="eventCreditGrantLandingPageCost" slot-scope="eventCreditGrantLandingPageCost">{{ eventCreditGrantLandingPageCost | decimalsHandle }}</span>
@@ -224,6 +225,7 @@
                 <span slot="nextDayOpenCost" slot-scope="nextDayOpenCost">{{ nextDayOpenCost | decimalsHandle }}</span>
                 <span slot="validPlayCost" slot-scope="validPlayCost">{{ validPlayCost | decimalsHandle }}</span>
                 <span slot="activeCost" slot-scope="activeCost">{{ activeCost | decimalsHandle }}</span>
+                <span slot="nextDayOpenCost" slot-scope="nextDayOpenCost">{{ nextDayOpenCost | decimalsHandle }}</span>
                 <span
                   slot="gameAddictionCost"
                   slot-scope="gameAddictionCost"
@@ -261,6 +263,7 @@
                   slot-scope="gameAddictionRate"
                 >{{ gameAddictionRate | toPercentage }}</span>
                 <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span>
+                <!-- <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span> -->
                 
                 
             </a-table>

+ 6 - 0
src/views/modules/Statistics/components/customColumn.vue

@@ -98,6 +98,12 @@ export default {
     }
   },
   methods: {
+     //li展示里的关闭按钮 删除当前被选中的这一个列
+    deleteCol(item, index) {
+      this.mylistNum = this.mylistNum.filter((item1, num) => {
+        return num != index
+      })
+    },
     handleDragStart(e, item) {
       this.dragging = item
     },

+ 5 - 5
src/views/modules/Statistics/imageStatics/imageCostReport.vue

@@ -215,9 +215,9 @@ const KScolumns = [
   },
     {
     title:'相关人员',
-    dataIndex:'operation',
-    key:'operation',
-    scopedSlots: { customRender: 'operation' },
+    dataIndex:'userName',
+    key:'userName',
+    scopedSlots: { customRender: 'userName' },
     align: 'center',
     width:100,
     fixed: 'left'
@@ -439,7 +439,7 @@ export default {
 
         disabledDate(current) {
         // console.log(current)
-          return current && current > moment().subtract(1, 'day')
+          return current && current > moment()
         },
 
         consumeOnChange() {},
@@ -522,7 +522,7 @@ export default {
             let downloadElement = document.createElement('a')
             let href = window.URL.createObjectURL(blob) //创建下载的链接
             downloadElement.href = href
-            downloadElement.download = this.statDate.format('YYYY-MM-DD') + '视频汇总.xlsx' //下载后文件名
+            downloadElement.download =  '图片消耗.xlsx' //下载后文件名
             document.body.appendChild(downloadElement)
             downloadElement.click() //点击下载
             document.body.removeChild(downloadElement) //下载完成移除元素

+ 272 - 215
src/views/modules/Statistics/videoStatics/KSvideoStatics.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="vsummary">
     <div class="xiangmuxuanze" >
-        <span>项目选择:</span>
-        <Treeselect  :appId.sync="appId" request="2,4"   style="display: inline-block;position: relative;top: 10px;"/>
+        <span style="margin-top:">项目选择:</span>
+        <Treeselect  :appId.sync="appId" request="2,4"   style="display: inline-block;position: relative;"/>
     </div>
     <div class="timeDiv">
       <div style='display:flex;align-items: center;'>
@@ -95,20 +95,31 @@
               <!-- <a-button type='primary' class="export" @click="exportExcel">导出报表</a-button>
               <a-button type='primary' class="add" @click="customColumns" >自定义列</a-button> -->
           </div>
-            <!-- <a-table
+            <a-table
                 size="middle"
                 :columns="columns"
-                :dataSource="tableData"
+                :dataSource="data"
                 bordered
                 id="outTable"
-                :pagination="false"
+                :pagination="ipagination"
                 :scroll="{ x: scrollX }"
                 :loading="loading"
                 ref="accountTable"
                 :width="tableWidth"
                 @change="sort"                
                 style="word-break: break-all;font-size:16px;font-weight:600"
+                 @customHeaderCell="customHeaderCell(columns)"
               >
+             
+                <div slot="videoU" slot-scope="test,records">
+                    <img
+                    :src="records.coverUrl"
+                    alt
+                    style="width:80px"
+                    @click="openVideo(records.url)"
+                    @load="loadShow"
+                    />
+                </div>
 
                 <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
                 <span slot="cost" slot-scope="cost">{{ cost | decimalsHandle }}</span>
@@ -177,13 +188,18 @@
                   slot-scope="installFinishCost"
                 >{{ installFinishCost | decimalsHandle }}</span>
                 <span slot="convertCost" slot-scope="convertCost">{{ convertCost | decimalsHandle }}</span>
+                <span
+                  slot="activeRegisterCost"
+                  slot-scope="activeRegisterCost"
+                >{{ activeRegisterCost | decimalsHandle }}</span>
+                
 
                
                 <span
                   slot="downloadStartRate"
                   slot-scope="downloadStartRate"
                 >{{ downloadStartRate | toPercentage }}</span>
-                <span
+                <!-- <span
                   slot="downloadFinishRate"
                   slot-scope="downloadFinishRate"
                 >{{ downloadFinishRate | toPercentage }}</span>
@@ -191,106 +207,19 @@
                 <span
                   slot="activeRegisterRate"
                   slot-scope="activeRegisterRate"
-                >{{ activeRegisterRate | toPercentage }}</span>
+                >{{ activeRegisterRate | toPercentage }}</span> -->
                 <span
                   slot="gameAddictionRate"
                   slot-scope="gameAddictionRate"
                 >{{ gameAddictionRate | toPercentage }}</span>
-                <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span>
-                
-                
-            </a-table> -->
-
-             <a-table
-            size="middle"
-            :columns="columns"
-            :dataSource="data"
-            bordered
-            id="outTable"
-            :pagination="ipagination"
-            :scroll="{ x: scrollX }"
-            :loading="loading"
-            ref="vSummaryTable"
-            :width="tableWidth"
-            @customHeaderCell="customHeaderCell(columns)"
-            @change="sort"
-            style="word-break: break-all;"
-            >
-            <div slot="videoU" slot-scope="test,records">
-                <img
-                :src="records.coverUrl"
-                alt
-                style="width:80px"
-                @click="openVideo(records.url)"
-                @load="loadShow"
-                />
-            </div>
-            <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
-            <span
-                slot="play25FeedBreakRate"
-                slot-scope="play25FeedBreakRate"
-            >{{ play25FeedBreakRate | toPercentage }}</span>
-            <span slot="playOverRate" slot-scope="playOverRate">{{ playOverRate | toPercentage }}</span>
-            <!-- 新加数据 -->
-            <span slot="convertRate" slot-scope="convertRate">{{ convertRate | toPercentage }}</span>
-            <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span>
-            <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
-            <span slot="cpc" slot-scope="cpc">{{ cpc | tofixed }}</span>
-            <span slot="cpm" slot-scope="cpm">{{ cpm | tofixed }}</span>
-            <span slot="activeRate" slot-scope="activeRate">{{ activeRate | toPercentage }}</span>
-            <span
-                slot="installFinishRate"
-                slot-scope="installFinishRate"
-            >{{ installFinishRate | toPercentage }}</span>
-            <span slot="validPlayRate" slot-scope="validPlayRate">{{ validPlayRate | tofixed }}</span>
-            <span slot="activePayCost" slot-scope="activePayCost">{{ activePayCost | tofixed }}</span>
-            <span slot="nextDayOpenCost" slot-scope="nextDayOpenCost">{{ nextDayOpenCost | tofixed }}</span>
-            <span slot="validPlayCost" slot-scope="validPlayCost">{{ validPlayCost | tofixed }}</span>
-            <span slot="activeCost" slot-scope="activeCost">{{ activeCost | tofixed }}</span>
-            <span
-                slot="gameAddictionCost"
-                slot-scope="gameAddictionCost"
-            >{{ gameAddictionCost | tofixed }}</span>
-            <span
-                slot="downloadFinishCost"
-                slot-scope="downloadFinishCost"
-            >{{ downloadFinishCost | tofixed }}</span>
-            <span
-                slot="downloadStartCost"
-                slot-scope="downloadStartCost"
-            >{{ downloadStartCost | tofixed }}</span>
-            <span
-                slot="installFinishCost"
-                slot-scope="installFinishCost"
-            >{{ installFinishCost | tofixed }}</span>
-            <span slot="convertCost" slot-scope="convertCost">{{ convertCost | tofixed }}</span>
-
-            <!--  -->
-            <span
-                slot="downloadStartRate"
-                slot-scope="downloadStartRate"
-            >{{ downloadStartRate | toPercentage }}</span>
-            <span
-                slot="downloadFinishRate"
-                slot-scope="downloadFinishRate"
-            >{{ downloadFinishRate | toPercentage }}</span>
-            <span slot="activeRate" slot-scope="activeRate">{{ activeRate | toPercentage }}</span>
-            <span
-                slot="activeRegisterRate"
-                slot-scope="activeRegisterRate"
-            >{{ activeRegisterRate | toPercentage }}</span>
-            <span
-                slot="gameAddictionRate"
-                slot-scope="gameAddictionRate"
-            >{{ gameAddictionRate | toPercentage }}</span>
-            <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span>
-            <span slot="cpm" slot-scope="cpm">{{ cpm | tofixed }}</span>
-            <span slot="statDatetime" slot-scope>{{ timedata[0]+'~'+timedata[1]}}</span>
+                <!-- <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span> -->
                 <span slot="operation" slot-scope="text,record">
                     <a href="javascript:;" @click.stop="showRelevantPeople(record)">查看相关人员</a>
                 </span>
 
+                
             </a-table>
+
         </div>
       <customColumn :visible='visible'  :listNum='listNum' :fiexColumn='columnsFixd' :mediaType='2'  @closeCustomColumn='closeCustomColumn' @changeColumn='changeColumn' />
   </div>
@@ -315,8 +244,8 @@ const columnsFixd = [
     scopedSlots: { customRender: 'videoU' }
   },
   {
-    title: '视频ID',
-    dataIndex: 'signature',
+    title: '视频名称',
+    dataIndex: 'materialName',
     align: 'center',
     width: 120,
     fixed: 'left'
@@ -339,85 +268,114 @@ const columnsFixd = [
   },
 
   {
-    title: '上传时间',
-    dataIndex: 'materialUploadTime',
-    scopedSlots: { customRender: 'materialUploadTime' },
-    align: 'center',
-    sorter: () => {}
-  },
-  {
-    title: '消耗',
-    dataIndex: 'cost',
-
-    scopedSlots: { customRender: 'cost' },
-    align: 'center',
-    sorter: () => {}
-  },
-  {
-    title: '点击数',
-    dataIndex: 'clickMaterial',
-    align: 'center',
-
-    scopedSlots: { customRender: 'clickMaterial' },
-    sorter: () => {}
-    // (a, b) => a.clickMaterial - b.clickMaterial
-  },
-  {
-    title: '点击率',
-    dataIndex: 'ctr',
+    title: '创建时间',
+    dataIndex: 'createTime',
+    scopedSlots: { customRender: 'createTime' },
     align: 'center',
-
-    scopedSlots: { customRender: 'ctr' },
     sorter: () => {}
   },
-
   {
-    title: '展示数',
-    dataIndex: 'showMaterial',
-    align: 'center',
-
-    scopedSlots: { customRender: 'showMaterial' },
-    sorter: () => {}
-  },
-  {
-    title: '25%进度播放率',
-    dataIndex: 'play25FeedBreakRate',
-    align: 'center',
-
-    scopedSlots: { customRender: 'play25FeedBreakRate' },
-    sorter:() => {}
-  },
-  {
-    title: '播完率',
-    dataIndex: 'playOverRate',
-    align: 'center',
-
-    tip: '表示广告在投放期内的预估花费金额。当天数据可能会有波动,次日稳定',
-    scopedSlots: { customRender: 'playOverRate' },
-    sorter: () => {}
-  },
-  {
-    title: '转化数',
-    dataIndex: 'convertMaterial',
-    align: 'center',
-
-    scopedSlots: { customRender: 'convertMaterial' },
-    sorter: () => {}
-  },
-  {
-    title: '转化率',
-    dataIndex: 'convertRate',
-    align: 'center',
-
-    scopedSlots: { customRender: 'convertRate' },
-    sorter: () => {}
-  }
+        title: '消耗(元)',
+        dataIndex: 'cost',
+        width:150,
+        tip: '广告在投放期间的花费总额',
+        align: 'center',
+        scopedSlots: { customRender: 'cost' },
+        sorter: () => {}
+    },
+      // {
+      //     title: '折后消耗(元)',
+      //     dataIndex: 'discountCost',
+      //     width:150,
+      //     tip: '广告在投放期间的花费总额',
+      //     align: 'center',
+      //     scopedSlots: { customRender: 'discountCost' },
+      //     sorter: () => {}
+      // },
+    {
+        title: '封面曝光数',
+        dataIndex: 'photoShow',
+        tip: '广告在瀑布流被观看次数',
+        align: 'center',       
+        scopedSlots: { customRender: 'photoShow' },
+        sorter:() => {}
+    },
+    {
+        title: '封面点击数',
+        dataIndex: 'photoClick',
+        tip: '用户点击封面进入视频播放页的次数(数据会进行反作弊去重)',
+        align: 'center',
+    
+        scopedSlots: { customRender: 'photoClick' },
+        sorter: () => {}
+    },
+    {
+        title: '封面点击率',
+        dataIndex: 'clickRate',
+        tip: '封面点击数占封面展示数百分比',
+        align: 'center',    
+        scopedSlots: { customRender: 'clickRate' },
+        sorter:() => {}
+    },
+    {
+        title: '素材曝光数',
+        dataIndex: 'aClick',
+        tip: '用户进入视频播放页观看的次数(数据会进行反作弊去重)',
+        align: 'center',
+    
+        scopedSlots: { customRender: 'aClick' },
+        sorter:() => {}
+    },
+    {
+        title: '行为数',
+        dataIndex: 'bClick',
+        tip: '用户在视频播放页单击转化按钮的次数/展示数*100%',
+        align: 'center',
+    
+        scopedSlots: { customRender: 'bClick' },
+        sorter:() => {}
+    },
+    
+    {
+        title: '行为率',
+        dataIndex: 'bClickRate',
+        tip: '行为数占素材曝光数百分比',
+        align: 'center',    
+        scopedSlots: { customRender: 'bClickRate' },
+        sorter:() => {}
+    },
+    {
+        title: '平均千次封面曝光花费(元)',
+        dataIndex: 'cpm',
+        tip: '花费/封面曝光数*1000',
+        align: 'center',    
+        scopedSlots: { customRender: 'cpm' },
+        sorter:() => {}
+    },
+    {
+        title: '平均封面点击单价(元)',
+        dataIndex: 'cpc',
+        tip: '花费/封面点击数',
+        align: 'center',    
+        scopedSlots: { customRender: 'cpc' },
+        sorter:() => {}
+    },
+    {
+        title: '平均行为单价(元)',
+        dataIndex: 'cpb',
+        tip: '总花费/行为数',
+        align: 'center',    
+        scopedSlots: { customRender: 'cpb' },
+        sorter:() => {}
+    },
 ]
 let show = 0
 
 export default {
   data() {
     return {
+       target:'cost',
+        order:'desc',
         type:0,
         dateValue:[moment(),moment()],
         openOptions:false,
@@ -454,12 +412,30 @@ export default {
       //自定义列的搜索框
       searchInput: '',
       //弹出框中现实的选中列数
-      scrollX: 0,
+      scrollX: 2000,
       listNum: [],
       //
       form: [],
       videoID: '',
-      timedata: []
+      timedata: [],
+      ipagination: {
+          current: 1,
+          pageSize: 10,
+          //   pageSizeOptions: ['10', '20', '30'],
+          showTotal: (total, range) => {
+              return range[0] + "-" + range[1] + " 共" + total + "条"
+          },
+          showQuickJumper: true,
+          showSizeChanger:true,
+          pageSizeOptions: ['10', '30', '50'],
+          total: 0,
+          onChange: (current, pageSize) => {
+              // 切换分页时的回调,
+              // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+              this.ipagination.current = current;
+              this.ipagination.pageSize= pageSize;
+          }
+      },
     }
   },
   mixins: [JeecgListMixin],
@@ -469,6 +445,9 @@ export default {
     DatePicker,
     customColumn,
   },
+  watch:{
+
+  },
   methods: {
     closeCustomColumn(){
       this.visible=false;
@@ -510,13 +489,20 @@ export default {
     },
       sort(pagination, filters, sorter, { currentDataSource }){
           console.log(pagination, filters, sorter)
-          if(sorter.order == 'ascend'){
-              this.HttpPost(sorter.columnKey+'+')
+          this.ipagination.current=pagination.current;
+          this.ipagination.pageSize=pagination.pageSize
+          if(sorter.order == 'ascend'){            
+              this.order='asc'
+              this.target=sorter.columnKey;
           }else if(sorter.order == 'descend'){
-              this.HttpPost(sorter.columnKey+'-')
-          }
-
-      },
+              this.order='desc'    
+              this.target=sorter.columnKey;
+          }else{            
+                this.target='cost',
+                this.order='desc'           
+          }          
+          this.HttpPost();
+    },
     moment,
     //select切换---项目
     selectChange(key){
@@ -545,19 +531,21 @@ export default {
       
     },
     //网络请求table数据函数
-    HttpPost(sort){
+    HttpPost(){
       this.loading=true;
       show = 0
-      postAction('/toutiao/videoReportDaily/videoInfoListTotal', {
+      postAction('/ctop/kuaishou/videoReport/list', {
         startDate: this.dateValue[0].format('YYYY-MM-DD'),
         endDate: this.dateValue[1].format('YYYY-MM-DD'),
         pageNo:this.ipagination.current,
         pageSize:this.ipagination.pageSize,
         accountIds:this.appId,
-        sort:sort?sort:''
+        target:this.target,
+        order:this.order,
       }).then(res => {
         let resArr = []
-        
+        this.data=[];
+        this.loading = false
         if (res.success) {
         //   let result = res.result
         //   this.data.push({ ...result, key: 1 })
@@ -580,27 +568,18 @@ export default {
     },
     //导出报表
     exportExcel() {
-      // var params = {}
-      // params.projectId = this.projectId
-      // params.disCount = this.discount
-      // params.statDate = this.statDate.format('YYYY-MM-DD')
-      // var name = this.dataElse.filter(item => {
-      //   return item.projectId == this.projectId
-      // })[0].projectName
-      // downFilePost('/ctop/yiche/report/exportDailyReport', params).then(res => {
-      //   let blob = new Blob([res], {
-      //     type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
-      let column = this.columns.map((item, index) => {
+       let column = this.columns.map((item, index) => {
         return item.dataIndex
       })
-        let columns=['url',...column]
+      
+      let columns=column.splice(5)
         
-      downFilePost('/toutiao/videoReportDaily/bytedanceVideoInfoListTotalExportExcel', {
+      downFilePost('/ctop/kuaishou/videoReport/report/excel', {
         columns,
-        signature: this.videoID,
-        startDate: this.timedata[0],
-        endDate: this.timedata[1],
-        cost: this.consumeValue,
+        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,
       }).then(res => {
         let blob = new Blob([res], {
@@ -609,7 +588,7 @@ export default {
         let downloadElement = document.createElement('a')
         let href = window.URL.createObjectURL(blob) //创建下载的链接
         downloadElement.href = href
-        downloadElement.download = this.statDate.format('YYYY-MM-DD') + '视频汇总.xlsx' //下载后文件名
+        downloadElement.download = '视频汇总.xlsx' //下载后文件名
         document.body.appendChild(downloadElement)
         downloadElement.click() //点击下载
         document.body.removeChild(downloadElement) //下载完成移除元素
@@ -782,12 +761,7 @@ export default {
       }
     }
   },
-  watch:{
-      'ipagination.current':function(n,o){
-          console.log(n,o)
-          this.HttpPost()
-      }
-  },
+  
   activated() {
     console.log('activated')
     // this.getParticipateList()
@@ -796,7 +770,7 @@ export default {
     moment().format('YYYY-MM-DD_HH:mm')
 
     postAction('/toutiao/videoReportDaily/getColumnJson', {
-      columnType: 1
+      columnType: 6
     }).then(res => {
       // console.log(res)
       if (res.success) {
@@ -830,25 +804,108 @@ export default {
     // console.log(arr)
     postAction('/toutiao/videoReportDaily/saveOrUpdateColumnJson', {
       json: arr,
-      columnType: 1
+      columnType: 6
     }).then(res => {
       // console.log(res)
     })
   },
-
-  filters: {
-    toPercentage(val) {
-      return (val * 100).toFixed(2) + '%'
-      // return val
-    },
+filters: {
+    
     toshowTime(val) {
       // console.log(val, this.timedata)
       // return this.timedata[0] + '~' + this.timedata[1]
       return val
     },
-    tofixed(val) {
-      return Number(val).toFixed(2)
-    }
+    toPercentage(val) {
+      if(val){
+          if(typeof val != 'string'){
+            return (val * 100).toFixed(2) + '%'
+          }else{
+            return val
+          }
+      }else if(typeof val =='string'){
+            return val
+        }
+      else{
+        return 0
+      }    
+    },
+    //保留两位小数并且变成货币格式
+      decimalsHandle(val){
+          // console.log(val)
+          if(val && typeof val !='string'){
+              if(val>=0){
+                  val=parseFloat(val).toFixed(2);
+                  let numberStr = val.toString()
+                  let str = numberStr.split('.')
+                  
+                  let str0=str[0].split('').reverse();
+                  for (let i = 0; i < str0.length; i++) {
+                      if ((i + 1) % 4 === 0) {
+                          str0.splice(i, 0, ',')
+                      }
+                  }
+                  str0.reverse()
+                  let handleResult = ''
+                  for (let j = 0; j < str0.length; j++) {
+                      handleResult += str0[j]
+                  }
+                  
+                  return handleResult+'.'+str[1]
+              }else{
+                  val=parseFloat(val).toFixed(2);
+                  let numberStr = val.toString()
+                  let str = numberStr.split('.')
+                  
+                  let str0=str[0].substr(1).split('').reverse();
+                  for (let i = 0; i < str0.length; i++) {
+                      if ((i + 1) % 4 === 0) {
+                          str0.splice(i, 0, ',')
+                      }
+                  }
+                  str0.reverse()
+                  let handleResult = ''
+                  for (let j = 0; j < str0.length; j++) {
+                      handleResult += str0[j]
+                  }
+                  
+                  return '-'+handleResult+'.'+str[1]
+              }
+              
+          }else if(typeof val =='string'){
+              return val
+          }
+          else{
+              return 0
+          }           
+      },
+      //变成货币格式
+      formatCurrency(val){
+        if((val||val==0)&& typeof val !='string'){
+            let numberStr = val.toString()
+          let str = numberStr.split('').reverse()
+          for (let i = 0; i < str.length; i++) {
+              if ((i + 1) % 4 === 0) {
+              str.splice(i, 0, ',')
+              }
+          }
+          str.reverse()
+          let handleResult = ''
+          for (let j = 0; j < str.length; j++) {
+              handleResult += str[j]
+          }
+          return handleResult
+        }else if(typeof val =='string'){
+              return val
+        }
+        else{
+          return '-'
+        }
+          
+      }
+
+
+      
   },
 
   mounted() {

+ 47 - 46
src/views/modules/Statistics/videoStatics/TTvideoStatics.vue

@@ -3,7 +3,7 @@
     <div class="xiangmuxuanze" >
       <!-- <div> -->
         <span>项目选择:</span>
-        <Treeselect  :appId.sync="appId" request="1,3"   style="display: inline-block;position: relative;top: 10px;"/>
+        <Treeselect  :appId.sync="appId" request="1,3"   style="display: inline-block;position: relative;"/>
       <!-- </div> -->
       
       
@@ -11,9 +11,9 @@
     <div class="timeDiv">
       <div style='display:flex;align-items: center;'>
         <span>时间范围:</span>
-        <span  @click="opendate">
+        <div  @click="opendate">
           <DatePicker :openOptions='openOptions'  :parentDate='dateValue' left='-100px'></DatePicker>
-        </span>    
+        </div>    
         <!-- <a-range-picker
           :disabled-date="disabledDate"
           format="YYYY-MM-DD"
@@ -40,17 +40,17 @@
       <a-button type="default" style="float:right" @click="exportExcel" id="mybtn" v-show="exportExcelIsOk">导出报表</a-button>
     </div>
 
-    <a-modal v-model="visible" title="自定义列" on-ok="handleOk" width="65%">
+    <!-- <a-modal v-model="visible" title="自定义列" on-ok="handleOk" width="65%">
       <template slot="footer">
         <a-button key="back" @click="handleCancel">取消</a-button>
         <a-button key="submit" type="primary" :loading="loading" @click="handleOk">应用</a-button>
       </template>
-      <!-- <a-input-search placeholder="输入要添加的列的名称" style="width: 40%" enter-button @search="onSearch" /> -->
+      
       <div class="zhuti">
         <div class="addlist">
           <p>可添加的列</p>
           <div class="selectionList">
-            <!--  v-for="(item,index) in addColumns" :key="index" -->
+           
             <selectComponent
               :showCol="listNum"
               @getshowlist="getshowlist"
@@ -81,7 +81,7 @@
           </ul>
         </div>
       </div>
-    </a-modal>
+    </a-modal> -->
 
     <a-table
       size="middle"
@@ -96,16 +96,18 @@
       :width="tableWidth"
       @customHeaderCell="customHeaderCell(columns)"
       @change="sort"
-      style="word-break: break-all;"
+      style="word-break: break-all;font-size:16px;font-weight:600"
     >
       <div slot="videoU" slot-scope="test,records">
         <img
-          :src="records.url"
+          :src="records.converUrl"
           alt
           style="width:80px"
           @click="openVideo(records.url)"
           @load="loadShow"
         />
+        <!-- <video :src="records.converUrl"  style="width:80px" controls  @click="openVideo(records.url)"
+          @load="loadShow" ></video> -->
       </div>
    
       <!-- <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span> -->
@@ -206,6 +208,7 @@
         style="height:600px;width:100%"
       >您的浏览器不支持 video 标签。</video>
     </a-modal>
+    <customColumn :visible='visible'  :listNum='listNum' :fiexColumn='columnsFixd' :mediaType='1'  @closeCustomColumn='closeCustomColumn' @changeColumn='changeColumn' />
   </div>
 </template>
 
@@ -216,6 +219,7 @@ import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
 import selectComponent from './selectComponent'
 import Treeselect from '../components/Treeselect'
 import DatePicker from '@/components/DatePicker'
+import customColumn from '../components/customColumn.vue'
 const columnsFixd = [
   {
     title: '视频',
@@ -228,7 +232,7 @@ const columnsFixd = [
   },
   {
     title: '视频名称',
-    dataIndex: 'name',
+    dataIndex: 'materialName',
     align: 'center',
     width: 120,
     fixed: 'left'
@@ -248,16 +252,15 @@ const columnsFixd = [
     align: 'center',
     width:100,
     fixed: 'left'
-  }
-]
-let variableCol = [
+  },
   {
-    title: '上传时间',
+    title: '创建时间',
     dataIndex: 'createTime',
     scopedSlots: { customRender: 'createTime' },
     align: 'center',
     sorter: () => {}
   },
+
   {
     title: '消耗',
     dataIndex: 'cost',
@@ -288,17 +291,14 @@ let variableCol = [
     title: '展示数',
     dataIndex: 'showMaterial',
     align: 'center',
-
     scopedSlots: { customRender: 'showMaterial' },
     sorter: () => {}
   },
 
- 
   {
     title: '转化数',
     dataIndex: 'convertMaterial',
     align: 'center',
-
     scopedSlots: { customRender: 'convertMaterial' },
     sorter: () => {}
   },
@@ -306,16 +306,17 @@ let variableCol = [
     title: '转化率',
     dataIndex: 'convertRate',
     align: 'center',
-
     scopedSlots: { customRender: 'convertRate' },
     sorter: () => {}
-  }
+  },
+
 ]
 let show = 0
 
 export default {
   data() {
     return {
+       listNum:[],
       target:'cost',
       order:'desc',
         type:0,
@@ -342,7 +343,7 @@ export default {
       exportExcelIsOk: true,
       consumeValue: 0,
 
-      columns: [...columnsFixd, ...variableCol],
+      columns: [...columnsFixd],
       addColumns: [],
       data: [],
       totalSelect: 0,
@@ -384,9 +385,22 @@ export default {
   components: {
     selectComponent,
     Treeselect,
-    DatePicker
+    DatePicker,
+    customColumn
   },
   methods: {
+    closeCustomColumn(){
+      this.visible=false;
+    },
+     //自定义之后修改父元素表头
+    changeColumn(val){
+        this.columns=[...val];
+        if(this.columns.length> this.columnsFixd.length){
+              this.scrollX=2000+200*(this.columns.length-this.columnsFixd.length)
+        }else{
+          this.scrollX=2000
+        }
+    },
     // 日期的开关
       //打开日期框
     opendate(){
@@ -427,7 +441,7 @@ export default {
                 this.target='cost',
                 this.order='desc'           
           }          
-          this.tableHttp();
+          this.HttpPost();
     },
     moment,
     //select切换---项目
@@ -470,6 +484,7 @@ export default {
         order:this.order,
       }).then(res => {
         let resArr = []
+        this.data=[];
          this.loading = false
         if (res.success) {
         
@@ -487,27 +502,18 @@ export default {
     },
     //导出报表
     exportExcel() {
-      // var params = {}
-      // params.projectId = this.projectId
-      // params.disCount = this.discount
-      // params.statDate = this.statDate.format('YYYY-MM-DD')
-      // var name = this.dataElse.filter(item => {
-      //   return item.projectId == this.projectId
-      // })[0].projectName
-      // downFilePost('/ctop/yiche/report/exportDailyReport', params).then(res => {
-      //   let blob = new Blob([res], {
-      //     type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
+      
       let column = this.columns.map((item, index) => {
         return item.dataIndex
       })
-        let columns=['url',...column]
-        
-      downFilePost('/toutiao/videoReportDaily/bytedanceVideoInfoListTotalExportExcel', {
+      
+      let columns=column.splice(5)
+      downFilePost('/ctop/byteDance/videoReport/report/excel', {
         columns,
-        signature: this.videoID,
-        startDate: this.timedata[0],
-        endDate: this.timedata[1],
-        cost: this.consumeValue,
+        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,
       }).then(res => {
         let blob = new Blob([res], {
@@ -623,12 +629,7 @@ export default {
       console.log(this.$refs.vSummaryTable)
     },
 
-    //li展示里的关闭按钮 删除当前被选中的这一个列
-    deleteCol(item, index) {
-      this.listNum = this.listNum.filter((item1, num) => {
-        return num != index
-      })
-    },
+ 
 
     //从自定义列拿选择的项
     getshowlist(val) {
@@ -839,7 +840,7 @@ export default {
   },
 
   mounted() {
-    this.columns = [...columnsFixd, ...variableCol]
+    this.columns = [...columnsFixd]
     // console.log('mounted')
     //请求自定义列的数据
     postAction('/toutiao/videoReportDaily/videoInfoListTotalExportExcelPermission').then(res => {

+ 472 - 0
src/views/modules/attendanceRecords/attendanceRecordsList.vue

@@ -0,0 +1,472 @@
+<template>
+    <div class="attendanceRecordsList">
+        <div class="optBody">
+            <div class="optItem">
+                <span class="itemName" style="margin-right:15px">部门:</span>
+                <a-select
+                    show-search
+                    v-model="departId"
+                    placeholder="请选择部门"
+                    style="width:320px"
+                    :show-arrow="false"
+                    option-filter-prop="children"
+                    :filter-option="filterOption"
+                    @change="departChange"
+                >
+                    <a-select-option v-for="item in departList" :key="item.value">
+                    {{ item.text }}
+                    </a-select-option>
+                </a-select>
+                <!-- <a-input placeholder="请输入部门名称" v-model="departName"></a-input> -->
+            </div>
+            <div class="optItem">
+                <span class="itemName" style="margin-right:15px">姓名:</span>
+               <a-input placeholder="请输入姓名" style="width:320px" v-model="userName"></a-input>
+            </div>
+            <div class="optItem">
+                <span class="itemName" style="margin-right:15px">时间:</span>
+                <a-range-picker
+                        :disabled-date="disabledDate"
+                        format="YYYY-MM-DD"
+                        style="width: 250px;"
+                        @change="dateValueChange"
+                        v-model="dateValue"
+                />
+            </div>
+
+            <a-button type='primary' @click="search" style="float:right" :loading='btnLoading'>查询</a-button>
+           
+        </div>
+        <div class="tabBody">
+            <a-tabs v-model="tabKey" @change="tabCHange">
+                <a-tab-pane :key="1" tab="详细数据"></a-tab-pane>
+                <a-tab-pane :key="2" tab="加班考勤"></a-tab-pane>
+                <a-tab-pane :key="3" tab="异常考勤"></a-tab-pane>
+                <a-button slot="tabBarExtraContent" @click="exportExcel"  >导出数据</a-button>
+            </a-tabs>
+        </div>
+        <div class="tableBody">
+            <a-table
+                size="middle"
+                :columns="columns"
+                :dataSource="data"
+                bordered
+                id="outTable"
+                :pagination="ipagination"
+                :scroll="{ x: scrollX }"
+                :loading="loading"
+                @change="sort"
+                style="word-break: break-all;"
+                >
+               <span slot="exceptionType" slot-scope="text">
+                   {{text?text:'正常'}}
+               </span>
+               <span slot="status" slot-scope="text">
+                   {{text?text:'-'}}
+               </span>
+               <span slot="type" slot-scope="text">
+                   {{text?text:'-'}}
+               </span>
+               <span slot="stateDuration" slot-scope="text">
+                   {{text?text:'-'}}
+               </span>
+               <span slot="overtime" slot-scope="text">
+                   {{text?text:'-'}}
+               </span>
+
+            </a-table>
+        </div>
+    </div>
+</template>
+
+<script>
+import moment from 'moment';
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
+let OverTimeColumns=[
+    {
+        title: '员工名称',
+        dataIndex: 'userName',
+        align: 'center',       
+        key: 'userName',
+        width:150,
+        scopedSlots: { customRender: 'userName' }
+    },
+     {
+        title: '员工ID',
+        dataIndex: 'userId',
+        align: 'center',
+        width:300,
+        key: 'userId',
+        scopedSlots: { customRender: 'userId' }
+    },
+    {
+        title: '部门名称',
+        dataIndex: 'departName',
+        align: 'center',      
+        key: 'departName',
+        scopedSlots: { customRender: 'departName' }
+    },
+    {
+        title: '部门ID',
+        dataIndex: 'departId',
+        align: 'center',      
+        key: 'departId',
+        scopedSlots: { customRender: 'departId' }
+    },
+    {
+        title: '加班日期',
+        dataIndex: 'checkinDate',
+        align: 'center',      
+        key: 'checkinDate',
+        scopedSlots: { customRender: 'checkinDate' }
+    },
+    {
+        title: '加班时长',
+        dataIndex: 'overtime',
+        align: 'center',      
+        key: 'overtime',
+        scopedSlots: { customRender: 'overtime' }
+    },
+]
+let allDataColumns=[
+    {
+        title: '员工名称',
+        dataIndex: 'userName',
+        align: 'center',
+        width:150,
+        key: 'userName',
+        scopedSlots: { customRender: 'userName' }
+    },
+    {
+        title: '员工ID',
+        dataIndex: 'userId',
+        align: 'center',
+        width:300,
+        key: 'userId',
+        scopedSlots: { customRender: 'userId' }
+    },
+    {
+        title: '部门名称',
+        dataIndex: 'departName',
+        align: 'center',      
+        key: 'departName',
+        scopedSlots: { customRender: 'departName' }
+    },
+    {
+        title: '部门ID',
+        dataIndex: 'departId',
+        align: 'center',      
+        key: 'departId',
+        scopedSlots: { customRender: 'departId' }
+    },
+    {
+        title: '考勤时间',
+        dataIndex: 'checkinTime',
+        align: 'center',      
+        key: 'checkinTime',
+        scopedSlots: { customRender: 'checkinTime' }
+    },
+    {
+        title: '考勤类型',
+        dataIndex: 'checkinType',
+        align: 'center',      
+        key: 'checkinType',
+        scopedSlots: { customRender: 'checkinType' }
+    },
+    {
+        title: '异常状态',
+        dataIndex: 'exceptionType',
+        align: 'center',      
+        key: 'exceptionType',
+        scopedSlots: { customRender: 'exceptionType' }
+    },
+    {
+        title: '加班时长',
+        dataIndex: 'overtime',
+        align: 'center',      
+        key: 'overtime',
+        scopedSlots: { customRender: 'overtime' }
+    },   
+]
+let abnormalColumns=[
+    {
+        title: '员工名称',
+        dataIndex: 'userName',
+        align: 'center',
+        width:150,
+        key: 'userName',
+        scopedSlots: { customRender: 'userName' }
+    },
+     {
+        title: '员工ID',
+        dataIndex: 'userId',
+        align: 'center',
+        width:300,
+        key: 'userId',
+        scopedSlots: { customRender: 'userId' }
+    },
+    {
+        title: '部门名称',
+        dataIndex: 'departName',
+        align: 'center',      
+        key: 'departName',
+        scopedSlots: { customRender: 'departName' }
+    },
+    {
+        title: '部门ID',
+        dataIndex: 'departId',
+        align: 'center',      
+        key: 'departId',
+        scopedSlots: { customRender: 'departId' }
+    },
+    {
+        title: '考勤日期',
+        dataIndex: 'checkinDate',
+        align: 'center',      
+        key: 'checkinDate',
+        scopedSlots: { customRender: 'checkinDate' }
+    },
+    {
+        title: '考勤类型',
+        dataIndex: 'checkinType',
+        align: 'center',      
+        key: 'checkinType',
+        scopedSlots: { customRender: 'checkinType' }
+    },
+    {
+        title: '异常状态',
+        dataIndex: 'exceptionType',
+        align: 'center',      
+        key: 'exceptionType',
+        scopedSlots: { customRender: 'exceptionType' }
+    },
+    {
+        title: '考勤时间',
+        dataIndex: 'checkinTime',
+        align: 'center',      
+        key: 'checkinTime',
+        scopedSlots: { customRender: 'checkinTime' }
+    },
+    {
+        title: '审核状态',
+        dataIndex: 'type',
+        align: 'center',      
+        key: 'type',
+        scopedSlots: { customRender: 'type' }
+    },
+    {
+        title: '状态时长',
+        dataIndex: 'stateDuration',
+        align: 'center',      
+        key: 'stateDuration',
+        scopedSlots: { customRender: 'stateDuration' }
+    },
+    {
+        title: '审批状态',
+        dataIndex: 'status',
+        align: 'center',      
+        key: 'status',
+        scopedSlots: { customRender: 'status' }
+    },
+]
+export default {
+    data() {
+        return {
+            ipagination: {
+                current: 1,
+                pageSize: 10,
+                //   pageSizeOptions: ['10', '20', '30'],
+                showTotal: (total, range) => {
+                    return range[0] + "-" + range[1] + " 共" + total + "条"
+                },
+                showQuickJumper: true,
+                showSizeChanger:true,
+                pageSizeOptions: ['10', '30', '50'],
+                total: 0,
+                onChange: (current, pageSize) => {
+                    // 切换分页时的回调,
+                    // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+                    this.ipagination.current = current;
+                    this.ipagination.pageSize= pageSize;
+                }
+            },
+            userName:undefined,
+            departName:undefined,
+            departId:undefined,
+            dateValue:[moment(),moment()],
+            tabKey:1,
+            btnLoading:false,
+
+            columns:[...allDataColumns],
+            OverTimeColumns,
+            abnormalColumns,
+            allDataColumns,
+            data:[],
+            scrollX:0,
+            loading:false,
+
+            url:{
+                OverTime:'/oa/wechatNoList/selectOverTimePage',
+                abnormal:'/oa/wechatNoList/selectNoListPage',
+                allData:'/oa/wechatCheckinData/queryPageList'
+            },
+            departList:[],
+        }
+    },
+    methods: {
+        moment,
+        filterOption(input, option) {
+            return (
+                option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+            );
+        },
+        departChange(value) {
+            // console.log(`selected ${value}`);
+            // console.log(this.departId)
+            this.userName=undefined;
+        },
+        dateValueChange(date,dateString){
+
+        },
+        disabledDate(current) {
+        // console.log(current)
+          return current && current > moment() 
+        },
+
+        tabCHange(key){
+            this.btnLoading=false;
+            this.loading=false;
+            this.data=[];
+            switch (this.tabKey){
+                case 1:
+                    this.columns=[...allDataColumns]
+                    this.attendanceHttp(this.url.allData)
+                    break;
+                case 2:
+                    this.columns=[...OverTimeColumns]
+                    this.attendanceHttp(this.url.OverTime)
+                    break;
+                case 3:
+                    this.columns=[...abnormalColumns]
+                    this.attendanceHttp(this.url.abnormal)
+                    break;
+            }
+        },
+        sort(pagination, filters, sorter, { currentDataSource }){
+            // console.log(pagination, filters, sorter)          
+            this.ipagination.current=pagination.current
+            this.ipagination.pageSize=pagination.pageSize
+            this.search()
+        },
+        search(){
+            this.btnLoading=true;
+            this.loading=true;
+            this.data=[];
+            switch (this.tabKey){
+                case 1:
+                    this.columns=[...allDataColumns]
+                    this.attendanceHttp(this.url.allData)
+                    break;
+                case 2:
+                    this.columns=[...OverTimeColumns]
+                    this.attendanceHttp(this.url.OverTime)
+                    break;
+                case 3:
+                    this.columns=[...abnormalColumns]
+                    this.attendanceHttp(this.url.abnormal)
+                    break;
+            }
+            
+
+        },
+        // 考勤数据查询
+        attendanceHttp(url){
+            if(this.dateValue.length>0){
+                this.loading=true;
+                postAction(url,{
+                    userName:this.userName,
+                    departId:this.departId,
+                    startTime:this.dateValue[0].format('YYYY-MM-DD'),
+                    stopTime:this.dateValue[1].format('YYYY-MM-DD'),
+                    pageNo:this.ipagination.current,
+                    pageSize:this.ipagination.pageSize
+                }).then(res=>{
+                    console.log(res)
+                    this.btnLoading=false;
+                    this.loading=false;
+                    if(res.success){
+                        this.data=[];
+                        if(res.result){
+                            this.data=res.result.list
+                        }
+                        this.ipagination.total=res.result.total
+                    }
+                })
+            }else{
+                this.btnLoading=false;
+                this.loading=false;
+                this.$message.error('请选择具体的时间')
+            }
+            
+        },
+       
+        //获取部门数据
+        departListHttp(){
+            postAction('/oa/wechatDepartment/queryList',{
+            }).then(res=>{
+                console.log(res)
+                if(res.success){
+                    this.departList=res.result.map(item=>{
+                        return {
+                            value:item.departId,
+                            text:item.departName
+                        }
+                    })
+                }
+            })
+        },
+
+         //导出报表
+        exportExcel() {          
+            downFilePost('/oa/wechatNoList/excel', {
+                userName:this.userName,
+                departId:this.departId,
+                startTime:this.dateValue[0].format('YYYY-MM-DD'),
+                stopTime:this.dateValue[1].format('YYYY-MM-DD'),
+            }).then(res => {
+                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.dateValue[0].format('YYYY-MM-DD')+'-'+this.dateValue[1].format('YYYY-MM-DD') + '考情数据.xlsx' //下载后文件名
+                document.body.appendChild(downloadElement)
+                downloadElement.click() //点击下载
+                document.body.removeChild(downloadElement) //下载完成移除元素
+                window.URL.revokeObjectURL(href) //释放掉blob对象
+            })
+        },
+    },
+
+    mounted() {
+        this.departListHttp()
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.attendanceRecordsList{
+    background: white;
+    padding: 20px 15px;
+    .optBody{
+        margin-bottom: 20px;
+        overflow: hidden;
+        .optItem{
+            float: left;
+            margin-right: 35px;
+            margin-bottom: 15px;
+        }
+    }
+}
+</style>

+ 24 - 24
src/views/modules/columnConst/accountConst.js

@@ -1154,30 +1154,30 @@ export const KScustomFields= [
           scopedSlots: { customRender: 'activeRegisterRate' },
           sorter:() => {}
         },
-          // {
-          //   title: '次留数',
-          //   dataIndex: 'nextDayOpen',
-          //   tip: '前一日激活用户在次日继续访问的PV',
-          //   align: 'center',    
-          //   scopedSlots: { customRender: 'nextDayOpen' },
-          //   sorter:() => {}
-          // },
-          // {
-          //   title: '次留成本',
-          //   dataIndex: 'nextDayOpenCost',
-          //   tip: '消耗/次日留存PV',
-          //   align: 'center',    
-          //   scopedSlots: { customRender: 'nextDayOpenCost' },
-          //   sorter:() => {}
-          // },
-          // {
-          //   title: '次留率',
-          //   dataIndex: 'nextDayOpenRate',
-          //   tip: '前一日激活用户在次日继续访问的PV/前一日激活数',
-          //   align: 'center',    
-          //   scopedSlots: { customRender: 'nextDayOpenRate' },
-          //   sorter:() => {}
-          // },
+          {
+            title: '次留数',
+            dataIndex: 'nextDayOpen',
+            tip: '前一日激活用户在次日继续访问的PV',
+            align: 'center',    
+            scopedSlots: { customRender: 'nextDayOpen' },
+            sorter:() => {}
+          },
+          {
+            title: '次留成本',
+            dataIndex: 'nextDayOpenCost',
+            tip: '消耗/次日留存PV',
+            align: 'center',    
+            scopedSlots: { customRender: 'nextDayOpenCost' },
+            sorter:() => {}
+          },
+          {
+            title: '次留率',
+            dataIndex: 'nextDayOpenRate',
+            tip: '前一日激活用户在次日继续访问的PV/前一日激活数',
+            align: 'center',    
+            scopedSlots: { customRender: 'nextDayOpenRate' },
+            sorter:() => {}
+          },
         {
           title: '完件数',
           dataIndex: 'eventJinJianApp',

+ 308 - 1
src/views/modules/kuaishouapp/account/accountIndex.vue

@@ -110,6 +110,8 @@
               <!-- <a-button slot="okText" type="primary" :disabled="refuseReason == ''">确定</a-button> -->
               <a @click="setData(record)">复制</a>
             </a-popconfirm>
+            <a-divider type="vertical" />
+            <a @click="realTimedata(record)">查看实时数据</a>
           </span>
           <span slot="campaignType" slot-scope="text">
             {{ text | typeStatus }}
@@ -165,6 +167,57 @@
         </a-button>
       </template>
     </a-modal>
+
+    <!-- 实时数据 -->
+    <a-modal v-model="realTimeVisiable" title="广告计划实时数据" @afterClose="clear" width="80%" :maskClosable="false">
+        <div class="optBody">
+          <a-range-picker
+            :disabled-date="disabledDate"
+            format="YYYY-MM-DD"
+            style="width: 250px;"
+           @change="dateValueChange"
+            v-model="dateValue"
+          />
+        </div>
+        <div class="tableBox" style="margin-top:20px;min-height:400px">
+          <a-table
+                size="middle"
+                :columns="realTimeColumn"
+                :dataSource="realTimeData"
+                bordered
+                :pagination="false"
+                :scroll="{ x: scrollX }"
+                :loading="realTimeLoading"
+                ref="accountTable"  
+                style="word-break: break-all;"
+              >
+
+                <span slot="ctr" slot-scope="text">{{ text | toPercentage }}</span>
+                <span slot="action_ratio" slot-scope="text">{{ text | toPercentage }}</span>
+                <span slot="photo_click_ratio" slot-scope="text">{{ text | toPercentage }}</span>
+
+                <span slot="charge" slot-scope="text">{{ text | decimalsHandle }}</span>
+                <span slot="activationCost" slot-scope="text,records">{{ (records.activation/records.charge) | decimalsHandle }}</span>
+                <span slot="event_register_cost" slot-scope="text">{{ text | decimalsHandle }}</span>
+                <span slot="form_cost" slot-scope="text">{{ text | decimalsHandle }}</span>
+                <span slot="event_order_paid_cost" slot-scope="text">{{ text | decimalsHandle }}</span>
+               
+
+                <span slot="show" slot-scope="text">{{ text | formatCurrency }}</span>
+                <span slot="photo_click" slot-scope="text">{{ text | formatCurrency }}</span>
+                <span slot="aclick" slot-scope="text">{{ text | formatCurrency }}</span>
+                <span slot="bclick" slot-scope="text">{{ text | formatCurrency }}</span>
+                <span slot="activation" slot-scope="text">{{ text | formatCurrency }}</span>
+                <span slot="event_register" slot-scope="text">{{ text | formatCurrency }}</span>
+                <span slot="form_count" slot-scope="text">{{ text | formatCurrency }}</span>
+                <span slot="event_order_paid" slot-scope="text">{{ text | formatCurrency }}</span>
+
+            </a-table>
+        </div>
+    </a-modal>
+
+
+
   </div>
 </template>
 
@@ -211,7 +264,7 @@
       align: 'center',
       dataIndex: 'actionTwo',
       fixed: 'left',
-      width: 100,
+      width: 200,
       scopedSlots: {
         customRender: 'actionTwo'
       }
@@ -297,6 +350,120 @@
       dataIndex: 'putUpdateTime'
     }
   ]
+
+let realTimeColumn=[
+  {
+    title: '广告计划名称',
+    align: 'center',
+    dataIndex: 'campaignName',
+    fixed: 'left',
+    width: 300,
+    scopedSlots: {
+      customRender: 'campaignName'
+    }
+  },
+  {
+    title: '时间',
+    align: 'center',
+    dataIndex: 'stat_date',
+    fixed: 'left',
+    width: 200,
+    scopedSlots: {
+      customRender: 'stat_date'
+    }
+  },
+  {
+    title: '消耗',
+    align: 'center',
+    dataIndex: 'charge',
+    scopedSlots: { customRender: 'charge'}
+  },
+  {
+    title: '封面曝光数',
+    align: 'center',
+    dataIndex: 'show',
+    scopedSlots: { customRender: 'show'}
+  },
+  {
+    title: '封面点击数',
+    align: 'center',
+    dataIndex: 'photo_click',
+    scopedSlots: { customRender: 'photo_click'}
+  },
+  {
+    title: '素材曝光数',
+    align: 'center',
+    dataIndex: 'aclick',
+    scopedSlots: { customRender: 'aclick'}
+  },
+  {
+    title: '行为数',
+    align: 'center',
+    dataIndex: 'bclick',
+    scopedSlots: { customRender: 'bclick'}
+  },
+  {
+    title: '行为率',
+    align: 'center',
+    dataIndex: 'action_ratio',
+    scopedSlots: { customRender: 'action_ratio'}
+  },
+  {
+    title: '封面点击率',
+    align: 'center',
+    dataIndex: 'photo_click_ratio',
+    scopedSlots: { customRender: 'photo_click_ratio'}
+  },
+  {
+    title: '激活数',
+    align: 'center',
+    dataIndex: 'activation',
+    scopedSlots: { customRender: 'activation'}
+  },
+  {
+    title: '激活成本',
+    align: 'center',
+    dataIndex: 'activationCost',
+    scopedSlots: { customRender: 'activationCost'}
+  },
+  {
+    title: '注册数',
+    align: 'center',
+    dataIndex: 'event_register',
+    scopedSlots: { customRender: 'event_register'}
+  },
+  {
+    title: '注册成本',
+    align: 'center',
+    dataIndex: 'event_register_cost',
+    scopedSlots: { customRender: 'event_register_cost'}
+  },
+  {
+    title: '表单提交数',
+    align: 'center',
+    dataIndex: 'form_count',
+    scopedSlots: { customRender: 'form_count'}
+  },
+  {
+    title: '表单提交单价',
+    align: 'center',
+    dataIndex: 'form_cost',
+    scopedSlots: { customRender: 'form_cost'}
+  },
+  {
+    title: '付费数',
+    align: 'center',
+    dataIndex: 'event_order_paid',
+    scopedSlots: { customRender: 'event_order_paid'}
+  },
+  {
+    title: '付费成本',
+    align: 'center',
+    dataIndex: 'event_order_paid_cost',
+    scopedSlots: { customRender: 'event_order_paid_cost'}
+  },
+]
+
   export default {
     name: 'account-statistics',
     components: {
@@ -308,6 +475,18 @@
     },
     data: function () {
       return {
+        // 实时数据
+        realTimeVisiable:false,
+        realTimeColumn,
+        realTimeData:[],
+        scrollX:2500,
+        realTimeLoading:false,
+        dateValue:[moment(),moment()],
+        realTimeRecords:{},
+
+        // 实时数据
+
+
         loadingMoney:false,
         loadingState:false,
         nameEdit: false,
@@ -418,9 +597,137 @@
           1: '汇创助手'
         }
         return data[sta]
+      },
+
+       toPercentage(val) {
+      if(val){
+          if(typeof val != 'string'){
+            return (val * 100).toFixed(2) + '%'
+          }else{
+            return val
+          }
+      }else if(typeof val =='string'){
+            return val
+        }
+      else{
+        return 0
+      }    
+    },
+    //保留两位小数并且变成货币格式
+      decimalsHandle(val){
+          
+          if(val && typeof val !='string'){
+              if(val>=0){
+                  val=parseFloat(val).toFixed(2);
+                  let numberStr = val.toString()
+                  let str = numberStr.split('.')
+                  
+                  let str0=str[0].split('').reverse();
+                  for (let i = 0; i < str0.length; i++) {
+                      if ((i + 1) % 4 === 0) {
+                          str0.splice(i, 0, ',')
+                      }
+                  }
+                  str0.reverse()
+                  let handleResult = ''
+                  for (let j = 0; j < str0.length; j++) {
+                      handleResult += str0[j]
+                  }
+                  
+                  return handleResult+'.'+str[1]
+              }else{
+                  val=parseFloat(val).toFixed(2);
+                  let numberStr = val.toString()
+                  let str = numberStr.split('.')
+                  
+                  let str0=str[0].substr(1).split('').reverse();
+                  for (let i = 0; i < str0.length; i++) {
+                      if ((i + 1) % 4 === 0) {
+                          str0.splice(i, 0, ',')
+                      }
+                  }
+                  str0.reverse()
+                  let handleResult = ''
+                  for (let j = 0; j < str0.length; j++) {
+                      handleResult += str0[j]
+                  }
+                  
+                  return '-'+handleResult+'.'+str[1]
+              }
+              
+          }else if(typeof val =='string'){
+              return val
+          }
+          else{
+              return 0
+          }           
+      },
+      //变成货币格式
+      formatCurrency(val){
+        if((val||val==0)&& typeof val !='string'){
+            let numberStr = val.toString()
+          let str = numberStr.split('').reverse()
+          for (let i = 0; i < str.length; i++) {
+              if ((i + 1) % 4 === 0) {
+              str.splice(i, 0, ',')
+              }
+          }
+          str.reverse()
+          let handleResult = ''
+          for (let j = 0; j < str.length; j++) {
+              handleResult += str[j]
+          }
+          return handleResult
+        }else if(typeof val =='string'){
+              return val
+        }
+        else{
+          return '-'
+        }
+          
       }
+
+
     },
     methods: {
+      disabledDate(current) {
+        // console.log(current)
+          return current && current > moment() || current&& current< moment().subtract(7,'days')
+        },
+      // 查看实时数据
+      realTimedata(records){
+        console.log(records);
+        this.realTimeRecords=records
+        this.realTimeVisiable=true;
+        this.realTimeHttp()
+      },
+      dateValueChange(date,dateString){
+        this.realTimeHttp()
+      },
+      // 获取实时数据请求
+      realTimeHttp(){
+        this.realTimeLoading=true;
+        postAction('/kuaishou/realTime/getCampaignDate',{
+          accountId:this.realTimeRecords.accountId,
+          campaignId:this.realTimeRecords.campaignId,
+          startDate:this.dateValue[0].format('YYYY-MM-DD'),
+          endDate:this.dateValue[1].format('YYYY-MM-DD')
+        }).then(res=>{
+          console.log(res)
+          this.realTimeData=[];
+          this.realTimeLoading=false;
+          if(res.success){
+            if(res.result){
+              res.result.forEach(item=>{
+                item.campaignName=this.realTimeRecords.campaignName
+              })
+              this.realTimeData=res.result
+            }
+           
+          }
+          
+        })
+      },
        sort(pagination, filters, sorter, { currentDataSource }){
             
             this.ipagination.current=pagination.current;

+ 307 - 1
src/views/modules/kuaishouapp/account/advertisingGroup.vue

@@ -112,6 +112,8 @@
                 <a @click="editDetail(record)">编辑</a>
                 <a-divider type="vertical" />
                 <a @click="copyDetail(record)">复制</a>
+                <a-divider type="vertical" />
+                <a @click="realTimedata(record)">查看实时数据</a>
               </span>
               <span slot="status" slot-scope="text">{{ text | status }}</span>
               <span slot="putStatus" slot-scope="text">{{ text | putStatus }}</span>
@@ -286,6 +288,55 @@
         </a-button>
       </template>
     </a-modal>
+
+
+      <!-- 实时数据 -->
+    <a-modal v-model="realTimeVisiable" title="广告组实时数据"  width="80%" :maskClosable="false">
+        <div class="optBody">
+          <a-range-picker
+            :disabled-date="disabledDate"
+            format="YYYY-MM-DD"
+            style="width: 250px;"
+           @change="dateValueChange"
+            v-model="dateValue"
+          />
+        </div>
+        <div class="tableBox" style="margin-top:20px;min-height:400px">
+          <a-table
+                size="middle"
+                :columns="realTimeColumn"
+                :dataSource="realTimeData"
+                bordered
+                :pagination="false"
+                :scroll="{ x: scrollX }"
+                :loading="realTimeLoading"
+                ref="accountTable"  
+                style="word-break: break-all;min-height:350px"
+              >
+
+                <span slot="ctr" slot-scope="text">{{ text | toPercentage }}</span>
+                <span slot="action_ratio" slot-scope="text">{{ text | toPercentage }}</span>
+                <span slot="photo_click_ratio" slot-scope="text">{{ text | toPercentage }}</span>
+
+                <span slot="charge" slot-scope="text">{{ text | decimalsHandle }}</span>
+                <span slot="activationCost" slot-scope="text,records">{{ (records.activation/records.charge) | decimalsHandle }}</span>
+                <span slot="event_register_cost" slot-scope="text">{{ text | decimalsHandle }}</span>
+                <span slot="form_cost" slot-scope="text">{{ text | decimalsHandle }}</span>
+                <span slot="event_order_paid_cost" slot-scope="text">{{ text | decimalsHandle }}</span>
+               
+
+                <span slot="show" slot-scope="text">{{ text | formatCurrency }}</span>
+                <span slot="photo_click" slot-scope="text">{{ text | formatCurrency }}</span>
+                <span slot="aclick" slot-scope="text">{{ text | formatCurrency }}</span>
+                <span slot="bclick" slot-scope="text">{{ text | formatCurrency }}</span>
+                <span slot="activation" slot-scope="text">{{ text | formatCurrency }}</span>
+                <span slot="event_register" slot-scope="text">{{ text | formatCurrency }}</span>
+                <span slot="form_count" slot-scope="text">{{ text | formatCurrency }}</span>
+                <span slot="event_order_paid" slot-scope="text">{{ text | formatCurrency }}</span>
+
+            </a-table>
+        </div>
+    </a-modal>
   </div>
 </template>
 
@@ -334,7 +385,7 @@
       align: 'center',
       dataIndex: 'actionTwo',
       fixed: 'left',
-      width: 200,
+      width: 220,
       scopedSlots: {
         customRender: 'actionTwo'
       }
@@ -561,6 +612,120 @@
     // }
   ]
 
+let realTimeColumn=[
+  {
+    title: '广告组名称',
+    align: 'center',
+    dataIndex: 'unitName',
+    fixed: 'left',
+    width: 300,
+    scopedSlots: {
+      customRender: 'unitName'
+    }
+  },
+  {
+    title: '时间',
+    align: 'center',
+    dataIndex: 'stat_date',
+    fixed: 'left',
+    width: 200,
+    scopedSlots: {
+      customRender: 'stat_date'
+    }
+  },
+  {
+    title: '消耗',
+    align: 'center',
+    dataIndex: 'charge',
+    scopedSlots: { customRender: 'charge'}
+  },
+  {
+    title: '封面曝光数',
+    align: 'center',
+    dataIndex: 'show',
+    scopedSlots: { customRender: 'show'}
+  },
+  {
+    title: '封面点击数',
+    align: 'center',
+    dataIndex: 'photo_click',
+    scopedSlots: { customRender: 'photo_click'}
+  },
+  {
+    title: '素材曝光数',
+    align: 'center',
+    dataIndex: 'aclick',
+    scopedSlots: { customRender: 'aclick'}
+  },
+  {
+    title: '行为数',
+    align: 'center',
+    dataIndex: 'bclick',
+    scopedSlots: { customRender: 'bclick'}
+  },
+  {
+    title: '行为率',
+    align: 'center',
+    dataIndex: 'action_ratio',
+    scopedSlots: { customRender: 'action_ratio'}
+  },
+  {
+    title: '封面点击率',
+    align: 'center',
+    dataIndex: 'photo_click_ratio',
+    scopedSlots: { customRender: 'photo_click_ratio'}
+  },
+  {
+    title: '激活数',
+    align: 'center',
+    dataIndex: 'activation',
+    scopedSlots: { customRender: 'activation'}
+  },
+  {
+    title: '激活成本',
+    align: 'center',
+    dataIndex: 'activationCost',
+    scopedSlots: { customRender: 'activationCost'}
+  },
+  {
+    title: '注册数',
+    align: 'center',
+    dataIndex: 'event_register',
+    scopedSlots: { customRender: 'event_register'}
+  },
+  {
+    title: '注册成本',
+    align: 'center',
+    dataIndex: 'event_register_cost',
+    scopedSlots: { customRender: 'event_register_cost'}
+  },
+  {
+    title: '表单提交数',
+    align: 'center',
+    dataIndex: 'form_count',
+    scopedSlots: { customRender: 'form_count'}
+  },
+  {
+    title: '表单提交单价',
+    align: 'center',
+    dataIndex: 'form_cost',
+    scopedSlots: { customRender: 'form_cost'}
+  },
+  {
+    title: '付费数',
+    align: 'center',
+    dataIndex: 'event_order_paid',
+    scopedSlots: { customRender: 'event_order_paid'}
+  },
+  {
+    title: '付费成本',
+    align: 'center',
+    dataIndex: 'event_order_paid_cost',
+    scopedSlots: { customRender: 'event_order_paid_cost'}
+  },
+]
+
+
   export default {
     name: 'account-statistics',
     components: {
@@ -574,6 +739,18 @@
 
     data: function () {
       return {
+         // 实时数据
+        realTimeVisiable:false,
+        realTimeColumn,
+        realTimeData:[],
+        scrollX:2500,
+        realTimeLoading:false,
+        dateValue:[moment(),moment()],
+        realTimeRecords:{},
+
+        // 实时数据
+
+
         clickTrackUrl: "",
         loadingMoney: false,
         loadingState: false,
@@ -758,9 +935,138 @@
           15: "购买联盟广告无门槛要求"
         }
         return data[sta]
+      },
+      toPercentage(val) {
+      if(val){
+          if(typeof val != 'string'){
+            return (val * 100).toFixed(2) + '%'
+          }else{
+            return val
+          }
+      }else if(typeof val =='string'){
+            return val
+        }
+      else{
+        return 0
+      }    
+    },
+    //保留两位小数并且变成货币格式
+      decimalsHandle(val){
+          
+          if(val && typeof val !='string'){
+              if(val>=0){
+                  val=parseFloat(val).toFixed(2);
+                  let numberStr = val.toString()
+                  let str = numberStr.split('.')
+                  
+                  let str0=str[0].split('').reverse();
+                  for (let i = 0; i < str0.length; i++) {
+                      if ((i + 1) % 4 === 0) {
+                          str0.splice(i, 0, ',')
+                      }
+                  }
+                  str0.reverse()
+                  let handleResult = ''
+                  for (let j = 0; j < str0.length; j++) {
+                      handleResult += str0[j]
+                  }
+                  
+                  return handleResult+'.'+str[1]
+              }else{
+                  val=parseFloat(val).toFixed(2);
+                  let numberStr = val.toString()
+                  let str = numberStr.split('.')
+                  
+                  let str0=str[0].substr(1).split('').reverse();
+                  for (let i = 0; i < str0.length; i++) {
+                      if ((i + 1) % 4 === 0) {
+                          str0.splice(i, 0, ',')
+                      }
+                  }
+                  str0.reverse()
+                  let handleResult = ''
+                  for (let j = 0; j < str0.length; j++) {
+                      handleResult += str0[j]
+                  }
+                  
+                  return '-'+handleResult+'.'+str[1]
+              }
+              
+          }else if(typeof val =='string'){
+              return val
+          }
+          else{
+              return 0
+          }           
+      },
+      //变成货币格式
+      formatCurrency(val){
+        if((val||val==0)&& typeof val !='string'){
+            let numberStr = val.toString()
+          let str = numberStr.split('').reverse()
+          for (let i = 0; i < str.length; i++) {
+              if ((i + 1) % 4 === 0) {
+              str.splice(i, 0, ',')
+              }
+          }
+          str.reverse()
+          let handleResult = ''
+          for (let j = 0; j < str.length; j++) {
+              handleResult += str[j]
+          }
+          return handleResult
+        }else if(typeof val =='string'){
+              return val
+        }
+        else{
+          return '-'
+        }
+          
       }
+
+
     },
     methods: {
+       disabledDate(current) {
+        // console.log(current)
+          return current && current > moment() || current&& current< moment().subtract(7,'days')
+        },
+      // 查看实时数据
+      realTimedata(records){
+        console.log(records);
+        this.realTimeRecords=records
+        this.realTimeVisiable=true;
+        this.realTimeHttp()
+      },
+      dateValueChange(date,dateString){
+        this.realTimeHttp()
+      },
+      // 获取实时数据请求
+      realTimeHttp(){
+        this.realTimeLoading=true;
+        postAction('/kuaishou/realTime/getUnitDate',{
+          accountId:this.realTimeRecords.accountId,
+          unitId:this.realTimeRecords.unitId,
+          startDate:this.dateValue[0].format('YYYY-MM-DD'),
+          endDate:this.dateValue[1].format('YYYY-MM-DD')
+        }).then(res=>{
+          console.log(res)
+          this.realTimeData=[];
+          this.realTimeLoading=false;
+          if(res.success){
+            if(res.result){
+              res.result.forEach(item=>{
+                item.unitName=this.realTimeRecords.unitName
+              })
+              
+              this.realTimeData=res.result
+            }
+           
+          }
+          
+        })
+      },
+
       sort(pagination, filters, sorter, {
         currentDataSource
       }) {

+ 1 - 1
src/views/modules/material/modules/labelModal.vue

@@ -202,7 +202,7 @@
         form: this.$form.createForm(this),
 
         iconChooseVisible: false,
-        validateStatus:""
+        validateStatus:"",
       }
     },
     computed:{

+ 77 - 5
src/views/modules/material/videoMaterial.vue

@@ -1,4 +1,5 @@
 <style lang="scss">
+
 .is-disabled .el-checkbox__inner {
   display: none !important;
 }
@@ -78,6 +79,40 @@ li.chouzhen.first:before {
   background: rgba(0, 0, 0, 0.5);
   border-radius: 2px;
 }
+.table-page-search-wrapper{
+  .el-cascader .el-input {
+    cursor: pointer;
+    height: 100%;
+  }
+  .el-cascader .el-input .el-input__inner {
+    text-overflow: ellipsis;
+    height: 100%;
+    position: relative;
+    top: -4px;
+  }
+  .el-cascader .el-input .el-icon-arrow-down {
+    -webkit-transition: -webkit-transform .3s;
+    transition: -webkit-transform .3s;
+    transition: transform .3s;
+    transition: transform .3s, -webkit-transform .3s;
+    transition: transform .3s,-webkit-transform .3s;
+    font-size: 14px;
+    position: relative;
+    top: -4px;
+  }
+  .el-cascader .el-input .el-icon-arrow-down.is-reverse {
+    -webkit-transform: rotateZ(180deg);
+    transform: rotateZ(180deg);
+    position: relative;
+    top: 2px;
+  }
+   .el-cascader .el-input .el-input__inner .el-input__icon.el-icon-arrow-down {
+    text-overflow: ellipsis;
+    height: 100%;
+    position: relative;
+    top: 0px;
+  }
+}
 </style>
 <style lang="scss" scoped>
 .chouzhen {
@@ -307,6 +342,7 @@ a {
     }
   }
 }
+ 
 </style>
 <template>
   <a-card :bordered="false" class="only-video-material-disable">
@@ -332,16 +368,26 @@ a {
                 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>
           <!--  -->
           <a-col :md="8" :sm="8">
             <a-form-item label="唯一标识">
               <a-input placeholder="请输入素材唯一标识" v-model="queryParam.code"></a-input>
-              <!--              <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>
+          <a-col :md="8" :sm="8">
+            <a-form-item label="视频标签">             
+               <el-cascader
+                placeholder="请选择视频的标签"
+                v-model="labelValue"
+                :options="options"
+                :props="{ checkStrictly: true ,value:'tagCode',label:'tagName',expandTrigger: 'hover'}"
+                clearable
+                style="width:100%;height:32px"
+                filterable></el-cascader>
             </a-form-item>
           </a-col>
           <a-col :md="8" :sm="8">
@@ -1654,6 +1700,9 @@ export default {
 
   data() {
     return {
+      // 标签的数据
+      labelValue:[],
+      options:[],
       departTree: [],
       departTreeModality: [],
       departTreeContent: [],
@@ -1774,7 +1823,7 @@ export default {
         name: '',
       },
       url: {
-        list: '/ctop/materialInfo/list',
+        list: '/ctop/materialInfo/listV2',
       },
       detail: false,
       form: this.$form.createForm(this),
@@ -1889,6 +1938,17 @@ export default {
         }
       })
     }, 1000)
+
+    getAction('/ctop/tagInfo/treeList',{
+      pageSize:10000
+    }).then(res=>{
+      console.log(res);
+      if(res.success){
+        this.options=res.result.records
+      }else{
+        this.$message.error('数据请求失败!')
+      }
+    })
   },
   watch: {
     $route: function (n, o) {
@@ -1911,6 +1971,18 @@ export default {
         closeAllVideoFun()
       }
     },
+
+    labelValue:{
+      deep:true,
+      handler(n,o){
+        if(n.length>=1){
+           this.queryParam.tagCode=n[n.length-1]
+        }else{
+          this.queryParam.tagCode='';
+        }
+        // this.loadData()
+      }
+    }
   },
   methods: {
     modalFormOkElse() {

+ 8 - 5
vue.config.js

@@ -59,17 +59,20 @@ module.exports = {
     proxy: {
       '/jeecg-boot': {
         //  target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+
         // target: 'http://192.168.0.59: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:8088', //请求本地 需要jeecg-boot后台项目  孙震
-        // target: 'http://192.168.0.230:8088', //请求本地 需要jeecg-boot后台项目  孙震
-        // target: 'http://192.168.1.51: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://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
+
+        // target: 'http://192.168.1.94:8081', //请求本地 需要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后台项目