wkyy 1 년 전
부모
커밋
beed2a6773
4개의 변경된 파일195개의 추가작업 그리고 145개의 파일을 삭제
  1. 169 132
      pages/abnormal/abnormalAlarmRecord.vue
  2. 1 1
      pages/mine/mine.vue
  3. 13 9
      pages/statistics/statistics.vue
  4. 12 3
      pages/workOrderManagement/workOrderStatistics.vue

+ 169 - 132
pages/abnormal/abnormalAlarmRecord.vue

@@ -1,92 +1,99 @@
 <template>
 	<view>
-		<u-navbar title="异常报警记录"  title-color="#101010" ></u-navbar>
+		<u-navbar title="异常报警记录" title-color="#101010"></u-navbar>
 		<view class="dropdown">
-				<u-dropdown-change>
-					<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="value3" title="全部设备" :options="options3"></u-dropdown-item>
-				</u-dropdown-change>
-			</view>
-			
-			<view class="records">
-				<view class="records-item" @click="gotoUrl('/pages/abnormal/abnormalAlarmDetails?id=')">
-					<view class="icon icon1">
-						<image class="img" src="@/assets/img/riFill-temp-cold-fill.svg" mode=""></image>
+			<u-dropdown-change ref="uDropdown">
+				<u-dropdown-item title="全部时间">
+					<view class="slot-content">
+						<view class="u-text-center u-content-color u-m-t-20 u-m-b-20">其他自定义内容</view>
+						<u-button type="primary" @click="closeDropdown">确定</u-button>
+					</view>
+				</u-dropdown-item>
+				<!-- <u-dropdown-item v-model="value1" title="全部时间" :options="options1" @change="timeChange"></u-dropdown-item> -->
+				<u-dropdown-item v-model="value2" title="全部状态" :options="options2" @change="stateChange"></u-dropdown-item>
+				<u-dropdown-item v-model="value3" title="全部设备" :options="options3" @change="deviceChange"></u-dropdown-item>
+			</u-dropdown-change>
+		</view>
+
+		<view class="records">
+			<view class="records-item" v-for="(item, index) in abnormalRecordsList" :key="index"
+				@click="gotoUrl('/pages/abnormal/abnormalAlarmDetails?id=')">
+				<view class="icon icon1">
+					<image class="img" src="@/assets/img/riFill-temp-cold-fill.svg" mode=""></image>
+				</view>
+				<view class="title">
+					<view class="name">
+						温度异常
 					</view>
-					<view class="title">
-						<view class="name">
-							温度异常
-						</view>
-						<view class="date">
-							2024-02-14 09:00:01
-						</view>
+					<view class="date">
+						2024-02-14 09:00:01
 					</view>
-					
-					<view class="equipment">
-						<view class="equipment1">
-							荆鹏软件园01
-						</view>
-						<view class="equipment2">
-							荆鹏集团
-						</view>
+				</view>
+
+				<view class="equipment">
+					<view class="equipment1">
+						荆鹏软件园01
 					</view>
-					<view class="more">
-						<u-icon name="arrow-right" color="#acacac"></u-icon>
+					<view class="equipment2">
+						荆鹏集团
 					</view>
 				</view>
-				
-				<view class="records-item">
-					<view class="icon icon2">
-						<image class="img" src="@/assets/img/riFill-cloud-off-fill.svg" mode=""></image>
+				<view class="more">
+					<u-icon name="arrow-right" color="#acacac"></u-icon>
+				</view>
+			</view>
+
+			<view class="records-item">
+				<view class="icon icon2">
+					<image class="img" src="@/assets/img/riFill-cloud-off-fill.svg" mode=""></image>
+				</view>
+				<view class="title">
+					<view class="name">
+						温度异常
 					</view>
-					<view class="title">
-						<view class="name">
-							温度异常
-						</view>
-						<view class="date">
-							2024-02-14 09:00:01
-						</view>
+					<view class="date">
+						2024-02-14 09:00:01
 					</view>
-					
-					<view class="equipment">
-						<view class="equipment1">
-							荆鹏软件园01
-						</view>
-						<view class="equipment2">
-							荆鹏集团
-						</view>
+				</view>
+
+				<view class="equipment">
+					<view class="equipment1">
+						荆鹏软件园01
 					</view>
-					<view class="more">
-						<u-icon name="arrow-right" color="#acacac"></u-icon>
+					<view class="equipment2">
+						荆鹏集团
 					</view>
 				</view>
-				<view class="records-item">
-					<view class="icon icon3">
-						<image class="img" src="@/assets/img/outputVoltage.svg" mode=""></image>
+				<view class="more">
+					<u-icon name="arrow-right" color="#acacac"></u-icon>
+				</view>
+			</view>
+			<view class="records-item">
+				<view class="icon icon3">
+					<image class="img" src="@/assets/img/outputVoltage.svg" mode=""></image>
+				</view>
+				<view class="title">
+					<view class="name">
+						电压异常
 					</view>
-					<view class="title">
-						<view class="name">
-							电压异常
-						</view>
-						<view class="date">
-							2024-02-14 09:00:01
-						</view>
+					<view class="date">
+						2024-02-14 09:00:01
 					</view>
-					
-					<view class="equipment">
-						<view class="equipment1">
-							荆鹏软件园01
-						</view>
-						<view class="equipment2">
-							荆鹏集团
-						</view>
+				</view>
+
+				<view class="equipment">
+					<view class="equipment1">
+						荆鹏软件园01
 					</view>
-					<view class="more">
-						<u-icon name="arrow-right" color="#acacac"></u-icon>
+					<view class="equipment2">
+						荆鹏集团
 					</view>
 				</view>
+				<view class="more">
+					<u-icon name="arrow-right" color="#acacac"></u-icon>
+				</view>
 			</view>
+		</view>
 	</view>
 </template>
 
@@ -94,6 +101,7 @@
 	export default {
 		data() {
 			return {
+				abnormalRecordsList: [], // 异常告警记录
 				value1: 1,
 				value2: 1,
 				value3: 1,
@@ -139,15 +147,32 @@
 						label: '荆州院子',
 						value: 3,
 					},
-					
+
 				],
 			}
 		},
+		methods: {
+			closeDropdown() {
+				this.$refs.uDropdown.close();
+			},
+			// 时间查询
+			timeChange() {
+				
+			},
+			// 状态查询
+			stateChange() {
+				
+			},
+			// 设备查询
+			deviceChange() {
+				
+			}
+		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	.dropdown{
+	.dropdown {
 		background-color: #fff;
 		position: fixed;
 		left: 0;
@@ -155,63 +180,75 @@
 		top: 88rpx;
 		z-index: 999;
 	}
- 
-  // 记录
-  .records{
-	  background-color: #fff;
-	  margin-top: 80rpx;
-	  .records-item{
-		  display: flex;
-		  align-items: center;
-		  padding:24rpx 40rpx ;
-		  border-bottom: 1px solid rgba(245,245,245,1);
-		  .icon{
-			  width: 72rpx;
-			  height: 72rpx;
-			  border-radius: 4px;
-			  display: flex;
-			  align-items: center;
-			  justify-content: center;
-			  .img{
-				  width: 48rpx;
-				  height: 48rpx;
-			  }
-		  }
-		  .icon1{
-			  background-color: rgba(255,227,218,1);
-		  }
-		  .icon2{
-			  background-color: rgba(230,230,230,1);
-		  }
-		  .icon3{
-			  background-color: rgba(212,251,220,1);
-		  }
-		  .title{
-			  margin-left: 16rpx;
-			  .name{
-				  color: rgba(51,51,51,1);
-				  font-weight: bold;
-			  }
-			  .date{
-				  color: rgba(119,119,119,1);
-				  font-size: 24rpx;
-				  margin-top: 4rpx;
-			  }
-		  }
-		  .equipment{
-			  margin-left: auto;
-			  margin-right: 24rpx;
-			  .equipment1{
-				  color: rgba(51,51,51,1);
-				  font-weight: bold;
-			  }
-			  .equipment2{
-				  color: rgba(119,119,119,1);
-				  font-size: 24rpx;
-				  text-align: right;
-				  margin-top: 4rpx;	
-			  }
-		  }
-	  }
-  }
-</style>
+
+	// 记录
+	.records {
+		background-color: #fff;
+		margin-top: 80rpx;
+
+		.records-item {
+			display: flex;
+			align-items: center;
+			padding: 24rpx 40rpx;
+			border-bottom: 1px solid rgba(245, 245, 245, 1);
+
+			.icon {
+				width: 72rpx;
+				height: 72rpx;
+				border-radius: 4px;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+
+				.img {
+					width: 48rpx;
+					height: 48rpx;
+				}
+			}
+
+			.icon1 {
+				background-color: rgba(255, 227, 218, 1);
+			}
+
+			.icon2 {
+				background-color: rgba(230, 230, 230, 1);
+			}
+
+			.icon3 {
+				background-color: rgba(212, 251, 220, 1);
+			}
+
+			.title {
+				margin-left: 16rpx;
+
+				.name {
+					color: rgba(51, 51, 51, 1);
+					font-weight: bold;
+				}
+
+				.date {
+					color: rgba(119, 119, 119, 1);
+					font-size: 24rpx;
+					margin-top: 4rpx;
+				}
+			}
+
+			.equipment {
+				margin-left: auto;
+				margin-right: 24rpx;
+
+				.equipment1 {
+					color: rgba(51, 51, 51, 1);
+					font-weight: bold;
+				}
+
+				.equipment2 {
+					color: rgba(119, 119, 119, 1);
+					font-size: 24rpx;
+					text-align: right;
+					margin-top: 4rpx;
+				}
+			}
+		}
+	}
+</style>

+ 1 - 1
pages/mine/mine.vue

@@ -106,7 +106,7 @@
 
 		</view>
 
-		<energyCenterTabbar :current="2"></energyCenterTabbar>
+		<energyCenterTabbar :current="1"></energyCenterTabbar>
 	</view>
 </template>
 

+ 13 - 9
pages/statistics/statistics.vue

@@ -11,7 +11,7 @@
 		</view>
 		<!-- 标签 -->
 		<view class="tabs-box">
-			<view class="tabs" v-if="companyList.length >2">
+			<view class="tabs">
 				<u-tabs :list="merchantList1" :is-scroll="false" active-color="#fff" inactive-color="#CCE2FF" bg-color="#1677FF"
 					:current="current" @change="change"></u-tabs>
 			</view>
@@ -150,8 +150,9 @@
 					</view>
 				</view>
 			</view>
+			
 			<!-- 统计2 异常告警记录 -->
-			<view class="statistics-2 statistics" v-if="false">
+			<view class="statistics-2 statistics" v-if="abnormalRecordsList.length != 0">
 				<view class="title">
 					<view class="icon">
 						<image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
@@ -164,8 +165,8 @@
 					</view>
 				</view>
 				<!-- 异常  -->
-				<view class="abnormal-item" v-for="item in 3"
-					@click="gotoUrl('/pages/abnormal/abnormalAlarmDetails?id=')">
+				<view class="abnormal-item" v-for="(item, index) in abnormalRecordsList" :key="index"
+					@click="gotoUrl('/pages/abnormal/abnormalAlarmDetails?id='+item.id)">
 					<view class="item-title">
 						<!-- <image class="img" src="@/assets/img/riFill-error-warning-fill 1.svg"></image> -->
 						<view class="name">
@@ -384,6 +385,7 @@
 		},
 		data() {
 			return {
+				abnormalRecordsList: [], // 异常告警记录
 				alarmsPercent: 0,
 				alarmsForm: {
 					okNum: 0,
@@ -403,7 +405,7 @@
 				companyList: [],
 				popShow: false,
 				current: 0,
-				myLineChart: null,
+				myLineChart: null, // 图表
 				myBarChart: null,
 				myPieChart: null
 			}
@@ -452,10 +454,12 @@
 					} else {
 						this.merchantList1 = this.companyList;
 					}
-					this.merchantList1.unshift({
-						id: '',
-						name: '全部'
-					});
+					if(this.companyList.length > 1) {
+						this.merchantList1.unshift({
+							id: '',
+							name: '全部'
+						});
+					}
 				}).catch(error => {
 					uni.showToast({
 						title: error,

+ 12 - 3
pages/workOrderManagement/workOrderStatistics.vue

@@ -179,17 +179,26 @@
 					series: [{
 							name: '新增工单',
 							type: 'bar',
-							data: dataX
+							data: dataX,
+							itemStyle: {
+								color: '#91cc75'
+							}
 						},
 						{
 							name: '处理工单',
 							type: 'bar',
-							data: dataC
+							data: dataC,
+							itemStyle: {
+								color: '#5470c6'
+							}
 						},
 						{
 							name: '剩余工单',
 							type: 'bar',
-							data: dataS
+							data: dataS,
+							itemStyle: {
+								color: '#fac858'
+							}
 						}
 					]
 				}