index.vue
3.88 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
<template>
<div class="app-deviceBox">
<div class="theme-card">
<div class="title"><span>设备</span></div>
<div class="content">
<table class="deviceTb">
<tr>
<td style="padding: 0 7px 0 15px;">
<div class="deviceBg eleVerHorCenter-box">
<table class="PDAcontent">
<tr><td><span>{{PDANum}}</span> </td></tr>
<tr><td><div>{{PDAName}}</div></td></tr>
</table>
</div>
<div class="deviceBg eleVerHorCenter-box marginTop">
<table class="daoZhacontent">
<tr><td><span>{{daoZhaNum}}</span> </td></tr>
<tr><td><div>{{daoZhaName}}</div></td></tr>
</table>
</div>
</td>
<td style="padding: 0 15px 0 7px;">
<div class="deviceBg eleVerHorCenter-box">
<table class="diCicontent">
<tr><td><span>{{diCiNum}}</span> </td></tr>
<tr><td><div>{{diCiName}}</div></td></tr>
</table>
</div>
<div class="deviceBg eleVerHorCenter-box marginTop">
<table class="youDaocontent">
<tr><td><span>{{youDaoNum}}</span> </td></tr>
<tr><td><div>{{youDaoName}}</div></td></tr>
</table>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
</template>
<script>
import { deviceAddress } from '../../api/api'
export default {
name: "device",
data() {
return {
PDANum:'',//PDA数
PDAName:'',
diCiNum:'',//地磁数
diCiName:'',
daoZhaNum:'',//道闸数
daoZhaName:'',
youDaoNum:'',//诱导屏
youDaoName:'',
name: '设备'
}
},
mounted() {
this.onLoad()
},
methods: {
onLoad() {
deviceAddress({orgIds: this.GLOBAL.paramsvariables}).then((response)=>{
let data = response.data.data
console.log(data)
this.PDANum = data[0].num
this.PDAName = data[0].deviceName
this.diCiNum = data[1].num
this.diCiName = data[1].deviceName
this.daoZhaNum = data[2].num
this.daoZhaName = data[2].deviceName
this.youDaoNum = data[3].num
if(this.youDaoNum == 0){
this.youDaoNum = '-'
}
this.youDaoName = data[3].deviceName
}).catch((response)=>{
console.log(response);
})
}
},
}
</script>
<style scoped lang="scss">
.app-deviceBox {
width: 100%;
.theme-card{
height: 100%;
}
.content{
padding: 0px;
}
.marginTop{
margin-top: 8% !important;
}
.deviceTb{
margin: 0 auto;
width: 100%;
height: 100%;
}
.deviceTb >tr >td{
vertical-align: middle;
text-align: center;
width: 50%;
}
.deviceBg{
background: url(../../images/com/deviceBg.svg) no-repeat;
background-size: 100% 100%;
width: 100%;
/*height:85%;*/
margin:0px auto;
/*padding: 5px;*/
height: 40%;
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
}
.PDAcontent,.diCicontent,.daoZhacontent,.youDaocontent{
margin: 0 auto;
}
.PDAcontent div,.diCicontent div,.daoZhacontent div,.youDaocontent div{
font-size: 12px;
}
.PDAcontent span,.diCicontent span{
background-image: -webkit-linear-gradient(bottom, #00CAFE, #2772F4);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
font-size: 24px;
}
.daoZhacontent span,.youDaocontent span{
background-image: -webkit-linear-gradient(bottom, #FFBA00, #FF8100);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
font-size: 24px;
}
}
</style>