inspectionPlan-detail.vue
3.25 KB
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
151
152
153
154
<template>
<view class="device-detail-page">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<view class="mt-3">
<view class="basic-header">
<view class="u-flex">
<view class="basic-text text-clip ml-2">
{{ listDetail.name }}
</view>
<view v-if="listDetail.status" class="basic-text-status ml-2" :style="{ color: faultDevice[listDetail.status].color}">
{{ listDetail.status ? faultDevice[listDetail.status].name : '' }}
</view>
</view>
</view>
<view class="detail">
<view class="detail-item">
<view class="detail-label">{{ $t('deviceMangement.schemeCode') }}</view>
<view class="detail-value">{{ listDetail.code}}</view>
</view>
<u-line length="90%" margin="0 auto"></u-line>
<view class="detail-item">
<view class="detail-label">{{ $t('deviceMangement.schemeName') }}</view>
<view class="detail-value">{{ listDetail.name }}</view>
</view>
<u-line length="90%" margin="0 auto"></u-line>
<view class="detail-item">
<view class="detail-label">{{ $t('deviceMangement.schemeType') }}</view>
<view class="detail-value">{{ listDetail.type ? schemeType[listDetail.type].name : '' }}</view>
</view>
<u-line length="90%" margin="0 auto"></u-line>
<view class="detail-item">
<view class="detail-label">{{ $t('deviceMangement.schemeDetails') }}</view>
<view class="detail-value">{{ listDetail.planDetails }}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import fTabbar from "@/components/module/f-tabbar/f-tabbar";
import api from '@/api/index.js'
import {faultDevice,schemeType} from '@/pages/deviceManagement/enum/index.js'
export default {
components: {
fTabbar,
},
data() {
return {
listDetail:{},
faultDevice,
schemeType
};
},
onUnload() {
},
async onLoad(options) {
// 隐藏原生的tabbar
uni.hideTabBar();
if (getApp().getBindNot()) {
return
}
let id = options.id
const res = await api.deviceManagementApi.getCheckPlanDetail(id)
if (!res) return
this.listDetail = {...res}
},
onShow(){
this.$nextTick(()=>{
uni.setNavigationBarTitle({
title:this.$t('menu.inspectionPlanDetail')
})
})
},
methods: {
},
};
</script>
<style lang="scss" scoped>
.device-detail-page {
min-height: 100vh;
background-color: #f8f9fa;
padding: 0 30rpx;
.basic-header {
display: flex;
justify-content: space-between;
align-items: center;
height: 140rpx;
background-color: #fff;
border-radius: 20rpx;
padding-left: 40rpx;
padding-right:20rpx;
.basic-text {
width: 370rpx;
}
.cu-item {
background: #3388ff;
border-radius: 12px;
width: 120rpx;
height: 48rpx;
text-align: center;
line-height: 40rpx;
text {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
}
}
.basic-text-status {
font-size: 14px;
}
}
.detail {
background-color: #fff;
margin-top: 30rpx;
border-radius: 20rpx;
width: 690rpx;
.detail-item {
padding: 30rpx;
display: flex;
align-items: center;
.detail-label {
color: #333;
font-size: 15px;
}
.detail-value {
color: #666;
font-size: 14px;
margin-left: 30rpx;
}
}
}
}
</style>