Explorar el Código

调整停电预警

zhengkaixin hace 10 meses
padre
commit
e4b9566da1
Se han modificado 2 ficheros con 61 adiciones y 6 borrados
  1. 22 3
      pages/statistics/statistics.vue
  2. 39 3
      pages/tenantList/remindList.vue

+ 22 - 3
pages/statistics/statistics.vue

@@ -407,6 +407,9 @@
 					<view class="item-title">
 			
 						<view class="name">
+							<span v-if="item.level==1" class="level level1 ">一级</span>
+							<span v-if="item.level==2"  class="level level2">二级</span>
+							
 							{{item.content}}
 						</view>
 						<view class="date" style="display: flex;    justify-content: space-between;margin-top: 4rpx;">
@@ -1669,16 +1672,18 @@
 					var mList1 = [];
 					var mList2 = [];
 					var sp=0
+					var id=""
 					if(list.length==1&&list[0].childList&&list[0].childList.length){
 						list=list[0].childList
 						
 						sp=1;
 					
-						
+						id=this.companyListMain[0].id
+						this.companyId=id
 					}
 					
 					mList1.push({
-						id: '',
+						id:id,
 						name: '全部',
 						sp:sp
 					});
@@ -2574,7 +2579,21 @@
 
 
 				.item-title {
-
+					.level{
+						color:#fff;
+						
+						    border-radius: 8rpx;
+						    font-weight: 400;
+						    padding: 4rpx 8rpx;
+						    font-size: 22rpx;
+							margin-right: 2px;
+					}
+					.level1{
+						background: red;
+					}
+					.level2{
+						background-color: rgba(255,123,0,1);
+					}
 
 					color: rgba(51, 51, 51, 1);
 					    width: 100%;

+ 39 - 3
pages/tenantList/remindList.vue

@@ -1,8 +1,10 @@
 <template>
 	<view>
 		<u-navbar title="租户断电提醒" title-color="#101010"></u-navbar>
-		
+		<u-tabs :list="list" :is-scroll="false" 
+		:current="current" @change="change"></u-tabs>
 
+		
 		<view class="records">
 			<view class="records-item" v-for="(item, index) in abnormalRecordsList" :key="index"
 				>
@@ -15,6 +17,9 @@
 				</view> -->
 				<view class="title">
 					<view class="name">
+						<span v-if="item.level==1" class="level level1 ">一级</span>
+						<span v-if="item.level==2"  class="level level2">二级</span>
+						
 						{{item.content}}
 					</view>
 					<view class="date" style="display: flex;    justify-content: space-between;">
@@ -72,6 +77,17 @@
 				value1: 1,
 				value2: 1,
 				value3: 1,
+				
+				list: [{
+									name: '一级预警',
+									level:'1'
+								}, {
+									name: '二级预警',
+									level:'2'
+								}],
+								current: 0,
+								
+								
 				options1: [{
 						label: '2024年2月',
 						value: 1,
@@ -157,7 +173,8 @@
 					pageIndex: this.pageIndex,
 					pageSize: 20,
 					companyId: this.companyId,
-					queryParent:this.companyId?1:0
+					queryParent:this.companyId?1:0,
+					level:this.list[this.current].level
 				}).then((res) => {
 					uni.hideLoading();
 					this.abnormalRecordsList = [
@@ -224,6 +241,10 @@
 					})
 				})
 			},
+			change(index){
+				this.current = index;
+				this.getAbnormalAlarmRecord(true);
+			},
 			// 时间查询
 			timeChange(params) {
 				console.log(params)
@@ -280,7 +301,22 @@
 			align-items: center;
 			padding: 24rpx 40rpx;
 			border-top: 1px solid rgba(245, 245, 245, 1);
-
+			
+			.level{
+				color:#fff;
+				
+				    border-radius: 8rpx;
+				    font-weight: 400;
+				    padding: 4rpx 8rpx;
+				    font-size: 22rpx;
+					margin-right: 2px;
+			}
+			.level1{
+				background: red;
+			}
+			.level2{
+				background-color: rgba(255,123,0,1);
+			}
 			.icon {
 				width: 72rpx;
 				height: 72rpx;