wkyy 1 سال پیش
والد
کامیت
7f6a60acaa

+ 35 - 10
apis/pagejs/energy/index.js

@@ -1,13 +1,38 @@
 import request from '@/apis/utils/request'
 import request from '@/apis/utils/request'
  
  
- export function homePage(data) {
- 	var url='/mobile/tenant/homePage';
- 	return request({
- 		method: 'post',
- 		data: data,
- 		url: url
- 	})
- }
- 
- 
+export function homePage(data) {
+	var url='/mobile/tenant/homePage';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function findByOpenId(data) {
+	var url='/mobile/employeeUser/findByOpenId';
+	return request({
+		method: 'get',
+		data: data,
+		url: url
+	})
+}
+
+export function homePageKwh(data) {
+	var url='/mobile/employee/homePageKwh';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function homePageDeviceData(data) {
+	var url='/mobile/employee/homePageDeviceData';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
  
  

+ 2 - 1
config/.env.dev.js

@@ -9,7 +9,8 @@ const UNI_APP = {
 	NODE_ENV :"dev",
 	NODE_ENV :"dev",
 	SIMPLE_RUN:true,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
 	SIMPLE_RUN:true,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
 	//openId:"1234",//开发人员2
 	//openId:"1234",//开发人员2
-	openId:"55555",//测试人员 开发环境
+	// openId:"55555",//测试人员 开发环境
+	openId:"111111", //sz
 	//openId:"oK9Wr57rAcNzihDN2PEdptprT0As", 
 	//openId:"oK9Wr57rAcNzihDN2PEdptprT0As", 
 	// openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",
 	// openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",
 	//openId:"oLowyuOJvTszgk96C0f8j0XfcEXg",//zkx
 	//openId:"oLowyuOJvTszgk96C0f8j0XfcEXg",//zkx

+ 2 - 2
pages/abnormal/abnormalAlarmRecord.vue

@@ -2,11 +2,11 @@
 	<view>
 	<view>
 		<u-navbar title="异常报警记录"  title-color="#101010" ></u-navbar>
 		<u-navbar title="异常报警记录"  title-color="#101010" ></u-navbar>
 		<view class="dropdown">
 		<view class="dropdown">
-				<u-dropdown>
+				<u-dropdown-change>
 					<u-dropdown-item v-model="value1" title="全部时间" :options="options1"></u-dropdown-item>
 					<u-dropdown-item v-model="value1" title="全部时间" :options="options1"></u-dropdown-item>
 					<u-dropdown-item v-model="value2" title="全部状态" :options="options2"></u-dropdown-item>
 					<u-dropdown-item v-model="value2" title="全部状态" :options="options2"></u-dropdown-item>
 					<u-dropdown-item v-model="value3" title="全部设备" :options="options3"></u-dropdown-item>
 					<u-dropdown-item v-model="value3" title="全部设备" :options="options3"></u-dropdown-item>
-				</u-dropdown>
+				</u-dropdown-change>
 			</view>
 			</view>
 			
 			
 			<view class="records">
 			<view class="records">

+ 2 - 2
pages/equipmentDataMonitoring/dataMonitoring-map.vue

@@ -19,10 +19,10 @@
 			</view>
 			</view>
 		</u-navbar>
 		</u-navbar>
 		<view class="dropdown">
 		<view class="dropdown">
-				<u-dropdown>
+				<u-dropdown-change>
 					<u-dropdown-item v-model="value1" title="全部设备" :options="options1"></u-dropdown-item>
 					<u-dropdown-item v-model="value1" title="全部设备" :options="options1"></u-dropdown-item>
 					<u-dropdown-item v-model="value2" title="全部状态" :options="options2"></u-dropdown-item>
 					<u-dropdown-item v-model="value2" title="全部状态" :options="options2"></u-dropdown-item>
-				</u-dropdown>
+				</u-dropdown-change>
 			</view>
 			</view>
 			<!-- 地图 -->
 			<!-- 地图 -->
 			<view class="map">
 			<view class="map">

+ 11 - 3
pages/equipmentDataMonitoring/electronicMonitoring.vue

@@ -20,7 +20,7 @@
 				</view>
 				</view>
 			</u-navbar> -->
 			</u-navbar> -->
 			<view class="navbar-c">
 			<view class="navbar-c">
-				<view class="back">
+				<view class="back" @click="backDataMonitoringList">
 					<u-icon name="arrow-left" color="#fff" size="36"></u-icon>
 					<u-icon name="arrow-left" color="#fff" size="36"></u-icon>
 				</view>
 				</view>
 				<view class="title" @click="equipmentShow=true">
 				<view class="title" @click="equipmentShow=true">
@@ -515,7 +515,10 @@
 					this.tabsFrom.show2 = true
 					this.tabsFrom.show2 = true
 					this.params.day = false
 					this.params.day = false
 				}
 				}
-			}
+			},
+			backDataMonitoringList() {
+				uni.navigateBack()
+			},
 		}
 		}
 	};
 	};
 </script>
 </script>
@@ -528,7 +531,12 @@
 
 
 	.navbar-c {
 	.navbar-c {
 		background-color: rgba(22, 119, 255, 1);
 		background-color: rgba(22, 119, 255, 1);
-
+		
+		.back {
+			z-index: 999;
+			width: 200rpx;
+		}
+		
 		.title {
 		.title {
 			color: #fff;
 			color: #fff;
 			display: flex;
 			display: flex;

+ 15 - 2
pages/equipmentDataMonitoring/equipmentElectricity.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
 	<view>
 	<view>
 		<view class="navbar-c">
 		<view class="navbar-c">
-			<view class="back">
+			<view class="back" @click="backStatistics">
 				<u-icon name="arrow-left" color="#101010" size="36"></u-icon>
 				<u-icon name="arrow-left" color="#101010" size="36"></u-icon>
 			</view>
 			</view>
 			<view class="title">
 			<view class="title">
@@ -20,7 +20,7 @@
 		</view>
 		</view>
 		<!-- 用电量 -->
 		<!-- 用电量 -->
 		<view class="main">
 		<view class="main">
-			<view class="item" v-for="item in 3">
+			<view class="item" v-for="item in 3" @click="toElectronicMonitoring">
 				<view class="icon">
 				<view class="icon">
 					<image class="img" src="@/assets/img/energyMeter.svg" mode=""></image>
 					<image class="img" src="@/assets/img/energyMeter.svg" mode=""></image>
 				</view>
 				</view>
@@ -84,12 +84,25 @@
 		methods: {
 		methods: {
 			change(index) {
 			change(index) {
 				this.current = index;
 				this.current = index;
+			},
+			backStatistics() {
+				uni.navigateBack()
+			},
+			toElectronicMonitoring() {
+				uni.navigateTo({
+					url: '/pages/equipmentDataMonitoring/electronicMonitoring'
+				})
 			}
 			}
 		}
 		}
 	}
 	}
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
+	.back {
+		z-index: 999;
+		width: 200rpx;
+	}
+	
 	.tabs-box{
 	.tabs-box{
 		background-color: #fff;
 		background-color: #fff;
 		display: flex;
 		display: flex;

+ 376 - 269
pages/statistics/statistics.vue

@@ -19,24 +19,23 @@
 				<u-icon name="arrow-down" color="#fff" size="40"></u-icon>
 				<u-icon name="arrow-down" color="#fff" size="40"></u-icon>
 			</view>
 			</view>
 		</view>
 		</view>
-		
+
 		<!-- 标签弹出层 -->
 		<!-- 标签弹出层 -->
-			<u-popup v-model="popShow" duration ="10" mode="top" :negative-top="88" border-radius="16">
-				<view class="popup-tabs">
-					<view class="tabs">
-						<u-tabs :list="list" :is-scroll="false"  
-							:current="current" @change="change"></u-tabs>
-					</view>
-					<view class="more">
-						<u-icon name="arrow-up" color="#777777" size="40" @click="popShow=false"></u-icon>
-					</view>
+		<u-popup v-model="popShow" duration="10" mode="top" :negative-top="88" border-radius="16">
+			<view class="popup-tabs">
+				<view class="tabs">
+					<u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
 				</view>
 				</view>
-				<view class="tabs-options">
-					<view class="item" v-for="item in 9" >
-						玉桥公园
-					</view>
+				<view class="more">
+					<u-icon name="arrow-up" color="#777777" size="40" @click="popShow=false"></u-icon>
+				</view>
+			</view>
+			<view class="tabs-options">
+				<view class="item" v-for="item in 9">
+					玉桥公园
 				</view>
 				</view>
-			</u-popup>
+			</view>
+		</u-popup>
 
 
 		<view class="main">
 		<view class="main">
 			<!-- 统计1 -->
 			<!-- 统计1 -->
@@ -62,7 +61,7 @@
 					</view>
 					</view>
 				</view>
 				</view>
 
 
-				<view class="item" @click="toWorkorderManagement()">
+				<view class="item" @click="toWorkOrderManagement()">
 					<view class="item-top">
 					<view class="item-top">
 						<view class="img-box">
 						<view class="img-box">
 							<u-circle-progress active-color="#2979ff" :percent="12/20*100" width="88">
 							<u-circle-progress active-color="#2979ff" :percent="12/20*100" width="88">
@@ -85,7 +84,7 @@
 
 
 			</view>
 			</view>
 			<!-- 用电量 -->
 			<!-- 用电量 -->
-			<view class="statistics-e statistics">
+			<view class="statistics-e statistics" v-if="codes.indexOf('reading') != -1">
 				<view class="title">
 				<view class="title">
 					<view class="icon">
 					<view class="icon">
 						<image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
 						<image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
@@ -93,9 +92,9 @@
 					<view class="text">
 					<view class="text">
 						用电量 (度)
 						用电量 (度)
 					</view>
 					</view>
-					<view class="change">
-						<image class="change-img" :class="pRotation ? 'rotation-img' : ''"
-							src="@/assets/img/refresh-line.svg" mode=""></image>
+					<view class="change" @click="getPowerConsumption(1)">
+						<image class="change-img" :class="pRotation ? 'rotation-img' : ''" src="@/assets/img/refresh-line.svg"
+							mode=""></image>
 						<text>换一批</text>
 						<text>换一批</text>
 					</view>
 					</view>
 					<view class="check-all" @click="toEquipmentElectricity">
 					<view class="check-all" @click="toEquipmentElectricity">
@@ -103,20 +102,21 @@
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="electricity">
 				<view class="electricity">
-					<view class="item" v-for="item in 3" @click="toElectronicMonitoring">
-						
+					<view class="item" v-for="(item, index) in powerConsumptionList" :key="index"
+						@click="toElectronicMonitoring(item)">
+
 						<view class="equipment">
 						<view class="equipment">
 							<view class="equipment1">
 							<view class="equipment1">
-								荆鹏软件园01
+								{{item.name}}
 							</view>
 							</view>
 							<view class="equipment2">
 							<view class="equipment2">
-								荆鹏集团
+								{{item.companyName}}
 							</view>
 							</view>
 						</view>
 						</view>
 						<view class="electricity">
 						<view class="electricity">
 							<view class="electricity-item">
 							<view class="electricity-item">
 								<view class="number">
 								<view class="number">
-									120.5
+									{{item.yesterdayKwh}}
 								</view>
 								</view>
 								<view class="date">
 								<view class="date">
 									昨日
 									昨日
@@ -124,7 +124,7 @@
 							</view>
 							</view>
 							<view class="electricity-item">
 							<view class="electricity-item">
 								<view class="number">
 								<view class="number">
-									120.5
+									{{item.thisMonthKwh}}
 								</view>
 								</view>
 								<view class="date">
 								<view class="date">
 									本月
 									本月
@@ -132,7 +132,7 @@
 							</view>
 							</view>
 							<view class="electricity-item">
 							<view class="electricity-item">
 								<view class="number">
 								<view class="number">
-									120.5
+									{{item.lastMonthKwh}}
 								</view>
 								</view>
 								<view class="date">
 								<view class="date">
 									上月
 									上月
@@ -145,7 +145,7 @@
 			<!-- 统计2 异常告警记录 -->
 			<!-- 统计2 异常告警记录 -->
 			<view class="statistics-2 statistics">
 			<view class="statistics-2 statistics">
 				<view class="title">
 				<view class="title">
-					<view class="icon" >
+					<view class="icon">
 						<image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
 						<image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
 					</view>
 					</view>
 					<view class="text">
 					<view class="text">
@@ -175,11 +175,11 @@
 						</view>
 						</view>
 					</view>
 					</view>
 				</view>
 				</view>
-				
-				
+
+
 			</view>
 			</view>
 			<!-- 统计3 设备数据监测-->
 			<!-- 统计3 设备数据监测-->
-			<view class="statistics-3 statistics">
+			<view class="statistics-3 statistics" v-if="codes.indexOf('detector') != -1">
 				<view class="title">
 				<view class="title">
 					<view class="icon">
 					<view class="icon">
 						<image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
 						<image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
@@ -187,35 +187,36 @@
 					<view class="text">
 					<view class="text">
 						设备数据监测
 						设备数据监测
 					</view>
 					</view>
-					<view class="change">
-						<image class="change-img" :class="eRotation ? 'rotation-img' : ''"
-							src="@/assets/img/refresh-line.svg" mode=""></image>
+					<view class="change" @click="getEquipmentDataMonitoring(1)">
+						<image class="change-img" :class="eRotation ? 'rotation-img' : ''" src="@/assets/img/refresh-line.svg"
+							mode=""></image>
 						<text>换一批</text>
 						<text>换一批</text>
 					</view>
 					</view>
-					<view class="check-all">
+					<view class="check-all" @click="toDataMonitoringList">
 						查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
 						查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
 					</view>
 					</view>
 				</view>
 				</view>
-				<view class="monitoring-item" v-for="item in 3">
+				<view class="monitoring-item" v-for="(item, index) in equipmentDataList" :key="index"
+					@click="toElectronicMonitoring(item)">
 					<view class="item-title">
 					<view class="item-title">
 						<view class="text1">
 						<view class="text1">
-							荆鹏软件园01
+							{{item.name}}
 						</view>
 						</view>
 						<view class="text2">
 						<view class="text2">
-							荆鹏集团
+							{{item.companyName}}
 						</view>
 						</view>
 						<view class="state">
 						<view class="state">
 							<view class="state1">
 							<view class="state1">
 								<view class="icon">
 								<view class="icon">
 									<image class="img" src="@/assets/img/antFill-alert.svg" mode=""></image>
 									<image class="img" src="@/assets/img/antFill-alert.svg" mode=""></image>
 								</view>
 								</view>
-								正常
+								{{item.temperatureStatus=='1' ? '正常' : '异常'}}
 							</view>
 							</view>
 							<view class="state2">
 							<view class="state2">
 								<view class="icon">
 								<view class="icon">
 									<image class="img" src="@/assets/img/smoke.svg" mode=""></image>
 									<image class="img" src="@/assets/img/smoke.svg" mode=""></image>
 								</view>
 								</view>
-								正常
+								{{item.smokeStatus=='1' ? '正常' : '异常'}}
 							</view>
 							</view>
 						</view>
 						</view>
 					</view>
 					</view>
@@ -226,7 +227,7 @@
 								<img src="../../assets/img/iconPark-electric-wave 1.svg" alt="" />
 								<img src="../../assets/img/iconPark-electric-wave 1.svg" alt="" />
 							</view>
 							</view>
 							<view class="text">
 							<view class="text">
-								20A
+								{{item.remoteMonitorRecord.dca.toFixed(2)}}A
 							</view>
 							</view>
 						</view>
 						</view>
 						<view class="infos-item">
 						<view class="infos-item">
@@ -234,7 +235,7 @@
 								<img src="../../assets/img/voltage.svg" alt="" />
 								<img src="../../assets/img/voltage.svg" alt="" />
 							</view>
 							</view>
 							<view class="text">
 							<view class="text">
-								380V
+								{{item.remoteMonitorRecord.dcv.toFixed(2)}}V
 							</view>
 							</view>
 						</view>
 						</view>
 						<view class="infos-item">
 						<view class="infos-item">
@@ -242,7 +243,7 @@
 								<img src="../../assets/img/iconPark-thermometer.svg" alt="" />
 								<img src="../../assets/img/iconPark-thermometer.svg" alt="" />
 							</view>
 							</view>
 							<view class="text">
 							<view class="text">
-								80
+								{{item.remoteMonitorRecord.temperatureTop}}
 							</view>
 							</view>
 						</view>
 						</view>
 						<view class="infos-item">
 						<view class="infos-item">
@@ -250,7 +251,7 @@
 								<img src="../../assets/img/power.svg" alt="" />
 								<img src="../../assets/img/power.svg" alt="" />
 							</view>
 							</view>
 							<view class="text">
 							<view class="text">
-								80kW
+								{{(item.remoteMonitorRecord.totalPower).toFixed(2)}}kW
 							</view>
 							</view>
 						</view>
 						</view>
 						<view class="infos-item">
 						<view class="infos-item">
@@ -258,7 +259,7 @@
 								<img src="../../assets/img/powerFactor.svg" alt="" />
 								<img src="../../assets/img/powerFactor.svg" alt="" />
 							</view>
 							</view>
 							<view class="text">
 							<view class="text">
-								0.98 / 0.97
+								{{item.remoteMonitorRecord.averPowerFactor}} / {{item.remoteMonitorRecord.averPowerFactorHistory}}
 							</view>
 							</view>
 						</view>
 						</view>
 					</view>
 					</view>
@@ -318,87 +319,87 @@
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
-		
-		<!-- 异常设备排名 -->
-		   <view class="statistics statistics-ranking">
-		   	<view class="title">
-		   		<view class="icon">
-		   			<image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
-		   		</view>
-		   		<view class="text">
-		   			异常设备排名
-		   		</view>
-		   	</view>
-			<!-- 合计 -->
-			<view class="total">
-				本年度共有<text> 42</text>次设备异常告警
-			</view>
-			
-			<view class="ranking-main">
-				<view class="item">
-					<view class="ranking">
-						1
-					</view>
+
+			<!-- 异常设备排名 -->
+			<view class="statistics statistics-ranking">
+				<view class="title">
 					<view class="icon">
 					<view class="icon">
-						<image class="img" src="@/assets/img/transformer1.svg" mode=""></image>
-					</view>
-					<view class="name">
-						<view class="name1">
-							荆鹏软件园01
-						</view>
-						<view class="name2">
-							荆鹏集团
-						</view>
+						<image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
 					</view>
 					</view>
-					<view class="time">
-						5次
+					<view class="text">
+						异常设备排名
 					</view>
 					</view>
 				</view>
 				</view>
-				<view class="item">
-					<view class="ranking">
-						2
-					</view>
-					<view class="icon">
-						<image class="img" src="@/assets/img/transformer1.svg" mode=""></image>
-					</view>
-					<view class="name">
-						<view class="name1">
-							玉桥公园02
+				<!-- 合计 -->
+				<view class="total">
+					本年度共有<text> 42</text>次设备异常告警
+				</view>
+
+				<view class="ranking-main">
+					<view class="item">
+						<view class="ranking">
+							1
 						</view>
 						</view>
-						<view class="name2">
-							荆鹏集团
+						<view class="icon">
+							<image class="img" src="@/assets/img/transformer1.svg" mode=""></image>
+						</view>
+						<view class="name">
+							<view class="name1">
+								荆鹏软件园01
+							</view>
+							<view class="name2">
+								荆鹏集团
+							</view>
+						</view>
+						<view class="time">
+							5次
 						</view>
 						</view>
 					</view>
 					</view>
-					<view class="time">
-						5次
-					</view>
-				</view>
-				<view class="item">
-					<view class="ranking">
-						3
-					</view>
-					<view class="icon">
-						<image class="img" src="@/assets/img/transformer1.svg" mode=""></image>
-					</view>
-					<view class="name">
-						<view class="name1">
-							御河社区03
+					<view class="item">
+						<view class="ranking">
+							2
 						</view>
 						</view>
-						<view class="name2">
-							荆鹏集团
+						<view class="icon">
+							<image class="img" src="@/assets/img/transformer1.svg" mode=""></image>
+						</view>
+						<view class="name">
+							<view class="name1">
+								玉桥公园02
+							</view>
+							<view class="name2">
+								荆鹏集团
+							</view>
+						</view>
+						<view class="time">
+							5次
 						</view>
 						</view>
 					</view>
 					</view>
-					<view class="time">
-						5次
+					<view class="item">
+						<view class="ranking">
+							3
+						</view>
+						<view class="icon">
+							<image class="img" src="@/assets/img/transformer1.svg" mode=""></image>
+						</view>
+						<view class="name">
+							<view class="name1">
+								御河社区03
+							</view>
+							<view class="name2">
+								荆鹏集团
+							</view>
+						</view>
+						<view class="time">
+							5次
+						</view>
 					</view>
 					</view>
 				</view>
 				</view>
+				<!-- 查看全部排名 -->
+				<view class="check-all">
+					查看全部排名 <u-icon name="arrow-down" size="24" color="rgba(119,119,119,1)"></u-icon>
+				</view>
 			</view>
 			</view>
-			<!-- 查看全部排名 -->
-			<view class="check-all">
-				查看全部排名 <u-icon name="arrow-down" size="24" color="rgba(119,119,119,1)"></u-icon>
-			</view>
-		   </view>
-		
+
 		</view>
 		</view>
 
 
 
 
@@ -409,6 +410,7 @@
 <script>
 <script>
 	import energyCenterTabbar from '@/components/energyCenterTabbar.vue'
 	import energyCenterTabbar from '@/components/energyCenterTabbar.vue'
 	import * as echarts from 'echarts';
 	import * as echarts from 'echarts';
+	import * as API from '@/apis/pagejs/energy/index.js'
 
 
 	export default {
 	export default {
 		components: {
 		components: {
@@ -416,12 +418,21 @@
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
+				pageIndexe: 1, // 设备数据检测
+				totalPagee: 1,
+				equipmentDataList: [],
+				pageIndexp: 1, // 用电量
+				totalPagep: 1,
+				powerConsumptionList: [],
+				codes: '', // 判断:reading用电量 detector设备数据检测
+				merchantList1: [], // 商户
+				merchantList2: [],
 				pRotation: false,
 				pRotation: false,
 				eRotation: false,
 				eRotation: false,
-				myPieChart: null,
+				myPieChart: null, // 图表
 				myBarChart: null,
 				myBarChart: null,
 				myLineChart: null,
 				myLineChart: null,
-				popShow:false,
+				popShow: false,
 				list: [{
 				list: [{
 					name: '全部'
 					name: '全部'
 				}, {
 				}, {
@@ -439,29 +450,87 @@
 			this.getPieCharts();
 			this.getPieCharts();
 			this.getBarCharts();
 			this.getBarCharts();
 			this.getLineCharts();
 			this.getLineCharts();
+
+			this.getfindByOpenId();
+			this.getPowerConsumption(0);
+			this.getEquipmentDataMonitoring(0);
 		},
 		},
 		methods: {
 		methods: {
+			// 商户ID
+			getfindByOpenId() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.findByOpenId({
+					openId: this.carhelp.getOpenId()
+				}).then((response) => {
+					uni.hideLoading();
+					this.codes = response.data.regUser.codes;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
 			// 设备数据监测
 			// 设备数据监测
-			getEquipmentDataMonitoring() {
+			getEquipmentDataMonitoring(pl) {
 				this.eRotation = true;
 				this.eRotation = true;
-				this.eRotation = false;
+				this.pageIndexe = this.pageIndexe + pl;
+				if (this.pageIndexe > this.totalPagee) {
+					this.pageIndexe = 1;
+				}
+
+				API.homePageDeviceData({
+					pageIndex: this.pageIndexe,
+					pageSize: 3
+				}).then((response) => {
+					uni.hideLoading();
+					this.eRotation = false;
+					this.equipmentDataList = response.data.data;
+					this.totalPagee = response.data.totalPage;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
 			},
 			},
 			// 异常告警记录
 			// 异常告警记录
 			getAbnormalAlarmRecord() {
 			getAbnormalAlarmRecord() {
-				
+
 			},
 			},
 			// 用电量
 			// 用电量
-			getPowerConsumption() {
+			getPowerConsumption(pl) {
 				this.pRotation = true;
 				this.pRotation = true;
-				this.pRotation = false;
+				this.pageIndexp = this.pageIndexp + pl;
+				if (this.pageIndexp > this.totalPagep) {
+					this.pageIndexp = 1;
+				}
+
+				API.homePageKwh({
+					pageIndex: this.pageIndexp,
+					pageSize: 3
+				}).then((response) => {
+					uni.hideLoading();
+					this.pRotation = false;
+					this.powerConsumptionList = response.data.data;
+					this.totalPagep = response.data.totalPage;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
 			},
 			},
 			// 累计工单
 			// 累计工单
 			getAccumulatedWorkOrders() {
 			getAccumulatedWorkOrders() {
-				
+
 			},
 			},
 			// 累计报警
 			// 累计报警
 			getAccumulatedAlarms() {
 			getAccumulatedAlarms() {
-				
+
 			},
 			},
 			getLineCharts() {
 			getLineCharts() {
 				if (!this.myLineChart) {
 				if (!this.myLineChart) {
@@ -663,9 +732,9 @@
 					url: '/pages/equipmentDataMonitoring/dataMonitoring-list'
 					url: '/pages/equipmentDataMonitoring/dataMonitoring-list'
 				})
 				})
 			},
 			},
-			toWorkorderManagement() {
+			toWorkOrderManagement() {
 				uni.navigateTo({
 				uni.navigateTo({
-					url: '/pages/workorderManagement/workorderManagement'
+					url: '/pages/workOrderManagement/workOrderManagement'
 				})
 				})
 			},
 			},
 			toEquipmentElectricity() {
 			toEquipmentElectricity() {
@@ -673,7 +742,7 @@
 					url: '/pages/equipmentDataMonitoring/equipmentElectricity'
 					url: '/pages/equipmentDataMonitoring/equipmentElectricity'
 				})
 				})
 			},
 			},
-			toElectronicMonitoring() {
+			toElectronicMonitoring(item) {
 				uni.navigateTo({
 				uni.navigateTo({
 					url: '/pages/equipmentDataMonitoring/electronicMonitoring'
 					url: '/pages/equipmentDataMonitoring/electronicMonitoring'
 				})
 				})
@@ -686,39 +755,51 @@
 	.rotation-img {
 	.rotation-img {
 		animation: rotation 2s linear infinite;
 		animation: rotation 2s linear infinite;
 	}
 	}
-	@keyframes rotation{
-		from {transform: rotate(0deg)}
-		to {transform: rotate(360deg)}
+
+	@keyframes rotation {
+		from {
+			transform: rotate(0deg)
+		}
+
+		to {
+			transform: rotate(360deg)
+		}
 	}
 	}
-	
+
 	page {
 	page {
 		padding-bottom: 200rpx;
 		padding-bottom: 200rpx;
 	}
 	}
-  /deep/.u-drawer-content{
-	  margin-top: 88rpx;
-  }
-  .popup-tabs{
-	  background-color: #fff;
-	  display: flex;
-	  align-items: center;
-	  justify-content: space-between;
-	  padding-top: 32rpx;
-	  padding-right: 32rpx;
-	  color: rgba(51,51,51,1);
-	  font-size: 32rpx;
-	  .tabs{
-		  width: 80%;
-	  }
-  }
-  .tabs-options{
-	  display: flex;
-	  padding: 24rpx 32rpx 0;
-	  flex-wrap: wrap;
-	  .item{
-		  width: 25%;
-		  margin-bottom: 40rpx;
-	  }
-  }
+
+	/deep/.u-drawer-content {
+		margin-top: 88rpx;
+	}
+
+	.popup-tabs {
+		background-color: #fff;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding-top: 32rpx;
+		padding-right: 32rpx;
+		color: rgba(51, 51, 51, 1);
+		font-size: 32rpx;
+
+		.tabs {
+			width: 80%;
+		}
+	}
+
+	.tabs-options {
+		display: flex;
+		padding: 24rpx 32rpx 0;
+		flex-wrap: wrap;
+
+		.item {
+			width: 25%;
+			margin-bottom: 40rpx;
+		}
+	}
+
 	// 导航栏
 	// 导航栏
 	.navbar {
 	.navbar {
 		background-color: rgba(22, 119, 255, 1);
 		background-color: rgba(22, 119, 255, 1);
@@ -730,11 +811,12 @@
 		padding: 0 32rpx;
 		padding: 0 32rpx;
 		color: rgba(255, 255, 255, 1);
 		color: rgba(255, 255, 255, 1);
 		font-size: 36rpx;
 		font-size: 36rpx;
-            position: fixed;
-            left: 0;
-            right: 0;
-            top: 0;
-			z-index: 999999;
+		position: fixed;
+		left: 0;
+		right: 0;
+		top: 0;
+		z-index: 999999;
+
 		.img {
 		.img {
 			width: 48rpx;
 			width: 48rpx;
 			height: 48rpx;
 			height: 48rpx;
@@ -782,20 +864,23 @@
 					height: 36rpx;
 					height: 36rpx;
 					vertical-align: middle;
 					vertical-align: middle;
 				}
 				}
-                .change{
+
+				.change {
 					display: flex;
 					display: flex;
 					align-items: center;
 					align-items: center;
+
 					.change-img {
 					.change-img {
 						width: 32rpx;
 						width: 32rpx;
 						height: 32rpx;
 						height: 32rpx;
 						vertical-align: middle;
 						vertical-align: middle;
 					}
 					}
-					text{
-						
+
+					text {
+
 						margin-left: 8rpx;
 						margin-left: 8rpx;
 					}
 					}
 				}
 				}
-				
+
 
 
 				.text {
 				.text {
 					color: rgba(16, 16, 16, 1);
 					color: rgba(16, 16, 16, 1);
@@ -818,46 +903,53 @@
 				}
 				}
 			}
 			}
 		}
 		}
+
 		// 用电量
 		// 用电量
-		.statistics-e{
-			.electricity{
-				   background-color: #fff;
-				   .item{
-					   padding: 16rpx 0;
-					   display: flex;
-					   align-items: center;
-					   border-bottom: 1px solid rgba(245,245,245,1);
-					   
-					   .equipment{
-						   
-						   .equipment1{
-							   color: rgba(51,51,51,1);
-							   font-size: 32rpx;
-							   font-weight: bold;
-						   }
-						   .equipment2{
-							   color: rgba(119,119,119,1);
-						   }
-					   }
-					   .electricity{
-						   display: flex;
-						   justify-content: space-between;
-						   flex: 1;
-						   margin-left: 48rpx;
-						   text-align: center;
-						   .electricity-item{
-							   .number{
-								   color: rgba(51,51,51,1);
-								   font-size: 32rpx;
-								   font-weight: bold;
-							   }
-							   .date{
-								   color: rgba(119,119,119,1);
-								   margin-top: 4rpx;
-							   }
-						   }
-					   }
-				   }
+		.statistics-e {
+			.electricity {
+				background-color: #fff;
+
+				.item {
+					padding: 16rpx 0;
+					display: flex;
+					align-items: center;
+					border-bottom: 1px solid rgba(245, 245, 245, 1);
+
+					.equipment {
+						width: 30%;
+						
+						.equipment1 {
+							color: rgba(51, 51, 51, 1);
+							font-size: 32rpx;
+							font-weight: bold;
+						}
+
+						.equipment2 {
+							color: rgba(119, 119, 119, 1);
+						}
+					}
+
+					.electricity {
+						display: flex;
+						justify-content: space-between;
+						flex: 1;
+						margin-left: 48rpx;
+						text-align: center;
+
+						.electricity-item {
+							.number {
+								color: rgba(51, 51, 51, 1);
+								font-size: 32rpx;
+								font-weight: bold;
+							}
+
+							.date {
+								color: rgba(119, 119, 119, 1);
+								margin-top: 4rpx;
+							}
+						}
+					}
+				}
 			}
 			}
 		}
 		}
 
 
@@ -916,34 +1008,39 @@
 				justify-content: space-between;
 				justify-content: space-between;
 				align-items: center;
 				align-items: center;
 				padding: 16rpx;
 				padding: 16rpx;
-border-bottom: 1px solid rgba(245,245,245,1);
+				border-bottom: 1px solid rgba(245, 245, 245, 1);
+
 				.item-title {
 				.item-title {
 
 
-					
+
 					color: rgba(51, 51, 51, 1);
 					color: rgba(51, 51, 51, 1);
- 
+
 					.img {
 					.img {
 						width: 32rpx;
 						width: 32rpx;
 						height: 32rpx;
 						height: 32rpx;
 						margin-right: 8rpx;
 						margin-right: 8rpx;
 					}
 					}
-					.name{
-						color: rgba(51,51,51,1);
+
+					.name {
+						color: rgba(51, 51, 51, 1);
 					}
 					}
-					.date{
-						color: rgba(119,119,119,1);
+
+					.date {
+						color: rgba(119, 119, 119, 1);
 						font-size: 24rpx;
 						font-size: 24rpx;
 					}
 					}
 				}
 				}
 
 
 				.item-value {
 				.item-value {
 					text-align: right;
 					text-align: right;
-					.value1{
+
+					.value1 {
 						font-weight: bold;
 						font-weight: bold;
 						color: rgba(51, 51, 51, 1);
 						color: rgba(51, 51, 51, 1);
 					}
 					}
-					.value2{
-						color: rgba(119,119,119,1);
+
+					.value2 {
+						color: rgba(119, 119, 119, 1);
 						font-size: 24rpx;
 						font-size: 24rpx;
 					}
 					}
 				}
 				}
@@ -968,7 +1065,7 @@ border-bottom: 1px solid rgba(245,245,245,1);
 						color: rgba(119, 119, 119, 1);
 						color: rgba(119, 119, 119, 1);
 						font-size: 24rpx;
 						font-size: 24rpx;
 						margin-left: 8rpx;
 						margin-left: 8rpx;
-						
+
 					}
 					}
 				}
 				}
 
 
@@ -1028,70 +1125,80 @@ border-bottom: 1px solid rgba(245,245,245,1);
 				height: 410rpx;
 				height: 410rpx;
 			}
 			}
 		}
 		}
-    // 异常设备排名
-	.statistics-ranking{
-		.total{
-			color: rgba(16,16,16,1);
-			text{
-				color: #1677FF;
-				padding: 0 8rpx;
-			}
-		}
-		
-		.ranking-main{
-			margin-top: 48rpx;
-			border-radius: 16px;
-			background-color: #fff;
-			.item{
-				display: flex;
-				align-items: center;
-				margin-bottom: 32rpx;
-				.ranking{
-					color: rgba(16,16,16,1);
-					font-weight: bold;
+
+		// 异常设备排名
+		.statistics-ranking {
+			.total {
+				color: rgba(16, 16, 16, 1);
+
+				text {
+					color: #1677FF;
+					padding: 0 8rpx;
 				}
 				}
-				
-				.icon{
-					width: 72rpx;
-					height: 72rpx;
-					border-radius: 4px;
-					background-color: rgba(219,234,255,1);
+			}
+
+			.ranking-main {
+				margin-top: 48rpx;
+				border-radius: 16px;
+				background-color: #fff;
+
+				.item {
 					display: flex;
 					display: flex;
 					align-items: center;
 					align-items: center;
-					justify-content: center;
-					margin-left: 24rpx;
-					.img{
-						width: 48rpx;
-						height: 48rpx;
-					}
-				}
-				.name{
-					margin-left: 16rpx;
-					.name1{
-						color: rgba(51,51,51,1);
+					margin-bottom: 32rpx;
+
+					.ranking {
+						color: rgba(16, 16, 16, 1);
 						font-weight: bold;
 						font-weight: bold;
 					}
 					}
-					.name2{
-						color: rgba(119,119,119,1);
-						font-size: 24rpx;
-						margin-top: 4rpx;
+
+					.icon {
+						width: 72rpx;
+						height: 72rpx;
+						border-radius: 4px;
+						background-color: rgba(219, 234, 255, 1);
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						margin-left: 24rpx;
+
+						.img {
+							width: 48rpx;
+							height: 48rpx;
+						}
+					}
+
+					.name {
+						margin-left: 16rpx;
+
+						.name1 {
+							color: rgba(51, 51, 51, 1);
+							font-weight: bold;
+						}
+
+						.name2 {
+							color: rgba(119, 119, 119, 1);
+							font-size: 24rpx;
+							margin-top: 4rpx;
+						}
+					}
+
+					.time {
+						color: rgba(16, 16, 16, 1);
+						margin-left: auto;
+						font-weight: bold;
 					}
 					}
 				}
 				}
-				.time{
-					color: rgba(16,16,16,1);
-					margin-left: auto;
-					font-weight: bold;
-				}
+
+
+			}
+
+			// 查看全部排名
+			.check-all {
+				text-align: center;
+				color: rgba(119, 119, 119, 1);
+				font-size: 12px;
 			}
 			}
-			
-			
-		}
-		// 查看全部排名
-		.check-all{
-			text-align: center;
-			color: rgba(119,119,119,1);
-			font-size: 12px;
 		}
 		}
 	}
 	}
-	}
 </style>
 </style>

+ 18 - 4
pages/workorderManagement/workorderManagement.vue

@@ -2,7 +2,7 @@
 	<view>
 	<view>
 		
 		
 		<view class="navbar-c">
 		<view class="navbar-c">
-			<view class="back" @click="toStatistics">
+			<view class="back" @click="toWorkOrderMap">
 				<image class="img" src="@/assets/img/riLine-road-map-line.svg" mode=""></image>
 				<image class="img" src="@/assets/img/riLine-road-map-line.svg" mode=""></image>
 			</view>
 			</view>
 			<view class="title">
 			<view class="title">
@@ -30,7 +30,7 @@
 					</view>
 					</view>
 					我的工单
 					我的工单
 				</view>
 				</view>
-				<view class="more">
+				<view class="more" @click="toWorkOrderStatistics">
 					工单统计<u-icon name="arrow-right" color="#777777"></u-icon>
 					工单统计<u-icon name="arrow-right" color="#777777"></u-icon>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -258,16 +258,30 @@
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
-				
+				keyword: ''
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {
-			
+			toWorkOrderMap() {
+				uni.navigateTo({
+					url: '/pages/workOrderManagement/workOrderMap'
+				})
+			},
+			toWorkOrderStatistics() {
+				uni.navigateTo({
+					url: '/pages/workOrderManagement/workOrderStatistics'
+				})
+			}
 		}
 		}
 	}
 	}
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
+	.back {
+		z-index: 999;
+		width: 200rpx;
+	}
+	
 	page{
 	page{
 		padding-bottom: 100px;
 		padding-bottom: 100px;
 	}
 	}