143 lines
2.8 KiB
Vue

<template>
<view class="control">
<!-- <view class="control-h2 flex j-between a-center">
进度记录
<view class="control-total">0/10</view>
</view> -->
<view class="control-list" v-if="listData && listData.length>0">
<view class="control-item" v-for="(item,index) in listData" :key="index">
<view class="item-title b-bottom">
{{item.dutyRegion}}
</view>
<view class="item-select-box" :class="{'b-bottom': item.imageUrl}">
<view class="item-content">进度描述:{{item.progressDescribe}}</view>
</view>
<view class="item-img" v-if="item.imageUrl">
现场照片
<view class="img-wrap flex a-center">
<view class="imgBox" v-for="(item,index) in item.imageUrl.split(',')" :key="index">
<image :src="url_config+'image/'+item" class="img"
@click="previewImage(url_config+'image/'+item)"></image>
</view>
</view>
</view>
</view>
</view>
<view class="no-data" v-else>
<image class="img" src="/static/noData.png"></image>
<text class="txt">暂无数据</text>
</view>
</view>
</template>
<script>
export default {
props:["detailId"],
data(){
return{
listData:[]
}
},
created(){
this.initData()
},
methods:{
previewImage(url) {
uni.previewImage({
urls: [url]
})
},
initData(){
this.sendRequest({
url:'xmgl/dangerousEngineeringProgressRecord/list',
method:'post',
data: {engineeringId: this.detailId,type:1},
success:res=>{
uni.hideLoading()
if(res.code==200){
this.listData = res.result
console.log(res)
}
}
})
}
}
}
</script>
<style lang="scss" scoped>
.control{
padding-top: 20rpx;
padding-bottom: 40rpx;
.flex{
display: flex;
}
.j-between{
justify-content: space-between;
}
.a-center{
align-items: center;
}
.b-bottom{
border-bottom: 1px solid #F6F6F6;
}
.control-h2{
font-size: 28rpx;
height: 60rpx;
padding: 0 20rpx;
background: rgba(255,255,255,0.5);
}
.control-list{
font-size: 28rpx;
.control-item{
padding: 0 20rpx;
margin-bottom: 20rpx;
background: #fff;
.item-title{
font-weight: 600;
height: 72rpx;
line-height: 72rpx;
}
}
.item-select-box{
padding: 30rpx 0;
.item-content{
width: 100%;
}
}
.img-wrap{
margin-top: 20rpx;
flex-wrap: wrap;
}
.item-img{
padding: 30rpx 0;
.imgBox{
width: 100rpx;
height: 100rpx;
margin-left: 20rpx;
.img{
width: 100%;
height: 100%;
}
}
}
}
.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>