geomagnetism.vue 1.82 KB
<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>