6/16,同步
This commit is contained in:
@@ -26,7 +26,13 @@
|
||||
</view>
|
||||
|
||||
<!-- 上报记录列表 -->
|
||||
<scroll-view class="record-list" scroll-y lower-threshold="60" @scrolltolower="scrolltolower">
|
||||
<scroll-view
|
||||
ref="scrollRef"
|
||||
class="record-list"
|
||||
scroll-y
|
||||
lower-threshold="60"
|
||||
@scrolltolower="scrolltolower"
|
||||
>
|
||||
<!-- 空状态 -->
|
||||
<view v-if="reportRecords.length === 0" class="empty-state">
|
||||
<uni-icons type="empty" size="60" color="#ccc"></uni-icons>
|
||||
@@ -74,6 +80,7 @@
|
||||
:key="index"
|
||||
:src="item"
|
||||
class="images"
|
||||
@tap="handlePrivew(record.repairImageUrlList, index)"
|
||||
mode="scaleToFill"
|
||||
></image>
|
||||
</view>
|
||||
@@ -136,9 +143,7 @@ const total = ref(0)
|
||||
|
||||
function scrolltolower() {
|
||||
// 必须加这两个判断!
|
||||
if (isLoading.value || !hasMore.value) {
|
||||
return
|
||||
}
|
||||
if (isLoading.value || !hasMore.value) return
|
||||
queryParmas.value.pageNum += 1
|
||||
getlist()
|
||||
}
|
||||
@@ -148,12 +153,17 @@ function getlist() {
|
||||
isLoading.value = true
|
||||
getTicketHallList(queryParmas.value)
|
||||
.then(res => {
|
||||
reportRecords.value = [...reportRecords.value, ...res.rows]
|
||||
reportRecords.value.forEach(item => {
|
||||
item.repairImageUrlList = item.repairImageUrl
|
||||
? item.repairImageUrl.split(',').filter(item => item)
|
||||
const list = res.rows.map(item => ({
|
||||
...item,
|
||||
repairImageUrlList: item.repairImageUrl
|
||||
? item.repairImageUrl.split(',').filter(Boolean)
|
||||
: []
|
||||
})
|
||||
}))
|
||||
if (queryParmas.value.pageNum === 1) {
|
||||
reportRecords.value = list
|
||||
} else {
|
||||
reportRecords.value.push(...list)
|
||||
}
|
||||
total.value = res.total
|
||||
hasMore.value = reportRecords.value.length < total.value
|
||||
})
|
||||
@@ -176,7 +186,7 @@ function getlist() {
|
||||
}
|
||||
|
||||
onShow(() => {
|
||||
resetList()
|
||||
getlist()
|
||||
})
|
||||
|
||||
function resetList() {
|
||||
@@ -245,85 +255,86 @@ function handleMain(id) {
|
||||
}
|
||||
|
||||
/* 预览图片 */
|
||||
function handlePrivew(imgs) {
|
||||
// if (imgs.length > 0) {
|
||||
// uni.previewImage({
|
||||
// urls: imgs,
|
||||
// success(e) {
|
||||
// console.log(JSON.stringify(e))
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
function handlePrivew(items, index) {
|
||||
if (items.length <= 0) return
|
||||
uni.previewImage({
|
||||
urls: items,
|
||||
count: index
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.bgaction {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 20%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 0;
|
||||
z-index: -1;
|
||||
/* 禁止拦截滚动/点击事件 */
|
||||
pointer-events: none;
|
||||
background: linear-gradient(225deg, #e2f0ff 0%, #f9f9f9 25%);
|
||||
}
|
||||
|
||||
/* 根页面:固定满屏、纵向弹性布局、禁止自身滚动 */
|
||||
.report-record-page {
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: linear-gradient(225deg, #e2f0ff 0%, #f9f9f9 25.71%);
|
||||
}
|
||||
|
||||
/* 主体容器:占满剩余高度、纵向排列、禁止滚动 */
|
||||
.hall_body {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 40rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
/* 状态筛选标签 */
|
||||
|
||||
/* 状态标签栏(固定高度,正常占位) */
|
||||
.status-tabs {
|
||||
display: flex;
|
||||
/* background-color: #fff; */
|
||||
padding: 0 40rpx;
|
||||
height: 88rpx;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* 类型筛选标签 */
|
||||
/* 类型标签栏(固定高度,正常占位) */
|
||||
.type-tabs {
|
||||
display: flex;
|
||||
height: 48rpx;
|
||||
/* background-color: #fff; */
|
||||
margin: 20rpx 0;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.type-tabs > .type-tab-item:not(:last-child) {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.type-tab-item {
|
||||
width: 142rpx;
|
||||
height: 48rpx;
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid #999999;
|
||||
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
line-height: 48rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.type-tab-item.active {
|
||||
color: #4d5dfa;
|
||||
border: 2rpx solid #4d5dfa;
|
||||
border-radius: 24rpx;
|
||||
}
|
||||
|
||||
/* 记录列表 */
|
||||
/* ========== 核心修复:scroll-view 滚动区域 ========== */
|
||||
/* 放弃 calc 固定计算,改用 flex 自适应,首屏高度永远正常 */
|
||||
.record-list {
|
||||
box-sizing: border-box;
|
||||
padding-bottom: 40rpx;
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
height: 0;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
|
||||
/* 空状态 */
|
||||
@@ -335,14 +346,13 @@ function handlePrivew(imgs) {
|
||||
padding: 100rpx 0;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 32rpx;
|
||||
color: #999;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
/* 记录卡片 */
|
||||
/* 卡片样式(原有逻辑保留,仅修正冗余 height) */
|
||||
.record-card {
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
@@ -357,14 +367,11 @@ function handlePrivew(imgs) {
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
margin-right: 20rpx;
|
||||
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #222222;
|
||||
line-height: 40rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
/* 状态标签 */
|
||||
@@ -372,25 +379,19 @@ function handlePrivew(imgs) {
|
||||
width: 82rpx;
|
||||
height: 30rpx;
|
||||
border-radius: 15rpx;
|
||||
|
||||
font-weight: 400;
|
||||
font-size: 20rpx;
|
||||
color: #ffffff;
|
||||
line-height: 30rpx;
|
||||
text-align: center;
|
||||
line-height: 30rpx;
|
||||
}
|
||||
|
||||
.status-tag.pending {
|
||||
background-color: #e34d59; /* 待分配-红色 */
|
||||
background-color: #e34d59;
|
||||
}
|
||||
|
||||
.status-tag.processing {
|
||||
background-color: #09c2bd; /* 待解决-绿色 */
|
||||
background-color: #09c2bd;
|
||||
}
|
||||
|
||||
.status-tag.completed {
|
||||
background-color: #4d5dfa; /* 已完成-蓝色 */
|
||||
background-color: #4d5dfa;
|
||||
}
|
||||
|
||||
/* 类型标签组 */
|
||||
@@ -401,14 +402,11 @@ function handlePrivew(imgs) {
|
||||
.tag-group > .tag-item:not(:last-child) {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.tag-item {
|
||||
height: 42rpx;
|
||||
padding: 0 10rpx;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 1rpx solid #999999;
|
||||
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
line-height: 42rpx;
|
||||
@@ -419,16 +417,15 @@ function handlePrivew(imgs) {
|
||||
.card-content {
|
||||
margin-bottom: 20rpx;
|
||||
letter-spacing: 2rpx;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
/* 图片 */
|
||||
|
||||
/* 图片区域 */
|
||||
.card-image {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
min-width: 186rpx;
|
||||
min-height: 104rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
@@ -448,8 +445,8 @@ function handlePrivew(imgs) {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
.create-time {
|
||||
font-weight: 400;
|
||||
.create-time,
|
||||
.repairman {
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
line-height: 40rpx;
|
||||
@@ -459,18 +456,9 @@ function handlePrivew(imgs) {
|
||||
height: 44rpx;
|
||||
background: #4d5dfa;
|
||||
border-radius: 22rpx;
|
||||
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
line-height: 44rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.repairman {
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user