Browse Source

[UPDATE] delete console.log

11868 1 year ago
parent
commit
783190f88a

+ 6 - 51
src/components/hk/hkCamara.vue

@@ -43,12 +43,10 @@ export default {
     window.removeEventListener("resize", this.handleResize);
   },
   mounted() {
-
     //浏览器界面大小
-    console.log("1: ",document.body.clientWidth ,document.body.clientHeight)
-    console.log("2: ",window.screen.height , window.devicePixelRatio,window.screen.height * window.devicePixelRatio)
-    console.log("3: ",window.screen.width , window.devicePixelRatio,window.screen.width * window.devicePixelRatio)
-
+    // console.log("1: ",document.body.clientWidth ,document.body.clientHeight)
+    // console.log("2: ",window.screen.height , window.devicePixelRatio,window.screen.height * window.devicePixelRatio)
+    // console.log("3: ",window.screen.width , window.devicePixelRatio,window.screen.width * window.devicePixelRatio)
     this.videoInitPlugin();
   },
   destroyed() {
@@ -98,7 +96,7 @@ export default {
       console.log("🚀 插入插件");
       let h
       let w
-      console.log("0: ",document.body.clientWidth ,document.body.clientHeight)
+      // console.log("0: ",document.body.clientWidth ,document.body.clientHeight)
       if(document.body.clientWidth>=(document.body.clientHeight*2)){
         h=document.body.clientHeight
         w=document.body.clientHeight*(2200/1080)
@@ -106,51 +104,8 @@ export default {
         h=document.body.clientWidth/(2200/1080)
         w=document.body.clientWidth
       }
-
-      var s = "";
-      s += " 网页可见区域宽:"+ document.body.clientWidth+"\n";
-      s += " 网页可见区域高:"+ document.body.clientHeight+"\n";
-
-      s += " 网页可见区域宽:"+ document.body.offsetWidth+" (包括边线和滚动条的宽)"+"\n";
-      s += " 网页可见区域高:"+ document.body.offsetHeight+" (包括边线的宽)"+"\n";
-
-      s += " 网页正文全文宽:"+ document.body.scrollWidth+"\n";
-      s += " 网页正文全文高:"+ document.body.scrollHeight+"\n";
-
-      s += " 网页被卷去的高:"+ document.body.scrollTop+"\n";
-      s += " 网页被卷去的左:"+ document.body.scrollLeft+"\n";
-
-      s += " 网页正文部分上:"+ window.screenTop+"\n";
-      s += " 网页正文部分左:"+ window.screenLeft+"\n";
-
-      s += " 屏幕分辨率的高:"+ window.screen.height+"\n";
-      s += " 屏幕分辨率的宽:"+ window.screen.width+"\n";
-
-      s += " 屏幕可用工作区高度:"+ window.screen.availHeight+"\n";
-      s += " 屏幕可用工作区宽度:"+ window.screen.availWidth+"\n";;
-
-      s += " 你的屏幕设置是 "+ window.screen.colorDepth +" 位彩色"+"\n";
-      s += " 你的屏幕设置 "+ window.screen.deviceXDPI +" 像素/英寸"+"\n";
-
-      const divElement = document.querySelector('.map_more_box');
-      s += " 1你的屏幕设置是 "+divElement.clientWidth+"\n";//元素高度+内边距
-      s += " 2你的屏幕设置是 "+divElement.clientHeight+"\n";//元素高度+内边距+滚动条+边框
-      s += " 3你的屏幕设置是 "+divElement.offsetWidth+"\n";//元素内容高度(包括溢出不可见内容)
-      s += " 4你的屏幕设置是 "+divElement.clientHeight+"\n";//元素左上角相对父级左上角的偏移量
-      s += " 5你的屏幕设置是 "+divElement.scrollWidth+"\n";//元素内容高度(包括溢出不可见内容)
-      s += " 6你的屏幕设置是 "+divElement.scrollHeight+"\n";//元素左上角相对父级左上角的偏移量
-      console.log(s)
-
-      // let h1
-      // let w1
-      // w1=divElement.clientWidth
-      // h1=divElement.clientHeight
-
-      console.log("1: ",w ,h)
-      console.log("1: ", w/2.43, h/3.05)
-
-      // console.log("2: ",w1 ,h1)
-      // console.log("2: ",w1*0.8,h1*0.7)
+      // console.log("1: ",w ,h)
+      // console.log("1: ", w/2.43, h/3.05)
       WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin1").then(() => {
         WebVideoCtrl.I_Resize(
             w/2.43,

+ 8 - 4
src/components/hk/hkv.vue

@@ -62,7 +62,7 @@ export default {
         w=document.body.clientWidth
       }
       setTimeout(() => {
-        console.log("this.zoom :>> ", this.zoom);
+        // console.log("this.zoom :>> ", this.zoom);
         WebVideoCtrl.I_Resize(
           // 380 / (this.zoom / 1.25),
           // 260 / (this.zoom / 1.25)
@@ -108,7 +108,7 @@ export default {
       console.log("🚀 插入插件");
       let h
       let w
-      console.log("0: ",document.body.clientWidth ,document.body.clientHeight)
+      // console.log("0: ",document.body.clientWidth ,document.body.clientHeight)
       if(document.body.clientWidth>=(document.body.clientHeight*2)){
         h=document.body.clientHeight
         w=document.body.clientHeight*(2200/1080)
@@ -136,15 +136,19 @@ export default {
     async getLoginParams() {
       var loginParams = {};
       var that = this;
-      for (const item of that.companyVideoData) {
+      let videoData = JSON.parse(JSON.stringify(that.companyVideoData))
+      for (const item of videoData) {
+        // console.log("item of video data: " , item)
         if (item !== undefined) {
-          let loginParam = {}
           const key = JSON.stringify(item);
+          // console.log("key:", key)
           if (!loginParams.hasOwnProperty(key)) {
             loginParams[key] = item;
+            // console.log("loginParamsTemp:", loginParams)
           }
         }
       }
+      console.log("paras: ", loginParams)
       return loginParams;
     },
     async login(loginParams) {

+ 22 - 23
src/components/hk/monitorHK.vue

@@ -46,9 +46,9 @@ export default {
     //   this.videoInitPlugin();
     // }
     //浏览器界面大小
-    console.log("1: ",document.body.clientWidth ,document.body.clientHeight)
-    console.log("2: ",window.screen.height , window.devicePixelRatio,window.screen.height * window.devicePixelRatio)
-    console.log("3: ",window.screen.width , window.devicePixelRatio,window.screen.width * window.devicePixelRatio)
+    // console.log("1: ",document.body.clientWidth ,document.body.clientHeight)
+    // console.log("2: ",window.screen.height , window.devicePixelRatio,window.screen.height * window.devicePixelRatio)
+    // console.log("3: ",window.screen.width , window.devicePixelRatio,window.screen.width * window.devicePixelRatio)
 
     this.videoInitPlugin();
   },
@@ -87,10 +87,10 @@ export default {
     initPlugin() {
       // console.log("窗口信息", I_GetWindowStatus(0))
       this.currentnum = this.num
-      console.log(1)
-      console.log(this.num)
-      console.log("isInteger11", isInteger(this.num))
-      console.log("isInteger22", isInteger(parseInt(this.num)))
+      // console.log(1)
+      // console.log(this.num)
+      // console.log("isInteger11", isInteger(this.num))
+      // console.log("isInteger22", isInteger(parseInt(this.num)))
       this.iWndowType = Math.sqrt(this.num);
 
       console.log('this.iWndowType :>> ', this.iWndowType);
@@ -121,7 +121,7 @@ export default {
       console.log("🚀 插入插件");
       let h
       let w
-      console.log("0: ", document.body.clientWidth, document.body.clientHeight)
+      // console.log("0: ", document.body.clientWidth, document.body.clientHeight)
       if (document.body.clientWidth >= (document.body.clientHeight *(2200 / 1080))) {
         h = document.body.clientHeight
         w = document.body.clientHeight * (2200 / 1080)
@@ -129,7 +129,7 @@ export default {
         h = document.body.clientWidth / (2200 / 1080)
         w = document.body.clientWidth
       }
-      console.log("w:h: ", w / 2.43, h / 3.05)
+      // console.log("w:h: ", w / 2.43, h / 3.05)
       // 检查插件是否最新
       //   if (-1 == WebVideoCtrl.I_CheckPluginVersion()) {
       //     alert("检测到新的插件版本,请双击WebComponents.exe插件,进行升级!");
@@ -476,10 +476,9 @@ export default {
 
     stopallPlayVideo(a) {//暂停播放多个视频
       // parseInt(myString) //istring转换int
-      console.log("里边的a为:",a)
       a.forEach(function(element) {
-        console.log(element);
-        console.log(parseInt(element));
+        // console.log(element);
+        // console.log(parseInt(element));
         WebVideoCtrl.I_Stop({
           iWndIndex: parseInt(element),
         });
@@ -491,29 +490,29 @@ export default {
   watch: {
     currentnum:{
       handler(val, oldval) {
-        console.log("watchnum11:",this.currentnum, this.num)
-        console.log("watchnum12:",val, oldval)
+        // console.log("watchnum11:",this.currentnum, this.num)
+        // console.log("watchnum12:",val, oldval)
       }
     },
 
     bofang: {
       handler(val, oldval) {
-        console.log("chooseData666:", this.chooseData)
-        console.log("chooseData6662:", val, oldval)
+        // console.log("chooseData666:", this.chooseData)
+        // console.log("chooseData6662:", val, oldval)
       },
     },
 
     chooseData: {
       handler(val, oldval) {
-        console.log("chooseData666:", this.chooseData)
-        console.log("chooseData6662:", val, oldval)
+        // console.log("chooseData666:", this.chooseData)
+        // console.log("chooseData6662:", val, oldval)
       },
     },
 
     num:{
       handler(val, oldval) {
-        console.log("watchnum21:", this.currentnum, this.num)
-        console.log("watchnum22:", val, oldval)
+        // console.log("watchnum21:", this.currentnum, this.num)
+        // console.log("watchnum22:", val, oldval)
         WebVideoCtrl.I_ChangeWndNum(Math.sqrt(this.num))
 
         let that = this;
@@ -534,9 +533,9 @@ export default {
 
     companyVideoData: {
       handler(val, oldval) {
-        console.log("watchnum121:",this.currentnum, this.num)
-        console.log("watchnum122:",val, oldval)
-        console.log("watchnum123:",val.length, oldval)
+        // console.log("watchnum121:",this.currentnum, this.num)
+        // console.log("watchnum122:",val, oldval)
+        // console.log("watchnum123:",val.length, oldval)
 
         if(val.length==1){
           this.num=1

+ 24 - 36
src/views/historicTaskScreen.vue

@@ -948,7 +948,10 @@ export default {
     pagedData() { // 动态计算当前页的数据
       const start = (this.gridData2.currentPage - 1) * this.gridData2.pageSize
       const end = start + this.gridData2.pageSize
-      if(this.gridData2.data!=null){
+      // console.log("hhhh0:  ",this.gridData2.data )
+      // console.log("hhhh0:  ",this.gridData2.data.length,this.gridData2.length )
+      // if(this.gridData.data!=null){
+      if(this.gridData2.data.length!=0){
         // console.log("hhhh1:  ",start+"---"+end )
         // console.log("hhhh2:  ",this.gridData2.data )
         // console.log("hhhh3:  ",this.gridData2.data.slice(start, end) )
@@ -986,7 +989,6 @@ export default {
       let a
       // console.log("参数:  "+this.gridData2.paged+" "+this.gridData2.pageSize+" "+index)
       a=((this.gridData2.currentPage - 1) * this.gridData2.pageSize + (index + 1))
-      // console.log(".....a  "+a)
       return a;
     },
     onCurrentPageChange (newCurrentPage) {
@@ -1015,7 +1017,6 @@ export default {
      * @param {Integer} newPageSize 变化后的每页显示数量
      */
     onPageSizeChange (newPageSize) {
-      // console.log("hhhh2:  ",newPageSize )
       this.gridData2.pageSize = newPageSize;
       this.gridData2.currentPage = 1
       this.loadTableDataImpl2(1, newPageSize).then(() => {
@@ -1035,6 +1036,9 @@ export default {
     loadTableDataImpl2 (pageNum, pageSize, reload = false) {
       // console.log("11:  ",pageNum+"---"+pageSize+"---"+reload)
       // 判断是否需要重新加载数据
+      if (this.gridData2.data.length == 0 || this.gridData2.length == 0) {
+        return Promise.resolve([])
+      }
       if (reload || !this.gridData2.data || this.gridData2.data.length === 0) {
         // 调用后端接口或其他数据来源获取数据
         // 这里省略具体实现
@@ -1181,19 +1185,15 @@ export default {
                         const element = document.getElementById('chart-earth');
                         if (element.requestFullScreen) {
                           // HTML W3C 提议
-                          console.log(1)
                           element.requestFullScreen()
                         } else if (element.msRequestFullscreen) {
                           // IE11
-                          console.log(2)
                           element.msRequestFullScreen()
                         } else if (element.webkitRequestFullScreen) {
                           // Webkit (works in Safari5.1 and Chrome 15)
-                          console.log(3)
                           element.webkitRequestFullScreen()
                         } else if (element.mozRequestFullScreen) {
                           // Firefox (works in nightly)
-                          console.log(4)
                           element.mozRequestFullScreen()
                         }
 
@@ -1311,18 +1311,7 @@ export default {
       if(this.myChart1 !=null && this.myChart1  != "" && this.myChart1  != undefined){
         this.myChart1.dispose();
       }
-      // if(document.getElementById('mapData')){
-      // if(echarts.init(document.getElementById('mapData'),'dark')) {
-      // console.log("000",this)
-      // console.log("001",this.myChart1)
-      // console.log("002",document)
-      // console.log("003",document.getElementById('mapData'))
-      // console.log("004",echarts.init(document.getElementById('mapData'),'dark'))
       this.myChart1  = echarts.init(document.getElementById('mapData'),'dark');
-      console.log("100",this)
-      // console.log("101",this.myChart1)
-      // }
-      // }
 
       echarts.registerMap('taiyuan', uploadedDataURL);
       var chinaGeoCoordMap = this.taiYuanMapData
@@ -1567,10 +1556,6 @@ export default {
           }
         })
 
-        // console.log("21",data)
-        // console.log("21",data.length)
-        // console.log("2",this.$route.query.key1)
-
         data.forEach((item, index) => {
           console.log(`Index: ${index}, Value: ${item}`);
           if(item.taskId==this.$route.query.key1){
@@ -1721,8 +1706,7 @@ export default {
               }
             ])
           })
-          console.log("666",echarts.version);
-          console.log("667",this);
+          // console.log("666",echarts.version);
           // this.initechartsMap()
 
           this.echartMapFlag=false
@@ -2064,7 +2048,7 @@ export default {
         this.danweiweidu.length=value.length
         this.danweiweidu.totalPage= (value.length)/(this.danweiweidu.pageSize)
         this.danweiweidu.totalPage=Math.ceil(this.danweiweidu.totalPage);
-        console.log("数据量,页面数据量,当前页面,页面数",value.length,this.danweiweidu.pageSize,this.danweiweidu.currentPage,this.danweiweidu.totalPage)
+        // console.log("数据量,页面数据量,当前页面,页面数",value.length,this.danweiweidu.pageSize,this.danweiweidu.currentPage,this.danweiweidu.totalPage)
         // this.initEchartsSubjectGradeStatistics(category, value)
         // this.updateChart();
         this.updateChart(0);
@@ -2095,7 +2079,7 @@ export default {
         this.xitongweidu.length=value.length
         this.xitongweidu.totalPage= (value.length)/(this.xitongweidu.pageSize)
         this.xitongweidu.totalPage=Math.ceil(this.xitongweidu.totalPage);
-        console.log("数据量,页面数据量,当前页面,页面数",value.length,this.danweiweidu.pageSize,this.danweiweidu.currentPage,this.danweiweidu.totalPage)
+        // console.log("数据量,页面数据量,当前页面,页面数",value.length,this.danweiweidu.pageSize,this.danweiweidu.currentPage,this.danweiweidu.totalPage)
         // this.initEchartsSubjectGradeStatistics(category, value)
         this.updateChart(1);
       } else {
@@ -2164,7 +2148,7 @@ export default {
         const pageData1 = this.danweiweidu.danwei_name.slice(start, end);
         const pageData2 = this.danweiweidu.danwei_grade.slice(start, end);
         // 更新echarts的data选项,设置为当前页的数据
-        console.log("数据",pageData1, pageData2)
+        // console.log("数据",pageData1, pageData2)
         this.initEchartsSubjectGradeStatistics(pageData1, pageData2)
       }
       if (type === 1) {
@@ -2175,16 +2159,16 @@ export default {
         const pageData1 = this.xitongweidu.xitong_name.slice(start, end);
         const pageData2 = this.xitongweidu.xitong_grade.slice(start, end);
         // 更新echarts的data选项,设置为当前页的数据
-        console.log("数据",pageData1, pageData2)
+        // console.log("数据",pageData1, pageData2)
         this.initEchartsTaskMemberGradeOfSystem(pageData1, pageData2)
       }
 
     },
     onCurrentPageChange_grade (newCurrentPage) {
       this.danweiweidu.currentPage=newCurrentPage
-      console.log("1:  ",newCurrentPage )//当前页面
-      console.log("2:  ",this.danweiweidu.pageSize )
-      console.log("3:  ",this.oldPage)
+      // console.log("1:  ",newCurrentPage )//当前页面
+      // console.log("2:  ",this.danweiweidu.pageSize )
+      // console.log("3:  ",this.oldPage)
       this.updateChart()
       this.updateChart(0)
     },
@@ -2193,7 +2177,7 @@ export default {
      * @param {Integer} newPageSize 变化后的每页显示数量
      */
     onPageSizeChange_grade (newPageSize) {
-      console.log("hhhh2:  ",newPageSize )
+      // console.log("hhhh2:  ",newPageSize )
       this.danweiweidu.pageSize = newPageSize;
       this.danweiweidu.currentPage = 1
       this.updateChart()
@@ -3443,11 +3427,15 @@ export default {
     viewManData(item){
       this.dialogType=2
       this.dialogVisible=true
-      console.log('item',item);
       const { subjectScore } = item
-      this.gridData=subjectScore
-      this.gridData2.data=subjectScore
-      this.gridData2.length=this.gridData2.data.length
+      // this.gridData=subjectScore
+      if(subjectScore==null){
+        this.gridData2.data = []
+        this.gridData2.length = this.gridData2.data.length
+      }else{
+        this.gridData2.data = subjectScore
+        this.gridData2.length = this.gridData2.data.length
+      }
     },
     // 全屏事件
     showFull(id){

+ 21 - 26
src/views/mainScreen.vue

@@ -167,9 +167,13 @@ export default {
     pagedData() { // 动态计算当前页的数据
       const start = (this.renwuliebiao.currentPage - 1) * this.renwuliebiao.pageSize
       const end = start + this.renwuliebiao.pageSize
-      console.log("1:  ",start+"---"+end)
-      console.log("12:  ",this.renwuliebiao.data)
-      if(this.renwuliebiao.data!=null){
+      // console.log("hhhh0:  ",this.renwuliebiao.data )
+      // console.log("hhhh0:  ",this.renwuliebiao.data.length,this.renwuliebiao.length )
+      // if(this.gridData.data!=null){
+      if(this.renwuliebiao.data.length!=0){
+        // console.log("hhhh1:  ",start+"---"+end )
+        // console.log("hhhh2:  ",this.renwuliebiao.data )
+        // console.log("hhhh3:  ",this.renwuliebiao.data.slice(start, end) )
         return this.renwuliebiao.data.slice(start, end)
       }else{
         return null
@@ -183,21 +187,16 @@ export default {
      * @param {Integer} newCurrentPage 变化后的显示页面
      */
     onCurrentPageChange (newCurrentPage) {
-
-      console.log("h1:",newCurrentPage,this.renwuliebiao.pageSize)
       this.loadTableDataImpl1(newCurrentPage, this.renwuliebiao.pageSize).then(() => {//数据加载成功
         this.renwuliebiao.currentPage = newCurrentPage;
         this.oldPage = this.renwuliebiao.currentPage-1
-        console.log("h1_1",this.renwuliebiao.data.length,newCurrentPage*this.renwuliebiao.pageSize)
         if(this.renwuliebiao.data.length <= newCurrentPage*this.renwuliebiao.pageSize){
           this.renwuliebiao.paged=true
         }else{
           this.renwuliebiao.paged=false
         }
-        console.log("h1_2",this.renwuliebiao.paged)
       }).catch(() => {//数据加载失败
         this.renwuliebiao.currentPage = this.oldPage;
-        console.log("h1_3",this.renwuliebiao.currentPage)
       });
     },
     /**
@@ -205,20 +204,14 @@ export default {
      * @param {Integer} newPageSize 变化后的每页显示数量
      */
     onPageSizeChange (newPageSize) {
-      console.log("h2:",newPageSize)
       this.renwuliebiao.currentPage = 1
       this.renwuliebiao.pageSize=newPageSize
       this.loadTableDataImpl1(1, newPageSize).then(() => {
         this.oldPage = this.renwuliebiao.currentPage;
         this.oldPageSize = this.renwuliebiao.pageSize;
-        console.log("h2_1",this.renwuliebiao.currentPage,this.renwuliebiao.pageSize)
-        console.log("h2_2",this.oldPage,this.oldPageSize)
-
       }).catch(e => {
         this.renwuliebiao.currentPage = this.oldPage;
         this.renwuliebiao.pageSize = this.oldPageSize;
-        console.log("h2_3",this.renwuliebiao.currentPage,this.renwuliebiao.pageSize)
-        console.log("h2_4",this.oldPage,this.oldPageSize)
       });
     },
     /**
@@ -227,7 +220,6 @@ export default {
      * @param {String} order 正序还是倒序
      */
     onSortChange ({ prop, order }) {
-      console.log("h3:",prop,order)
       this.orderInfo.fieldName = prop;
       this.orderInfo.asc = (order === 'ascending');
       this.refreshTable();
@@ -239,10 +231,11 @@ export default {
      * @param {Boolean} reload 是否重新获取数据
      */
     loadTableDataImpl1 (pageNum, pageSize, reload = false) {
-      console.log("11:  ",pageNum+"---"+pageSize+"---"+reload)
       // 判断是否需要重新加载数据
+      if (this.renwuliebiao.data.length == 0 || this.renwuliebiao.length == 0) {
+        return Promise.resolve([])
+      }
       if (reload || !this.renwuliebiao.data || this.renwuliebiao.data.length === 0) {
-        console.log("111:")
         // 调用后端接口或其他数据来源获取数据
         // 这里省略具体实现
         // 模拟一个返回结果的 Promise 对象
@@ -265,10 +258,6 @@ export default {
           return this.renwuliebiao.data.slice((pageNum - 1) * pageSize, pageNum * pageSize);
         });
       } else {// 直接返回已有的任务列表数据
-        console.log("112:")
-        console.log("112_1:",pageNum ,pageSize)
-        console.log("112_2:",this.renwuliebiao.data.slice((pageNum - 1) * pageSize,pageNum * pageSize))
-        console.log("112_2:",Promise.resolve(this.renwuliebiao.data.slice((pageNum - 1) * pageSize,pageNum * pageSize)))
         return Promise.resolve(this.renwuliebiao.data.slice((pageNum - 1) * pageSize, pageNum * pageSize));
       }
     },
@@ -308,6 +297,7 @@ export default {
         path:"/taskScreen",
         query:{
           key1:a[5],
+          taskName:a[6],
         }
       });
     },
@@ -677,13 +667,18 @@ export default {
     viewManData(item){
       this.dialogType=2
       this.dialogVisible=true
-      console.log('item',item);
       const { subjectScore } = item
-      this.gridData=subjectScore
+      // this.gridData=subjectScore
+
+      if(subjectScore==null){
+        this.gridData=[]
+      }else{
+        this.gridData=subjectScore
+      }
     },
     // 全屏事件
     showFull(id){
-      console.log('this.camaraData :>> ', this.camaraData);
+      // console.log('this.camaraData :>> ', this.camaraData);
       console.log('ckx debug  监控大屏' )
       this.$router.push(
           {
@@ -695,7 +690,7 @@ export default {
       )
     },
     showFull1(id){
-      console.log('this.camaraData :>> ', this.cardData);
+      // console.log('this.camaraData :>> ', this.cardData);
       console.log('ckx debug  监控大屏' )
       this.$router.push(
           {
@@ -832,7 +827,7 @@ export default {
         };
         this.cardData.push(data);
       }
-      console.log('cardData :>> ', this.cardData);
+      // console.log('cardData :>> ', this.cardData);
       // setTimeout(() => {
 
       //   for(let index = 0; index < this.cardSrc.length;index++)

+ 26 - 133
src/views/monitorScreen.vue

@@ -239,10 +239,8 @@ export default {
     pagedData_bigcamaraData() { // 动态计算当前页的数据
       const start = (this.bigcamaraData.currentPage - 1) * this.bigcamaraData.pageSize
       const end = start + this.bigcamaraData.pageSize
-      if(this.bigcamaraData.data!=null){
-        console.log("hhhh1:  ",start+"---"+end )
-        console.log("hhhh2:  ",this.bigcamaraData.data )
-        console.log("hhhh3:  ",this.bigcamaraData.data.slice(start, end) )
+      // if(this.gridData.data!=null){
+      if(this.bigcamaraData.data.length!=0){
         return this.bigcamaraData.data.slice(start, end)
       }else{
         return null
@@ -251,10 +249,8 @@ export default {
     pagedData_bigcardData() { // 动态计算当前页的数据
       const start = (this.bigcardData.currentPage - 1) * this.bigcardData.pageSize
       const end = start + this.bigcardData.pageSize
-      if(this.bigcardData.data!=null){
-        console.log("hhhh1:  ",start+"---"+end )
-        console.log("hhhh2:  ",this.bigcardData.data )
-        console.log("hhhh3:  ",this.bigcardData.data.slice(start, end) )
+      // if(this.gridData.data!=null){
+      if(this.bigcardData.data.length!=0){
         return this.bigcardData.data.slice(start, end)
       }else{
         return null
@@ -266,67 +262,40 @@ export default {
     async handleChangeWindow(value) {
       console.log("当前更新的窗口",value)
       this.selectWindow=value
-      console.log("this.selectWindow",this.selectWindow)
-    },
-
-    updateSelectedButton(button) {
-      console.log("更新button",this.selectedScreen,button)
-      this.selectedScreen = button;
-
     },
 
-    bofang1(){
-      console.log("播放1",this.bigcardData)
-      console.log("播放2",this.bigcamaraData)
-      this.bigData=this.bigcardData
-      // this.handleChange()
-    },
-    bofang2(){
-      console.log("播放2",this.bigcamaraData)
-      this.bigData=this.bigcamaraData
-    },
     checkWindow(){
       let that = this
-      console.log("this.selectWindow1",this.selectWindow)
+      console.log("this.selectWindow",this.selectWindow)
       let xuanzhongchuangkou = this.selectWindow
       //播放前先停止当前窗口播放其他视频
       this.bigcamaraData.data.forEach(function(obj,index) {
-        console.log(index);
-        // console.log(obj);
-        console.log(obj.windowList);
+        // console.log(index);
+        // console.log(obj.windowList);
         if (obj.windowList.length != 0) {
           obj.windowList.forEach(function (obj, index) {
-            console.log("camaraData序号,数值",index,obj);
+            // console.log("camaraData序号,数值",index,obj);
             if (parseInt(obj) == xuanzhongchuangkou) {//该窗口已播放视频
-              console.log("cardData该窗口已播放视频",this,that);
+              // console.log("cardData该窗口已播放视频",this,that);
               that.$refs.hkbigCamara.stopPlayVideo()
               //删除窗口显示
               that.bigcamaraData.data[index].windowList = that.bigcamaraData.data[index].windowList.filter((element) => element !== that.selectWindow.toString());
-              // if(that.$refs.hkbigCamara.stopPlayVideo()){
-              //   that.bigcamaraData.data[index].windowList = that.bigcamaraData.data[index].windowList.filter((element) => element !== that.selectWindow.toString());
-              // }
-
-
             }
           })
         }
       }),
 
       this.bigcardData.data.forEach(function(obj,index) {
-        console.log(index);
-        // console.log(obj);
-        console.log(obj.windowList);
+        // console.log(index);
+        // console.log(obj.windowList);
         if(obj.windowList.length!=0){
           obj.windowList.forEach(function(obj,index) {
-            console.log("cardData序号,数值",index,obj);
+            // console.log("cardData序号,数值",index,obj);
             if(parseInt(obj)==xuanzhongchuangkou){//该窗口已播放视频
-              console.log("cardData该窗口已播放视频",this,that);
+              // console.log("cardData该窗口已播放视频",this,that);
               that.$refs.hkbigCamara.stopPlayVideo() //暂停播放该视频
               //删除窗口显示
               that.bigcardData.data[index].windowList = that.bigcardData.data[index].windowList.filter((element) => element !== that.selectWindow.toString());
-              // if(that.$refs.hkbigCamara.stopPlayVideo()){
-              //   that.bigcardData.data[index].windowList = that.bigcardData.data[index].windowList.filter((element) => element !== that.selectWindow.toString());
-              // }
             }
           })
         }
@@ -373,11 +342,7 @@ export default {
         //   }
         // });
         this.checkWindow()
-
-        console.log("a", a)
-        console.log("a.index", a.$index)
-        console.log(" this.bigcamaraData", this.bigcamaraData)
-
+        // console.log("a", a)
         this.bofangyuan.Password = a.row.Password
         this.bofangyuan.Port = a.row.Port
         this.bofangyuan.Username = a.row.Username
@@ -389,8 +354,7 @@ export default {
         this.bofangyuan.isbofang = 1
         this.issbofang = 1
 
-        console.log("this.bigcamaraData.data[a.$index]", this.bigcamaraData.data[a.$index])
-        console.log("this.bofangyuan", this.bofangyuan)
+        // console.log("this.bofangyuan", this.bofangyuan)
         // 定义一个空数组对象
         let myArray = [];
         // 将对象添加到数组中
@@ -413,7 +377,7 @@ export default {
       this.bigcamaraData.data[a.$index].windowList = this.bigcamaraData.data[a.$index].windowList.filter((element) => element !== this.selectWindow.toString());
     },
     stopall_bigcamaraData(a){
-      console.log("windowList",this.bigcamaraData.data[a.$index].windowList)
+      // console.log("windowList",this.bigcamaraData.data[a.$index].windowList)
       this.$refs.hkbigCamara.stopallPlayVideo(this.bigcamaraData.data[a.$index].windowList)
       this.bigcamaraData.data[a.$index].windowList.splice(0, this.bigcamaraData.data[a.$index].windowList.length)
     },
@@ -422,7 +386,7 @@ export default {
       this.bigcardData.data[a.$index].windowList = this.bigcardData.data[a.$index].windowList.filter((element) => element !== this.selectWindow.toString());
     },
     stopall_bigcardData(a){
-      console.log("windowList",this.bigcardData.data[a.$index].windowList)
+      // console.log("windowList",this.bigcardData.data[a.$index].windowList)
       this.$refs.hkbigCamara.stopallPlayVideo(this.bigcardData.data[a.$index].windowList)
       this.bigcardData.data[a.$index].windowList.splice(0, this.bigcardData.data[a.$index].windowList.length)
     },
@@ -465,11 +429,7 @@ export default {
         //   }
         // });
         this.checkWindow()
-
-        console.log("a",a)
-        console.log("a.index",a.$index)
-        console.log(" this.bigcardData", this.bigcardData)
-
+        // console.log("a",a)
         this.bofangyuan.Password= a.row.Password
         this.bofangyuan.Port=a.row.Port
         this.bofangyuan.Username=a.row.Username
@@ -480,9 +440,6 @@ export default {
         this.bofangyuan.isbofang=1
         this.issbofang=1
 
-        console.log("this.bigcardData.data[a.$index]",this.bigcardData.data[a.$index])
-        console.log("this.bofangyuan",this.bofangyuan)
-
         // 定义一个空数组对象
         let myArray = [];
         // 将对象添加到数组中
@@ -501,7 +458,7 @@ export default {
      * @param {String} order 正序还是倒序
      */
     onSortChange ({ prop, order }) {
-      console.log("h3:",prop,order)
+      // console.log("h3:",prop,order)
       this.orderInfo.fieldName = prop;
       this.orderInfo.asc = (order === 'ascending');
       this.refreshTable();
@@ -510,9 +467,6 @@ export default {
       const start = (this.bigcamaraData.currentPage - 1) * this.bigcamaraData.pageSize
       const end = start + this.bigcamaraData.pageSize
       if(this.bigcamaraData.data!=null){
-        console.log("hhhh1:  ",start+"---"+end )
-        console.log("hhhh2:  ",this.bigcamaraData.data )
-        console.log("hhhh3:  ",this.bigcamaraData.data.slice(start, end) )
         return this.bigcamaraData.data.slice(start, end)
       }else{
         return null
@@ -540,26 +494,13 @@ export default {
      */
     getTableIndex_bigcamaraData (index) {
       let a
-      console.log("参数20: "+this.bigcamaraData.data,this.bigcardData.data,this.bigData.data)
-      console.log("参数:  "+this.bigcamaraData.paged+" "+this.bigcamaraData.pageSize+" "+index)
       a=((this.bigcamaraData.currentPage - 1) * this.bigcamaraData.pageSize + (index + 1))
-      console.log(".....a  "+a)
       return a;
     },
     onCurrentPageChange_bigcamaraData (newCurrentPage) {
-
-      console.log("1:  ",newCurrentPage )
-      console.log("2:  ",this.bigcamaraData.pageSize )
-      console.log("3:  ",this.oldPage)
-
       this.loadTableDataImpl_bigcamaraData(newCurrentPage, this.bigcamaraData.pageSize).then(() => {//数据加载成功
-
         this.bigcamaraData.currentPage = newCurrentPage;
         this.oldPage = this.bigcamaraData.currentPage-1
-        console.log("4:  ",newCurrentPage)
-        console.log("5:  ",this.bigcamaraData.currentPage)
-        console.log("6:  ",this.oldPage)
-
         if(this.bigcamaraData.data.length <= newCurrentPage*this.bigcamaraData.pageSize   ){
           this.bigcamaraData.paged=true
         }else{
@@ -568,9 +509,6 @@ export default {
 
       }).catch(() => {//数据加载失败
         this.bigcamaraData.currentPage = this.oldPage;
-        console.log("7:  ",this.oldPage)
-        console.log("8:  ",this.bigcamaraData.currentPage)
-
       });
     },
     /**
@@ -578,7 +516,6 @@ export default {
      * @param {Integer} newPageSize 变化后的每页显示数量
      */
     onPageSizeChange_bigcamaraData (newPageSize) {
-      console.log("hhhh2:  ",newPageSize )
       this.bigcamaraData.pageSize = newPageSize;
       this.bigcamaraData.currentPage = 1
       this.loadTableDataImpl_bigcamaraData(1, newPageSize).then(() => {
@@ -596,8 +533,10 @@ export default {
      * @param {Boolean} reload 是否重新获取数据
      */
     loadTableDataImpl_bigcamaraData (pageNum, pageSize, reload = false) {
-      console.log("11:  ",pageNum+"---"+pageSize+"---"+reload)
       // 判断是否需要重新加载数据
+      if (this.bigcamaraData.data.length == 0 || this.bigcamaraData.length == 0) {
+        return Promise.resolve([])
+      }
       if (reload || !this.bigcamaraData.data || this.bigcamaraData.data.length === 0) {
         // 调用后端接口或其他数据来源获取数据
         // 这里省略具体实现
@@ -623,54 +562,30 @@ export default {
           return this.bigcamaraData.data.slice((pageNum - 1) * pageSize, pageNum * pageSize);
         });
       } else {// 直接返回已有的任务列表数据
-        console.log("112:")
-        console.log("112_1:",pageNum ,pageSize)
-        console.log("112_2:",this.bigcamaraData.data.slice((pageNum - 1) * pageSize,pageNum * pageSize))
-        console.log("112_2:",Promise.resolve(this.bigcamaraData.data.slice((pageNum - 1) * pageSize,pageNum * pageSize)))
         return Promise.resolve(this.bigcamaraData.data.slice((pageNum - 1) * pageSize, pageNum * pageSize));
       }
     },
 
-
-
-
     /**
      * 获取每一行的index信息
      * @param {Integer} index 表格在本页位置
      */
     getTableIndex_bigcardData (index) {
       let a
-      console.log("参数10: "+this.bigcamaraData.data,this.bigcardData.data,this.bigData.data)
-      console.log("参数:  "+this.bigcardData.paged+" "+this.bigcardData.pageSize+" "+index)
       a=((this.bigcardData.currentPage - 1) * this.bigcardData.pageSize + (index + 1))
-      console.log(".....a  "+a)
       return a;
     },
     onCurrentPageChange_bigcardData (newCurrentPage) {
-
-      console.log("1:  ",newCurrentPage )
-      console.log("2:  ",this.bigcardData.pageSize )
-      console.log("3:  ",this.oldPage)
-
       this.loadTableDataImpl_bigcardData(newCurrentPage, this.bigcardData.pageSize).then(() => {//数据加载成功
-
         this.bigcardData.currentPage = newCurrentPage;
         this.oldPage = this.bigcardData.currentPage-1
-        console.log("4:  ",newCurrentPage)
-        console.log("5:  ",this.bigcardData.currentPage)
-        console.log("6:  ",this.oldPage)
-
         if(this.bigcardData.data.length <= newCurrentPage*this.bigcardData.pageSize   ){
           this.bigcardData.paged=true
         }else{
           this.bigcardData.paged=false
         }
-
       }).catch(() => {//数据加载失败
         this.bigcardData.currentPage = this.oldPage;
-        console.log("7:  ",this.oldPage)
-        console.log("8:  ",this.bigcardData.currentPage)
-
       });
     },
     /**
@@ -678,7 +593,6 @@ export default {
      * @param {Integer} newPageSize 变化后的每页显示数量
      */
     onPageSizeChange_bigcardData (newPageSize) {
-      console.log("hhhh2:  ",newPageSize )
       this.bigcardData.pageSize = newPageSize;
       this.bigcardData.currentPage = 1
       this.loadTableDataImpl_bigcardData(1, newPageSize).then(() => {
@@ -696,8 +610,10 @@ export default {
      * @param {Boolean} reload 是否重新获取数据
      */
     loadTableDataImpl_bigcardData (pageNum, pageSize, reload = false) {
-      console.log("11:  ",pageNum+"---"+pageSize+"---"+reload)
       // 判断是否需要重新加载数据
+      if (this.bigcardData.data.length == 0 || this.bigcardData.length == 0) {
+        return Promise.resolve([])
+      }
       if (reload || !this.bigcardData.data || this.bigcardData.data.length === 0) {
         // 调用后端接口或其他数据来源获取数据
         // 这里省略具体实现
@@ -733,12 +649,7 @@ export default {
       this.subjectName=this.$route.query.subjectInfo1
       this.taskId=this.$route.query.subjectInfo2
       // this.init('步坦协同课目')
-      console.log("0",this.subjectName,this.taskId)
-      console.log("1",this.$route.query)
       this.initUrl()
-      // console.log(this.bigcamaraData)
-      // console.log("...")
-      // console.log(this.bigcardData)
     },
     async initUrl() {
       this.bigData.data=[];
@@ -754,14 +665,8 @@ export default {
       this.SubjectInfo2=params.taskId
       this.SubjectInfo3=res.data.data
 
-
-      console.log("cansgu1",params.subjectName,params.taskId)
-      console.log("res1",res.data.data)
-
-
       this.bigcamaraSrc = ["", "", "", "", ""];
-      this.bigcamaraName = ["监控名称", "监控名称", "监控名称", "监控名称", "监控名称"];
-      // console.log()
+      this.bigcamaraNam
       for (let item in res.data.data) {
         // this.camaraSrc[index] = res.data.data[item].url;
         // this.camaraName[index++] = res.data.data[item].name;
@@ -777,10 +682,8 @@ export default {
         this.bigcamaraData.data.push(data);
         this.bigData.data.push(data);
       }
-      console.log('bigcamaraData :>> ', this.bigcamaraData.data);
       this.bigcamaraData.length=this.bigcamaraData.data.length
 
-
       setTimeout(() => {
         this.HKbigCamaraShow = true;
       }, 800);
@@ -793,8 +696,6 @@ export default {
       this.bigcardData.data = [];
       const res1 = await request("/dt_screen/rest/v2/video/videos/getSubjectCardUrls", "post", params1, false);
 
-      console.log("cansgu2",params.subjectName,params.taskId)
-      console.log("res1",res1.data.data)
       let index1 = 0;
       this.bigcardSrc = ["", "", "", "", ""];
       this.bigcardName = ["监控名称", "监控名称", "监控名称", "监控名称", "监控名称"];
@@ -813,12 +714,7 @@ export default {
         this.bigcardData.data.push(data);
         this.bigData.data.push(data);
       }
-      console.log('bigcardData :>> ', this.bigcardData.data);
-      console.log('bigData :>> ', this.bigData.data);
-
-
       this.bigcardData.length=this.bigcardData.data.length
-
     },
     HKbigCamaraInit(){
       this.HKbigCamaraShow = true;
@@ -827,10 +723,7 @@ export default {
 
     selectChange(val){
       // 此时 val 为当前对象
-      console.log("isInteger1",isInteger(val))
-      console.log("isInteger2",isInteger(parseInt(val)))
       this.selectedScreen =parseInt(val)
-
       // this.selectedScreen =val
       console.log(val)
       // this.num=this.selectedScreen

+ 23 - 67
src/views/situationScreen.vue

@@ -713,21 +713,13 @@
                 </div>
               </div>
               <div class="task_dialog_box_other" v-if="dialogType==2">
-                <el-table
-                  :data="pagedData"
-                  :header-cell-style="changeHeaderCellStyle"
-                  :cell-style="changeCellStyle"
-                  stripe
-                  :border="true"
-
-                >
+                <el-table :data="pagedData" :header-cell-style="changeHeaderCellStyle" :cell-style="changeCellStyle" stripe:border="true">
                   <el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="getTableIndex" />
                   <el-table-column align="center"   property="participantName" label="姓名" max-width="350"></el-table-column>
                   <el-table-column align="center" property="score" label="成绩" max-width="300"></el-table-column>
                 </el-table>
                 <el-row type="flex" justify="end" style="margin-top: 10px;">
                   <el-pagination
-
                       :total="this.gridData2.length"
                       :current-page="this.gridData2.currentPage"
                       :page-size="this.gridData2.pageSize"
@@ -736,11 +728,7 @@
                       @current-change="onCurrentPageChange"
                       @size-change="onPageSizeChange">
                   </el-pagination>
-
                 </el-row>
-
-                <operation-space v-if="showOperationSpace" :flow-instance="currentFlowInstance" @close="onOperationSpaceClose"></operation-space>
-
               </div>
 
               <div class="dialog_footer_box">
@@ -890,10 +878,8 @@ export default {
     pagedData() { // 动态计算当前页的数据
       const start = (this.gridData2.currentPage - 1) * this.gridData2.pageSize
       const end = start + this.gridData2.pageSize
-      if(this.gridData2.data!=null){
-        console.log("hhhh1:  ",start+"---"+end )
-        console.log("hhhh2:  ",this.gridData2.data )
-        console.log("hhhh3:  ",this.gridData2.data.slice(start, end) )
+      // if(this.gridData.data!=null){
+      if(this.gridData2.data.length!=0){
         return this.gridData2.data.slice(start, end)
       }else{
         return null
@@ -908,36 +894,20 @@ export default {
      */
     getTableIndex (index) {
       let a
-      console.log("参数:  "+this.gridData2.paged+" "+this.gridData2.pageSize+" "+index)
       a=((this.gridData2.currentPage - 1) * this.gridData2.pageSize + (index + 1))
-      console.log(".....a  "+a)
       return a;
     },
     onCurrentPageChange (newCurrentPage) {
-
-      console.log("1:  ",newCurrentPage )
-      console.log("2:  ",this.gridData2.pageSize )
-      console.log("3:  ",this.oldPage)
-
       this.loadTableDataImpl2(newCurrentPage, this.gridData2.pageSize).then(() => {//数据加载成功
-
         this.gridData2.currentPage = newCurrentPage;
         this.oldPage = this.gridData2.currentPage-1
-        console.log("4:  ",newCurrentPage)
-        console.log("5:  ",this.gridData2.currentPage)
-        console.log("6:  ",this.oldPage)
-
         if(this.gridData2.data.length <= newCurrentPage*this.gridData2.pageSize   ){
           this.gridData2.paged=true
         }else{
           this.gridData2.paged=false
         }
-
       }).catch(() => {//数据加载失败
         this.gridData2.currentPage = this.oldPage;
-        console.log("7:  ",this.oldPage)
-        console.log("8:  ",this.gridData2.currentPage)
-
       });
     },
     /**
@@ -945,7 +915,6 @@ export default {
      * @param {Integer} newPageSize 变化后的每页显示数量
      */
     onPageSizeChange (newPageSize) {
-      console.log("hhhh2:  ",newPageSize )
       this.gridData2.pageSize = newPageSize;
       this.gridData2.currentPage = 1
       this.loadTableDataImpl2(1, newPageSize).then(() => {
@@ -963,8 +932,10 @@ export default {
      * @param {Boolean} reload 是否重新获取数据
      */
     loadTableDataImpl2 (pageNum, pageSize, reload = false) {
-      console.log("11:  ",pageNum+"---"+pageSize+"---"+reload)
       // 判断是否需要重新加载数据
+      if (this.gridData2.data.length == 0 || this.gridData2.length == 0) {
+        return Promise.resolve([])
+      }
       if (reload || !this.gridData2.data || this.gridData2.data.length === 0) {
         // 调用后端接口或其他数据来源获取数据
         // 这里省略具体实现
@@ -1030,11 +1001,8 @@ export default {
         }
         console.log('data :>> ', data);
         datas.push(data)
-
       }
       console.log('datas :>> ', datas);
-
-
       // 设置图表的配置项和数据
       const option = {
         backgroundColor: '#000',
@@ -1088,19 +1056,15 @@ export default {
 
                 if (element.requestFullScreen) {
                   // HTML W3C 提议
-                  console.log(1)
                   element.requestFullScreen()
                 } else if (element.msRequestFullscreen) {
                   // IE11
-                  console.log(2)
                   element.msRequestFullScreen()
                 } else if (element.webkitRequestFullScreen) {
                   // Webkit (works in Safari5.1 and Chrome 15)
-                  console.log(3)
                   element.webkitRequestFullScreen()
                 } else if (element.mozRequestFullScreen) {
                   // Firefox (works in nightly)
-                  console.log(4)
                   element.mozRequestFullScreen()
                 }
 
@@ -1217,9 +1181,7 @@ export default {
     },
     // 查看任务态势
     viewTaskSituation(item) {
-      console.log("查看态势1",this.wholeOutTaskId)
       this.wholeOutTaskId = item.taskId;
-      console.log("查看态势2",this.wholeOutTaskId)
       this.changeTask()
     },
     // 地图
@@ -1228,7 +1190,6 @@ export default {
         this.myChart1.dispose();
       }
       this.myChart1  = echarts.init(document.getElementById('mapData'),'dark');
-      console.log("100",this)
       echarts.registerMap('taiyuan', uploadedDataURL);
       var chinaGeoCoordMap = this.taiYuanMapData
       var chinaDatas = this.taiYuanDatas
@@ -1431,14 +1392,10 @@ export default {
         series: series
       };
       if(option){
-        console.log('111',option)
-        // console.log('222',this.myChart1.get())
-        console.log('112',this)
         this.myChart1.setOption(option)
       }
       let that =this
       window.addEventListener('resize',function () {//执行
-        console.log('cuowu');
         that.myChart1.resize();
       })
     },
@@ -1620,8 +1577,7 @@ export default {
               }
             ])
           })
-          console.log("666",echarts.version);
-          console.log("667",this);
+          // console.log("666",echarts.version);
           // this.initechartsMap()
           this.echartMapFlag=false
         }else{
@@ -1950,12 +1906,11 @@ export default {
           this.participantScoreFlag=true
         }
         this.updatekeyOther=new Date().getTime()
-
         // console.log("name and grade: ", this.danweiweidu.danwei_name,this.danweiweidu.danwei_grade)
         this.danweiweidu.length=value.length
         this.danweiweidu.totalPage= (value.length)/(this.danweiweidu.pageSize)
         this.danweiweidu.totalPage=Math.ceil(this.danweiweidu.totalPage);
-        console.log("数据量,页面数据量,当前页面,页面数",value.length,this.danweiweidu.pageSize,this.danweiweidu.currentPage,this.danweiweidu.totalPage)
+        // console.log("数据量,页面数据量,当前页面,页面数",value.length,this.danweiweidu.pageSize,this.danweiweidu.currentPage,this.danweiweidu.totalPage)
         // this.initEchartsSubjectGradeStatistics(category, value)
         this.updateChart(0);
       } else {
@@ -1980,12 +1935,11 @@ export default {
           this.participantScoreFlag=true
         }
         this.updatekeyOther=new Date().getTime()
-
         // console.log("name and grade: ", this.danweiweidu.danwei_name,this.danweiweidu.danwei_grade)
         this.xitongweidu.length=value.length
         this.xitongweidu.totalPage= (value.length)/(this.xitongweidu.pageSize)
         this.xitongweidu.totalPage=Math.ceil(this.xitongweidu.totalPage);
-        console.log("数据量,页面数据量,当前页面,页面数",value.length,this.danweiweidu.pageSize,this.danweiweidu.currentPage,this.danweiweidu.totalPage)
+        // console.log("数据量,页面数据量,当前页面,页面数",value.length,this.danweiweidu.pageSize,this.danweiweidu.currentPage,this.danweiweidu.totalPage)
         // this.initEchartsSubjectGradeStatistics(category, value)
         this.updateChart(1);
       } else {
@@ -2029,7 +1983,7 @@ export default {
         const pageData1 = this.danweiweidu.danwei_name.slice(start, end);
         const pageData2 = this.danweiweidu.danwei_grade.slice(start, end);
         // 更新echarts的data选项,设置为当前页的数据
-        console.log("数据",pageData1, pageData2)
+        // console.log("数据",pageData1, pageData2)
         this.initEchartsSubjectGradeStatistics(pageData1, pageData2)
       }
       if (type === 1) {
@@ -2040,7 +1994,7 @@ export default {
         const pageData1 = this.xitongweidu.xitong_name.slice(start, end);
         const pageData2 = this.xitongweidu.xitong_grade.slice(start, end);
         // 更新echarts的data选项,设置为当前页的数据
-        console.log("数据",pageData1, pageData2)
+        // console.log("数据",pageData1, pageData2)
         this.initEchartsTaskMemberGradeOfSystem(pageData1, pageData2)
       }
 
@@ -2048,9 +2002,6 @@ export default {
 
     onCurrentPageChange_grade (newCurrentPage) {
       this.danweiweidu.currentPage=newCurrentPage
-      console.log("1:  ",newCurrentPage )//当前页面
-      console.log("2:  ",this.danweiweidu.pageSize )
-      console.log("3:  ",this.oldPage)
       this.updateChart(0)
     },
     /**
@@ -2058,7 +2009,6 @@ export default {
      * @param {Integer} newPageSize 变化后的每页显示数量
      */
     onPageSizeChange_grade (newPageSize) {
-      console.log("hhhh2:  ",newPageSize )
       this.danweiweidu.pageSize = newPageSize;
       this.danweiweidu.currentPage = 1
       this.updateChart(0)
@@ -3307,12 +3257,20 @@ export default {
     viewManData(item){
       this.dialogType=2
       this.dialogVisible=true
-      console.log('item',item);
       const { subjectScore } = item
-      this.gridData=subjectScore
-      this.gridData2.data=subjectScore
-      this.gridData2.length=this.gridData2.data.length
+
+      // this.gridData=subjectScore
+      if(subjectScore==null){
+        this.gridData2.data = []
+        this.gridData2.length = this.gridData2.data.length
+      }else{
+        this.gridData2.data = subjectScore
+        this.gridData2.length = this.gridData2.data.length
+      }
+
     },
+
+
     // 全屏事件
     showFull(id){
       // 获取想要展示全屏的元素
@@ -3417,8 +3375,6 @@ export default {
     }
   },
   mounted(){
-    let that= this
-
     // 获取全部单位
     this.getAllUnits()
     // 获取全部系统

+ 133 - 27
src/views/taskScreen.vue

@@ -295,21 +295,22 @@
             <div class="task_detail_dialog">
               <div class="header_line_style"></div>
               <div class="task_dialog_box_other" v-if="dialogType == 2">
-                <el-table
-                  :data="gridData"
-                  :header-cell-style="changeHeaderCellStyle"
-                  :cell-style="changeCellStyle"
-                  stripe
-                  :border="true"
-                >
-                  <el-table-column
-                    align="center"
-                    property="participantName"
-                    label="姓名"
-                    max-width="350"
-                  ></el-table-column>
+                <el-table :data="pagedData" :header-cell-style="changeHeaderCellStyle" :cell-style="changeCellStyle" stripe:border="true">
+                  <el-table-column align="center" label="序号" header-align="center" type="index" width="55px" :index="getTableIndex" />
+                  <el-table-column align="center" property="participantName" label="姓名" max-width="350"></el-table-column>
                   <el-table-column align="center" property="score" label="成绩" max-width="300"></el-table-column>
                 </el-table>
+                <el-row type="flex" justify="end" style="margin-top: 10px;">
+                  <el-pagination
+                      :total="this.gridData.length"
+                      :current-page="this.gridData.currentPage"
+                      :page-size="this.gridData.pageSize"
+                      :page-sizes="[5,10,15, 20]"
+                      layout="total, prev, pager, next, sizes"
+                      @current-change="onCurrentPageChange"
+                      @size-change="onPageSizeChange">
+                  </el-pagination>
+                </el-row>
               </div>
               <div class="dialog_footer_box">
                 <div class="view_more" @click="dialogVisible = false" style="color: #fff; padding: 3px 30px">关闭</div>
@@ -399,7 +400,13 @@ export default {
       currentTaskName: "",
       currentTaskGrade: "",
       unitSubGradeValue: "",
-      gridData: [],
+      gridData:{
+        data: [],
+        length:0,
+        currentPage:1,
+        pageSize:10,
+        paged:true,
+      },
       camaraSrc: ["", "", "", "", ""],
       completionRate: false,
       playerList: [],
@@ -420,7 +427,96 @@ export default {
       cardSrc:[]
     };
   },
+  computed:{
+    pagedData() { // 动态计算当前页的数据
+      const start = (this.gridData.currentPage - 1) * this.gridData.pageSize
+      const end = start + this.gridData.pageSize
+      // if(this.gridData.data!=null){
+      if(this.gridData.data.length!=0){
+        return this.gridData.data.slice(start, end)
+      }else{
+        return null
+      }
+    }
+  },
   methods:{
+    /**
+     * 获取每一行的index信息
+     * @param {Integer} index 表格在本页位置
+     */
+    getTableIndex (index) {
+      let a
+      a=((this.gridData.currentPage - 1) * this.gridData.pageSize + (index + 1))
+      return a;
+    },
+    onCurrentPageChange (newCurrentPage) {
+      this.loadTableDataImpl2(newCurrentPage, this.gridData.pageSize).then(() => {//数据加载成功
+        this.gridData.currentPage = newCurrentPage;
+        this.oldPage = this.gridData.currentPage-1
+        if(this.gridData.data.length <= newCurrentPage*this.gridData.pageSize   ){
+          this.gridData.paged=true
+        }else{
+          this.gridData.paged=false
+        }
+      }).catch(() => {//数据加载失败
+        this.gridData.currentPage = this.oldPage;
+      });
+    },
+    /**
+     * 表格分页每页显示数量变化
+     * @param {Integer} newPageSize 变化后的每页显示数量
+     */
+    onPageSizeChange (newPageSize) {
+      this.gridData.pageSize = newPageSize;
+      this.gridData.currentPage = 1
+      this.loadTableDataImpl2(1, newPageSize).then(() => {
+        this.oldPage = this.gridData.currentPage;
+        this.oldPageSize = this.gridData.pageSize;
+      }).catch(e => {
+        this.gridData.currentPage = this.oldPage;
+        this.gridData.pageSize = this.oldPageSize;
+      });
+    },
+    /**
+     * 获取表格数据
+     * @param {Integer} pageNum 当前分页
+     * @param {Integer} pageSize 每页数量
+     * @param {Boolean} reload 是否重新获取数据
+     */
+    loadTableDataImpl2 (pageNum, pageSize, reload = false) {
+      // 判断是否需要重新加载数据
+      if (this.gridData.data.length == 0 || this.gridData.length == 0) {
+        return Promise.resolve([])
+      }
+      if (reload || !this.gridData.data || this.gridData.data.length === 0) {
+        // 调用后端接口或其他数据来源获取数据
+        // 这里省略具体实现
+
+        // 模拟一个返回结果的 Promise 对象
+        const mockData = new Promise(resolve => {
+          const data = [];
+          for (let i = 1; i <= pageSize; i++) {
+            data.push({
+              id: pageNum * pageSize + i,
+              name: `任务${pageNum * pageSize + i}`,
+              status: Math.floor(Math.random() * 4)
+            });
+          }
+          resolve(data);
+        });
+        // 返回 Promise 对象,以便分页组件可以在数据加载完成后进行下一步处理。
+        return mockData.then(data => {
+          // 更新任务列表数据
+          this.gridData.data = data;
+          // 返回新的任务列表数据
+          return this.gridData.data.slice((pageNum - 1) * pageSize, pageNum * pageSize);
+        });
+      } else {// 直接返回已有的任务列表数据
+        return Promise.resolve(this.gridData.data.slice((pageNum - 1) * pageSize, pageNum * pageSize));
+      }
+    },
+
+
     HKCardInit(){
       this.HKCardShow = true;
     },
@@ -502,11 +598,13 @@ export default {
 
         if(this.$route.query.key1){
           this.wholeOutTaskId = this.$route.query.key1;
+
           this.currentTaskName = this.$route.query.taskName;
-          if(location.href.indexOf('#reloaded')==-1){
-            location.href=location.href+"#reloaded";
-            location.reload();
-          }
+          // currentTaskName
+          // if(location.href.indexOf('#reloaded')==-1){
+          //   location.href=location.href+"#reloaded";
+          //   location.reload();
+          // }
         }else{
           this.wholeOutTaskId = data[0].taskId;
           this.currentTaskName = data[0].taskName;
@@ -557,7 +655,7 @@ export default {
 
       let param = {taskId: this.processInstanceId};
       const res2 = await request("/dt_screen/rest/v2/task/getDefId/", "post", param, false);
-      console.log('res2 :>> ', res2.data);
+      // console.log('res2 :>> ', res2.data);
       this.processDefinitionId = res2.data;
       this.isReady = true;
       this.getSubjectList(this.wholeOutTaskId);
@@ -773,13 +871,21 @@ export default {
     viewManData(item){
       this.dialogType=2
       this.dialogVisible=true
-      console.log('item',item);
       const { subjectScore } = item
-      this.gridData=subjectScore
+
+
+      if(subjectScore==null){
+        this.gridData.data = []
+        this.gridData.length = this.gridData.data.length
+      }else{
+        this.gridData.data = subjectScore
+        this.gridData.length = this.gridData.data.length
+      }
+
     },
     // 全屏事件
     showFull(id){
-      console.log('this.camaraData :>> ', this.camaraData);
+      // console.log('this.camaraData :>> ', this.camaraData);
       console.log('ckx debug  监控大屏' )
       this.$router.push(
         {
@@ -795,7 +901,7 @@ export default {
       )
     },
      showFull1(id){
-      console.log('this.camaraData :>> ', this.cardData);
+      // console.log('this.camaraData :>> ', this.cardData);
       console.log('ckx debug  监控大屏' )
       this.$router.push(
         {
@@ -924,8 +1030,8 @@ export default {
       // this.SubjectInfo1=params.subjectName
       // this.SubjectInfo2=params.taskId
       // this.SubjectInfo3=res.data.data
-      console.log("cansgu",params.subjectName,params.taskId)
-      console.log("res",res.data.data)
+      // console.log("cansgu",params.subjectName,params.taskId)
+      // console.log("res",res.data.data)
       this.camaraSrc = ["", "", "", "", ""];
       this.camaraName = ["监控名称", "监控名称", "监控名称", "监控名称", "监控名称"];
 
@@ -970,8 +1076,8 @@ export default {
          this.cardData.push(data);
         this.hebingjiankongData.push(data);
       }
-      console.log('cardData :>> ', this.cardData);
-      console.log('hebingjiankongData :>> ', this.hebingjiankongData);
+      // console.log('cardData :>> ', this.cardData);
+      // console.log('hebingjiankongData :>> ', this.hebingjiankongData);
     },
     resolveUrl(url){
       if(url ==''){