<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: 20px;font-weight: bold">{{ name }}</div> <div class="num" style="color: #B3F3F6;width:100%;word-break: break-all;text-align: left;">位置:{{ position }}</span></div> <!-- <div class="item" style="width: 51%"> <el-image :src="require('@/assets/images/function/教育/专项数据看板图标/在校生总数.png')" class="base-map-image" mode="fill" /> <div class="item-text"> <div class="num">{{ list[0] }}<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">{{ list[1] }}<span class="unit">人</span></div> <div style="color: #B3F3F6;">教师总数</div> </div> </div> --> <div class="item" v-for="(item, index) in list"> <!-- <el-image :src="require('@/assets/images/function/教育/专项数据看板图标/教职工总数.png')" class="base-map-image" mode="fill" /> --> <div class="item-text"> <div class="num">{{ item.total }}<span class="unit"></span></div> <div style="color: #B3F3F6;">{{ item.name }}</div> </div> </div> </div> </div> <div class="block"> <div :style="{ backgroundImage: 'url(' + titleImg + ')' }" class="title">居民年龄统计</div> <age-pie style="flex:1;" ref="agePie" /> </div> <div class="block"> <div :style="{ backgroundImage: 'url(' + titleImg + ')' }" class="title">居民流动比例</div> <currentPie style="flex:1;" ref="currentPie"/> </div> <div class="block"> <div :style="{ backgroundImage: 'url(' + titleImg + ')' }" class="title">近1年人房车占比统计</div> <personBar style="flex:1;" ref="personBar"/> </div> <div class="block"> <div :style="{ backgroundImage: 'url(' + titleImg + ')' }" class="title">近1月居民通行量分析</div> <transitBar style="flex:1;" ref="transitBar"/> </div> <div class="block"> <div :style="{ backgroundImage: 'url(' + titleImg + ')' }" class="title">近1月高频事件排行榜</div> <scoreLineBar style="flex:1;" ref="scoreLineBar"/> </div> </div> </template> <script> import scoreLineBar from "./components/scoreLineBar"; import transitBar from "./components/transitBar"; import personBar from "./components/personBar"; import AgePie from "./components/agePie"; import currentPie from "./components/currentPie"; import { getBaseInfo } from '@/api/ywts/shms/sq' export default { name: 'SchoolPop', // components: {SexPie, AgePie, StudentBar, TsLineBar, TeacherLine}, components: { AgePie, currentPie, personBar, transitBar, scoreLineBar }, data() { return { titleImg: require('@/assets/images/popup/title.png'), // 背景图片 titleAll: require('@/assets/images/popup/title-all.png'),// 背景图片 list: [ { name: '居民总数', value: 'personnum', total: '0', }, { name: '房屋总数', value: 'buildingnum', total: '0', }, { name: '车辆总数', value: 'carnum', total: '0', }, { name: '入住率', value: 'inrate', total: '0', }, ], name: '', position: '', } }, methods: { initData(item) { console.log(item, '社区信息') this.name = item.name getBaseInfo({ id: item.id }).then(res => { const data = res.data.value[0] this.position = data.location this.list.forEach((item) => { if (data[item.value]) { item.total = data[item.value] } }) }) this.$refs.agePie.fetchData(item.id) this.$refs.currentPie.fetchData(item.id) this.$refs.personBar.fetchData(item.id) this.$refs.transitBar.fetchData(item.id) this.$refs.scoreLineBar.fetchData(item.id) } } } </script> <style rel="stylesheet/scss" lang="scss" scoped> .bottom { z-index: 111111111111; width: 100%; height: 220px; 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: 20px; padding-top: 2px; } .unit { color: #B3F3F6; font-size: 14px; margin-left: 1px; } .item { width: 50%; height: 35%; display: flex; justify-content: left; align-items: center; } } </style>