Преглед на файлове

Merge branch 'master' of http://47.92.161.104:10080/zkx/jp-housekeep-electric

# Conflicts:
#	pages/equipmentDataMonitoring/electronicMonitoring.vue
wkyy преди 1 година
родител
ревизия
ae6b065c31

BIN
assets/img/fas fa-exclamation-triangle Copy 2@3x.png


+ 303 - 13
pages/equipmentDataMonitoring/electronicMonitoring.vue

@@ -26,9 +26,14 @@
 					<u-icon name="arrow-left" color="#fff" size="36"></u-icon>
 				</view>
 				<view class="title">
+<<<<<<< HEAD
 					{{tabsFrom.title}}
 					<!-- <u-icon name="arrow-down" color="#fff" size="24" @click="equipmentShow=true"></u-icon> -->
 					<u-icon name="arrow-down" color="#fff" size="24" @click="tabsFrom.show1=true"></u-icon>
+=======
+					{{title}}<u-icon v-if="false" name="arrow-down" color="#fff" size="24"
+						@click="equipmentShow=true"></u-icon>
+>>>>>>> d6db741283ddecd108c9c7844ac40a43193c5dd9
 				</view>
 				<!-- <view class="right" @click="tabsFrom.show2=true">
 					<image class="img" src="@/assets/img/riLine-calendar-todo-line 1.svg" mode=""></image>
@@ -166,6 +171,7 @@
 		<!-- 各时段用电量 -->
 		<view class="electricity-chart">
 			<view class="title">
+<<<<<<< HEAD
 
 				<view class="text">
 					<view class="icon">
@@ -174,6 +180,16 @@
 
 				</view>
 				<view @click="tabsFrom.show2=true,params.day=true">
+=======
+				<view class="icon">
+
+				</view>
+				<view class="text">
+					各时段用电量 (度)
+
+				</view>
+				<view class="date" @click="tabsFrom.show2=true,params.day=true">
+>>>>>>> d6db741283ddecd108c9c7844ac40a43193c5dd9
 					{{queryDay}}<u-icon name="arrow-down"></u-icon>
 				</view>
 			</view>
@@ -310,13 +326,126 @@
 				</u-grid>
 			</view>
 		</view>
-		<!-- 创建工单 -->
+
+		<!-- 设备信息 -->
+		<view class="equipment-information" v-if="false">
+			<view class="title">
+
+				<view class="icon">
+
+				</view>
+				<view class="text">
+					设备信息
+
+				</view>
+				<view class="more" @click="equipmentInfosShow=true">
+					查看全部<u-icon name="arrow-right" size="24" color="#d4d4d4"></u-icon>
+				</view>
+			</view>
+
+			<view class="infos">
+				<view class="item">
+					<view class="item-title">
+						类型
+					</view>
+					<view class="item-value">
+						变压器
+					</view>
+				</view>
+				<view class="border">
+					
+				</view>
+				<view class="item">
+					<view class="item-title">
+						设备编号
+					</view>
+					<view class="item-value">
+						SN9015001
+					</view>
+				</view>
+				<view class="border">
+					
+				</view>
+				<view class="item">
+					<view class="item-title">
+						上次故障时间
+					</view>
+					<view class="item-value">
+						2024-02-14
+					</view>
+				</view>
+			</view>
+		</view>
+          <!-- 设备信息弹窗 -->
+		
+			<view class="equipment-popup">
+					<u-popup v-model="equipmentInfosShow" mode="bottom" border-radius="12">
+						<view class="content">
+							<view class="headline">
+								设备信息
+							</view>
+							<view class="infos">
+								<view class="item" >
+									<view class="item-title">
+										类型
+									</view>
+									<view class="item-value">
+										变压器
+									</view>
+								</view>
+								<view class="item" >
+									<view class="item-title">
+										编号
+									</view>
+									<view class="item-value">
+										SN9015001
+									</view>
+								</view>
+								<view class="item" >
+									<view class="item-title">
+										所属公司
+									</view>
+									<view class="item-value">
+										荆鹏集团
+									</view>
+								</view>
+								<view class="item" >
+									<view class="item-title">
+										地址
+									</view>
+									<view class="item-value">
+										荆州市沙市区江津东路155号
+									</view>
+								</view>
+								<view class="item" >
+									<view class="item-title">
+										上线时间
+									</view>
+									<view class="item-value">
+										2024-01-01
+									</view>
+								</view>
+								<view class="item" >
+									<view class="item-title">
+										上次故障时间
+									</view>
+									<view class="item-value">
+										2024-02-14
+									</view>
+								</view>
+							</view>
+							<button class="get" @click="equipmentInfosShow=false">知道了</button>
+						</view>
+					</u-popup>
+					
+				</view>
+		<!-- 故障上报 -->
 		<view class="create-order" v-if="false">
 			<view class="img-box">
-				<image class="img" src="@/assets/img/riFill-file-add-fill.svg" mode=""></image>
+				<image class="img" src="@/assets/img/fas fa-exclamation-triangle Copy 2@3x.png" mode=""></image>
 			</view>
 			<view class="text">
-				创建工单
+				故障上报
 			</view>
 		</view>
 	</view>
@@ -334,7 +463,12 @@
 	export default {
 		data() {
 			return {
+				equipmentInfosShow:false,
 				kWhList: [],
+<<<<<<< HEAD
+=======
+				title: '',
+>>>>>>> d6db741283ddecd108c9c7844ac40a43193c5dd9
 				queryDay: '',
 				showTop: [0, 0, 0, 0, 0, 0, 0, 0],
 				FormData: {
@@ -423,6 +557,7 @@
 					backgroundColor: '#1677FF',
 				},
 				list: [{
+<<<<<<< HEAD
 					id: 4,
 					name: '当日用电量',
 					disabled: false
@@ -448,6 +583,36 @@
 					disabled: false
 				}],
 				value: '2',
+=======
+						id: 0,
+						name: '总用电量',
+						disabled: false
+					},
+					{
+						id: 4,
+						name: '当日用电量',
+						disabled: false
+					},
+					{
+						id: 1,
+						name: '当月用电量',
+						disabled: false
+					}, {
+						id: 3,
+						name: '当年用电量',
+						disabled: false
+					}, {
+						id: 5,
+						name: '去年用电量',
+						disabled: false
+					}, {
+						id: 10,
+						name: '指定月份',
+						disabled: false
+					}
+				],
+				value: '0',
+>>>>>>> d6db741283ddecd108c9c7844ac40a43193c5dd9
 			};
 		},
 		onLoad(op) {
@@ -459,8 +624,14 @@
 			this.endYear = new Date().getFullYear();
 			this.FormData.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
 			this.FormData2.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
+<<<<<<< HEAD
 			this.FormData.type = 2;
 
+=======
+			this.FormData.type = 0;
+
+			this.getTimeSlotStatistics();
+>>>>>>> d6db741283ddecd108c9c7844ac40a43193c5dd9
 			this.getElectricityStatistics();
 			this.getTimeSlotStatistics();
 			this.getList();
@@ -469,6 +640,7 @@
 			this.getBarCharts(false);
 		},
 		methods: {
+<<<<<<< HEAD
 			selector1confirm(e) {
 
 				var index = e[0];
@@ -487,6 +659,8 @@
 				this.getTimeSlotStatistics();
 				this.getElectricityStatistics();
 			},
+=======
+>>>>>>> d6db741283ddecd108c9c7844ac40a43193c5dd9
 			queryDate(queryTime, day) {
 
 				if (day) {
@@ -494,16 +668,31 @@
 					//this.FormData2.type =day?"9":"10"
 					//this.value="-1"
 
+<<<<<<< HEAD
 					this.getTimeSlotStatistics();
+=======
+					this.getTimeSlotStatistics()
+>>>>>>> d6db741283ddecd108c9c7844ac40a43193c5dd9
 
 				} else {
 
 					this.FormData.queryDate = queryTime + "-01";
+<<<<<<< HEAD
 					this.FormData.type = "10";
 					//this.value="-1"
 
 					this.getElectricityStatistics();
 				}
+=======
+					this.FormData.type = "10"
+					//this.value="-1"
+
+					this.getElectricityStatistics()
+
+				}
+
+
+>>>>>>> d6db741283ddecd108c9c7844ac40a43193c5dd9
 			},
 			getList() {
 				uni.showLoading({
@@ -517,11 +706,17 @@
 				API.homePageKwh(data).then((res) => {
 					uni.hideLoading()
 					this.kWhList = res.data.data;
+<<<<<<< HEAD
 					this.tabsFrom.selector1 = [];
 					this.tabsFrom.selector1 = this.kWhList.map(item => {
 						return {
 							label: item.name,
 							value: item.id
+=======
+					for (var i = 0; i < this.kWhList.length; i++) {
+						if (this.kWhList[i].id == this.FormData.meterId) {
+							this.title = this.kWhList[i].name;
+>>>>>>> d6db741283ddecd108c9c7844ac40a43193c5dd9
 						}
 					})
 				}).catch(error => {
@@ -598,6 +793,7 @@
 					});
 				}
 				this.myChart.clear();
+<<<<<<< HEAD
 				var data1 = ['0-2点', '3-4点', '5-6点', '7-8点', '9-10点', '11-12点', '13-14点', '15-16点',
 					'17-18点', '19-20点', '21-22点', '23-24点'];
 				var data2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
@@ -608,6 +804,13 @@
 						data1.push(i)
 						data2.push(list[i])
 					}
+=======
+				var data1 = [];
+				var data2 = [];
+				for (var i in list) {
+					data1.push(i)
+					data2.push(list[i])
+>>>>>>> d6db741283ddecd108c9c7844ac40a43193c5dd9
 				}
 
 				var headitemby = ""
@@ -640,6 +843,10 @@
 					},
 					yAxis: {
 						type: 'value',
+<<<<<<< HEAD
+=======
+
+>>>>>>> d6db741283ddecd108c9c7844ac40a43193c5dd9
 					},
 					series: [{
 						name: '合计',
@@ -944,7 +1151,8 @@
 	// 		}
 	// 	}
 	// }
-	.electricity-chart {
+	.electricity-chart,
+	.equipment-information {
 		margin: 24rpx 32rpx;
 		padding: 40rpx 0rpx;
 		background-color: #fff;
@@ -953,15 +1161,14 @@
 		.title {
 			display: flex;
 			align-items: center;
-			justify-content: space-between;
-			padding: 0 12rpx;
+			padding: 0 32rpx;
 			margin-bottom: 40rpx;
 
 			.icon {
 				width: 36rpx;
 				height: 36rpx;
-				background-color: rgba(22, 119, 255, 1);
-				border: 6px solid rgba(182, 212, 255, 1);
+				background-color: rgba(182, 212, 255, 1);
+				border: 6px solid rgba(22, 119, 255, 1);
 				border-radius: 100px;
 			}
 
@@ -972,6 +1179,17 @@
 				font-size: 36rpx;
 				margin-left: 16rpx;
 			}
+
+			.date {
+				margin-left: auto;
+			}
+
+			.more {
+				color: #838383;
+				font-size: 24rpx;
+				margin-left: auto;
+
+			}
 		}
 
 		.chart {
@@ -983,6 +1201,27 @@
 				height: 440rpx;
 			}
 		}
+		.infos{
+			padding: 0 32rpx;
+			display: flex;
+			justify-content: space-between;
+			text-align: center;
+			.border{
+				margin: auto 0;
+				height: 70rpx;
+				width: 2rpx;
+				background-color: rgba(204,204,204,1);;
+			}
+			.item-title{
+				color: rgba(119,119,119,1);
+			}
+			.item-value{
+				color: rgba(16,16,16,1);
+				font-size: 32rpx;
+				margin-top: 16rpx;
+			}
+			
+		}
 	}
 
 	// 异常
@@ -1006,8 +1245,8 @@
 			.icon {
 				width: 36rpx;
 				height: 36rpx;
-				background-color: rgba(22, 119, 255, 1);
-				border: 6px solid rgba(182, 212, 255, 1);
+				background-color: rgba(182, 212, 255, 1);
+				border: 6px solid rgba(22, 119, 255, 1);
 				border-radius: 100px;
 			}
 
@@ -1061,8 +1300,8 @@
 			.icon {
 				width: 36rpx;
 				height: 36rpx;
-				background-color: rgba(22, 119, 255, 1);
-				border: 6px solid rgba(182, 212, 255, 1);
+				background-color: rgba(182, 212, 255, 1);
+				border: 6px solid rgba(22, 119, 255, 1);
 				border-radius: 100px;
 			}
 
@@ -1128,12 +1367,62 @@
 		}
 	}
 
+
+// 设备信息弹窗
+.equipment-popup{
+	
+	.content{
+		
+		padding: 32rpx;
+		.headline{
+			color: rgba(16,16,16,1);
+			font-size: 36rpx;
+			text-align: center;
+			font-weight: bold;
+		}
+		.infos{
+			padding-bottom: 100rpx;
+			.item:last-of-type{
+				border: none;
+			}
+			.item{
+				display: flex;
+				align-items: center;
+				height: 80rpx;
+				line-height: 80rpx;
+				border-bottom: 1px solid #cccccc;
+				.item-title{
+					color: rgba(51,51,51,1);
+					width: 200rpx;
+				}
+				.item-value{
+					color: #666666;
+					flex: 1;
+					margin-left: 16rpx;
+				}
+			}
+			
+		}
+		.get{
+			height: 80rpx;
+			line-height: 80rpx;
+			border-radius: 4px;
+			background-color: rgba(22,119,255,1);
+			color: rgba(255,255,255,1);
+			font-size: 32rpx;
+		}
+	}
+}
+
+
+
+
 	// 创建工单
 	.create-order {
 		width: 120rpx;
 		height: 120rpx;
 		border-radius: 20px;
-		background: linear-gradient(180deg, rgba(121, 172, 255, 1) 0%, rgba(57, 132, 255, 1) 100%);
+		background: linear-gradient(180.29deg, rgba(255,124,112,1) 0.9%,rgba(255,79,63,1) 100.4%);
 		box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
 		text-align: center;
 		display: flex;
@@ -1147,6 +1436,7 @@
 		.img {
 			width: 56rpx;
 			height: 56rpx;
+			vertical-align: middle;
 		}
 
 		.text {

+ 124 - 2
pages/equipmentDataMonitoring/equipmentElectricity.vue

@@ -11,14 +11,68 @@
 			
 		</view>
 		<!-- 标签 -->
-		<view class="tabs-box" v-if="false">
+		<view class="tabs-box" >
 			<view class="tabs">
 				<u-tabs :list="list" :is-scroll="false" inactive-color="#999999"  active-color="#666666" :current="current" @change="change"></u-tabs>
 			</view>
-			<view class="icon">
+			<view class="icon" @click="popShow=true">
 				<u-icon name="arrow-down" color="#999999"></u-icon>
 			</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>
+			</view>
+			<view class="tabs-options">
+				<view class="item" v-for="(item, index) in list" :key="index"
+					>
+					{{item.name}}
+				</view>
+			</view>
+		</u-popup>
+		<!-- 用电量合计 -->
+		<view class="total">
+			<view class="company">
+				<view class="name">
+					荆鹏集团
+				</view>
+				<view class="amount">
+					共 3 台设备
+				</view>
+			</view>
+			<view class="infos">
+				<view class="infos-item">
+					<view class="number">
+						361.5
+					</view>
+					<view class="time">
+						昨日
+					</view>
+				</view>
+				<view class="infos-item">
+					<view class="number">
+						361.5
+					</view>
+					<view class="time">
+						本月
+					</view>
+				</view>
+				<view class="infos-item">
+					<view class="number">
+						361.5
+					</view>
+					<view class="time">
+						上月
+					</view>
+				</view>
+			</view>
+		</view>
 		<!-- 用电量 -->
 		<view class="main">
 			<view class="item" v-for="(item, index) in kWhList" :key="index" @click="toElectronicMonitoring(item)">
@@ -76,6 +130,7 @@
 				companyId: '',
 				pageIndex: 1,
 				recordsTotal: 0,
+				popShow:false,
 				list: [{
 					name: '全部'
 				}, {
@@ -178,6 +233,10 @@
 		z-index: 999;
 		width: 200rpx;
 	}
+	/deep/.u-drawer-content {
+		margin-top: 88rpx;
+	}
+	
 	
 	.tabs-box{
 		background-color: #fff;
@@ -191,6 +250,69 @@
 			margin-right: 24rpx;
 		}
 	}
+	.popup-tabs {
+		background-color: #fff;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		// padding-top: 44px;
+		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;
+		}
+	}
+  
+  // 用电量合计
+  .total{
+	  padding: 24rpx 32rpx;
+	  background: linear-gradient(90deg, rgba(49,110,207,1) 2%,rgba(37,138,255,1) 100%);
+	  display: flex;
+	  .company{
+		  .name{
+			  color: rgba(255,255,255,1);
+			  font-size: 36rpx;
+			  font-weight: bold;
+		  }
+		  .amount{
+			  color:#f2f4f6 ;
+			  margin-top: 4rpx;
+		  }
+	  }
+	  .infos{
+		  display: flex;
+		  margin-left: auto;
+		  .infos-item{
+			  margin-left: 32rpx;
+			  text-align: center;
+			  .number{
+				  color: rgba(255,255,255,1);
+				  font-size: 32rpx;
+				  font-weight: bold;
+			  }
+			  .time{
+				  color:#f2f4f6 ;
+				  margin-top: 4rpx;
+			  }
+		  }
+	  }
+  }
+  
+  
+  
    // 用电量
    .main{
 	   background-color: #fff;

+ 3 - 0
pages/statistics/statistics.vue

@@ -265,6 +265,9 @@
 					</view>
 				</view>
 			</view>
+		
+		
+		
 		</view>
 
 		<energyCenterTabbar :current="0"></energyCenterTabbar>