Liuyi
2024-11-30 493d712b9b7d7821e71f9fee6f2078e023ef4f5f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<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>