zhuxinbo пре 5 година
родитељ
комит
daf989bc15

+ 21 - 6
src/views/modules/Statistics/videoStatics/vDay.vue

@@ -84,7 +84,7 @@
       
     >
       <div slot="videoU" slot-scope="test,records">
-        <img  :src="records.url+'?x-oss-process=video/snapshot,t_0,m_fast'"  alt=""  style="width:140px"  @click="openVideo(records.url)">
+        <img  :src="records.url+'?x-oss-process=video/snapshot,t_0,m_fast'"  alt=""  style="width:140px"  @click="openVideo(records.url)" @load="loadShow">
 
       </div>
       <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
@@ -253,10 +253,11 @@ let variableCol = [
     sorter: (a, b) => a.convertRate - b.convertRate
   }
 ]
-
+let show = 0
 export default {
   data() {
     return {
+        roleCode: localStorage.getItem('roleCode'),
       //下拉选择框的数据
       projectArr:[],
       selectValue:'',
@@ -307,7 +308,7 @@ export default {
    watch:{
       'ipagination.current':function(n,o){
           console.log(n,o)
-          if(this.appId.length>0){
+          if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
             this.HttpPost()
           }
           
@@ -316,6 +317,15 @@ export default {
   mixins: [JeecgListMixin],
   methods: {
     moment,
+    loadShow(){
+        show++
+        console.log(show)
+        if(this.data.length>0){
+            if(show == (this.data.length*2)){
+                this.data = [...this.data]
+            }
+        }
+    },
     //select切换---项目
     selectChange(key){
         this.selectValue=key;
@@ -350,7 +360,7 @@ export default {
       this.timedata=moment(yesterday).format('YYYY-MM-DD')
       // this.totalSelect = 1
       // this.daysFlag = true
-      if(this.appId.length>0){
+      if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
         this.HttpPost();
       }else{
           this.$message.error('请选择项目')
@@ -361,6 +371,7 @@ export default {
     HttpPost(){
       this.loading = true
       this.date = []
+      show = 0
       postAction('/toutiao/videoReportDaily/bytedanceVideoInfoListDaily', {
         date: this.timedata,
         cost: this.consumeValue,
@@ -387,7 +398,7 @@ export default {
     //查询按钮
     searchRes() {
       console.log(this.timedata[0])
-      if(this.appId.length>0){
+      if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
         this.HttpPost();
       }else{
           this.$message.error('请选择项目')
@@ -558,7 +569,11 @@ export default {
   mounted() {
       this.dateRange=moment().subtract(1,'days')  
       this.timedata=moment().subtract(1,'days').format('YYYY-MM-DD')
-    //   this.HttpPost();
+    if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
+        this.HttpPost();
+      }else{
+          this.$message.error('请选择项目')
+      }
   },
 
 }

+ 20 - 6
src/views/modules/Statistics/videoStatics/vMonth.vue

@@ -92,7 +92,7 @@
       </span>
 
       <div slot="videoU" slot-scope="test,records">
-        <img  :src="records.url+'?x-oss-process=video/snapshot,t_0,m_fast'"  alt="" style="width:140px" @click="openVideo(records.url)">
+        <img  :src="records.url+'?x-oss-process=video/snapshot,t_0,m_fast'"  alt="" style="width:140px" @click="openVideo(records.url)" @load="loadShow">
       </div>
       <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
       <span
@@ -287,7 +287,7 @@ let variableCol = [
   }
 ]
 let length=0
-
+let show=0
 let detailConsum = [
   {
     title: '客户',
@@ -350,6 +350,7 @@ let detailConsum = [
 export default {
   data() {
     return {
+        roleCode: localStorage.getItem('roleCode'),
        //下拉选择框的数据
       projectArr:[],
       selectValue:'',
@@ -411,7 +412,7 @@ export default {
   watch:{
       'ipagination.current':function(n,o){
           console.log(n,o)
-          if(this.appId.length>0){
+           if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
             this.HttpPost()
           }
           
@@ -454,7 +455,7 @@ export default {
       this.totalSelect = (this.dateRange[1]._d - this.dateRange[0]._d) / (24 * 60 * 60 * 1000) + 1;
       this.timedata=[this.dateRange[0]._i,this.dateRange[1]._i]
       this.daysFlag = true
-      if(this.appId.length>0){
+       if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
           this.HttpPost();
       }else{
           this.$message.error('请选择项目')
@@ -467,6 +468,7 @@ export default {
     HttpPost(){
       this.loading=true;
       this.date=[];
+      show = 0
        postAction('/toutiao/videoReportDaily/bytedanceVideoInfoListMonth', {
         startDate: this.timedata[0],
         endDate: this.timedata[1],
@@ -494,7 +496,7 @@ export default {
     },
     //查询按钮
     searchRes() {
-        if(this.appId.length>0){
+         if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
             this.HttpPost(); 
         }else{
             this.$message.error('请选择项目')
@@ -568,7 +570,14 @@ export default {
         this.scrollX = 0
       }
     },
-
+    loadShow(){
+        show++
+        if(this.data.length>0){
+            if(show == (this.data.length*2)){
+                this.data = [...this.data]
+            }
+        }
+    },
     //弹出框确定
     handleOk(e) {
       this.loading = false
@@ -756,6 +765,11 @@ export default {
       this.totalSelect = (this.dateRange[1]._d - this.dateRange[0]._d) / (24 * 60 * 60 * 1000) + 1;
       this.timedata=[this.dateRange[0]._i,this.dateRange[1]._i]
       this.daysFlag = true
+      if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
+        this.HttpPost();
+      }else{
+          this.$message.error('请选择项目')
+      }
 
   },
 }

+ 27 - 9
src/views/modules/Statistics/videoStatics/vSummary.vue

@@ -96,6 +96,7 @@
           alt
           style="width:140px"
           @click="openVideo(records.url)"
+          @load="loadShow"
         />
       </div>
       <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
@@ -272,10 +273,11 @@ let variableCol = [
     sorter: (a, b) => a.convertRate - b.convertRate
   }
 ]
-
+let show = 0
 export default {
   data() {
     return {
+      roleCode: localStorage.getItem('roleCode'),
        //下拉选择框的数据
       projectArr:[],
       selectValue:'',
@@ -344,7 +346,7 @@ export default {
     //查询按钮
     searchRes() {
       this.date = []
-      if(this.appId.length>0){
+      if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
         this.HttpPost();
       }else{
           this.$message.error('请选择项目')
@@ -354,6 +356,7 @@ export default {
     //网络请求table数据函数
     HttpPost(){
       this.loading=true;
+      show = 0
       postAction('/toutiao/videoReportDaily/videoInfoListTotal', {
         startDate: this.timedata[0],
         endDate: this.timedata[1],
@@ -364,21 +367,24 @@ export default {
         projectIds:this.appId
       }).then(res => {
         let resArr = []
-        this.loading = false
-        console.log(res)
+        
         if (res.success) {
-          let result = res.result
+        //   let result = res.result
         //   this.data.push({ ...result, key: 1 })
         //   result.map((item, index) => {
         //     item.key = index
         //   })
-          this.data = result.list.map((item,index)=>{
+          this.data = res.result.list.map((item,index)=>{
               return {
                   ...item,
                   key:index
               }
           })
-          this.ipagination.total = result.total
+          this.ipagination.total = res.result.total
+          this.loading = false
+          
+        }else{
+            this.loading = false
         }
       })
     },
@@ -500,6 +506,14 @@ export default {
     handleCancel(e) {
       this.visible = false
     },
+    loadShow(){
+        show++
+        if(this.data.length>0){
+            if(show == (this.data.length*2)){
+                this.data = [...this.data]
+            }
+        }
+    },
     //弹出框里的搜索框
     onSearch(value) {
       console.log(value)
@@ -579,7 +593,7 @@ export default {
   watch:{
       'ipagination.current':function(n,o){
           console.log(n,o)
-          if(this.appId.length>0){
+          if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
             this.HttpPost()
           }
           
@@ -663,7 +677,11 @@ export default {
     this.dateRange=[moment().subtract(1,'days'),moment()]
     this.timedata=[moment().subtract(1,'days').format('YYYY-MM-DD'),moment().format('YYYY-MM-DD')]
     // this.loading=true;
-    // this.HttpPost();
+    if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
+        this.HttpPost();
+      }else{
+          this.$message.error('请选择项目')
+      }
     
   }
 }

+ 23 - 5
src/views/modules/Statistics/videoStatics/vWeek.vue

@@ -92,7 +92,7 @@
       </span>
 
       <div slot="videoU" slot-scope="test,records">
-       <img  :src="records.url+'?x-oss-process=video/snapshot,t_0,m_fast'"  alt="" style="width:140px" @click="openVideo(records.url)">
+       <img  :src="records.url+'?x-oss-process=video/snapshot,t_0,m_fast'"  alt="" style="width:140px" @click="openVideo(records.url)"  @load="loadShow">
       </div>
       <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
       <span
@@ -342,9 +342,11 @@ let detailConsum = [
     align: 'center'
   }
 ]
+let show = 0
 export default {
   data() {
     return {
+        roleCode: localStorage.getItem('roleCode'),
        //下拉选择框的数据
       projectArr:[],
       selectValue:'',
@@ -396,7 +398,8 @@ export default {
      watch:{
       'ipagination.current':function(n,o){
           console.log(n,o)
-          if(this.appId.length>0){
+         
+          if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
             this.HttpPost()
           }
           
@@ -413,6 +416,14 @@ export default {
   mixins: [JeecgListMixin],
   methods: {
     moment,
+    loadShow(){
+        show++
+        if(this.data.length>0){
+            if(show == (this.data.length*2)){
+                this.data = [...this.data]
+            }
+        }
+    },
     //select切换---项目
     selectChange(key){
         this.selectValue=key;
@@ -445,7 +456,8 @@ export default {
       this.totalSelect = 7
       this.daysFlag = true
       this.timedata=[moment(this.dateRange[0]).format('YYYY-MM-DD'),moment(this.dateRange[1]).format('YYYY-MM-DD')]
-      if(this.appId.length>0){
+      
+          if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
         this.HttpPost();
       }else{
           this.$message.error('请选择项目')
@@ -458,6 +470,7 @@ export default {
     HttpPost(){
       this.date = []
       this.loading = true
+      show = 0
       postAction('/toutiao/videoReportDaily/bytedanceVideoInfoListWeek', {
         startDate: this.timedata[0],
         endDate: this.timedata[1],
@@ -469,7 +482,6 @@ export default {
       }).then(res => {
         let resArr = []
         this.loading = false
-        console.log(res)
         if (res.success) {
           let result = res.result
           this.data = result.list.map((item,index)=>{
@@ -484,7 +496,8 @@ export default {
     },
     //查询按钮
     searchRes() {
-      if(this.appId.length>0){
+      
+      if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
         this.HttpPost();
       }else{
           this.$message.error('请选择项目')
@@ -732,6 +745,11 @@ export default {
   },
   mounted() {
     // this.lastWeekHandle();
+    if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
+        this.HttpPost();
+      }else{
+          this.$message.error('请选择项目')
+      }
   },
 }
 </script>