Newer
Older
ganzhou-feidu / src / pages / ywts / zyhj / yl / ylPop.vue
<template>
  <div class="bottom">
    <i class="el-icon-close close-pop" @click="$emit('close')"/>
    <div class="block" style="padding: 10px">
      <div style="display: flex;flex-wrap: wrap;flex-direction: row;justify-content: center">
        <div class="num" style="text-align: left;width:100%;font-size: 18px;font-weight: bold">{{ gdInfo.name }}</div>
        <!-- <div class="num" style="color: #B3F3F6;width:50%;word-break: break-all;text-align: left;">类别:<span style="font-weight: bold">{{gdInfo.typename}}</span></div> -->
        <div class="num" style="color: #B3F3F6;width:100%;word-break: break-all;text-align: left;">面积:<span style="font-weight: bold">{{ gdInfo.area }}</span>公顷</div>
        <div class="num" style="color: #B3F3F6;width:100%;word-break: break-all;text-align: left;">位置:<span>{{ gdInfo.location }}</span></div>
        <div class="item">
           <el-image :src="require('@/assets/images/function/教育/专项数据看板图标/已部署点位.png')" class="base-map-image" mode="fill" />
           <div class="item-text">
             <div class="num">{{gdInfo.area}}<span class="unit">公顷</span></div>
             <div style="color: #B3F3F6;">总面积</div>
           </div>
         </div>
         <div class="item">
           <el-image :src="require('@/assets/images/function/教育/专项数据看板图标/已部署点位.png')" class="base-map-image" mode="fill" />
           <div class="item-text">
             <div class="num">{{gdInfo.green}}<span class="unit">公顷</span></div>
             <div style="color: #B3F3F6;">绿化面积</div>
           </div>
         </div>
         <div class="item">
           <el-image :src="require('@/assets/images/function/教育/专项数据看板图标/已部署点位.png')" class="base-map-image" mode="fill" />
           <div class="item-text">
             <div class="num">{{gdInfo.water}}<span class="unit">公顷</span></div>
             <div style="color: #B3F3F6;">水域面积</div>
           </div>
         </div>
        <div class="item">
           <el-image :src="require('@/assets/images/function/教育/专项数据看板图标/监控点位.png')" class="base-map-image" mode="fill" />
           <div class="item-text">
             <div class="num">{{gdInfo.device}}<span class="unit">台</span></div>
             <div style="color: #B3F3F6;">设备数量</div>
           </div>
         </div>
      </div>
    </div>
    <div class="block">
      <div :style="{backgroundImage:'url('+titleImg+')'}" class="title">资源统计</div>
      <case-pie style="flex:1;" ref="casePie"/>
    </div>
    <div class="block">
      <div :style="{backgroundImage:'url('+titleImg+')'}" class="title">设备分析</div>
      <person-bar style="flex:1;" ref="personBar"/>
    </div>
    <div class="block">
      <div :style="{backgroundImage:'url('+titleImg+')'}" class="title">养护分析</div>
      <case-pie1 style="flex:1;" ref="casePie1"/>
    </div>
    <div class="block">
      <div :style="{backgroundImage:'url('+titleImg+')'}" class="title">近1月客流量趋势</div>
      <person-line style="flex:1;" ref="caseLineBar"/>
    </div>
    <div class="block">
      <div :style="{backgroundImage:'url('+titleImg+')'}" class="title">近1月高频事件排行榜</div>
      <ScoreLineBar style="flex:1;" ref="scoreLineBar" />
    </div>
  </div>
</template>

<script>


import PersonBar from "./components/personBar";
import CasePie from "./components/casePie";
import CasePie1 from "./components/casePie1";
import {getGdPointInfo} from "../../../../api/ywts/cszl/gd";
import { getPointInfo } from '@/api/ywts/zyhj/yl'
import PersonLine from "./components/personLine";
import ScoreLineBar from "./components/scoreLineBar";

export default {
  name: 'YlPop',
  components: {PersonLine, CasePie, CasePie1, PersonBar, ScoreLineBar},
  data() {
    return {
      titleImg: require('@/assets/images/popup/title.png'), // 背景图片
      titleAll: require('@/assets/images/popup/title-all.png'),// 背景图片
      list: ['', '', '', ''],
      gdInfo: {}
    }
  },
  methods: {
    initData(item) {
      this.gdInfo = item
      // getGdPointInfo(item.id).then(res => {
      //   if(res.code === 200) {
      //     this.gdInfo = { ...res.data.value[0], ...this.gdInfo }
      //   }
      // })
      // 获取园林详情
      getPointInfo({id: item.id}).then(res => {
        console.log(res.data.value, 'res.data.value')
        this.gdInfo = { ...res.data.value[0], ...this.gdInfo }
      })
      setTimeout(() => {
        // 资源分析
      this.$refs.casePie.fetchData(item.id)
      // 养护
      this.$refs.casePie1.fetchData(item.id)
      // 设备分析
      this.$refs.personBar.fetchData(item.id)
      // 客流量趋势
      this.$refs.caseLineBar.fetchData(item.id)
      // 事件排行
      this.$refs.scoreLineBar.fetchData(item.id)
      })

      // this.$refs.eduLineBar.fetchData(item.id)
      // this.$refs.scoreLineBar.fetchData(item.id)
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>

.bottom{
  z-index: 111111111111;
  width: 100%;
  height: 250px;
  position: absolute;
  bottom: 10px;
  left: 0px;
  display: flex;
  overflow: hidden;
  padding: 0px 0px;
  .block{
    flex: 1;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    background: linear-gradient(to top left, rgba(5, 30, 61, 0.62), #0D3F7E9D);
    border-radius: 5px;
    box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
    border-color: rgba(0, 0, 0, .05);
    margin: 0px 5px;
    flex-direction: column;
  }
  .block1{
    width: 500px;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    background: linear-gradient(to top left, rgba(5, 30, 61, 0.62), #0D3F7E9D);
    border-radius: 5px;
    box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
    border-color: rgba(0, 0, 0, .05);
    margin: 0px 10px;
    flex-direction: column;
  }
  .title{
    text-shadow: 0 0 5px #d1ffff;
    height: 35px;
    float: left;
    text-align: left;
    background-repeat: no-repeat;
    -webkit-background-size: 100% 100%;
    background-size: 100% 100% !important;
    color: white;
    font-weight: bold;
    padding-top: 4px;
    padding-left: 30px;
    font-family: 黑体;
    letter-spacing: 1px;
  }
  .item-text{
    text-shadow: 0 0 2px #d1ffff;
    flex: 1;
    font-weight: bold;
    text-align: center;
    font-size: 18px;
  }
  .base-map-image{
    width: 60px;
    height: 60px;
  }
  .num{
    text-shadow: 0 0 5px #ffb441;
    color: #ffb441;
    font-size: 18px;
    padding-top: 2px;
  }
  .unit{
    color: #B3F3F6;
    font-size: 14px;
    margin-left: 1px;
  }
  .item{
    width: 50%;
    height: 32%;
    display: flex;
    justify-content: left;
    align-items: center;
  }
}
</style>