浏览代码

数据duijie

Ming 4 年之前
父节点
当前提交
d1ab716597

+ 45 - 71
data/json.js

@@ -1,72 +1,5 @@
 // 本地模拟json数据
 // 首页九宫格
-let cuIconList = [{
-		imgUrl: '../../static/square1.png',
-		badge: 120,
-		name: '综合报警',
-		redirectUrl: '/pages/siteList/siteList?type=1'
-	}, {
-		imgUrl: '../../static/square2.png',
-		badge: 0,
-		name: '设备管理',
-		redirectUrl: '/pages/siteList/siteList?type=2'
-	},
-	{
-		imgUrl: '../../static/square-xf.png',
-		badge: 0,
-		name: '消防督查单',
-		redirectUrl: ''
-	},
-	{
-		imgUrl: '../../static/square-xj.png',
-		badge: 0,
-		badge: 0,
-		name: '巡检',
-		redirectUrl: ''
-	},
-	{
-		imgUrl: '../../static/square-bx.png',
-		badge: 0,
-		name: '报修',
-		redirectUrl: ''
-	}, {
-		imgUrl: '../../static/square-wb.png',
-		badge: 0,
-		name: '维保',
-		redirectUrl: ''
-	},
-	{
-		imgUrl: '../../static/square-sp.png',
-		badge: 0,
-		badge: 0,
-		name: '视频监测',
-		redirectUrl: ''
-	},
-	{
-		imgUrl: '../../static/square-bz.png',
-		badge: 0,
-		badge: 0,
-		name: '风险保障',
-		redirectUrl: ''
-	}, {
-		imgUrl: '../../static/square-rl.png',
-		badge: 0,
-		name: '人脸识别',
-		redirectUrl: ''
-	},
-	{
-		imgUrl: '../../static/square-sb.png',
-		badge: 0,
-		name: '设备注册',
-		redirectUrl: ''
-	},
-	{
-		imgUrl: '../../static/square-yh.png',
-		badge: 0,
-		name: '用户管理',
-		redirectUrl: ''
-	}
-];
 
 // 首页报警数据
 
@@ -96,51 +29,61 @@ let alarmingSquareList = [{
 		imgUrl: '../../static/alarming-zj.png',
 		badge: 100,
 		name: '报警主机',
+		type:1
 
 	}, {
 		imgUrl: '../../static/alarming-water.png',
 		badge: 0,
 		name: '水系统',
+		type:2
 	},
 	{
 		imgUrl: '../../static/alarming-ck.png',
 		badge: 0,
 		name: '测控终端',
+		type:6
 	},
 	{
 		imgUrl: '../../static/alarming-dq.png',
 		badge: 0,
 		name: '电气火灾',
+		type:7
 	},
 	{
 		imgUrl: '../../static/alarming-sp.png',
 		badge: 0,
 		name: '视频告警',
+		type:16
 	},
 	{
 		imgUrl: '../../static/alarming-dt.png',
 		badge: 0,
 		name: '电梯报警',
+		type:17
 	},
 	{
 		imgUrl: '../../static/alarming-mc.png',
 		badge: 0,
 		name: '门磁',
+		type:130
 	},
 	{
 		imgUrl: '../../static/alarming-kr.png',
 		badge: 0,
 		name: '可燃气体',
+		type:131
 	},
 	{
 		imgUrl: '../../static/alarming-jg.png',
 		badge: 0,
 		name: '井盖监测',
+		type:128
 	},
 	{
 		imgUrl: '../../static/alarming-xf.png',
 		badge: 0,
 		name: '消防栓监测',
+		type:4
 	}
 ];
 
@@ -232,19 +175,50 @@ let deviceType = [{
 		"num": "4",
 		"imgUrl": "/static/dt-videoIcon.png"
 	},
-
-	{
+{
 		"id": "7",
+		"title": "电梯",
+		"num": "4",
+		"imgUrl": "/static/dt.png"
+	},
+	{
+		"id": "8",
 		"title": "井盖",
 		"num": "4",
 		"imgUrl": "/static/dt-jgIcon.png"
 	},
 	{
-		"id": "8",
+		"id": "9",
 		"title": "消防栓",
 		"num": "4",
 		"imgUrl": "/static/dt-xfsIcon.png"
 	},
+	
+	{
+		"id": "10",
+		"title": "液位设备",
+		"num": "4",
+		"imgUrl": "/static/dt-ywIcon.png"
+	},
+	{
+		"id": "11",
+		"title": "地磁设备",
+		"num": "4",
+		"imgUrl": "/static/dt-dcIcon.png"
+	},
+	{
+		"id": "12",
+		"title": "门禁设备",
+		"num": "4",
+		"imgUrl": "/static/dt-mjIcon.png"
+	},
+	{
+		"id": "13",
+		"title": "天然气体设备",
+		"num": "4",
+		"imgUrl": "/static/dt-trIcon.png"
+	},
+	
 ];
 //设备管理
 let deviceManage = [{
@@ -558,7 +532,7 @@ module.exports = {
 
 	staticData: staticData,
 
-	cuIconList: cuIconList,
+	// cuIconList: cuIconList,
 	unprocessList: unprocessList,
 	processedList: processedList,
 	alarmingSquareList: alarmingSquareList,

+ 24 - 14
pages/alarmingList/alarmingList.vue

@@ -3,7 +3,7 @@
 		<!-- 宫格列表 -->
 		<view class="section2 section  bg-white padding-top-sm margin-bottom-sm">
 			<view class="cu-list grid col-3 no-border">
-				<view class="cu-item justify-center align-center"  v-for="(item,index) in alarmingSquareList" @tap="goProcessList()"
+				<view class="cu-item justify-center align-center"  v-for="(item,index) in alarmingSquareList" @tap="goProcessList(item)"
 				 :key="index">
 					<image :src="item.imgUrl" style="width:100rpx;height:100rpx"></image>
 					<view class="cu-tag badge" v-if="item.badge!=0">
@@ -29,38 +29,48 @@
 				companyCode: '',
 				count2: '',
 				// 宫格列表数据
-				alarmingSquareList: json.alarmingSquareList
+				alarmingSquareList: json.alarmingSquareList,
+				getData:{}
 
 			}
 		},
 		onLoad(option) {
 
 			// console.log(option.companyCode)
-			// this.getSiteType(option.companyCode)
+			this.getSiteType(option.companyCode)
+			this.companyCode=option.companyCode
 
 		},
 		methods: {
 
-			async getSiteType(ming) {
+			async getSiteType(params) {
 				const res = await this.$myRequest({
-					url: 'IntegratedAlarm/getSiteType',
+					url: 'ComprehensiveAlarm/getAlarmStatistics',
 					data: {
-						"companyCode": ming,
-
+						"company_code": params,
 					}
 				})
-				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;
+				
+				this.getData=res.data.data[0]
+				this.alarmingSquareList[0].badge=this.getData.untreated_alarm_host_count;
+				this.alarmingSquareList[1].badge=this.getData.untreated_fire_water_count;
+				this.alarmingSquareList[2].badge=this.getData.untreated_rtu_count;
+				this.alarmingSquareList[3].badge=this.getData.untreated_electrical_fire_count;
+				this.alarmingSquareList[4].badge=this.getData.untreated_video_monitoring_count;
+				this.alarmingSquareList[5].badge=this.getData.untreated_elevator_count;
+				this.alarmingSquareList[6].badge=this.getData.untreated_door_count;  //门磁
+				this.alarmingSquareList[7].badge=this.getData.untreated_gas_count; //可燃气体
+				this.alarmingSquareList[8].badge=this.getData.untreated_manhole_cover_count;  //井盖
+				this.alarmingSquareList[9].badge=this.getData.untreated_fire_hydrant_count; //消防栓
+				
+				
 
 			},
 
 			// 页面跳转
-			goProcessList() {
+			goProcessList(item) {
 					uni.navigateTo({
-						url: '/pages/processList/processList',
+						url: '/pages/processList/processList?type='+item.type+'&&companyCode='+this.companyCode,
 						success: res => {},
 						fail: () => {},
 						complete: () => {}

+ 25 - 1
pages/deviceType/deviceType.vue

@@ -26,9 +26,11 @@
 		data() {
 			return {
 				deviceType: json.deviceType,
+				getData:{}
 			};
 		},
 		onLoad: function(option) {
+			this.getDeviceData({'company_code':option.companyCode})
 
 		},
 
@@ -37,7 +39,29 @@
 				uni.navigateTo({
 					url: '/pages/device-Manage/device-Manage',
 				});
-			}
+			},
+			
+			// 设备类型数据请求
+			async getDeviceData(params = {}) {
+				const res = await this.$myRequest({
+					url: 'DeviceManagement/getDeviceCount',
+					data:params,
+					showLoading: true
+				})
+				
+				this.getData=res.data.data[0];
+				console.log(this.getData);
+				this.deviceType[0].num=this.getData.access_control_device_count;
+				this.deviceType[1].num=this.getData.water_meter_device_count
+				this.deviceType[2].num=this.getData.electrical_fire_device_count
+				this.deviceType[3].num=this.getData.rtu_device_count
+				
+				this.deviceType[4].num=this.getData.smoke_sensation_device_count
+				this.deviceType[5].num=this.getData.video_device_count
+				this.deviceType[6].num=this.getData.manhole_cover_device_count
+				this.deviceType[6].num=this.getData.fire_hydrant_device_count
+				
+			},
 
 		}
 

+ 74 - 71
pages/index/components/chart/chart.vue

@@ -1,34 +1,11 @@
 <template>
 	<view class="content">
-		<view @click="echarts.onClick" :prop="option" :change:prop="echarts.updateEcharts" id="echarts" class="echarts"></view>
+		<view @click="echarts.onClick"   :change:prop="echarts.updateEcharts" id="echarts" class="echarts"></view>
 	</view>
 </template>
 
 <script>
-	var dataname = ['消防水系统', '报警主机', '电气火灾', '其他', '监控视频']
-	var datamax = [600, 600, 600, 600, 600]
-	var datavaule = [265, 368, 350, 260, 300, ]
-	var color = ['#3C8BF0', '#06CDF8', '#0ECB70', '#6744EF', '#FFD803'];
-
-	var indicator = []
-
-	for (var i = 0; i < dataname.length; i++) {
-		indicator.push({
-			name: dataname[i],
-			max: datamax[i],
-			color: color[i]
-		})
-	}
-
-	function contains(arrays, obj) {
-		var i = arrays.length;
-		while (i--) {
-			if (arrays[i] === obj) {
-				return i;
-			}
-		}
-		return false;
-	}
+	
 
 	export default {
 		name: 'chart',
@@ -39,9 +16,80 @@
 			}
 		},
 		data() {
+	
 			return {
+				aa:0
+
+			}
+		},
+		onLoad() {
+	
+
+		},
+		methods: {
+			// changeOption() {
+			// 	const data = this.option.series[0].data
+			// 	// 随机更新示例数据
+			// 	data.forEach((item, index) => {
+			// 		data.splice(index, 1, Math.random() * 40)
+			// 	})
+			// },
+			// onViewClick(options) {
+			// 	console.log(options)
+			// }
+		}
+	}
+</script>
+
+<script module="echarts" lang="renderjs">
+	let myChart
+	export default {
+		mounted() {
+			if (typeof window.echarts === 'function') {
+				this.initEcharts()
+			} else {
+				// 动态引入较大类库避免影响页面展示
+				const script = document.createElement('script')
+				// view 层的页面运行在 www 根目录,其相对路径相对于 www 计算
+				script.src = 'static/echarts.min.js'
+				script.onload = this.initEcharts.bind(this)
+				document.head.appendChild(script)
+			}
+		},
+		methods: {
+			initEcharts() {
+				var dataname = ['消防水系统', '报警主机', '电气火灾', '其他', '监控视频']
+				var datavaule = [this.bindData.fire_water_count, this.bindData.alarm_host_count, this.bindData.electrical_fire_count, this.bindData.other_count, this.bindData.video_monitoring_count]
+				var aa = [this.bindData.fire_water_count, this.bindData.alarm_host_count, this.bindData.electrical_fire_count, this.bindData.other_count, this.bindData.video_monitoring_count]
+				aa=aa.sort().pop();
+				var datamax = [aa, aa, aa, aa, aa];
+				var color = ['#3C8BF0', '#06CDF8', '#0ECB70', '#6744EF', '#FFD803'];
+				
+				var indicator = []
+				
+				for (var i = 0; i < dataname.length; i++) {
+					indicator.push({
+						name: dataname[i],
+						max: datamax[i],
+						color: color[i]
+					})
+				}
+				
+				function contains(arrays, obj) {
+					var i = arrays.length;
+					while (i--) {
+						if (arrays[i] === obj) {
+							return i;
+						}
+					}
+					return false;
+				}
+				
+
 
-				option: {
+				myChart = echarts.init(document.getElementById('echarts'))
+				// 观测更新的数据在 view 层可以直接访问到
+				myChart.setOption({
 					tooltip: {
 						formatter: function() {
 							var html = '';
@@ -132,53 +180,8 @@
 						},
 						data: [datavaule]
 					}]
-				}
-			}
-		},
-		onLoad() {
-			alert(1)
-			console.log('this.bindData')
-			console.log(this,bindData)
-
-		},
-		methods: {
-			changeOption() {
-				const data = this.option.series[0].data
-				// 随机更新示例数据
-				data.forEach((item, index) => {
-					data.splice(index, 1, Math.random() * 40)
 				})
 			},
-			onViewClick(options) {
-				console.log(options)
-			}
-		}
-	}
-</script>
-
-<script module="echarts" lang="renderjs">
-	let myChart
-	export default {
-		mounted() {
-			if (typeof window.echarts === 'function') {
-				this.initEcharts()
-			} else {
-				// 动态引入较大类库避免影响页面展示
-				const script = document.createElement('script')
-				// view 层的页面运行在 www 根目录,其相对路径相对于 www 计算
-				script.src = 'static/echarts.min.js'
-				script.onload = this.initEcharts.bind(this)
-				document.head.appendChild(script)
-			}
-		},
-		methods: {
-			initEcharts() {
-
-
-				myChart = echarts.init(document.getElementById('echarts'))
-				// 观测更新的数据在 view 层可以直接访问到
-				myChart.setOption(this.option)
-			},
 			updateEcharts(newValue, oldValue, ownerInstance, instance) {
 				// 监听 service 层数据变更
 				myChart.setOption(newValue)

+ 7 - 5
pages/index/components/chart2/chart2.vue

@@ -34,6 +34,9 @@
 			}
 		},
 		data() {
+			console.log('bindData')
+			console.log(this.bindData)
+			
 			return {
 				option: {
 					color: ['#F67F32', '#3BD2BD', '#1DABFE'],
@@ -48,7 +51,7 @@
 					},
 
 					title: [{ //aa标题
-						text: '{val|' +(parseInt(this.bindData.alarmCount)+parseInt(this.bindData.eventCount)+ parseInt(this.bindData.hiddenDangerCount))+ '}\n{name|' + title + '}',
+						text: '{val|' +(parseInt(this.bindData.alarm_count)+parseInt(this.bindData.event_count)+ parseInt(this.bindData.hidden_danger_count))+ '}\n{name|' + title + '}',
 						top: '45%',
 						left: 'center',
 						textStyle: {
@@ -104,15 +107,15 @@
 
 						data: [{
 								name: "报警",
-								value: this.bindData.alarmCount
+								value: this.bindData.alarm_count
 							},
 							{
 								name: "事件",
-								value: this.bindData.eventCount
+								value: this.bindData.event_count
 							},
 							{
 								name: "隐患",
-								value: this.bindData.hiddenDangerCount
+								value: this.bindData.hidden_danger_count
 							},
 
 						],
@@ -154,7 +157,6 @@
 			}
 		},
 		onLoad() {
-
 		},
 		methods: {
 			changeOption() {

+ 7 - 7
pages/index/components/chart3/chart3.vue

@@ -61,7 +61,7 @@
 							//左侧柱状图的Y轴
 							axisTick: 'none',
 							axisLine: 'none',
-							data: [this.bindData.normalCount,this.bindData.otherCount,this.bindData.earlyWarningCount,this.bindData.earlyWarningCount,this.bindData.offlineCount],
+							data: [this.bindData.alarm_count,this.bindData.other_count,this.bindData.early_warning_device_count,this.bindData.fault_device_count,this.bindData.off_line_device_count],
 							axisLabel: {
 								show: true,
 								verticalAlign: 'bottom',
@@ -82,7 +82,7 @@
 					],
 					series: [{
 							type: 'bar',
-							data: [this.bindData.normalCount, , , , ],
+							data: [this.bindData.alarm_count, , , , ],
 							barWidth: 6,
 							itemStyle: {
 								normal: {
@@ -92,7 +92,7 @@
 							z: 2
 						}, {
 							type: 'bar',
-							data: [ ,this.bindData.otherCount, , , ],
+							data: [ ,this.bindData.other_count, , , ],
 							barWidth: 6,
 							itemStyle: {
 								normal: {
@@ -102,7 +102,7 @@
 							z: 2
 						}, {
 							type: 'bar',
-							data: [ , ,this.bindData.earlyWarningCount, , ],
+							data: [ , ,this.bindData.early_warning_device_count, , ],
 							barWidth: 6,
 							itemStyle: {
 								normal: {
@@ -113,7 +113,7 @@
 						},
 						{
 							type: 'bar',
-							data: [ , , ,this.bindData.faultCount, ],
+							data: [ , , ,this.bindData.fault_device_count, ],
 							barWidth: 6,
 							itemStyle: {
 								normal: {
@@ -124,7 +124,7 @@
 						},
 						{
 							type: 'bar',
-							data: [ , , , ,this.bindData.offlineCount],
+							data: [ , , , ,this.bindData.off_line_device_count],
 							barWidth: 6,
 							itemStyle: {
 								normal: {
@@ -155,7 +155,7 @@
 		},
 		computed: {
 					// total:function(){
-					// 	 return parseInt(this.bindData.normalCount)+3
+					// 	 return parseInt(this.bindData.alarm_count)+3
 					//  },
 					// onePersent:function(){
 					// 	 return parseInt(1/this.total*100)

+ 107 - 16
pages/index/index.vue

@@ -1,7 +1,6 @@
 <template>
 	<view style="background:#f1f1f1;" class="padding-sm">
 		
-		
 		<!-- 下拉选择 -->
 		<view class="searchSelect shadow" v-if="flag">
 			<view class="cu-bar search bg-white">
@@ -14,10 +13,11 @@
 			</view>
 			<view class="select-items">
 				<view class="select-item" v-for="(item,index) in searchList" @click="clickSelectItem(item,index)"
-					:key="index">{{item}}</view>
+					:key="index">{{item.owner_name}}</view>
 			</view>
 		</view>
 		<!-- 下拉选择 end -->
+		
 		<!-- <search-Select :flag="flag"></search-Select> -->
 
 		<!-- 图表 -->
@@ -31,7 +31,7 @@
 			</view>
 			<view style="height:570rpx">
 				<view v-if="Inv == 0">
-					<chart :bindData="staticData" v-if="hackReset"></chart>
+					<chart :bindData="staticData" v-if="hackReset&& JSON.stringify(staticData) != '{}'"></chart>
 				</view>
 				<view v-if="Inv == 1">
 					<chart2 :bindData="staticData"></chart2>
@@ -54,7 +54,7 @@
 							<image src="../../static/chart3-5.png" style="width:64rpx;height:64rpx"></image>
 						</li>
 					</ul>
-					<chart3 :bindData="staticData" :searchList="searchList"  :searchList2="searchList2">
+					<chart3 :bindData="staticData" >
 					</chart3>
 				</view>
 			</view>
@@ -100,7 +100,7 @@
 			return {
 				staticData: {},
 				alarmCount: json.staticData.data[0].alarmCount,
-				cuIconList: json.cuIconList,
+				// cuIconList: json.cuIconList,
 				Inv: 0,
 
 				
@@ -110,6 +110,77 @@
 				
 				
 				searchInput: '',
+				selectedCode:10012,
+				
+				
+				cuIconList : [{
+						imgUrl: '../../static/square1.png',
+						badge: 120,
+						name: '综合报警',
+						redirectUrl: '/pages/siteList/siteList?type=1'
+					}, {
+						imgUrl: '../../static/square2.png',
+						badge: 0,
+						name: '设备管理',
+						redirectUrl: '/pages/siteList/siteList?type=2'
+					},
+					{
+						imgUrl: '../../static/square-xf.png',
+						badge: 0,
+						name: '消防督查单',
+						redirectUrl: ''
+					},
+					{
+						imgUrl: '../../static/square-xj.png',
+						badge: 0,
+						badge: 0,
+						name: '巡检',
+						redirectUrl: ''
+					},
+					{
+						imgUrl: '../../static/square-bx.png',
+						badge: 0,
+						name: '报修',
+						redirectUrl: ''
+					}, {
+						imgUrl: '../../static/square-wb.png',
+						badge: 0,
+						name: '维保',
+						redirectUrl: ''
+					},
+					{
+						imgUrl: '../../static/square-sp.png',
+						badge: 0,
+						badge: 0,
+						name: '视频监测',
+						redirectUrl: ''
+					},
+					{
+						imgUrl: '../../static/square-bz.png',
+						badge: 0,
+						badge: 0,
+						name: '风险保障',
+						redirectUrl: ''
+					}, {
+						imgUrl: '../../static/square-rl.png',
+						badge: 0,
+						name: '人脸识别',
+						redirectUrl: ''
+					},
+					{
+						imgUrl: '../../static/square-sb.png',
+						badge: 0,
+						name: '设备注册',
+						redirectUrl: ''
+					},
+					{
+						imgUrl: '../../static/square-yh.png',
+						badge: 0,
+						name: '用户管理',
+						redirectUrl: ''
+					}
+				]
+				
 			};
 		},
 
@@ -123,12 +194,21 @@
 		},
 
 		onLoad(option) {
+			
+			// 数据渲染
+			this.getHomeData();
+			
 
 			// 图表切换渲染
-			this.hackReset = true;
+			this.hackReset = false;
+			this.$nextTick(() => {
+				this.hackReset = true;
+			})
+			
+			this.getHandleData();
+			this.getSearchList()
 	
-			// 数据渲染
-			this.getSearchList();
+			
 		},
 		methods: {
 			// 九宫格页面跳转
@@ -136,10 +216,10 @@
 				let url = "";
 				switch (index) {
 					case 0:
-						url = "/pages/alarmingList/alarmingList"
+						url = "/pages/alarmingList/alarmingList?companyCode="+this.selectedCode
 						break;
 					case 1:
-						url = "/pages/deviceType/deviceType"
+						url = "/pages/deviceType/deviceType?companyCode="+this.selectedCode
 						break;
 					case 2:
 						url = "/pages/inspectList/inspectList"
@@ -202,15 +282,15 @@
 			},
 			
 
-			//请求
+			//站点下拉请求
 			async getSearchList(param = {}) {
 				const res = await this.$myRequest({
 					url: 'Index/getCompanyList',
 					data: param
 				})
 				res.data.data.forEach(item => {
-					this.searchList.push(item.owner_name)
-					this.searchList2.push(item.owner_name)
+					this.searchList.push(item)
+					this.searchList2.push(item)
 				});
 			},
 			
@@ -221,8 +301,9 @@
 			
 			// 下拉选择
 			clickSelectItem(item, index) {
+				this.selectedCode=item.owner_code;
 				this.getSearchList({
-					"siteName": item
+					"owner_code": item.owner_code
 				});
 				this.flag = false
 			},
@@ -244,8 +325,8 @@
 
 			},
 			
-			//请求
-			async getSearchList(param = {}) {
+			//echarts图表请求
+			async getHomeData(param = {}) {
 				const res = await this.$myRequest({
 					url: 'Index/getHomePageData',
 					data: param
@@ -255,6 +336,16 @@
 				this.staticData=res.data.data[0]
 				
 			},
+			// 未处理告警请求
+			async getHandleData() {
+				const res = await this.$myRequest({
+					url: 'Index/getFunctionalModuleStatistics',
+					showLoading: true
+				})
+				
+				this.cuIconList[0].badge = res.data.data[0].fire_brigade_inspector_count;
+				this.cuIconList[2].badge = res.data.data[0].comprehensive_alarm_count
+			},
 
 
 		

+ 61 - 42
pages/processList/processList.vue

@@ -11,8 +11,7 @@
 					{{item}}
 				</view>
 			</scroll-view>
-		</view>
-		
+		</view>
 
 		<block v-if="TabCur==0">
 			<view class="processList">
@@ -22,18 +21,17 @@
 							<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.owner_name}}</view>
 								</view>
 								<view class="pro-des  ">
 									<view class="text-cut">
-										{{item.des}}
+										{{item.unitinfo}}
 									</view>
 								</view>
 								<view class="pro-date ">{{item.time}}</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(item.id)">未处理</view>
+								<view class="unProcess"  @tap="goUnprocessDetail(item)">未处理</view>
 							</view>
 						</view>
 						<view class=" text-center margin-top" v-if="unporcessList.length === 0">暂无数据...</view>
@@ -48,18 +46,17 @@
 							<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 class="cut">{{item.owner_name}}</view>
 								</view>
 								<view class="pro-des  ">
 									<view class="text-cut">
-										{{item.des}}
+										{{item.unitinfo}}
 									</view>
 								</view>
 								<view class="pro-date ">{{item.time}}</view>
 							</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(item.id)">已处理</view>
+								<view class="processed"  @tap="goProcessedDetail(item)">已处理</view>
 							</view>
 						</view>
 						<view class="text-center margin-top" v-if="porcessedList.length === 0">暂无数据...</view>
@@ -75,8 +72,8 @@
 	export default {
 		data() {
 			return {
-				 unporcessList: json.unprocessList,
-				 porcessedList: json.processedList,
+				 unporcessList: [],
+				 porcessedList: [],
 				 
 				type: '0',
 				modalName: null,
@@ -90,6 +87,15 @@
 			};
 		},
 		onLoad: function(option) {
+			
+			this.getProcessData({
+				"company_code": option.companyCode,
+				"type": option.type,
+				"processing_status": 0
+			},0);
+			this.companyCode = option.companyCode;
+			this.processingStatus = 1
+			this.type = option.type;
 
 			
 		},
@@ -104,6 +110,36 @@
 			});
 		},
 		methods: {
+			
+			
+			async getProcessData(params = {}, whichTab) {
+				const res = await this.$myRequest({
+					url: 'ComprehensiveAlarm/getIntegratedAlarmList',
+					data: params,
+					showLoading:true
+			
+				})
+				this.unporcessList = res.data.data;
+			
+				if (whichTab == 0) {
+					this.unporcessList = res.data.data;
+					this.alarmUntreatedCount = parseInt(res.data.alarmUntreatedCount)
+				} else {
+					this.porcessedList = res.data.data;
+					this.alarmUntreatedCount1 = parseInt(res.data.alarmUntreatedCount)
+			
+				}
+			
+			
+				//   console.log(res.data)
+			},
+			
+			
+			
+			
+			
+			
+			
 
 			
 
@@ -112,49 +148,32 @@
 				console.log(e.currentTarget);
 				this.TabCur = e.currentTarget.dataset.id;
 				this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
-
-
-
+				
+				this.getProcessData({
+					"company_code": this.companyCode,
+					"type": this.type,
+					"processing_status": e.currentTarget.dataset.id
+				},1);
 			},
 
 			// 页面跳转
-			goUnprocessDetail(id) {
+			goUnprocessDetail(item) {
+				if(item.type==1||item.type==3)
 				uni.navigateTo({
-					url: '/pages/unprocessDetail/unprocessDetail?companyCode=' + this.companyCode + '&processingStatus=0&id=' + id +
-						'&type=1',
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
-				});
-			},
-			goVideoUnprocessDetail(id) {
-				uni.navigateTo({
-					url: '/pages/unprocessDetail/unprocessDetail?companyCode=' + this.companyCode + '&processingStatus=0&id=' + id +
-						'&type=2',
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
+					url: '/pages/unprocessDetail/unprocessDetail?companyCode=' + this.companyCode + '&id=' + item.id +'&type='+this.type+'&deviceCode='+item.device_code+'&data2='+item.data2+'&data3='+item.data3+'&data5='+item.data5,
 				});
 			},
-			goProcessedDetail(id) {
+		
+			goProcessedDetail(item) {
 				uni.navigateTo({
-					url: '/pages/processedDetail/processedDetail?companyCode=' + this.companyCode + '&processingStatus=' + this.processingStatus +
-						'&id=' + id + '&type=1',
+					url: '/pages/processedDetail/processedDetail?id=' + item.id + '&type='+item.type,
 					success: res => {},
 					fail: () => {},
 					complete: () => {}
 				});
 			},
 
-			goVideoProcessedDetail(id) {
-				uni.navigateTo({
-					url: '/pages/processedDetail/processedDetail?companyCode=' + this.companyCode + '&processingStatus=' + this.processingStatus +
-						'&id=' + id + '&type=2',
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
-				});
-			}
+			
 		}
 	}
 </script>

+ 34 - 11
pages/processedDetail/processedDetail.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<view class="timeBox flex justify-between align-center padding-lr-sm">
-			<view class="time">2021-01-18 15:16:45</view>
+			<view class="time">{{getData.clsj}}</view>
 			<button class="cu-btn radius bg-green sm">已处理</button>
 		</view>
 	
@@ -15,16 +15,16 @@
 				<view class="info-content">
 					<view class="info-one-info ">
 						<text>设备名称:</text>
-						<text>三楼赛特威尔测试烟感二</text>
+						<text>{{getData.device_name}}</text>
 					</view>
 					
 					<view>
 						<text>设备地址:</text> 
-						<text>上海市青浦区徐泾镇徐乐路208号</text>
+						<text>{{getData.unitinfo}}</text>
 					</view>
 					<view>
 						<text>告警信息:</text>
-						<text>烟雾拆卸报警</text>
+						<text>{{getData.alarm_information}}</text>
 					</view>
 				</view>
 			</view>
@@ -39,19 +39,19 @@
 				<view class="info-content">
 					<view class="info-one-info ">
 						<text>是否误报:</text>
-						<text>非误报</text>
+						<text>{{getData.clwb?'是':'否'}}</text>
 					</view>
 					<view>
 						<text>处理人:</text>
-						<text>13895656565</text>
+						<text>{{getData.clr}}</text>
 					</view>
 					<view>
 						<text>处理时间:</text>
-						<text>2021-01-18 18:00:00</text>
+						<text>{{getData.clsj}}</text>
 					</view>
 					<view>
 						<text>处理内容:</text>
-						<text>测试</text>
+						<text>{{getData.clnr}}</text>
 					</view>
 				</view>
 			</view>
@@ -71,15 +71,38 @@
 				modalName: null,
 				type: '0',
 				detailMessage:{},
-				detailMessage2:{}
+				detailMessage2:{},
+				
+				getData:{}
 			}
 		},
 		onLoad: function(option) {
 		
-			
+			this.getDetailData({
+				
+				"type": option.type,
+				"id": option.id
+			})
 			
 		},
-		methods: {
+		methods: {
+			
+			async getDetailData(params = {}) {
+				const res = await this.$myRequest({
+					url: 'ComprehensiveAlarm/getAlarmDetails',
+					data: params,
+					showLoading:true
+			
+				})
+				this.getData = res.data.data[0];
+			console.log(this.getData)
+				
+			
+			
+				//   console.log(res.data)
+			},
+			
+			
 			
 			submit() {
 				uni.makePhoneCall({

二进制
static/dt-dcIcon.png


二进制
static/dt-mjIcon.png


二进制
static/dt-trIcon.png


二进制
static/dt-ywIcon.png


二进制
static/dt.png