This commit is contained in:
xuli
2025-11-21 18:25:05 +08:00
parent a62063850b
commit 9b4ccd7811
8 changed files with 276 additions and 98 deletions

View File

@@ -16,9 +16,11 @@
<view class="top-height"></view>
<view class="week">{{dateStr}}</view>
<!-- 列表 -->
<mescroll-uni ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
:up="upOption" :down="downOption" :fixed="false" class="scroll-h" :class="{'loading-scroll':cssFlag}">
<!-- 列表 @up="upCallback" -->
<mescroll-uni ref="mescrollRef" @init="mescrollInit"
@down="downCallback" :down="downOption" :up="upOption"
:fixed="false" class="scroll-h"
:class="{'loading-scroll':cssFlag}">
<view class="white-bg">
<view class="blue-title">日常巡检</view>
<block v-if="list1.length>0">
@@ -135,8 +137,8 @@
</view>
<view class="r-list">
<view class="r-left">
<view class="r-l-left">跟踪次数<span class="r-gray">{{ item.count }}</span></view>
<view class="r-l-right">最近跟踪时间<span class="r-gray">{{ item.planTime }}</span></view>
<view class="r-l-left" style="width:220rpx">跟踪次数<span class="r-gray">{{ item.count }}</span></view>
<view class="r-l-right">最近跟踪时间<span class="r-gray">{{ parseTime(item.modifyTime,'{m}-{d} {h}:{i}') }}</span></view>
</view>
</view>
<view class="report-border" v-if="index<list3.length-1"></view>
@@ -157,24 +159,22 @@ import customHeader from '@/components/customHeader.vue';
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
import { parseTime } from '@/utils/datetime.js';
import { formatTaskStatus } from '@/utils/status.js';
import { noticeList } from '@/api/notice.js'
import { taskTodayList } from '@/api/polling.js'
// '2025-12-29 星期五'
let dateStr = ref('');
onLoad(option => {
let date = new Date();
dateStr.value = parseTime(date,'{y}-{m}-{d} 星期{a}');
})
// 查询列表
let list1 = ref([]);
let list2 = ref([]);
let list3 = ref([]);
const mescrollRef = ref(null);
const upOption = ref({
// use: false,
use: false,
page: { num: 0, size: 10 },
noMoreSize: 5,
empty: {
@@ -186,7 +186,7 @@ const upOption = ref({
});
const downOption = ref({
auto: false,
auto: true,
textInOffset: '下拉刷新',
textOutOffset: '释放更新',
textLoading: '刷新中...'
@@ -207,13 +207,11 @@ const downCallback = async (mescroll) => {
list1.value = res.list1;
list2.value = res.list2;
list3.value = res.list3;
mescroll.resetUpScroll();
// mescroll.resetUpScroll();
} catch (error) {
mescroll.endErr();
} finally {
setTimeout(async ()=>{
mescroll.endSuccess();
},500);
mescroll.endSuccess();
}
}
// 上拉加载更多
@@ -236,6 +234,7 @@ const upCallback = async (mescroll) => {
// 获取数据列表
const getList = (pageIndex, pageSize) => {
return new Promise(async (resolve) => {
let param = {
pageIndex,
@@ -356,7 +355,7 @@ const getList = (pageIndex, pageSize) => {
// total: res.recordCount || 0
});
});
}
// 查看详情 type 1-任务详情 2-问题详情