<script setup>
|
import { ref ,onMounted } from 'vue';
|
import { searchBreakdownApi } from '../../api/index.js'
|
import { BASE_URL } from '../../config/baseUrl.js';
|
|
const baesUrl = ref(BASE_URL)
|
const breakdownList = ref([])
|
async function searchBreakdown(){
|
await searchBreakdownApi({limit:10000,page:1}).then((res) =>{
|
if(res.code == 200){
|
breakdownList.value = []
|
breakdownList.value = res.data.list
|
breakdownList.value.forEach((item) =>{
|
item.imageList = item.url.split(',')
|
})
|
console.log('000',breakdownList.value)
|
}
|
})
|
}
|
onMounted(async() =>{
|
await searchBreakdown()
|
})
|
</script>
|
<template>
|
<view class="container">
|
<navbar title = '上报记录'></navbar>
|
<view class="content">
|
<view class="main">
|
<view v-for="(item,index) in breakdownList" class="item">
|
<view class="item-child">
|
<text class="text">设备编号:</text>
|
<text class="value">{{item.facilityCode}}</text>
|
</view>
|
<view class="item-child">
|
<text class="text">故障类型:</text>
|
<text class="value">{{item.typeName}}</text>
|
</view>
|
<view class="item-child">
|
<text class="text">联系方式:</text>
|
<text class="value">{{item.userPhone}}</text>
|
</view>
|
<view class="item-child">
|
<text class="text">故障描述:</text>
|
<text class="value">{{item.describe}}</text>
|
</view>
|
<view class="item-child handle-item">
|
<view>
|
<text class="text">处理状态:</text>
|
<text class="value">{{item.isSolveView}}</text>
|
</view>
|
<view v-if="item.isSolve == 0" class="handle-btn">去处理</view>
|
</view>
|
<view class="item-child-image">
|
<view class="text">故障图片:</view>
|
<view class="imgList">
|
<view class="child-img" v-for="(itemChild,index) in item.imageList">
|
<image class="img" :src="baesUrl + '/upload' + itemChild" mode="aspectFit"></image>
|
</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
</template>
|
<style lang="scss" scoped>
|
.container{
|
width:100%;
|
box-sizing: border-box;
|
.content{
|
height:calc(100vh - 176rpx);
|
background: linear-gradient(to bottom,#8BC1FC 0%,#D2F2FE 30%,#D2F2FE 100%);
|
padding:30rpx 20rpx 100rpx;
|
box-sizing: border-box;
|
.main{
|
width:100%;
|
height:100%;
|
background: #f3fbfe;
|
padding:20rpx;
|
box-sizing: border-box;
|
overflow: scroll;
|
.item{
|
width:100%;
|
height: 550rpx;
|
box-shadow: 0 0 3rpx 1rpx #bac1c8;
|
margin-top:15rpx;
|
display: flex;
|
flex-direction: column;
|
padding:10rpx 20rpx;
|
box-sizing: border-box;
|
.item-child{
|
margin-top:6rpx;
|
.text{
|
color: #616266;
|
margin-right:10rpx;
|
}
|
.value{
|
color: #5687c7;
|
}
|
}
|
.handle-item{
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
.handle-btn{
|
width:120rpx;
|
height:60rpx;
|
background: rgba(110, 151, 245, 0.8);
|
border-radius:15rpx;
|
text-align: center;
|
line-height:60rpx;
|
color: #fff;
|
font-size: 30rpx;
|
}
|
}
|
.item-child-image{
|
display: flex;
|
flex-direction: column;
|
.text{
|
color: #616266;
|
}
|
.imgList{
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
margin-top:20rpx;
|
.child-img{
|
width: 180rpx;
|
height:180rpx;
|
border-radius:20rpx;
|
border:1rpx dashed #b7d4ff;
|
margin-bottom: 10rpx;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
overflow: hidden;
|
.img{
|
width: 170rpx;
|
height:170rpx;
|
}
|
}
|
}
|
// }
|
}
|
}
|
}
|
}
|
}
|
|
</style>
|