Browse Source

综合告警详情页视频播放,首页数据写活,综合告警暂无数据,样式修复等

ming 4 years ago
parent
commit
47cf08907d

+ 7 - 5
components/list-test/list-test.vue

@@ -26,11 +26,7 @@
 					
 					<view class="content" v-if="nowType==1"  @tap="goNowUrl(item)" >
 						<view class="text-grey site-tit">
-							<text style="width:260rpx;" class="inOneLine">{{item.siteName}}</text>
-							
-							<text style="font-size:28rpx;text-align:right"> 
-							   ( 共{{item.siteAlarmCount}}个未处理告警 )
-							</text>
+							<text style="width:93%">{{item.siteName}}( 共{{item.siteAlarmCount}}个未处理告警 )</text>
 						</view>
 					</view>
 					
@@ -52,6 +48,8 @@
 					</view>
 				</view>
 			</view>
+			<view v-if="!bindData.length&&bindSiteListRes==1" class="text-center margin-top"> 暂无数据</view>
+			
 		</view>
 		<!-- 站点列表end -->
 	
@@ -90,6 +88,10 @@
 			bindSiteName:{
 				type:String,
 				default: ''
+			},
+			bindSiteListRes:{
+				type:Number,
+				default: ''
 			}
 		},
 		data() {

+ 5 - 5
pages/device-Manage/device-Manage.vue

@@ -1,9 +1,7 @@
 <template>
 
 	<view class="">
-		<view class="cu-list menu-avatar">
-			
-			
+		<view class="cu-list menu-avatar">
 			<view class="cu-item deviceTypeItem" :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in deviceData"
 			 :key="index" :data-target="'move-box-' + index" @tap="goDeviceDetail(item)">
 				<view class="cu-avatar round lg" style="background-image:url(../../static/jx.png)"></view>
@@ -12,12 +10,14 @@
 				</view>
 				<view class="nav-right num">
 					<view class="text-grey">
-						{{item.trueStatus?'离线':'在线'}}
+						{{item.trueStatus=="0"?'在线':'离线'}}
 						<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
 					</view>
 				</view>
 			</view>
-		</view>
+		</view>
+		
+		
 	</view>
 </template>
 

+ 10 - 6
pages/index/index.vue

@@ -74,7 +74,8 @@
 	import chart2 from './components/chart2/chart2.vue';
 	import chart3 from './components/chart3/chart3.vue';
 	import chart4 from './components/chart4/chart4.vue';
-	import json from '../../data/json.js';
+	import json from '../../data/json.js';
+	
 
 	export default {
 		components: {
@@ -90,16 +91,17 @@
 				arr: [],
 				searchInput: '',
 				alarmCount: '',
-				flag: false,
+				flag: false,
+			
 				// 宫格列表数据
 				cuIconList: [{
 					imgUrl: '../../static/square1.png',
-					badge: 111,
+					badge: 0,
 					name: '综合报警',
 					redirectUrl: '/pages/siteList/siteList?type=1'
 				}, {
 					imgUrl: '../../static/square2.png',
-					badge: 100,
+					badge: 0,
 					name: '运行监测',
 					redirectUrl: '/pages/siteList/siteList?type=2'
 				}, {
@@ -414,8 +416,10 @@
 					url: 'Index/getDataStatistics',
 					showLoading: true
 				})
-				this.staticData = res.data.data[0]
-				this.alarmCount = this.staticData.alarmCount
+				this.staticData = res.data.data[0]  
+				this.alarmCount = this.staticData.alarmCount
+				this.cuIconList[0].badge=this.staticData.integratedAlarmCount
+				this.cuIconList[1].badge=this.staticData.videoMonitoringCount
 			},
 
 

+ 1 - 1
pages/processedDetail/processedDetail.vue

@@ -240,7 +240,7 @@
 			},
 			goVideoDetail() {
 				uni.navigateTo({
-					url: '/pages/unprocessDetail/videoDetail/videoDetail',
+					url: '/pages/videoList/videoList?deviceType=2&companyCode=' + this.detailMessage.siteId + '',
 					success: res => {},
 					fail: () => {},
 					complete: () => {}

+ 16 - 14
pages/siteListAlarming/siteListAlarming.vue

@@ -1,6 +1,6 @@
 <template>
-	<list-test :bindData="siteListData" :bindUrl="linkUrl" :bindIcon="linkIcon" :bindNum="num" :bindType="type" :bindSiteName="siteName"
-	 :bindDetailUrl="detailUrl">
+	<list-test :bindData="siteListData" :bindUrl="linkUrl" :bindIcon="linkIcon" :bindNum="num" :bindType="type"
+	 :bindSiteName="siteName" :bindDetailUrl="detailUrl" :bindSiteListRes="siteListRes">
 	</list-test>
 
 </template>
@@ -12,13 +12,14 @@
 
 		data() {
 			return {
+				siteListRes: 0,
 				type: 1,
 				linkUrl: '/pages/alarmingList/alarmingList',
 				linkIcon: '../../static/site-icon-alarm.png',
 				siteListData: [],
 				num: ' 共3个未处理告警',
-				detailUrl: '/pages/siteDetail/siteDetail',
-				siteName:''
+				detailUrl: '/pages/siteDetail/siteDetail',
+				siteName: ''
 			};
 		},
 
@@ -34,7 +35,7 @@
 		},
 
 		mounted() {
-		
+
 		},
 
 		onLoad() {
@@ -42,15 +43,16 @@
 		},
 
 		methods: {
-			async getDataList(params={}) {
-				const res= await this.$myRequest({
-					url:'IntegratedAlarm/getSiteList',
-					showLoading:true,
-					data:params
-					
-				})
-				console.log(res.data.data)
-				this.siteListData=res.data.data
+			async getDataList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'IntegratedAlarm/getSiteList',
+					showLoading: true,
+					data: params
+
+				})
+				console.log(res.data.data)
+				this.siteListData = res.data.data
+				this.siteListRes = 1;
 			}
 		}
 

+ 4 - 3
pages/unprocessDetail/unprocessDetail.vue

@@ -6,7 +6,7 @@
 			<button class="cu-btn radius bg-red sm">未处理</button>
 		</view>
 		<!-- 电力start -->
-		<view v-if="type==1">
+		<view v-if="type==1">
 			<view class="basic-info">
 				<view class="info-tit margin-left-xs">
 					<text class="cuIcon-titles margin-right-xs"></text>
@@ -198,7 +198,8 @@
 			async getUnProcessDetail(params = {}) { 
 				const res = await this.$myRequest({
 					url: 'IntegratedAlarm/getPowerAlarmDetails',
-					data: params
+					data: params,
+					showLoading: true,
 				})
 				console.log(res.data.data[0]);
 				this.detailMessage = res.data.data[0]
@@ -338,7 +339,7 @@
 			},
 			goVideoDetail() {
 				uni.navigateTo({
-					url: '/pages/unprocessDetail/videoDetail/videoDetail',
+					url: '/pages/videoList/videoList?deviceType=2&companyCode=' + this.detailMessage.siteId + '',
 					success: res => {},
 					fail: () => {},
 					complete: () => {}

+ 5 - 12
pages/videoList/videoList.vue

@@ -2,8 +2,11 @@
 
 	<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-list menu-avatar">
+			
+			<view v-if="!this.openId&&!this.onLineVideoList.length" class="text-center margin-top-lg">加载中...</view>
+		<view v-if="!this.matchedDeviceList.length&&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>
@@ -84,13 +87,6 @@
 		methods: {
 
 			chk_video() {
-				// if (!this.openId) {
-				// 	uni.showLoading({
-				// 		title: "加载中",
-				// 		mask: true,
-				// 	});
-				// 	//添加loading
-				// }
 				uni.request({
 					url: 'https://fire.usky.cn:8443/YtIoT/cgi-bin/demo2.cgi',
 					data: 'queryJson:' + JSON.stringify({
@@ -101,12 +97,9 @@
 						'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
 					},
 					success: (res) => {
-
 						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++;

+ 0 - 1
util/api.js

@@ -14,7 +14,6 @@ export const myRequest = (options) => {
 			title: "加载中",
 			mask: true,
 		});
-
 	}
 
 	return new Promise((resolve, reject) => {

+ 2 - 24
util/jssdk.js

@@ -4,38 +4,27 @@ const jweixin = require('jweixin-module')
 //#endif
 export function configWeiXin(callback) {
 	const url = window.location.href.split('#')[0];
-	
+	// start
 	uni.request({
-		// url: 'https://s.yxin.tech/sign.php', //test-ming
 		url:"https://qhome.usky.cn/sign.php",		
 		header: {
 			'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
 		},
-		
 		data:{"url":url},
-		// data:{"turl":url},
 		method: 'GET',
 		success: (res) => {
 			console.log('请求的签名的参数')
 			console.log(res)
 
-			
-			
 			let apiList = [ // 可能需要用到的能力 需要啥就写啥。多写也没有坏处
-				// 'scanQRCode',
 				'openLocation'
 			];
 			let info = {
 				debug: false, // 调试,发布的时候改为false
 				appId: res.data.appid,
-				// appId: res.data.appId,
-				
-				
 				nonceStr: res.data.nonceStr,
 				timestamp: parseInt(res.data.timestamp),
-				
 				signature: res.data.sha_str,
-				// signature: res.data.signature,
 				jsApiList: apiList
 			};
 						
@@ -48,18 +37,7 @@ export function configWeiXin(callback) {
 			jweixin.ready(res => {
 				if (callback) callback(jweixin);
 			});
-			
-			
-			//end
-			
-			
 		}
 	});
-	
-	
-	
-	
-	
-	
-	
+	// end
 }