Browse Source

数据对接

ming 4 years ago
parent
commit
8d979e713c

+ 4 - 2
common/common.scss

@@ -108,7 +108,7 @@ radio,checkbox {
 
 .cu-list.menu-avatar>.cu-item .content {
 	left: 120rpx;
-	width: 600rpx;
+	width: 580rpx;
 }
 
 .unProcess,.error {
@@ -148,7 +148,9 @@ radio,checkbox {
 
 .site-items .site-tit {
 	font-size: 32rpx;
-	color: #333;
+	color: #333;
+	    justify-content: space-between;
+	
 }
 
 .site-items .cu-avatar {}

+ 6 - 6
components/list-test/list-test.vue

@@ -24,12 +24,12 @@
 					<view class="cu-avatar round lg"  v-bind:style="{ 'background-image': 'url(' + nowIcon+ ')' }"></view>
 					
 					
-					<view class="content" v-if="nowType==1"  @tap="goNowUrl" >
+					<view class="content" v-if="nowType==1"  @tap="goNowUrl(item)" >
 						<view class="text-grey site-tit">
-							<text >{{item.siteName}}</text>
+							<text style="width:260rpx;" class="inOneLine">{{item.siteName}}</text>
 							
-							<text > 
-							   ({{nowNum}}
+							<text style="font-size:28rpx;text-align:right"> 
+							   ( 共{{item.siteAlarmCount}}个未处理告警 
 							</text>
 						</view>
 					</view>
@@ -145,9 +145,9 @@
 			
 			
 			// 页面跳转
-			goNowUrl() {
+			goNowUrl(item) {
 				uni.navigateTo({
-					url: this.nowUrl,
+					url: this.nowUrl+'?companyCode='+item.companyCode,
 					success: res => {},
 					fail: () => {},
 					complete: () => {}

+ 4 - 0
main.js

@@ -1,6 +1,10 @@
 import Vue from 'vue'
 import App from './App'
+import {myRequest} from './util/api.js'
  // import wx from 'node_modules/jweixin-module/lib/index'
+ 
+ 
+ Vue.prototype.$myRequest = myRequest
 
 // 引入colorui组件
 import cuCustom from 'colorui/components/cu-custom.vue'

+ 9 - 9
pages.json

@@ -28,15 +28,15 @@
 								"fontSrc": "/static/iconfont/iconfont.ttf",
 								 "width": "auto"
 								
-							},
-							{
-
-								"text": "\ue63d",
-								"fontSize": "18px",
-								"float":"left",
-								"fontSrc": "/static/iconfont/iconfont.ttf",
-								 "width": "auto"
 							}
+							// {
+
+							// 	"text": "\ue63d",
+							// 	"fontSize": "18px",
+							// 	"float":"left",
+							// 	"fontSrc": "/static/iconfont/iconfont.ttf",
+							// 	 "width": "auto"
+							// }
 						]
 					}
 				
@@ -289,7 +289,7 @@
             "path" : "pages/siteListAlarming/siteListAlarming",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "综合报警",
+                "navigationBarTitleText": "站点列表",
                 "enablePullDownRefresh": true
             }
             

+ 45 - 12
pages/alarmingList/alarmingList.vue

@@ -1,62 +1,95 @@
 <template>
 	<view>
 		<!-- 宫格列表 -->
-		<square :cuIconList="cuIconList"></square>
-		<!-- <view class="section2 section  bg-white margin-top-sm margin-bottom-sm">
+		<!-- <square :cuIconList="cuIconList"></square> -->
+		<view class="section2 section  bg-white margin-top-sm margin-bottom-sm">
 			<view class="cu-list grid col-3 no-border">
 				<view class="cu-item justify-center align-center"  @tap="goProcessList">
 					<image src="../../static/square-dl.png" style="width:100rpx;height:100rpx"></image>
-					<view class="cu-tag badge">99+
+					<view class="cu-tag badge" v-if="powerMonitoringCount!=0">{{powerMonitoringCount>99?'99+':powerMonitoringCount}}
 					</view>
 					<text>电力监测</text>
 				</view>
-				<view class="cu-item justify-center align-center">
+				<view class="cu-item justify-center align-center" @tap="goProcessList2">
 					<image src="../../static/square-alarm.png" style="width:100rpx;height:100rpx"></image>  
+					<view class="cu-tag badge" v-if="videoMonitoringCount!=0">{{videoMonitoringCount>99?'99+':videoMonitoringCount}}
+					</view>
 					<text>视频告警</text>
 				</view>
 				
 			</view>
-		</view> -->
+		</view>
 	</view>
 </template>
 
 <script>
+	
 	// import square from '../../components/square/square.vue';
 	
 	export default {
 		// components: {
-		
 		// 	square
 		// },
+		
 		data() {
 			return {
+				powerMonitoringCount:'',
+				videoMonitoringCount:'',
+				companyCode:'',
+				count2:'',
 				// 宫格列表数据
 				cuIconList: [{
 					imgUrl:'../../static/square-dl.png',
-					badge: 120,
+					badge: this.powerMonitoringCount,
 					name: '电力监测',
 					redirectUrl:'/pages/processList/processList?type=1'
 				}, {
 					imgUrl:'../../static/square-alarm.png',
-					badge: 0,
+					badge: 20,
 					name: '视频告警',
 					redirectUrl:'/pages/processList/processList?type=2'
 				}],
 				
 			}
 		},
-		onLoad() {
+		onLoad(option) {
 			uni.setNavigationBarTitle({
-				title: '综合报警'
+				title: '站点类型'
 			});
-			
+			console.log(option.companyCode)
+			this.getSiteType(option.companyCode)
+
 		},
 		methods: {
 			
+			async getSiteType(ming) {
+				const res= await this.$myRequest({
+					url:'IntegratedAlarm/getSiteType',
+					data:{
+						"companyCode": ming,
+						
+					}
+				})
+				console.log(res.data)
+				// this.cuIconList=res.data.data   videoMonitoringCount
+				this.powerMonitoringCount= res.data.data[0].powerMonitoringCount
+				this.videoMonitoringCount= res.data.data[0].videoMonitoringCount
+				this.companyCode=res.data.companyCode;
+				
+			},
+			
 			// 页面跳转
 			goProcessList() {
 				uni.navigateTo({
-					url: '/pages/processList/processList',
+					url: '/pages/processList/processList?type=1&companyCode='+this.companyCode+'',
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+			},
+			goProcessList2() {
+				uni.navigateTo({
+					url: '/pages/processList/processList?type=2&companyCode='+this.companyCode+'',
 					success: res => {},
 					fail: () => {},
 					complete: () => {}

+ 1 - 1
pages/index/components/chart2/chart2.vue

@@ -47,7 +47,7 @@
 					},
 
 					title: [{ //aa标题
-						text: '{val|' + this.bindData.alarmCount+this.bindData.eventCount+ this.bindData.hiddenDangerCount+ '}\n{name|' + title + '}',
+						text: '{val|' +(parseInt(this.bindData.alarmCount)+parseInt(this.bindData.eventCount)+ parseInt(this.bindData.hiddenDangerCount))+ '}\n{name|' + title + '}',
 						top: '45%',
 						left: 'center',
 						textStyle: {

+ 27 - 14
pages/index/components/chart3/chart3.vue

@@ -1,6 +1,5 @@
 <template>
 	<view class="content">
-
 		<view @click="echarts.onClick" :prop="option" :change:prop="echarts.updateEcharts" id="echarts3" class="echarts"></view>
 
 	</view>
@@ -13,12 +12,15 @@
 
 
 	export default {
+		
+		
 		props:{
 			bindData:{
 				type:Object,
 				default: ''
 			}
-		},
+		},
+		
 		data() {
 			return {
 				option: {
@@ -29,7 +31,7 @@
 					//     },
 					grid: {  //aa位置
 						top: '2%',
-						right: '-5%',
+						right: '8%',
 						bottom: '1%',
 						left: '17%',
 						
@@ -52,26 +54,26 @@
 
 								}
 							},
-							data: ['正常 '+this.bindData.normalCount+'','其他 '+this.bindData.otherCount+'','预警 '+this.bindData.earlyWarningCount+'','故障 '+this.bindData.faultCount+'','离线 '+this.bindData.offlineCount+''   ],
+							data: ['正常','其他','预警','故障','离线'   ],
 
 						},
 						{
 							//左侧柱状图的Y轴
 							axisTick: 'none',
 							axisLine: 'none',
-							data: [0,0,0,0,0],
+							data: [this.bindData.normalCount,this.bindData.otherCount,this.bindData.earlyWarningCount,this.bindData.earlyWarningCount,this.bindData.offlineCount],
 							axisLabel: {
 								show: true,
 								verticalAlign: 'bottom',
 								align: 'right',
-								padding: [0, 45, 8, 0],
+								padding: [0, 10, 8, 0],
 								textStyle: {
 									color: '#333',
 									fontSize:'15'
 
 								},
 								formatter: function(value) {
-									return value + '%'
+									return value 
 								}
 
 							}
@@ -80,7 +82,7 @@
 					],
 					series: [{
 							type: 'bar',
-							data: ['+this.bindData.normalCount+', , , , ],
+							data: [this.bindData.normalCount, , , , ],
 							barWidth: 6,
 							itemStyle: {
 								normal: {
@@ -90,7 +92,7 @@
 							z: 2
 						}, {
 							type: 'bar',
-							data: [ ,'+this.bindData.normalCount+', , , ],
+							data: [ ,this.bindData.otherCount, , , ],
 							barWidth: 6,
 							itemStyle: {
 								normal: {
@@ -100,7 +102,7 @@
 							z: 2
 						}, {
 							type: 'bar',
-							data: [ , ,'+this.bindData.normalCount+', , ],
+							data: [ , ,this.bindData.earlyWarningCount, , ],
 							barWidth: 6,
 							itemStyle: {
 								normal: {
@@ -111,7 +113,7 @@
 						},
 						{
 							type: 'bar',
-							data: [ , , ,'+this.bindData.normalCount+', ],
+							data: [ , , ,this.bindData.faultCount, ],
 							barWidth: 6,
 							itemStyle: {
 								normal: {
@@ -122,7 +124,7 @@
 						},
 						{
 							type: 'bar',
-							data: [ , , , ,'+this.bindData.normalCount+'],
+							data: [ , , , ,this.bindData.offlineCount],
 							barWidth: 6,
 							itemStyle: {
 								normal: {
@@ -135,7 +137,7 @@
 						{
 							type: 'bar',
 							barGap: '-100%',
-							data: [1554, 1554, 1554, 1554, 1554],
+							data: [1000, 1000, 1000, 1000, 1000],
 							barWidth: 6,
 							itemStyle: {
 								normal: {
@@ -150,12 +152,23 @@
 			}
 			
 			
+		},
+		computed: {
+					// total:function(){
+					// 	 return parseInt(this.bindData.normalCount)+3
+					//  },
+					// onePersent:function(){
+					// 	 return parseInt(1/this.total*100)
+					//  },
+					 
+					 
 		},
 		onLoad() {
 			
 			// this.option.series.reverse()
 
-		},
+		},
+		
 		methods: {
 			changeOption() {
 				const data = this.option.series[0].data

+ 25 - 23
pages/index/index.vue

@@ -85,8 +85,8 @@
 
 		},
 		data() {
-			return {
-				componentKey:0,
+			return {
+				componentKey: 0,
 				arr: [],
 				searchInput: '',
 				flag: false,
@@ -143,41 +143,43 @@
 			}
 		},
 
-		onLoad() {
-			this.hackReset = false;
-			  this.$nextTick(() => {
-			       this.hackReset = true;
-			  })
+		onLoad() {
+			this.hackReset = false;
+			this.$nextTick(() => {
+				this.hackReset = true;
+			})
 			this.getData();
 			this.getSearchList();
 		},
 		methods: {
+
 			async getData() {
-				const res = await uni.request({
-					url: 'https://iot.usky.cn/USKYOF/USKYOF.php/Home/Index/getDataStatistics',
+				const res = await this.$myRequest({
+					url: 'Index/getDataStatistics',
 				})
-				console.log(res[1].data.data[0]);
-				this.staticData = res[1].data.data[0]
+				console.log(res.data.data);
+				this.staticData = res.data.data[0]
 			},
 
-			getSearchList(data) {
-				uni.request({
-					url: 'https://iot.usky.cn/USKYOF/USKYOF.php/Home/Index/getSiteDropDownBox', //仅为示例,并非真实接口地址。
-					method: 'POST',
-				
-					success: (res) => {
-						res.data.data.forEach(item => {
-							this.searchList.push(item.siteName)
-							this.searchList2.push(item.siteName)
-						});
-					}
+
+			async getSearchList(ming = {}) {
+				const res = await this.$myRequest({
+					url: 'Index/getSiteDropDownBox',
+					data: ming
+				})
+				res.data.data.forEach(item => {
+					this.searchList.push(item.siteName)
+					this.searchList2.push(item.siteName)
 				});
 			},
 
 			clickSelectItem(item, index) {
 				// alert(index);
 				alert(item);
-				this.getSearchList();
+				this.getSearchList({
+					"siteName": item
+				});
+				this.flag = false
 			},
 
 			handleInput() {

+ 94 - 69
pages/processList/processList.vue

@@ -1,38 +1,38 @@
 <template>
 	<view class="processWrapper ">
-		<!-- 		<cu-custom bgColor="bg-gradual-blue" :isBack="true"><block slot="backText">返回</block><block slot="content">布局</block></cu-custom>
- -->	<view class="ding">
-	 <scroll-view scroll-x class="bg-white nav text-center" >
-	 	<view class="cu-item" :class="index==TabCur?'text-blue cur':''" v-for="(item,index) in tabNav" :key="index" @tap="tabSelect"
-	 	 :data-id="index">
-	 		<view class="cu-tag badge">
-	 			<block class="cu-tag badge" v-if="item.badge!=1">99</block>
-	 		</view>
-	 		{{tabNav[index]}}
-	 	</view>
-	 </scroll-view>
- </view>
-		
+
+		<view class="ding">
+			<scroll-view scroll-x class="bg-white nav text-center">
+				<view class="cu-item" :class="index==TabCur?'text-blue cur':''" v-for="(item,index) in tabNav" :key="index" @tap="tabSelect"
+				 :data-id="index">
+					<!-- <view class="cu-tag badge" >
+						<block class="cu-tag badge" >{{alarmUntreatedCount}}</block>
+					</view> -->
+					{{tabNav[index]}}
+				</view>
+			</scroll-view>
+		</view>
+
 		<block v-if="TabCur==0">
-			<view class="processList" >
+			<view class="processList">
 				<view class="cu-list menu-avatar ">
-					<view class="cu-item" v-for="(item,index) in unporcessList" :key="index">
+					<view class="cu-item" v-for="(item,index) in unporcessList" :key="item.id">
 						<view class="cu-avatar lg" style="background-image:url(../../static/process-icon.png);"></view>
 						<view class="content">
 							<view class="pro-title">
-								<view class="cut">{{item.title}}</view>
+								<view class="cut">{{item.measName}}</view>
 							</view>
 							<view class="pro-des  ">
 								<view class="text-cut">
-									{{item.subTitle}}
+									{{item.digitalValue!=0?"动作":"复归"}}
 								</view>
 							</view>
-							<view class="pro-date ">{{item.time}}</view>
-						</view>
-						<view class="action">
-							<view class="unProcess"  v-if="type==1"  @tap="goUnprocessDetail">{{item.status}}</view>
-							<view class="unProcess" v-else @tap="goVideoUnprocessDetail">{{item.status}}</view>
+							<view class="pro-date ">{{item.soeTime}}</view>
 						</view>
+						<view class="action" style="z-index:99">
+							<view class="unProcess" v-if="type==1" @tap="goUnprocessDetail(item.id)">未处理</view>
+<!-- 							<view class="unProcess" v-else @tap="goVideoUnprocessDetail">未处理</view>
+ -->						</view>
 					</view>
 				</view>
 			</view>
@@ -40,22 +40,22 @@
 		<block v-if="TabCur==1">
 			<view class="processList">
 				<view class="cu-list menu-avatar ">
-					<view class="cu-item" v-for="(item,index) in processedList" :key="index" >
+					<view class="cu-item" v-for="(item,index) in unporcessList" :key="index">
 						<view class="cu-avatar lg" style="background-image:url(../../static/processed-icon.png);"></view>
-						<view class="content">
-							<view class="pro-title">
-								<view class="cut">{{item.title}}</view>
-							</view>
-							<view class="pro-des  ">
-								<view class="text-cut">
-									{{item.subTitle}}
-								</view>
-							</view>
-							<view class="pro-date ">{{item.time}}</view>
+						<view class="content">
+							<view class="pro-title">
+								<view class="cut">{{item.measName}}</view>
+							</view>
+							<view class="pro-des  ">
+								<view class="text-cut">
+									{{item.digitalValue!=0?"动作":"复归"}}
+								</view>
+							</view>
+							<view class="pro-date ">{{item.soeTime}}</view>
 						</view>
-						<view class="action">
-							<view class="processed" v-if="type==1" @tap="goProcessedDetail">{{item.status}}</view>
-							<view class="processed"v-else  @tap="goVideoProcessedDetail">{{item.status}}</view>
+						<view class="action" style="z-index:99">
+							<view class="processed" v-if="type==1" @tap="goProcessedDetail(item.id)">已处理</view>
+							<view class="processed" v-else @tap="goVideoProcessedDetail">已处理</view>
 						</view>
 					</view>
 				</view>
@@ -65,13 +65,14 @@
 	</view>
 </template>
 
-<script>
+<script>
 	import json from '../../data/json.js';
 	export default {
 		data() {
 			return {
-				unporcessList: json.unprocessList,
-				processedList: json.processedList,
+				// unporcessList: json.unprocessList,
+				unporcessList:[],
+			
 
 				type: '0',
 				modalName: null,
@@ -79,12 +80,16 @@
 				listTouchDirection: null,
 				CustomBar: this.CustomBar,
 				TabCur: 0,
-				tabNav: ['未处理', '已处理']
+				tabNav: ['未处理', '已处理'],
+				companyCode:'',
+				alarmUntreatedCount:'',
+				processingStatus:''
 			};
-		},
+		},
 		onLoad: function(option) {
-			console.log(option.type); //打印出上个页面传递的参数。
-			this.type = option.type;
+			
+			console.log(option.type); 
+			console.log(option.companyCode); 
 			if (option.type == 1) {
 				uni.setNavigationBarTitle({
 					title: '电力检测'
@@ -94,53 +99,73 @@
 					title: '视频告警'
 				});
 			}
+			
+			
+			this.companyCode = option.companyCode;
+			this.processingStatus=1
+			this.type = 1;
+			this.getProcessData({"companyCode":option.companyCode,"type":option.type,"processingStatus":"0"});
 		},
-		methods: {
-			tabSelect(e) {
-				this.TabCur = e.currentTarget.dataset.id;
-				this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
+		methods: {
+			async getProcessData(ming={}) {
+				const res= await this.$myRequest({
+					url:'IntegratedAlarm/getElectricAlarmUntreated',
+					data:ming
+				})
+				this.unporcessList=res.data.data;
+				this.alarmUntreatedCount=res.data.alarmUntreatedCount
+				  console.log(res.data)
+			},
+
+			tabSelect(e) {
+				console.log(e.currentTarget);
+				this.TabCur = e.currentTarget.dataset.id;
+				this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
+				this.getProcessData({"companyCode":this.companyCode,"type":"1","processingStatus":e.currentTarget.dataset.id});
 			},
 
 			// 页面跳转
-			goUnprocessDetail() {
+			goUnprocessDetail(id) {
+	
+			
 				uni.navigateTo({
-					url: '/pages/unprocessDetail/unprocessDetail?type=1',
+					url: '/pages/unprocessDetail/unprocessDetail?companyCode='+this.companyCode+'&processingStatus=0&id='+id+'&type=1',
 					success: res => {},
 					fail: () => {},
 					complete: () => {}
 				});
 			},
-			goProcessedDetail() {
+			goProcessedDetail(id) {
 				uni.navigateTo({
-					url: '/pages/processedDetail/processedDetail?type=1',
+					url: '/pages/processedDetail/processedDetail?companyCode='+this.companyCode+'&processingStatus='+this.processingStatus+'&id='+id+'&type=1',
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+			},
+			goVideoUnprocessDetail() {
+				uni.navigateTo({
+					url: '/pages/unprocessDetail/unprocessDetail?type=2',
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+			},
+			goVideoProcessedDetail() {
+				uni.navigateTo({
+					url: '/pages/processedDetail/processedDetail?type=2',
 					success: res => {},
 					fail: () => {},
 					complete: () => {}
 				});
-			},
-			goVideoUnprocessDetail() {
-				uni.navigateTo({
-					url: '/pages/unprocessDetail/unprocessDetail?type=2',
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
-				});
-			},
-			goVideoProcessedDetail() {
-				uni.navigateTo({
-					url: '/pages/processedDetail/processedDetail?type=2',
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
-				});
 			}
 		}
 	}
 </script>
 
 <style lang="scss">
-	//已处理未处理消息个数样式
-	
+	//已处理未处理消息个数样式
+
 	.nav .cu-item.cur {
 		position: relative;
 		border-bottom: 8rpx solid;

+ 36 - 24
pages/processedDetail/processedDetail.vue

@@ -14,39 +14,39 @@
 				<view class="info-content">
 					<view class="info-one-info ">
 						<text>站点名称:</text>
-						<text>测试站点一</text>
+						<text>{{detailMessage.siteName}}</text>
 					</view>
 					<view>
 						<text>线路名称:</text>
-						<text>进线一</text>
+						<text>{{detailMessage.deviceName}}</text>
 					</view>
 					<view>
 						<text>警告信息:</text>
-						<text>母线停电</text>
+						<text>{{detailMessage.measValue}}</text>
 					</view>
 					<view>
 						<text>警告状态:</text>
-						<text>复归</text>
+						<text>{{detailMessage.measValue?'动作':'复归'}}</text>
 					</view>
 					<view>
 						<text>采集终端:</text>
-						<text>DA00012784</text>
+						<text>{{detailMessage.deviceCode}}</text>
 					</view>
 					<view>
 						<text>站点地址:</text>
-						<text>沪太路8786弄155号<text class="icon iconfont map" @click="mapLocation()">&#xe612;</text></text>
+						<text>{{detailMessage.address}}<text class="icon iconfont map" @click="mapLocation()">&#xe612;</text></text>
 					</view>
 					<view>
 						<text>联系人:</text>
-						<text>韩正义</text>
+						<text>{{detailMessage.userName}}</text>
 					</view>
 					<view>
 						<text>联系方式:</text>
-						<text>15122423833<text class="phone icon iconfont" @click="submit()">&#xe61d;</text></text>
+						<text>{{detailMessage.phone}}<text class="phone icon iconfont" @click="submit()">&#xe61d;</text></text>
 					</view>
 					<view>
 						<text>运行数据:</text>
-						<text class="checkMore"  @tap="goOpeDataDetail">点击查看</text>
+						<text class="checkMore"  @tap="goOpeDataDetail(detailMessage)">点击查看</text>
 					</view>
 					<view>
 						<text>视频:</text>
@@ -62,21 +62,18 @@
 					处理信息
 				</view>
 				<view class="info-content">
-					<view class="info-one-info ">
-						<text>是否误报:</text>
-						<text>误报</text>
-					</view>
+				
 					<view>
 						<text>处理人:</text>
-						<text>13262908415</text>
+						<text>{{detailMessage.handler}}</text>
 					</view>
 					<view>
 						<text>处理时间:</text>
-						<text>2021-01-27 09:41:12</text>
+						<text>{{detailMessage.handlerTime}}</text>
 					</view>
 					<view>
-						<text>处理内容:</text>
-						<text>测试</text>
+						<text>处理内容:</text>   
+						<text>{{detailMessage.handlerTime}}</text>
 					</view>
 			
 				</view>
@@ -160,33 +157,48 @@
 				radio: 'A',
 				radio: 'B',
 				modalName: null,
-				type: '0'
+				type: '0',
+				detailMessage:{}
 			}
 		},
 		onLoad: function(option) {
-			console.log(option.type); //打印出上个页面传递的参数。
 			this.type = option.type;
+			this.companyCode = option.companyCode;
+			this.processingStatus=option.processingStatus;
+			this.alarmId = option.id;
+			this.getUnProcessDetail({"companyCode":option.companyCode,"processingStatus":option.processingStatus,"alarmId":option.id})
 		},
 		methods: {
-			
+			async getUnProcessDetail(ming={}) {
+				const res= await this.$myRequest({
+					url:'IntegratedAlarm/getPowerAlarmDetails',
+					data:ming
+				})
+				// this.unporcessList=res.data.data;
+				// this.alarmUntreatedCount=res.data.alarmUntreatedCount
+				  console.log(res.data.data[0]);
+				  this.detailMessage=res.data.data[0]
+			},
 			submit() {
 				uni.makePhoneCall({
 					phoneNumber: '15122423833' //仅为示例
 				});
 			},
 			mapLocation(){
+				console.log(this.detailMessage)
 				uni.openLocation({
-					latitude: 31.469465,
-					longitude: 121.327514,
+					latitude: parseInt(this.detailMessage.latitude),
+					longitude: parseInt(this.detailMessage.longitude),
 					success: function() {
 						console.log('success');
 					}
 				});
 			},
+	
 			// 页面跳转
-			goOpeDataDetail() {
+			goOpeDataDetail(detailMessage) {
 				uni.navigateTo({
-					url: '/pages/unprocessDetail/opeDataDetail/opeDataDetail',
+					url: '/pages/unprocessDetail/opeDataDetail/opeDataDetail?companyCode='+this.companyCode+'&deviceCode='+detailMessage.deviceCode+'&deviceType='+this.type+'',
 					success: res => {},
 					fail: () => {},
 					complete: () => {}

+ 9 - 19
pages/siteListAlarming/siteListAlarming.vue

@@ -38,28 +38,18 @@
 
 		onLoad() {
 			this.getSiteList()
-
 		},
 
 		methods: {
-			getSiteList() {
-		
-				uni.request({
-					url: 'https://iot.usky.cn/USKYOF/USKYOF.php/Home/IntegratedAlarm/getSiteList',
-					data: {
-						"companyCode": "13"
-					},
-					header: {
-						'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
-					},
-
-					method: 'POST',
-					success: (res) => {
-						 console.log('res.data')
-						console.log(res.data.data)
-						this.siteListData=res.data.data
-					}
-				});
+			async getSiteList() {
+				const res= await this.$myRequest({
+					url:'IntegratedAlarm/getSiteList',
+					// data:{
+					// 	"companyCode": "13"
+					// }
+				})
+				console.log(res.data.data)
+				this.siteListData=res.data.data
 			}
 		}
 

+ 17 - 9
pages/unprocessDetail/opeDataDetail/opeDataDetail.vue

@@ -12,27 +12,27 @@
 			<view class="info-content">
 				<view class="info-one-info ">
 					<text>Uab:</text>
-					<text>219.06V</text>
+					<text>{{opeData.Uab}}V</text>
 				</view>
 				<view>
 					<text>Ubc:</text>
-					<text>0.00V</text>
+					<text>{{opeData.Ubc}}V</text>
 				</view>
 				<view>
 					<text>Uca:</text>
-					<text>219.06V</text>
+					<text>{{opeData.Uca}}V</text>
 				</view>
 				<view>
 					<text>la:</text>
-					<text>0.00A</text>
+					<text>{{opeData.Ia}}A</text>
 				</view>
 				<view>
 					<text>lb:</text>
-					<text>0.00A</text>
+					<text>{{opeData.Ib}}A</text>
 				</view>
 				<view>
 					<text>lc:</text>
-					<text>0.00A</text>
+					<text>{{opeData.Ic}}A</text>
 				</view>
 				
 			</view>
@@ -44,16 +44,24 @@
 	export default {
 		data() {
 			return {
+				opeData:{}
 				
 			}
 		},
-		onLoad() {
+		onLoad(option) {
 			
-		
+		this.getOpeData({"companyCode":option.companyCode,"deviceCode":option.deviceCode,"deviceType":option.deviceType})
 		
 		},
 		methods: {
-			
+			async getOpeData(ming={}) {
+				const res= await this.$myRequest({
+					url:'OperationMonitoring/getMonitoringScreen',
+					data:ming
+				})
+				  console.log(res.data.data[0]);
+				  this.opeData=res.data.data[0]
+			},
 		}
 	}
 </script>

+ 39 - 32
pages/unprocessDetail/unprocessDetail.vue

@@ -13,42 +13,42 @@
 				<view class="info-content">
 					<view class="info-one-info ">
 						<text>站点名称:</text>
-						<text>测试站点一</text>
+						<text>{{detailMessage.siteName}}</text>
 					</view>
 					<view>
 						<text>线路名称:</text>
-						<text>进线一</text>
+						<text>{{detailMessage.deviceName}}</text>
 					</view>
 					<view>
 						<text>警告信息:</text>
-						<text>母线停电</text>
+						<text>{{detailMessage.measValue}}</text>
 					</view>
 					<view>
 						<text>警告状态:</text>
-						<text>复归</text>
+						<text>{{detailMessage.measValue?'动作':'复归'}}</text>
 					</view>
 					<view>
 						<text>采集终端:</text>
-						<text>DA00012784</text>
+						<text>{{detailMessage.deviceCode}}</text>
 					</view>
 					<view>
 						<text>站点地址:</text>
-						<text>沪太路8786弄155号<text class="icon iconfont map" @click="mapLocation()">&#xe612;</text></text>
+						<text>{{detailMessage.address}}<text class="icon iconfont map" @click="mapLocation()">&#xe612;</text></text>
 					</view>
 					<view>
 						<text>联系人:</text>
-						<text>韩正义</text>
+						<text>{{detailMessage.userName}}</text>
 					</view>
 					<view>
 						<text>联系方式:</text>
 						<text>
-							15122423833
+							{{detailMessage.phone}}
 							<text class="phone icon iconfont" @click="submit()">&#xe61d;</text>
 						</text>
 					</view>
 					<view>
 						<text>运行数据:</text>
-						<text class="checkMore" @tap="goOpeDataDetail">点击查看</text>
+						<text class="checkMore" @tap="goOpeDataDetail(detailMessage)">点击查看</text>
 					</view>
 					<view>
 						<text>视频:</text>
@@ -64,17 +64,6 @@
 				</view>
 				<view class="padding-lr padding-bottom-lg">
 					<form action="">
-						<!-- <radio-group class="block" @change="RadioChange">
-							<view class=" flex align-center ">
-								<radio class="blue mr-sm margin-right-xs" :class="radio=='A'?'checked':''" :checked="radio=='A'?true:false"
-								 value="A"></radio>
-								<view class="title">单个处理</view>
-								<radio class="blue margin-left-lg margin-right-xs" :class="radio=='B'?'checked':''" :checked="radio=='B'?true:false"
-								 value="B"></radio>
-								<view class="title ">批量处理</view>
-							</view>
-						</radio-group> -->
-			
 						<view class="cu-form-group">
 							<!-- <textarea maxlength="-1" :disabled="modalName!=null" @input="textareaAInput" placeholder="备注信息,最多可输入50个字..."></textarea>-->
 							<textarea class="JTxtArea lg" placeholder="备注信息,最多可输入50个字..." :maxlength="50" :data-maxnum="reason.length+'/50'"
@@ -104,16 +93,16 @@
 				<view class="info-content">
 					<view class="info-one-info ">
 						<text>设备名称:</text>
-						<text>火点侦测摄像机</text>
+						<text>{{detailMessage.deviceName}}</text> 
 					</view>
 					
 					<view>
 						<text>设备地址:</text>
-						<text>上海市虹口区塘沽路伍继办公室</text>
+						<text>{{detailMessage.address}}</text>
 					</view>
 					<view>
 						<text>告警信息:</text>
-						<text>火点/高温检测告警</text>
+						<text>{{detailMessage.address}}</text>
 					</view>
 				</view>
 			</view>
@@ -180,14 +169,32 @@
 				radio: 'B',
 				modalName: null,
 				reason: '',
-				type: '0'
+				type: '0',
+				detailMessage:{}
 			}
 		},
-		onLoad: function(option) {
-			console.log(option.type); //打印出上个页面传递的参数。
-			this.type = option.type;
+		onLoad: function(option) {
+			this.type = option.type;
+			this.companyCode = option.companyCode;
+			this.processingStatus=option.processingStatus;
+			this.alarmId = option.id;
+			this.getUnProcessDetail({"companyCode":option.companyCode,"processingStatus":option.processingStatus,"alarmId":option.id})
 		},
-		methods: {
+		methods: {
+			
+			
+			async getUnProcessDetail(ming={}) {
+				const res= await this.$myRequest({
+					url:'IntegratedAlarm/getPowerAlarmDetails',
+					data:ming
+				})
+				// this.unporcessList=res.data.data;
+				// this.alarmUntreatedCount=res.data.alarmUntreatedCount
+				  console.log(res.data.data[0]);
+				  this.detailMessage=res.data.data[0]
+			},
+			
+			
 			submit() {
 				uni.makePhoneCall({
 					phoneNumber: '15122423833' //仅为示例
@@ -195,8 +202,8 @@
 			},
 			mapLocation() {
 				uni.openLocation({
-					latitude: 31.469465,
-					longitude: 121.327514,
+					latitude: parseInt(this.detailMessage.latitude),
+					longitude: parseInt(this.detailMessage.longitude),
 					success: function() {
 						console.log('success');
 					}
@@ -206,9 +213,9 @@
 			},
 
 			// 页面跳转
-			goOpeDataDetail() {
+			goOpeDataDetail(detailMessage) {
 				uni.navigateTo({
-					url: '/pages/unprocessDetail/opeDataDetail/opeDataDetail',
+					url: '/pages/unprocessDetail/opeDataDetail/opeDataDetail?companyCode='+this.companyCode+'&deviceCode='+detailMessage.deviceCode+'&deviceType='+this.type+'',
 					success: res => {},
 					fail: () => {},
 					complete: () => {}

+ 31 - 0
util/api.js

@@ -0,0 +1,31 @@
+const BASE_URL = 'https://iot.usky.cn/USKYOF/USKYOF.php/Home/'
+
+export const myRequest = (options) => {
+	return new Promise((resolve, reject) => {
+		uni.request({
+			url: BASE_URL + options.url,
+			method: options.method || 'POST',
+			data: options.data || {},
+			header: {
+				'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
+			},
+			success: (res) => {
+				if (res.data.flag == false) { //登录失效
+					return uni.showToast({
+						title: '获取数据失败',
+					})
+				}
+				resolve(res)
+			},
+			fail: (err) => {
+				uni.showToast({
+					title: '请求接口失败',
+
+				})
+				reject(err)
+
+			}
+		})
+	})
+
+}