瀏覽代碼

视频修改询次数

ming 4 年之前
父節點
當前提交
da2d1c436c
共有 3 個文件被更改,包括 62 次插入70 次删除
  1. 1 1
      pages.json
  2. 3 3
      pages/siteList/siteList.vue
  3. 58 66
      pages/videoList/videoList.vue

+ 1 - 1
pages.json

@@ -223,7 +223,7 @@
 		}, {
 			"path": "pages/videoList/videoList",
 			"style": {
-				"navigationBarTitleText": "视频测",
+				"navigationBarTitleText": "视频测",
 				"enablePullDownRefresh": false
 			}
 

+ 3 - 3
pages/siteList/siteList.vue

@@ -10,7 +10,7 @@
 					 placeholder="请输入站点名称" confirm-type="search"></input>
 				</view>
 				<view class="action">
-					<button class="cu-btn bg-blue round" @click=searchData()>查询</button>
+					<button class="cu-btn bg-blue round" @click="searchData()">查询</button>
 				</view>
 			</view>
 		</view>
@@ -25,9 +25,9 @@
 					<view class="cu-avatar round lg" style="background-image: url(../../static/site-icon-alarm.png);"></view>
 					<view class="content" @tap="goDeviceType(item)" @longpress="showDetail(item)">
 						<view class="text-grey site-tit">
-							<text style="width:260rpx;" class="inOneLine">{{item.siteName}}</text>
+							<text style="width:350rpx;" class="inOneLine">{{item.siteName}}</text>
 							<text style="font-size:28rpx;text-align:right">
-								( 共{{item.count}}个未处理告警
+								( 共{{item.count}}个设备
 							</text>
 						</view>
 						<view class="showDetail" v-if="item.isShow" @tap.stop="goSiteDetail(item)">查看详情</view>

+ 58 - 66
pages/videoList/videoList.vue

@@ -1,13 +1,13 @@
 <template>
 
-	<view class="">
-		<view v-if="loadingStatus" class="loadingMask" >Loading...</view>
+	<view class="">
+		<view v-if="loadingStatus" class="loadingMask">Loading...</view>
 		<view class="cu-list menu-avatar">
 			<view v-if="!this.openId&&!this.onLineVideoList.length" class="text-center margin-top-lg">加载中...</view>
 			<view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in matchedDeviceList"
 			 :key="index" :data-target="'move-box-' + index">
 				<view v-if="item.ALIVEVALUE==3" class="cu-avatar round lg" style="background-image:url(../../static/video-icon-on.png);opacity:.7"></view>
-				<view  v-else class="cu-avatar round lg" style="background-image:url(../../static/video-icon-off.png);opacity:.7"></view>
+				<view v-else class="cu-avatar round lg" style="background-image:url(../../static/video-icon-off.png);opacity:.7"></view>
 				<view v-if="item.ALIVEVALUE==3" @tap="open_video(item)">
 					<view class="content">
 						<view class="">{{item.DEVICE}}</view>
@@ -17,7 +17,7 @@
 							在线
 							<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
 						</view>
-				
+
 					</view>
 				</view>
 
@@ -27,7 +27,7 @@
 					</view>
 					<view class="nav-right num">
 
-						<view  class="offline">
+						<view class="offline">
 							离线
 							<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
 						</view>
@@ -58,8 +58,8 @@
 
 				openId: '',
 				reCount: 0,
-				count: 0,
-				loadingStatus:false
+				count: 0,
+				loadingStatus: false
 
 			};
 		},
@@ -102,11 +102,11 @@
 					},
 					success: (res) => {
 
-						this.onLineVideoList = res.data.RESULT.LIST;
-						
-						if (this.openId.length > 0) {
-							console.log('doododododododo')
-							
+						this.onLineVideoList = res.data.RESULT.LIST;
+
+						if (this.openId.length > 0) {
+							console.log('doododododododo')
+
 							for (var n = 0; n < this.onLineVideoList.length; n++) {
 								if (this.openId == this.onLineVideoList[n].DEVICE) {
 									this.reCount++;
@@ -115,13 +115,13 @@
 											// var mask = document.getElementById('videomask');
 											// if (mask != undefined) {
 											// 	removeDIV('videomask');
-											// }
-											this.loadingStatus=false;
+											// }
+											this.loadingStatus = false;
 
 											uni.navigateTo({
 												url: '/pages/videoDetail/videoDetail?deviceType=2&companyCode=' + this.companyCode + '&deviceCode=' +
 													this.onLineVideoList[n].DEVICE +
-													'',
+													'',
 												// url:'https://qhome.usky.cn/video.html?device='+this.onLineVideoList[n].DEVICE+'&companyid=' + this.companyCode + ''
 											});
 
@@ -129,27 +129,30 @@
 											setTimeout(this.chk_video, 5000);
 										}
 									} else {
+
+										if (this.reCount > 7) {
+											// var mask = document.getElementById('videomask');
+											// if (mask != undefined) {
+											// 	removeDIV('videomask');
+											// }
+											this.loadingStatus = false;
+											// alert('远程摄像头链接超时,请稍后再试')
+											uni.showToast({
+												title: "远程摄像头链接超时,请稍后再试",
+												icon: "none"
+											});
+											// $("#myPopup").popup("open");
+
+											break;
+
+
+										}
+
 										setTimeout(this.chk_video, 5000);
 									}
-									if (this.reCount > 5) {
-										// var mask = document.getElementById('videomask');
-										// if (mask != undefined) {
-										// 	removeDIV('videomask');
-										// }
-										this.loadingStatus=false;
-										alert('远程摄像头链接超时,请稍后再试')
-										// uni.showToast({
-										// 	title: "远程摄像头链接超时,请稍后再试",
-										// 	icon: "none"
-										// });
-										// $("#myPopup").popup("open");
-										
-										break;
-										
-										
-									}
-									// break;
-									
+
+
+
 								}
 							}
 						} else {
@@ -158,12 +161,12 @@
 									if (this.onLineVideoList[i].DEVICE == this.deviceData[j].deviceCode) {
 										this.matchedDeviceList.push({
 											"DEVICE": this.onLineVideoList[i].DEVICE,
-											"ALIVEVALUE": this.onLineVideoList[i].ALIVEVALUE,
-											"ONAIR":this.onLineVideoList[i].ONAIR
+											"ALIVEVALUE": this.onLineVideoList[i].ALIVEVALUE,
+											"ONAIR": this.onLineVideoList[i].ONAIR
 										})
 									}
 								}
-							}
+							}
 							console.log(this.matchedDeviceList)
 						}
 
@@ -179,7 +182,7 @@
 						if (this.onLineVideoList[n].ONAIR) {
 							uni.navigateTo({
 								url: '/pages/videoDetail/videoDetail?deviceType=2&companyCode=' + this.companyCode + '&deviceCode=' + item.DEVICE +
-									'',
+									'',
 								// url:'https://qhome.usky.cn/video.html?device='+item.DEVICE+'&companyid=' + this.companyCode + ''
 							});
 							return;
@@ -187,8 +190,8 @@
 					}
 				}
 				this.count = 0;
-				this.reCount = 0;
-				this.loadingStatus=true
+				this.reCount = 0;
+				this.loadingStatus = true
 				// alert('一些loading操作')
 				uni.request({
 					url: 'https://fire.usky.cn:8443/YtIoT/cgi-bin/demo2.cgi',
@@ -212,17 +215,6 @@
 			},
 
 
-
-
-
-
-
-
-
-
-
-
-
 			async getDeviceManage(ming = {}) {
 				const res = await this.$myRequest({
 					url: 'OperationMonitoring/getDeviceList',
@@ -231,25 +223,25 @@
 				this.deviceData = res.data.data
 			},
 
-
-
 		}
 
 	}
 </script>
 
-<style lang="scss">
-	.loadingMask{
-		width:100%;height:100%;position:absolute;left:0;
-		background:rgba(0,0,0,.3);
-		z-index:1000;
-		color:#000;
-		justify-content: center;
-		align-items: center;
-		display:flex;
-		text-align:center;
-		padding-top:100rpx;
-		font-size:34rpx;
+<style lang="scss">
+	.loadingMask {
+		width: 100%;
+		height: 100%;
+		position: absolute;
+		left: 0;
+		background: rgba(0, 0, 0, .3);
+		z-index: 1000;
+		color: #000;
+		justify-content: center;
+		align-items: center;
+		display: flex;
+		text-align: center;
+		padding-top: 100rpx;
+		font-size: 34rpx;
 	}
-
 </style>