zhengkaixin il y a 1 mois
Parent
commit
6459afc657
3 fichiers modifiés avec 37 ajouts et 8 suppressions
  1. 19 3
      pages/index/index.vue
  2. 14 2
      pages/task/maintenanceTaks.vue
  3. 4 3
      pages/task/selectLock.vue

+ 19 - 3
pages/index/index.vue

@@ -174,7 +174,7 @@
 						
 						<view class="line2">
 							<view class="value">
-								{{item.createTime}}
+								{{item.createTime}}<span style="color: red;" v-if="isToday(item.createTime)">(今日)</span>
 
 							</view>
 							<view class="value">
@@ -193,7 +193,7 @@
 				
 				<u-divider color="#F44336"  v-if="dataerrRecordsTotal>5"
 				 @click="gotoUrl('/pages/task/listTask')"  >故障记录{{dataerrRecordsTotal}}条,点击查看更多</u-divider>
-				
+				<u-divider v-if="dataerrRecordsTotal==0" :isnone="dataerrRecordsTotal==0" nonetext="暂无数据" border-color="#CFD2D5"></u-divider>
 			</view>
 
 		</view>
@@ -213,7 +213,10 @@
 	import * as echarts from 'echarts';
 	import Tabbar from '@/components/Tabbar.vue'
 
-
+import {
+	
+		newDate
+	} from '@/apis/utils'
 	export default {
 		components: {
 			Tabbar,
@@ -263,6 +266,19 @@
 			this.query()
 		},
 		methods: {
+			isToday(dateStr) {
+			    // 将传入的日期字符串转换为Date对象
+			    const targetDate = newDate(dateStr);
+			    // 获取当前日期
+			    const today = new Date();
+			
+			    // 比较年份、月份和日期是否相等
+			    return (
+			        targetDate.getFullYear() === today.getFullYear() &&
+			        targetDate.getMonth() === today.getMonth() &&
+			        targetDate.getDate() === today.getDate()
+			    );
+			},
 			query(){
 				uni.showLoading({
 					title: "加载中",

+ 14 - 2
pages/task/maintenanceTaks.vue

@@ -95,7 +95,7 @@
 				
 			</view>
 			<view class="list" >
-				<view class="item">
+				<view class="item"  v-if="floorlockErrorRecord.status!=0">
 					<view class="name">
 						处理时间
 				
@@ -104,7 +104,9 @@
 						{{floorlockErrorRecord.updateTime}}
 						
 					</view>
-				</view>
+				</view>
+				
+				
 				<view class="item item-plus"  >
 					<view class="name">
 						处理结果				
@@ -142,6 +144,16 @@
 						 :src="item" mode=""></img>
 						 
 					</view>
+				</view>
+				<view class="item"  v-if="floorlockErrorRecord.status!=0">
+					<view class="name">
+						处理人
+				
+					</view>
+					<view class="value">
+						{{floorlockErrorRecord.updateByName}}
+						
+					</view>
 				</view>
 			</view>
 			

+ 4 - 3
pages/task/selectLock.vue

@@ -16,7 +16,7 @@
 				<view class="v">
 					
 			
-					<view class="v1" >
+					<view class="v1" style="font-weight: bold;" >
 						查询全部
 					</view>
 					
@@ -29,7 +29,7 @@
 					
 
 					<view class="v1" >
-						荆鹏停车场<span class="y">|</span>{{item.lockNo}}
+						{{item.parkingName}}<span class="y">|</span>{{item.lockNo}}
 					</view>
 					<view class="v2" >
 						地锁名称:{{item.name}}
@@ -152,7 +152,8 @@
 		}
 	}
 
-	.body2 {
+	.body2 {
+		padding-top: 20rpx;
 		.item:not(:last-child) {
 			border-bottom: 1px solid rgba(232, 232, 232, 1);
 		}