2025-01-21 18:08:48 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view class="dangerbig-list">
|
|
|
|
|
|
<view class="fixedheader">
|
|
|
|
|
|
<headers :themeType="true" :showBack="true">
|
|
|
|
|
|
<view class="headerName">
|
|
|
|
|
|
危大工程
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</headers>
|
|
|
|
|
|
</view>
|
2025-04-11 14:24:29 +08:00
|
|
|
|
<view :style="{ 'padding-top': ((statusBarHeight * 2) + 45) * 1.5 + 'rpx' }">
|
2025-01-21 18:08:48 +08:00
|
|
|
|
<view class="list" v-if="listData && listData.length>0">
|
|
|
|
|
|
<view class="list-item" v-for="(item,index) in listData" :key="index" @click="checkItem(item)">
|
|
|
|
|
|
<view class="list-title">
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<text class="tag" v-if="item.hiddenDangerNum > 0">未销项{{item.hiddenDangerNum}}</text>
|
|
|
|
|
|
{{item.engineeringName}}
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- <view :class="{'status2': item.engineeringState === 2,'status4': item.engineeringState === 4}"> -->
|
|
|
|
|
|
<!-- <view :class="{'status2': item.engineeringState === 2 || item.engineeringState === 3,'status4': item.engineeringState === 4}"> -->
|
|
|
|
|
|
<!-- <view :class="{'status2': item.engineeringState !== 4, 'status4': item.engineeringState === 4}">
|
|
|
|
|
|
{{item.engineeringState === 2 ? "在施" : item.engineeringState === 4 ? "已完工" : ""}}
|
|
|
|
|
|
{{item.engineeringState === 1 ? "在施" : item.engineeringState === 2 ? "在施" : item.engineeringState === 3 ? "在施" : item.engineeringState === 4 ? "已完工" : ""}}
|
|
|
|
|
|
{{item.engineeringState === 4 ? "已完工" : "在施"}}
|
|
|
|
|
|
</view> -->
|
|
|
|
|
|
<!-- <view :class="{'status1': item.finalAcceptanceStatus == 1,'status2': item.finalAcceptanceStatus == 2}">
|
|
|
|
|
|
{{item.finalAcceptanceStatus == 1 ? "在施" : item.finalAcceptanceStatus == 2 ? "已完工" : ""}}
|
|
|
|
|
|
</view> -->
|
|
|
|
|
|
<view :class="{'status2': item.finalAcceptanceStatus == 1,'status4': item.finalAcceptanceStatus == 2}">
|
|
|
|
|
|
{{item.finalAcceptanceStatus == 1 ? "在施" : item.finalAcceptanceStatus == 2 ? "已完工" : ""}}
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="list-content">
|
|
|
|
|
|
<view class="list-info">
|
|
|
|
|
|
类别:{{item.engineeringTypeName}}
|
|
|
|
|
|
<view class="info-status" v-if="item.issuperdanger">超危</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="loadMoreBox" v-if="isLoadMore">
|
|
|
|
|
|
<uni-load-more :status="loadStatus" iconType="auto"></uni-load-more>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- <view class="btn" @click="jumPage">危大验收</view> -->
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="no-data" v-else>
|
|
|
|
|
|
<image class="img" src="/static/noData.png"></image>
|
|
|
|
|
|
<text class="txt">暂无数据</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<levitatedsphere :x="100" :y="80"></levitatedsphere>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import levitatedsphere from "@/components/levitatedsphere/levitatedsphere.vue"
|
|
|
|
|
|
export default {
|
|
|
|
|
|
data(){
|
|
|
|
|
|
return{
|
|
|
|
|
|
statusBarHeight: 0,
|
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
projectSn: "",
|
|
|
|
|
|
listData:[],
|
|
|
|
|
|
isLoadMore: false,
|
|
|
|
|
|
loadStatus: 'more'
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onShow(){
|
|
|
|
|
|
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight;
|
|
|
|
|
|
this.projectSn = JSON.parse(uni.getStorageSync('userInfo')).sn
|
|
|
|
|
|
},
|
|
|
|
|
|
onLoad(){
|
|
|
|
|
|
this.projectSn = JSON.parse(uni.getStorageSync('userInfo')).sn
|
|
|
|
|
|
this.initData()
|
|
|
|
|
|
},
|
|
|
|
|
|
onReachBottom() {
|
|
|
|
|
|
console.log(1)
|
|
|
|
|
|
if(!this.isLoadMore){ //此处判断,上锁,防止重复请求
|
|
|
|
|
|
this.isLoadMore=true
|
|
|
|
|
|
this.pageNo+=1
|
|
|
|
|
|
this.initData()
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onPullDownRefresh() {
|
|
|
|
|
|
console.log(2)
|
|
|
|
|
|
this.pageNo=1
|
|
|
|
|
|
this.listData=[]
|
|
|
|
|
|
this.initData()
|
|
|
|
|
|
},
|
|
|
|
|
|
methods:{
|
|
|
|
|
|
|
|
|
|
|
|
checkItem(val){
|
|
|
|
|
|
console.log(val)
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url:'./details?id='+val.id
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
initData(){
|
|
|
|
|
|
let data = {
|
|
|
|
|
|
pageNo: this.pageNo,
|
|
|
|
|
|
pageSize: this.pageSize,
|
|
|
|
|
|
projectSn: this.projectSn
|
|
|
|
|
|
}
|
|
|
|
|
|
this.sendRequest({
|
|
|
|
|
|
url:'xmgl/dangerousEngineeringRecord/list',
|
|
|
|
|
|
method:'post',
|
|
|
|
|
|
data:data,
|
|
|
|
|
|
success:res=>{
|
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
|
if(res.code==200){
|
|
|
|
|
|
// this.listData = res.result.records
|
|
|
|
|
|
this.listData=this.listData.concat(res.result.records)
|
|
|
|
|
|
if(res.result.records.length<this.pageSize){ //判断接口返回数据量小于请求数据量,则表示此为最后一页
|
|
|
|
|
|
this.isLoadMore=true
|
|
|
|
|
|
this.loadStatus='nomore'
|
|
|
|
|
|
}else{
|
|
|
|
|
|
this.isLoadMore=false
|
|
|
|
|
|
// that.loadStatus='more'
|
|
|
|
|
|
}
|
|
|
|
|
|
uni.stopPullDownRefresh()
|
|
|
|
|
|
}
|
|
|
|
|
|
console.log(res)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
jumPage(){
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url:'./dangerBigCheckList'
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
.dangerbig-list{
|
|
|
|
|
|
min-height: 100%;
|
|
|
|
|
|
background: #F6F6F6;
|
|
|
|
|
|
.fixedheader{
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
z-index: 2;
|
|
|
|
|
|
.headerName{
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.list{
|
|
|
|
|
|
padding:20rpx 0;
|
|
|
|
|
|
.list-item{
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
margin-bottom: 20rpx;
|
|
|
|
|
|
.list-title{
|
|
|
|
|
|
padding: 20rpx;
|
|
|
|
|
|
border-bottom: 4rpx solid #F6F6F6;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
.tag{
|
|
|
|
|
|
background: #F0AD4E;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
padding: 4rpx 8rpx;
|
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
margin-right: 20rpx;
|
|
|
|
|
|
margin-left: -20rpx;
|
|
|
|
|
|
height: 32rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
.status2{
|
|
|
|
|
|
background: #F0AD4E;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
padding: 4rpx 8rpx;
|
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
.status4{
|
|
|
|
|
|
background: #ccc;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
padding: 4rpx 8rpx;
|
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.list-info{
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
padding: 20rpx;
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
.info-status{
|
|
|
|
|
|
padding:0 10rpx;
|
|
|
|
|
|
border: 1px solid #DD524D;
|
|
|
|
|
|
border-radius: 6rpx;
|
|
|
|
|
|
color: #DD524D;
|
|
|
|
|
|
margin-left: 10rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.btn{
|
|
|
|
|
|
height: 96rpx;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
line-height: 96rpx;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
background: #4181FE;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.no-data{
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
.img{
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
height: 200rpx;
|
|
|
|
|
|
width: 200rpx;
|
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
|
margin-top: 60rpx;
|
|
|
|
|
|
margin-bottom: 60rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
.txt{
|
|
|
|
|
|
color: #C0C4CC;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|