<template>
|
<view class="">
|
<view class="list">
|
<view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k" @click="navTo(i.id)">
|
<view class="item-title flex a-i-c j-c-s-b mb-20">
|
<text class="f-32 fw">{{i.type ==1?"安全隐患排查":"矛盾纠纷排查"}}</text>
|
<!-- <text class="f-32 fw" v-if="i.eventType == 3">二手车交易</text>id
|
<text class="f-32 fw" v-if="i.eventType == 2">二手手机维修</text> -->
|
<u-tag v-if="i.confirmFlag == 4" text="待处理" type="warning" plain plainFill></u-tag>
|
<u-tag v-if="i.confirmFlag == 1" text="待审批" type="warning" plain plainFill></u-tag>
|
<u-tag v-if="i.confirmFlag == 2" text="审核通过" type="success" plain plainFill></u-tag>
|
<u-tag v-if="i.confirmFlag == 3" text="审核拒绝" type="error" plain plainFill></u-tag>
|
</view>
|
<view class="item-row flex a-i-c j-c-s-b">
|
<text class="f-28">描述</text>
|
<text class="f-28 c-66 remarkText">{{i.remark}}</text>
|
</view>
|
<view class="item-row flex a-i-c j-c-s-b">
|
<text class="f-28">时间</text>
|
<text class="f-28 c-66">{{i.createTime}}</text>
|
</view>
|
</view>
|
</view>
|
<u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
|
</view>
|
</template>
|
|
<script>
|
import {
|
getTroubleReportList
|
} from "@/api/school/school.js";
|
|
export default {
|
data() {
|
return {
|
list: [],
|
currentPage: 1,
|
loadingStatus: 'nomore',
|
}
|
},
|
|
onLoad(option) {
|
if (option.type == 1) {
|
uni.setNavigationBarTitle({
|
title: "安全隐患排查"
|
})
|
} else {
|
uni.setNavigationBarTitle({
|
title: "矛盾纠纷排查"
|
})
|
}
|
this.getList(option.type)
|
},
|
onReachBottom() {
|
this.currentPage++
|
this.getList()
|
},
|
|
methods: {
|
getList(type) {
|
getTroubleReportList({
|
current: this.currentPage,
|
size: 10,
|
houseCode: uni.getStorageSync("siteInfo").houseCode,
|
type: type,
|
createUser: uni.getStorageSync("userInfo").user_id,
|
}).then(res => {
|
if (res.code != 200) {
|
uni.showToast({
|
title: '数据请求失败',
|
icon: 'error'
|
})
|
return
|
}
|
let records = res.data.records;
|
this.list = [...this.list, ...records]
|
this.loadingStatus = 'nomore'
|
})
|
},
|
navTo(id) {
|
uni.navigateTo({
|
url: `troubleDetail?id=${id}`
|
})
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss">
|
page {
|
background-color: #F5F5F5;
|
}
|
|
.list {
|
margin: 20rpx 30rpx 0;
|
}
|
|
.list-item {
|
padding: 0 30rpx 20rpx;
|
border-radius: 8rpx;
|
|
.item-title {
|
padding: 30rpx 0;
|
border-bottom: 1px solid #F5F5F5;
|
}
|
|
.item-row {
|
padding: 10rpx 0;
|
|
.address {
|
width: 65%;
|
}
|
|
.remarkText {
|
width: 200px;
|
/* 定义容器宽度 */
|
white-space: nowrap;
|
/* 确保文本在一行内显示 */
|
overflow: hidden;
|
/* 隐藏超出容器的文本 */
|
text-overflow: ellipsis;
|
/* 使用点点表示文本的溢出 */
|
text-align: right;
|
/* 文本居中对齐 */
|
}
|
}
|
}
|
</style>
|