|
@@ -174,7 +174,7 @@
|
|
|
|
|
|
<view class="line2">
|
|
<view class="line2">
|
|
<view class="value">
|
|
<view class="value">
|
|
- {{item.createTime}}
|
|
|
|
|
|
+ {{item.createTime}}<span style="color: red;" v-if="isToday(item.createTime)">(今日)</span>
|
|
|
|
|
|
</view>
|
|
</view>
|
|
<view class="value">
|
|
<view class="value">
|
|
@@ -193,7 +193,7 @@
|
|
|
|
|
|
<u-divider color="#F44336" v-if="dataerrRecordsTotal>5"
|
|
<u-divider color="#F44336" v-if="dataerrRecordsTotal>5"
|
|
@click="gotoUrl('/pages/task/listTask')" >故障记录{{dataerrRecordsTotal}}条,点击查看更多</u-divider>
|
|
@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>
|
|
|
|
|
|
</view>
|
|
</view>
|
|
@@ -213,7 +213,10 @@
|
|
import * as echarts from 'echarts';
|
|
import * as echarts from 'echarts';
|
|
import Tabbar from '@/components/Tabbar.vue'
|
|
import Tabbar from '@/components/Tabbar.vue'
|
|
|
|
|
|
-
|
|
|
|
|
|
+import {
|
|
|
|
+
|
|
|
|
+ newDate
|
|
|
|
+ } from '@/apis/utils'
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
Tabbar,
|
|
Tabbar,
|
|
@@ -263,6 +266,19 @@
|
|
this.query()
|
|
this.query()
|
|
},
|
|
},
|
|
methods: {
|
|
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(){
|
|
query(){
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title: "加载中",
|
|
title: "加载中",
|