解决巡检上传记录固定,不能滑动
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<!-- 顶部导航栏 -->
|
||||
<view class="page_padding">
|
||||
<view class="inspection_record_box flex-1 flex flex-col">
|
||||
<view class="inspection_record_box flex flex-col">
|
||||
<navBar @clickLeft="navBack" title="巡检记录"></navBar>
|
||||
<TabsComponents
|
||||
:activeValue="activeValue"
|
||||
@@ -26,40 +26,39 @@
|
||||
</uni-datetime-picker>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list.length > 0">
|
||||
<scroll-view
|
||||
class="record_body record-list"
|
||||
scroll-y
|
||||
lower-threshold="160"
|
||||
@scrolltolower="scrolltolower"
|
||||
<scroll-view
|
||||
v-if="list.length > 0"
|
||||
class="record_body record-list"
|
||||
scroll-y
|
||||
lower-threshold="160"
|
||||
@scrolltolower="scrolltolower"
|
||||
>
|
||||
<view
|
||||
class="record_list_item"
|
||||
v-for="(ite, index) in list"
|
||||
:key="index"
|
||||
@tap="handleTap(ite)"
|
||||
>
|
||||
<view
|
||||
class="record_list_item"
|
||||
v-for="(ite, index) in list"
|
||||
:key="index"
|
||||
@tap="handleTap(ite)"
|
||||
>
|
||||
<view class="title flex items-center">
|
||||
<view class="title_name"> {{ ite.taskName }} </view>
|
||||
<view class="title_status" v-if="isComputed(ite.taskStatus)"> 已巡检 </view>
|
||||
<view class="title_status noinspection" v-else> 未巡检 </view>
|
||||
</view>
|
||||
<view class="items" v-if="ite.points">
|
||||
<view class="item" v-for="(itemname, itemindex) in ite.itemslist" :key="itemindex">
|
||||
<text>{{ itemname }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="time">
|
||||
<text>巡检时间:</text>
|
||||
<text>{{ ite.taskTime }}</text>
|
||||
</view>
|
||||
<view class="time user">
|
||||
<text>巡检人:</text>
|
||||
<text>{{ ite.inspectorName }}</text>
|
||||
<view class="title flex items-center">
|
||||
<view class="title_name"> {{ ite.taskName }} </view>
|
||||
<view class="title_status" v-if="isComputed(ite.taskStatus)"> 已巡检 </view>
|
||||
<view class="title_status noinspection" v-else> 未巡检 </view>
|
||||
</view>
|
||||
<view class="items" v-if="ite.points">
|
||||
<view class="item" v-for="(itemname, itemindex) in ite.itemslist" :key="itemindex">
|
||||
<text>{{ itemname }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="time">
|
||||
<text>巡检时间:</text>
|
||||
<text>{{ ite.taskTime }}</text>
|
||||
</view>
|
||||
<view class="time user">
|
||||
<text>巡检人:</text>
|
||||
<text>{{ ite.inspectorName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="nodata" v-if="list.length <= 0">
|
||||
<text>暂无数据</text>
|
||||
</view>
|
||||
@@ -100,7 +99,7 @@ const activeValue = ref(2)
|
||||
// ---------------------------------------------------------------------
|
||||
const list = ref([])
|
||||
const queryParmas = ref({
|
||||
date: '',
|
||||
date: parseTime(new Date(), '{y}-{m}-{d}'),
|
||||
status: 2,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
@@ -190,11 +189,6 @@ function handleChangeTabs(val: number) {
|
||||
}
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
function init() {
|
||||
queryParmas.value.date = parseTime(new Date(), '{y}-{m}-{d}')
|
||||
getlist()
|
||||
}
|
||||
|
||||
onShow(() => {
|
||||
hasMore.value = true
|
||||
resetList()
|
||||
@@ -203,9 +197,8 @@ function resetList() {
|
||||
list.value = []
|
||||
queryParmas.value.status = 2
|
||||
queryParmas.value.pageSize = 10
|
||||
queryParmas.value.pageSize = 10
|
||||
hasMore.value = true
|
||||
init()
|
||||
getlist()
|
||||
}
|
||||
|
||||
// 返回上一页
|
||||
@@ -276,7 +269,6 @@ const navBack = () => {
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
|
||||
.record_list_item {
|
||||
margin-bottom: 20rpx;
|
||||
background: #ffffff;
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<view class="submitbox" @tap="handleSubmit(ite)" v-if="!ite.complated">
|
||||
<text>提交</text>
|
||||
</view>
|
||||
<view class="line" v-if="ind + 1 === baseFormData.length"> </view>
|
||||
<view class="line" v-if="ind + 1 < item.points.length"> </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user