ming il y a 4 ans
Parent
commit
9f33f925f3

+ 47 - 5
common/common.scss

@@ -240,7 +240,7 @@ radio,checkbox {
 
 
 .info-content view text:first-child {
-	width: 160rpx;
+	width: auto!important;
 	display: inline-block
 }
 .info-content view text:last-child {
@@ -387,9 +387,7 @@ radio,checkbox {
 	}
 	
 	
-	// 导出
-	
-	
+	// 导出页面
 	.cu-dialog{
 		width:70%
 	}
@@ -399,4 +397,48 @@ radio,checkbox {
 	}
 	.cu-dialog{
 		border-radius:20rpx
-	}
+	}
+	
+	// 设备类型
+	.cu-list.menu-avatar .deviceTypeItem.cu-item{
+		height:110rpx;
+		 .content{
+			 left:100rpx!important
+		 }
+		.cu-avatar.round{
+			width:70rpx;
+			height:70rpx
+			
+			
+		}
+		.title{
+			font-size:32rpx!important;
+		}
+		.num{
+			color:#666;
+		}
+	}
+	
+	// 设备详情
+	.radiusStatus{
+		width:20rpx;height:20rpx;border-radius:50%;display:inline-block;
+		margin-right:6rpx
+	}
+	.radiusStatus.offLine{
+		
+	}
+	.bg-offLine{
+		background:#ABABAB;
+		color:#666666;
+		.radiusStatus{
+			background:#666
+		}
+	}
+	.bg-onLine{
+		background:#08BE04;
+		color:#fff;
+		.radiusStatus{
+			background:#fff
+		}
+	}
+		

+ 102 - 57
data/json.js

@@ -139,61 +139,6 @@ let deviceOffLineData = [{
 	time: '2020-01-08 15:15:12'
 }]
 
-
-
-// 本地模拟json数据
-let siteListData = [{
-		"id": 1,
-		"siteName": '测试站点一',
-
-	},
-	{
-		"id": 2,
-		"siteName": '测试站点二'
-	},
-	{
-		"id": 3,
-		"siteName": '测试站点三'
-	},
-	{
-		"id": 4,
-		"siteName": '测试站点四',
-		"iconUrl": "../../static/site-icon-alarm.png",
-	},
-	{
-		"id": 5,
-		"siteName": '测试站点五'
-	},
-	{
-		"id": 3,
-		"siteName": '测试站点三'
-	},
-	{
-		"id": 3,
-		"siteName": '测试站点三'
-	},
-	{
-		"id": 3,
-		"siteName": '测试站点三'
-	},
-	{
-		"id": 3,
-		"siteName": '测试站点三'
-	},
-	{
-		"id": 3,
-		"siteName": '测试站点三'
-	},
-	{
-		"id": 3,
-		"siteName": '测试站点三'
-	},
-	{
-		"id": 3,
-		"siteName": '测试站点三'
-	},
-];
-
 let unprocessList = [{
 		"id": "561",
 		"title": "烟雾拆卸报警",
@@ -227,12 +172,112 @@ let processedList = [{
 	}
 ];
 
+// 设备类型
+let deviceType = [{
+		"id": "1",
+		"title": "火警",
+		"num": "3",
+		"imgUrl": "/static/square-video.png"
+	},
+	{
+		"id": "2",
+		"title": "水警",
+		"num": "4",
+		"imgUrl": "/static/square-dl.png"
+	},
+	{
+		"id": "3",
+		"title": "电气火灾",
+		"num": "4",
+		"imgUrl": "/static/square-dl.png"
+	},
+	{
+		"id": "4",
+		"title": "RTU",
+		"num": "4",
+		"imgUrl": "/static/square-dl.png"
+	},
+	{
+		"id": "5",
+		"title": "烟感",
+		"num": "4",
+		"imgUrl": "/static/square-dl.png"
+	},
+	{
+		"id": "6",
+		"title": "视频",
+		"num": "4",
+		"imgUrl": "/static/square-dl.png"
+	},
+	{
+		"id": "6",
+		"title": "电梯",
+		"num": "4",
+		"imgUrl": "/static/square-dl.png"
+	},
+	{
+		"id": "7",
+		"title": "井盖",
+		"num": "4",
+		"imgUrl": "/static/square-dl.png"
+	},
+	{
+		"id": "8",
+		"title": "消防栓",
+		"num": "4",
+		"imgUrl": "/static/square-dl.png"
+	},
+];
+//设备管理
+let deviceManage = [{
+		"id": "561",
+		"title": "测试用传装置",
+		"des": "三楼茶水间",
+		"time": "2021-01-20 15:23:43",
+		"status":0
+	},
+	{
+		"id": "561",
+		"title": "测试用传装置",
+		"des": "三楼茶水间",
+		"time": "2021-01-20 15:23:43",
+		"status":1
+	},
+	{
+		"id": "561",
+		"title": "测试用传装置",
+		"des": "三楼茶水间",
+		"time": "2021-01-20 15:23:43",
+		"status":2
+	}
+];
+
+// 消防督查单
+let inspectList = [{
+		"id": "1",
+		"title": "人工督查单",
+		"num": "3",
+		"imgUrl": "/static/square-video.png"
+	},
+	{
+		"id": "2",
+		"title": "电子督查单",
+		"num": "4",
+		"imgUrl": "/static/square-dl.png"
+	}
+	
+];
+
 // 定义数据出口
 module.exports = {
-	siteListData: siteListData,
+	
 	cuIconList: cuIconList,
 	unprocessList: unprocessList,
 	processedList: processedList,
 	alarmingSquareList: alarmingSquareList,
-	deviceOffLineData: deviceOffLineData
+	deviceOffLineData: deviceOffLineData,
+	deviceType: deviceType,
+	deviceManage:deviceManage,
+	inspectList:inspectList
+	
 }

+ 0 - 1
main.js

@@ -1,7 +1,6 @@
 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

+ 49 - 28
pages.json

@@ -92,6 +92,50 @@
 		        "enablePullDownRefresh": false
 		    }
 		    
+		},
+		{
+			"path": "pages/deviceType/deviceType",
+			"style": {
+				"navigationBarTitleText": "设备类型",
+				"enablePullDownRefresh": false
+				
+			}
+		
+		},
+		{
+			"path": "pages/device-Manage/device-Manage",
+			"style": {
+				"navigationBarTitleText": "设备管理",
+				"app-plus": {
+					"titleNView": {
+						"buttons": [{
+							"text": "\ue613",
+							"fontSize": "20px",
+							// "redDot": true,
+							"float": "right",
+							"fontSrc": "/static/iconfont/iconfont.ttf",
+							"width": "auto"
+						}]
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/deviceDetail/deviceDetail",
+			"style": {
+				"navigationBarTitleText": "设备详情",
+				"enablePullDownRefresh": false
+			}
+		
+		},
+		{
+		    "path" : "pages/inspectList/inspectList",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "消防督查单",
+		        "enablePullDownRefresh": false
+		    }
+		    
 		},
 
 
@@ -117,18 +161,8 @@
 		},
 
 
-		{
-			"path": "pages/deviceType/deviceType",
-			"style": {
-				"navigationBarTitleText": "设备类型"
-			}
-		},
-		{
-			"path": "pages/device-Manage/device-Manage",
-			"style": {
-				"navigationBarTitleText": "设备管理"
-			}
-		},
+		
+		
 
 
 
@@ -223,14 +257,7 @@
 				"enablePullDownRefresh": false
 			}
 
-		}, {
-			"path": "pages/deviceType/deviceType",
-			"style": {
-				"navigationBarTitleText": "设备类型",
-				"enablePullDownRefresh": false
-			}
-
-		}, {
+		},  {
 			"path": "pages/device-Manage/device-Manage",
 			"style": {
 				"navigationBarTitleText": "设备管理",
@@ -252,14 +279,7 @@
 				"enablePullDownRefresh": false
 			}
 
-		}, {
-			"path": "pages/device-Manage/deviceDetail/deviceDetail",
-			"style": {
-				"navigationBarTitleText": "监控画面",
-				"enablePullDownRefresh": false
-			}
-
-		}, {
+		},  {
 			"path": "pages/siteManage/siteManage",
 			"style": {
 				"navigationBarTitleText": "站点管理",
@@ -375,6 +395,7 @@
 
 	    
         
+       
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 31 - 45
pages/device-Manage/device-Manage.vue

@@ -1,18 +1,26 @@
 <template>
 
 	<view class="">
-		<view class="cu-list menu-avatar">
-			
-			
-			<view class="cu-item deviceTypeItem" :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in deviceData"
+		<view class="cu-list menu-avatar">
+			<view class="cu-item"  :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in deviceManage"
 			 :key="index" :data-target="'move-box-' + index" @tap="goDeviceDetail(item)">
-				<view class="cu-avatar round lg" style="background-image:url(../../static/jx.png)"></view>
+				<view class="cu-avatar round lg" style="background-image:url(../../static/device-icon.png)"></view>
 				<view class="content" >
-					<view class="">{{item.deviceName}}</view>
+					<view class="pro-title">
+						<view class="cut">{{item.title}}</view>
+					</view>
+					<view class="pro-des  ">
+						<view class="text-cut">
+							{{item.des}}
+						</view>
+					</view>
+					<view class="pro-date ">{{item.time}}111</view>
 				</view>
 				<view class="nav-right num">
 					<view class="text-grey">
-						{{item.trueStatus?'离线':'在线'}}
+						<span class="online" v-if="item.status==0">在线</span>
+						<span class="offline" v-if="item.status==1">离线</span>
+						<span class="error" v-if="item.status==2">故障</span>
 						<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
 					</view>
 				</view>
@@ -21,63 +29,41 @@
 	</view>
 </template>
 
-<script>
+<script>
+	import json from '../../data/json.js';
 	export default {
 		data() {
 			return {
-				deviceData:[],
-				
+				deviceManage: json.deviceManage,
 				modalName: null,
 			};
 		},
 		
 		onLoad:function(option){
-			console.log(111)
-			console.log(option.companyCode)
-			this.companyCode=option.companyCode
-			this.deviceType=option.deviceType
-			this.getDeviceManage({"companyCode":option.companyCode,"deviceType":option.deviceType})
+			
+		},
+		onNavigationBarButtonTap(e) {
+			console.log(e)
+			uni.navigateTo({
+				url: '/pages/export/export',
+	
+			});
 		},
 		methods: {
-			
-			async getDeviceManage(ming={}) {
-				const res= await this.$myRequest({
-					url:'OperationMonitoring/getDeviceList',
-					data:ming,
-					showLoading:true
-				})
-				console.log(res.data.data)
-				this.deviceData=res.data.data
-				// this.powerDeviceCount= res.data.data[0].powerDeviceCount
-				// this.videoDeviceCount= res.data.data[0].videoDeviceCount
-				
-			},
-			
+		
 			// 页面跳转
 			goDeviceDetail(item) {
 				uni.navigateTo({
-					url: '/pages/device-Manage/deviceDetail/deviceDetail?deviceType=1&companyCode='+this.companyCode+'&deviceCode='+item.deviceCode+'',
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
+					url: '/pages/deviceDetail/deviceDetail',
 				});
 			},
-			
-
-
-
 		}
 
 	}
 </script>
 
-<style lang="scss">
-	.cu-list.menu-avatar>.cu-item .content>uni-view:first-child {
-		font-size: 32rpx;
-	}
-
-	.num {
-		font-size: 30rpx;
-		color: #666;
+<style lang="scss">
+	.cu-item{
+		height:180rpx!important
 	}
 </style>

+ 0 - 147
pages/device-Manage/deviceDetail/deviceDetail.vue

@@ -1,147 +0,0 @@
-<template>
-	<view class="wrapper flex justify-between padding-lr-lg">
-		<view class="device-items">
-			<view class="device-item">
-				<text class="text-yellow">Uab</text>
-				<text>{{deviceDetail.Uab>1000?deviceDetail.Uab/1000:deviceDetail.Uab}}</text>
-				<text v-if="deviceDetail.Uab>1000">KV</text>
-				<text v-else>V</text>
-			</view>
-			<view class="device-item">
-				<text class="text-green">Ubc</text>
-				<text>{{deviceDetail.Ubc>1000?deviceDetail.Ubc/1000:deviceDetail.Ubc}}</text>
-				<text v-if="deviceDetail.Ubc>1000">KV</text>
-				<text v-else>V</text>
-			</view>
-			<view class="device-item">
-				<text class="text-red">Uca</text>
-				<text>{{deviceDetail.Uca}}</text>
-				<text>V</text>
-			</view>
-			<view class="device-item">
-				<text class="text-red">F</text>
-				<text>{{deviceDetail.F}}</text>
-				<text>V</text>
-			</view>
-		</view>
-
-		<view class="device-items">
-			<view class="device-item">
-				<text class="text-yellow">La</text>
-				<text>{{deviceDetail.Ia}}</text>
-				<text>A</text>
-			</view>
-			<view class="device-item">
-				<text class="text-green">Lb</text>
-				<text>{{deviceDetail.Ib}}</text>
-				<text>A</text>
-			</view>
-			<view class="device-item">
-				<text class="text-red">Lc</text>
-				<text>{{deviceDetail.Ic}}</text>
-				<text>A</text>
-			</view>
-			<view class="device-item">
-				<text class="text-yellow">P</text>
-				<text>{{deviceDetail.P}}</text>
-				<text>kW</text>
-			</view>
-			<view class="device-item">
-				<text class="text-green">Q</text>
-				<text>{{deviceDetail.Q}}</text>
-				<text>kvar</text>
-			</view>
-			<view class="device-item">
-				<text class="text-red">cos</text>
-				<text>{{deviceDetail.COS}}</text>
-				<text>V</text>
-			</view>
-		</view>
-	</view>
-</template>
-<script>
-	export default {
-		data() {
-			return {
-				deviceDetail:''
-			}
-		},
-	
-		
-		onLoad:function(option){
-			
-			uni.setNavigationBarColor({
-				frontColor: "#ffffff", //文字颜色
-				backgroundColor: "#000033", //底部背景色
-			})
-			console.log(111)
-			console.log(option.companyCode)
-			this.companyCode=option.companyCode
-			this.deviceType=option.deviceType
-			this.getDeviceDetail({"companyCode":option.companyCode,"deviceType":option.deviceType,"deviceCode":option.deviceCode})
-		},
-		
-		
-		methods: {
-			
-			async getDeviceDetail(ming={}) {
-				const res= await this.$myRequest({
-					url:'OperationMonitoring/getMonitoringScreen',
-					data:ming,
-					showLoading:true
-				})
-				console.log(res.data.data[0])
-				this.deviceDetail=res.data.data[0]
-				// this.powerDeviceCount= res.data.data[0].powerDeviceCount
-				// this.videoDeviceCount= res.data.data[0].videoDeviceCount
-				
-			},
-		}
-	}
-</script>
-
-<style lang="scss">
-	page {
-		height: 100% !important
-	}
-
-	.wrapper {
-		width: 100%;
-		height: 100%;
-		background-color: #000033;
-		background-image: url(../../../static/device-bg.png);
-		background-position: center center;
-		background-size: cover;
-		position: relative;
-
-		.device-items {
-			font-family: FANDOLFANG-REGULAR;
-			margin-top: 150rpx;
-			color: #fff;
-			.device-item text{
-				vertical-align:top
-			}
-
-			.device-item text:first-child {
-				width: 50rpx;
-				display: inline-block;
-				font-size: 28rpx;
-			}
-			.device-item text:nth-child(2) {
-				display: inline-block;
-				width: 100rpx;
-				margin: 0 15rpx 30rpx 15rpx;
-				height: 42rpx;
-				background: #FFFFCC;
-				font-size: 28rpx;
-				text-align: left;
-				padding-left: 10rpx;
-				line-height: 42rpx;
-				color: #333;
-			}
-		}
-		.device-item:nth-child(3) {
-			margin-bottom: 94rpx;
-		}
-	}
-</style>

+ 222 - 0
pages/deviceDetail/components/chart.vue

@@ -0,0 +1,222 @@
+<template>
+	<view class="content">
+
+		<view @click="echarts.onClick" :prop="option" :change:prop="echarts.updateEcharts" id="echarts2" class="echarts"></view>
+
+	</view>
+</template>
+
+<script>
+	// let echartData = [{
+	// 		name: "报警",
+	// 		value: 1000
+	// 	},
+	// 	{
+	// 		name: "事件",
+	// 		value: 2920
+	// 	},
+	// 	{
+	// 		name: "隐患",
+	// 		value: 2200
+	// 	},
+
+	// ];
+	 let title = '报警总数';
+	// let total = echartData.reduce((a, b) => {
+	// 	return a + b.value * 1
+	// }, 0);
+
+	export default {
+		props:{
+			bindData:{
+				type:Object,
+				default: ''
+			}
+		},
+		data() {
+			return {
+				option: {
+					color: ['#F67F32', '#3BD2BD', '#1DABFE'],
+
+					title: {
+						left: 'center'
+					},
+					tooltip: {
+						trigger: 'item',
+						formatter: "{a} <br/>{b}: {c} ({d}%)"
+					},
+
+					title: [{ //aa标题
+						text: '{val|' +(parseInt(this.bindData.wubao)+parseInt(this.bindData.unSolve)+ parseInt(this.bindData.truely))+ '}\n{name|' + title + '}',
+						top: '35%',
+						left: 'center',
+						textStyle: {
+							rich: {
+								name: {
+									fontSize: 14,
+									fontWeight: 'normal',
+									color: '#666666',
+									padding: [5, 0]
+								},
+								val: {
+									fontSize: 24,
+									color: '#333333',
+								}
+							}
+						}
+					}],
+					legend: { //aa图例
+						orient: 'horizontal',
+						icon: 'circle',
+						itemWidth: 12,
+						itemHeight: 12,
+						itemGap: 50,
+						 bottom: -6,
+						textStyle: {
+
+							fontSize: 14,
+							rich: {
+								name: {
+									fontSize: 18
+								},
+								value: {
+									fontSize: 14,
+									padding: [0, 20, 0, 5]
+								},
+
+							}
+						},
+					},
+					series: [{
+						name: '访问来源',
+						type: 'pie',
+						radius: ['37%', '60%'],
+						center: ['50%', '45%'],
+						itemStyle: {
+							normal: {
+								shadowBlur: 20,
+								shadowColor: '#F9F5F7',
+								shadowOffsetX: 0,
+								shadowOffsetY: 0,
+							},
+						},
+
+						data: [{
+								name: "误报数",
+								value: this.bindData.wubao
+							},
+							{
+								name: "未解决次数",
+								value: this.bindData.unSolve
+							},
+							{
+								name: "真实报警",
+								value: this.bindData.truely
+							},
+
+						],
+						emphasis: {
+							itemStyle: {
+								shadowBlur: 10,
+								shadowOffsetX: 0,
+								shadowColor: 'rgba(0, 0, 0, 0.5)'
+							}
+						},
+						labelLine: {
+							normal: {
+								length: 10, //aa折线长度
+								length2: 20, //aa折线长度
+
+							}
+						},
+						label: {
+							normal: {
+								
+								formatter: "{b}: {c}"
+								// formatter: params => {
+								// 	var percent = 0;
+								// 	var total = 0;
+								// 	for (var i = 0; i < echartData.length; i++) {
+								// 		total += echartData[i].value;
+								// 	}
+								// 	console.log(111);
+								// 	console.log(total);
+
+								// 	percent = ((params.value / total) * 100).toFixed(0);
+								// 	return params.name + ': ' + percent + '%';
+
+								// },
+
+							}
+						},
+					}]
+				}
+			}
+		},
+		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.js'
+				script.onload = this.initEcharts.bind(this)
+				document.head.appendChild(script)
+			}
+		},
+		methods: {
+			initEcharts() {
+				myChart = echarts.init(document.getElementById('echarts2'))
+				// 观测更新的数据在 view 层可以直接访问到
+				myChart.setOption(this.option)
+			},
+			updateEcharts(newValue, oldValue, ownerInstance, instance) {
+				// 监听 service 层数据变更
+				myChart.setOption(newValue)
+			},
+			onClick(event, ownerInstance) {
+				// 调用 service 层的方法
+				ownerInstance.callMethod('onViewClick', {
+					test: 'test'
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+	.content {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.echarts {
+		width: 100%;
+		height: 500rpx;
+		margin-bottom: 70rpx;
+	}
+</style>

+ 95 - 0
pages/deviceDetail/deviceDetail.vue

@@ -0,0 +1,95 @@
+<template>
+	<view>
+		<view class="timeBox flex justify-between align-center padding-lr-sm">
+			<view class="time">测试用传装置</view>
+			<button class="cu-btn radius bg-offLine sm">
+				<view class="radiusStatus offLine"></view>
+				离线
+			</button>
+		</view>
+
+		<view>
+			<!-- 基本信息start -->
+			<view class="basic-info">
+				<view class="info-tit margin-left-xs">
+					<text class="cuIcon-titles margin-right-xs"></text>
+					基本信息
+				</view>
+				<view class="info-content">
+					<view class="info-one-info ">
+						<text>设备类型:</text>
+						<text>报警主机</text>
+					</view>
+
+					<view>
+						<text>设备编号:</text>
+						<text>15221</text>
+					</view>
+					<view>
+						<text>物联网卡号:</text>
+						<text></text>
+					</view>
+					<view>
+						<text>安装位置:</text>
+						<text>物联网开发</text>
+					</view>
+					<view>
+						<text>添加时间:</text>
+						<text>2019-05-28 16:12:45</text>
+					</view>
+					<view>
+						<text>设备地址:</text>
+						<text>青浦区徐乐路208c幢</text>
+					</view>
+				</view>
+			</view>
+			<!-- 基本信息end -->
+
+			<!-- 图表start -->
+			<view class="processStatus">
+				<view class="info-tit margin-left-xs">
+					<text class="cuIcon-titles margin-right-xs"></text>
+					图表
+				</view>
+				<view class="info-content" >
+					<chart :bindData="staticData"></chart>
+				</view>
+			</view>
+			<!-- 图表end -->
+		</view>
+
+
+	</view>
+</template>
+
+<script>
+	import chart from './components/chart.vue';
+	export default {
+		components: {
+			chart
+
+		},
+		data() {
+			return {
+				staticData: {
+					wubao:9,
+					unSolve:6,
+					truely:20
+				},
+			}
+		},
+		onLoad: function(option) {
+
+
+
+		},
+		methods: {
+		
+
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 19 - 134
pages/deviceType/deviceType.vue

@@ -2,150 +2,42 @@
 
 	<view class="">
 		<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="hrefKing(index)">
-				<view class="cu-avatar round lg" :style="`background-image:url(${item.imgUrl})`"></view>
+			<view class="cu-item deviceTypeItem" v-for="(item,index) in deviceType" :key="index" @tap="goDeviceType">
+				<view class="cu-avatar round" :style="`background-image:url(${item.imgUrl})`"></view>
 				<view class="content">
-					<view class="">{{item.title}}</view>
+					<view class="title">{{item.title}}</view>
 				</view>
 				<view class="nav-right num">
-					<view class="text-grey">
+					<view>
 						共{{item.num}}个设备
 						<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
 					</view>
 				</view>
-			</view> -->
-			
-			<view class="cu-item deviceTypeItem"  @tap="goVideoList()">
-				<view class="cu-avatar round lg" style="background-image:url(../../static/square-video.png)"></view>
-				<view class="content">
-					<view class="">视频</view>
-				</view>
-				<view class="nav-right num">
-					<view class="text-grey">
-						共{{videoDeviceCount}}个设备
-						<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
-					</view>
-				</view>
-			</view>
-			<view class="cu-item deviceTypeItem" @tap="goDeviceManage()">
-				<view class="cu-avatar round lg" style="background-image:url(../../static/square-dl.png)"></view>
-				<view class="content">
-					<view class="">电力监测</view>
-				</view>
-				<view class="nav-right num">
-					<view class="text-grey">
-						共{{powerDeviceCount}}个设备
-						<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
-					</view>
-				</view>
-			</view>
-			
+			</view>
+
+
 		</view>
 	</view>
 </template>
 
 <script>
+	import json from '../../data/json.js';
 	export default {
 		data() {
-			return {
-				
-				powerDeviceCount:'',
-				videoDeviceCount:'',
-				companyCode:'',	
-				// deviceData: [{
-				// 		imgUrl: '../../static/square-video.png',
-				// 		title: '视频',
-				// 		num: 6
-				// 	}, {
-				// 		imgUrl: '../../static/square-dl.png',
-				// 		title: '电力监测',
-				// 		num: 11
-				// 	}
-				// ],
-
-				modalName: null,
-
+			return {
+				deviceType: json.deviceType,
 			};
-		},
-		onLoad:function(option){
-			console.log(111)
-			console.log(option.companyCode)
-			this.companyCode=option.companyCode
-			this.getSiteType(option.companyCode)
-		},
-		
-	
-		methods: {
-
-			async getSiteType(ming) {
-				const res= await this.$myRequest({
-					url:'OperationMonitoring/getDeviceStatistics',
-					data:{
-						"companyCode": ming,
-						
-					}
-				})
-				console.log(res.data.data[0])
-				this.powerDeviceCount= res.data.data[0].powerDeviceCount
-				this.videoDeviceCount= res.data.data[0].videoDeviceCount
-				
-			},
-			
-			
-			
-			goDeviceManage(item){
-				if(this.powerDeviceCount){
-					uni.navigateTo({
-						url: '/pages/device-Manage/device-Manage?deviceType=1&companyCode='+this.companyCode+'',
-						success: res => {},
-						fail: () => {},
-						complete: () => {}
-					});
-				}
-				
-			},
-			
-			goVideoList(item){
-				if(this.videoDeviceCount){
-					uni.navigateTo({
-						url: '/pages/videoList/videoList?deviceType=2&companyCode='+this.companyCode+'',
-						success: res => {},
-						fail: () => {},
-						complete: () => {}
-					});
-				}
-				
-			},
-			
-
-			hrefKing(index) {
-				// log(index)
-				let url = "";
-				switch (index) {
-					case 0:
-						url = "/pages/videoList/videoList" //进口水果
-						break;
-					case 1:
-						url = "/pages/device-Manage/device-Manage" //热门品种
-						break;
-
-					default:
-						break;
-				}
-				if (url) {
-					uni.navigateTo({
-						url: url
-					})
-				} else {
-					uni.showToast({
-						title: '功能未完成~',
-						icon: 'none'
-					})
-				}
-			},
+		},
+		onLoad: function(option) {
 
+		},
 
+		methods: {
+			goDeviceType() {
+				uni.navigateTo({
+					url: '/pages/device-Manage/device-Manage',
+				});
+			}
 
 		}
 
@@ -153,12 +45,5 @@
 </script>
 
 <style lang="scss">
-	.cu-list.menu-avatar>.cu-item .content>uni-view:first-child {
-		font-size: 32rpx;
-	}
 
-	.num {
-		font-size: 30rpx;
-		color: #666;
-	}
 </style>

+ 4 - 1
pages/index/index.vue

@@ -285,7 +285,10 @@
 						url = "/pages/alarmingList/alarmingList"
 						break;
 					case 1:
-						url = "/pages/siteList/siteList"
+						url = "/pages/deviceType/deviceType"
+						break;
+					case 2:
+						url = "/pages/inspectList/inspectList"
 						break;
 					default:
 						break;

+ 59 - 0
pages/inspectList/inspectList.vue

@@ -0,0 +1,59 @@
+<template>
+
+	<view class="">
+		<view class="cu-list menu-avatar">
+			<view class="cu-item deviceTypeItem" v-for="(item,index) in inspectList" :key="index" >
+				<view class="cu-avatar round" :style="`background-image:url(${item.imgUrl})`"></view>
+				<view class="content">
+					<view class="title">{{item.title}}</view>
+				</view>
+				<view class="nav-right num">
+					<view>
+						
+						<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
+					</view>
+				</view>
+			</view>
+			
+			
+		</view>
+	</view>
+</template>
+
+<script>
+	import json from '../../data/json.js';
+	export default {
+		data() {
+			return {
+			inspectList: json.inspectList,
+
+			};
+		},
+		onLoad:function(option){
+			
+		},
+		
+	
+		methods: {
+			// goDeviceType(){
+			// 	uni.navigateTo({
+			// 		url: '/pages/device-Manage/device-Manage',
+			// 	});
+			// }
+
+			
+			
+			
+			
+			
+
+
+
+		}
+
+	}
+</script>
+
+<style lang="scss">
+	
+</style>