geomagnetism.vue
2.31 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
<template>
<div class="">
<ul class="dici-wrap" v-if="queryGeoFaultList != undefined && queryGeoFaultList.length > 0">
<li v-for="(item, index) in queryGeoFaultList" :key="index" >
<p class="parkName">{{item.plName}}</p>
<ul class="diciList" v-for="(list, i) in item.eqpDTOs" :key="i">
<li>
编号 :{{list.eqpNo}}
</li>
<li>
故障时间 :{{list.modifyTime | dataFilter}}
</li>
</ul>
</li>
</ul>
<div v-else class="noData">暂无数据</div>
</div>
</template>
<script>
import { diciAddress } from '../utils/api'
export default {
name: 'geomagnetism',
data() {
return {
modifyTimeBegin: new Date(decodeURIComponent(this.getUrlKey("modifyTimeBegin"))),
modifyTimeEnd: new Date(decodeURIComponent(this.getUrlKey("modifyTimeEnd"))),
queryGeoFaultList: []
}
},
created() {
document.title = '地磁故障'
console.log(this.modifyTimeBegin)
console.log(this.modifyTimeEnd)
diciAddress({
modifyTimeBegin:this.modifyTimeBegin,
modifyTimeEnd: this.modifyTimeEnd,
orgId: 10003,
sysCode:'1001',
baseRequest: {
"pageNum": 1,
"pageSize": 500
},
})
.then((res) => {
console.log(res.data.data)
if(res.data.code === '8888'){
const queryGeoFaultList = res.data.data
this.queryGeoFaultList = queryGeoFaultList
}else{
alert('服务器出错了')
}
})
.catch((res) => {
console.log(res)
})
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
.dici-wrap > li {
background-color: $whiteBg;
margin-bottom: 12px;
padding: 15px 15px;
}
.parkName {
font-size: 1.8rem;
font-weight: 700;
padding-left: 2.5rem;
background: url("../assets/images/parkName.png") no-repeat 0 center;
background-size: 1.8rem 1.8rem;
}
.diciList{
background-color: #fafafa;
border-radius: 4px;
padding: 0 15px;
margin-top: 12px;
>li{
height: 3.8rem;
line-height: 3.8rem;
position: relative;
&:first-child:after{
@include border-1px(#D9D9D9, bottom)
opacity: .5;
}
}
}
.noData{
padding-top: 20px;
text-align: center;
}
</style>