<template>
  <div>

    <predict-gas class="border netdanger" :sdata=data></predict-gas>
    <predict-air class="border predictair" :sdata=data></predict-air>
  </div>
</template>

<script>
export default {
  name: "PredictHome",
  data() {
    return {
      loaddata: 0,
      data : []
    }
  },
  watch: {
    'loaddata': {
      deep: true,
      handler() {
        console.log(this.loaddata,'加载次数')
        if (this.loaddata > 0) {
          this.$parent.initdatashow = false
        }
        this.$resetpost('rs/logic/predictGas',{}, {resolveMsg: null, rejectMsg: null}).then((res) => {
          console.log('--------------------------------------------')
          console.log('返回来的数据',res.data)
          this.data = res.data

        })
      },
      immediate: true
    }
  },
}
</script>

<style scoped>
.border {
  padding-top: 0.4%;
  background: linear-gradient(#6fd9d0, #6fd9d0) left top,
  linear-gradient(#6fd9d0, #6fd9d0) left top,
  linear-gradient(#6fd9d0, #6fd9d0) right top,
  linear-gradient(#6fd9d0, #6fd9d0) right top,
  linear-gradient(#6fd9d0, #6fd9d0) left bottom,
  linear-gradient(#6fd9d0, #6fd9d0) left bottom,
  linear-gradient(#6fd9d0, #6fd9d0) right bottom,
  linear-gradient(#6fd9d0, #6fd9d0) right bottom;
  background-repeat: no-repeat;
  background-size: 1.5px 11px, 11px 1.5px;
  background-color: rgba(1, 207, 242, 0.05);
}
.border-1 {

  background: linear-gradient(#6fd9d0, #6fd9d0) left top,
  linear-gradient(#6fd9d0, #6fd9d0) left top,
  linear-gradient(#6fd9d0, #6fd9d0) right top,
  linear-gradient(#6fd9d0, #6fd9d0) right top,
  linear-gradient(#6fd9d0, #6fd9d0) left bottom,
  linear-gradient(#6fd9d0, #6fd9d0) left bottom,
  linear-gradient(#6fd9d0, #6fd9d0) right bottom,
  linear-gradient(#6fd9d0, #6fd9d0) right bottom;
  background-repeat: no-repeat;
  background-size: 1.5px 11px, 11px 1.5px;
  background-color: rgba(1, 207, 242, 0.05);
}

/*管网隐患*/
.netdanger {
  position: absolute;
  top: 1%;
  left: 1%;
  width: 48%;
  height: 96%;
}
.predictair{
  position: absolute;
  top: 1%;
  left: 50%;
  width: 48%;
  height: 96%;
}
</style>
