geomagnetism.vue
1.82 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
<template>
  <div class="">
    <ul class="dici-wrap">
      <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>
</template>
<script>
import { diciAddress } from '../utils/api'
export default {
  name: 'geomagnetism',
  data() {
    return {
      modifyTimeBegin: new Date('2019-04-01 00:00:00'),
      modifyTimeEnd: new Date('2019-04-04 00:00:00'),
      queryGeoFaultList: []
    }
  },
  created() {
    document.title = '地磁故障'
    diciAddress({
      modifyTimeBegin:this.modifyTimeBegin,
      modifyTimeEnd: this.modifyTimeEnd,
      orgId: 10003,
      sysCode:'1001',
    })
    .then((res) => {
      console.log(res.data.data)
      const queryGeoFaultList = res.data.data
      this.queryGeoFaultList = queryGeoFaultList
    })
    .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;
      }
    }
  }
</style>