pull/2/head
何峥傲 1 year ago
parent 7586f80297
commit dba5cb545d

@ -15,3 +15,11 @@ export function transitVehicleRecord(params) {
params params
}) })
} }
//人车数量
export function humanVehicleStatistics(params) {
return request({
url: '/base/perceptionDevice/humanVehicleStatistics',
method: 'post',
params
})
}

@ -1,6 +1,7 @@
<template> <template>
<div class="build_body"> <div class="build_body" v-if="play">
<!-- 头部 --> <!-- 头部 -->
<div class="X1" @click="deleteinfo"></div>
<div class="build_title"> <div class="build_title">
<div class="header_icon"></div> <div class="header_icon"></div>
<div class="title_text">楼栋信息</div> <div class="title_text">楼栋信息</div>
@ -163,6 +164,10 @@ export default {
floorinfo() { floorinfo() {
console.log(123) console.log(123)
this.$emit('floorinfo') this.$emit('floorinfo')
},
deleteinfo(){
this.play =!this.play
this.$emit('deleteinfo')
} }
} }
} }
@ -186,6 +191,20 @@ export default {
width: 20vw; width: 20vw;
height: 15vh; height: 15vh;
background-size: 100% 100%; background-size: 100% 100%;
position: relative;
.X1{
width: 0.8vw;
height: 1.8vh;
// background-color: #fff;
position: absolute;
top: 0.5vh;
right: 0.5vw;
background-image: url(@/assets/house-hza/bg9.png);
background-size: 100% 100%;
&:hover{
background-color: #07e2d0;
}
}
.build_title { .build_title {
width: 18vw; width: 18vw;

@ -1,6 +1,7 @@
<template> <template>
<div class="add"> <div class="add" v-if="show">
<!-- 户室信息 --> <!-- 户室信息 -->
<div class="X2" @click="deleteinfo" ></div>
<div class="build_title"> <div class="build_title">
<div class="header_icon"></div> <div class="header_icon"></div>
<div class="title_text">户室信息</div> <div class="title_text">户室信息</div>
@ -103,6 +104,7 @@ export default {
name: 'FloorInform', name: 'FloorInform',
data() { data() {
return { return {
show:'true',
animateUp: false, animateUp: false,
boxlist: [ boxlist: [
{ name: '地址', place: '射阳县五星街道解放南路110-3号5幢' }, { name: '地址', place: '射阳县五星街道解放南路110-3号5幢' },
@ -144,6 +146,10 @@ export default {
this.animateUp = false this.animateUp = false
}, 500) }, 500)
}, },
deleteinfo(){
console.log(123);
this.show =!this.show
}
} }
} }
@ -157,6 +163,19 @@ export default {
background-image: url(../../../assets/house-hza/bg7.png); background-image: url(../../../assets/house-hza/bg7.png);
background-size: 100% 100%; background-size: 100% 100%;
padding-left: 1vw; padding-left: 1vw;
.X2{
width: 0.8vw;
height: 1.8vh;
// background-color: #fff;
position: absolute;
top: 0.5vh;
right: 0.5vw;
background-image: url(@/assets/house-hza/bg9.png);
background-size: 100% 100%;
&:hover{
background-color: #07e2d0;
}
}
.build_title { .build_title {
width: 18vw; width: 18vw;
height: 3.5vh; height: 3.5vh;

@ -35,11 +35,12 @@
<!-- 显示实有房屋弹窗 --> <!-- 显示实有房屋弹窗 -->
<div class="left_house_box" v-else-if="isplay == '2'"> <div class="left_house_box" v-else-if="isplay == '2'">
<BuildingInform @floorinfo="floorinfo"></BuildingInform> <BuildingInform @floorinfo="floorinfo" @deleteinfo="deleteinfo" ></BuildingInform>
</div> </div>
<div class="floorInform" v-if="only"> <div class="floorInform" v-if="only">
<floorInform></floorInform> <floorInform></floorInform>
</div> </div>
<!-- -->
<!-- 右边区域 --> <!-- 右边区域 -->
<div class="right_box" v-if="isplay == '1'"> <div class="right_box" v-if="isplay == '1'">
@ -159,7 +160,7 @@ export default {
this.isplay = 2 this.isplay = 2
// //
document.getElementsByClassName('point_list')[0].style.right = '0' document.getElementsByClassName('point_list')[0].style.right = '0'
document.getElementsByClassName('left_box')[0].style.left = '0'
}, },
timeStart() { timeStart() {
this.timer = setInterval(() => { this.timer = setInterval(() => {
@ -180,6 +181,10 @@ export default {
}, },
floorinfo() { floorinfo() {
this.only = true this.only = true
},
deleteinfo(){
this.isplay=1
document.getElementsByClassName('point_list')[0].style.right = '50'
} }
} }
} }

@ -15,65 +15,51 @@
<script> <script>
import * as echarts from 'echarts' import * as echarts from 'echarts'
import EleResize from '@/utils/esresize' import { humanVehicleStatistics } from '@/api/sensingDevice/resource/index'
export default { export default {
name: 'ManCar', name: 'ManCar',
data() { data() {
return {} return {
list: {}
}
}, },
mounted() { mounted() {
this.init_charts() this.init_charts()
this.init_car_charts() this.init_car_charts()
}, },
created() {
this.onhumanVehicleStatistics()
},
methods: { methods: {
onhumanVehicleStatistics() {
const res = humanVehicleStatistics()
console.log(res, 'aaa')
},
init_charts() { init_charts() {
var chartDom = document.getElementById('man-charts') var chartDom = document.getElementById('man-charts')
var myChart = echarts.init(chartDom) var myChart = echarts.init(chartDom)
let resize_div = document.getElementById('man-charts') var option
// echarts
EleResize.on(resize_div, () => {
myChart.resize()
})
const gaugeData = [ const gaugeData = [
{ {
value: 80, value: 2656446,
name: 'Perfect', name: '人口',
title: { title: {
offsetCenter: ['0%', '-30%'] offsetCenter: ['0%', '30%']
}, },
detail: { detail: {
valueAnimation: true, valueAnimation: true,
offsetCenter: ['0%', '-20%'] offsetCenter: ['0%', '-20%']
} }
} }
// {
// value: 40,
// name: 'Good',
// title: {
// offsetCenter: ['0%', '0%']
// },
// detail: {
// valueAnimation: true,
// offsetCenter: ['0%', '10%']
// }
// },
// {
// value: 60,
// name: 'Commonly',
// title: {
// offsetCenter: ['0%', '30%']
// },
// detail: {
// valueAnimation: true,
// offsetCenter: ['0%', '40%']
// }
// }
] ]
let option = { option = {
series: [ series: [
{ {
type: 'gauge', type: 'gauge',
startAngle: 90, startAngle: 120,
endAngle: -270, endAngle: -270,
pointer: { pointer: {
show: false show: false
@ -107,71 +93,62 @@ export default {
}, },
data: gaugeData, data: gaugeData,
title: { title: {
fontSize: 14 fontSize: 18,
color: '#fff',
fontweight: 600
}, },
detail: { detail: {
// width: 50, width: 50,
// height: 14, height: 14,
fontSize: 12, fontSize: 12,
color: 'inherit', color: '',
borderColor: 'inherit', borderColor: 'inherit',
borderRadius: 20, borderRadius: 20,
borderWidth: 1, borderWidth: 1,
formatter: '{value}%' formatter: '{value}'
} }
} }
] ]
} }
setInterval(function () {
gaugeData.value = +(Math.random() * 100).toFixed(2)
myChart.setOption({
series: [
{
data: gaugeData,
pointer: {
show: false
}
}
]
})
}, 2000)
option && myChart.setOption(option) option && myChart.setOption(option)
}, },
init_car_charts() { init_car_charts() {
var chartDom = document.getElementById('car-charts') var chartDom = document.getElementById('car-charts')
var myChart = echarts.init(chartDom) var myChart = echarts.init(chartDom)
let resize_div = document.getElementById('car-charts') var option
// echarts
EleResize.on(resize_div, () => {
myChart.resize()
})
const gaugeData = [ const gaugeData = [
{ {
value: 20, value: 755554,
name: 'Perfect', name: '车辆',
title: {
offsetCenter: ['0%', '-30%']
},
detail: {
valueAnimation: true,
offsetCenter: ['0%', '-20%']
}
},
{
value: 40,
name: 'Good',
title: {
offsetCenter: ['0%', '0%']
},
detail: {
valueAnimation: true,
offsetCenter: ['0%', '10%']
}
},
{
value: 60,
name: 'Commonly',
title: { title: {
offsetCenter: ['0%', '30%'] offsetCenter: ['0%', '30%']
}, },
detail: { detail: {
valueAnimation: true, valueAnimation: true,
offsetCenter: ['0%', '40%'] offsetCenter: ['0%', '-20%']
} }
} }
] ]
let option = { option = {
series: [ series: [
{ {
type: 'gauge', type: 'gauge',
startAngle: 90, startAngle: 120,
endAngle: -270, endAngle: -270,
pointer: { pointer: {
show: false show: false
@ -188,7 +165,7 @@ export default {
}, },
axisLine: { axisLine: {
lineStyle: { lineStyle: {
width: 40 width: 10
} }
}, },
splitLine: { splitLine: {
@ -205,21 +182,37 @@ export default {
}, },
data: gaugeData, data: gaugeData,
title: { title: {
fontSize: 14 fontSize: 18,
color: '#fff',
fontweight: 600
}, },
detail: { detail: {
width: 50, width: 50,
height: 14, height: 14,
fontSize: 14, fontSize: 12,
color: 'inherit', color: 'inherit',
borderColor: 'inherit', borderColor: 'inherit',
borderRadius: 20, borderRadius: 20,
borderWidth: 1, borderWidth: 1,
formatter: '{value}%' formatter: '{value}'
} }
} }
] ]
} }
setInterval(function () {
gaugeData.value = +(Math.random() * 100).toFixed(2)
myChart.setOption({
series: [
{
data: gaugeData,
pointer: {
show: false
}
}
]
})
}, 2000)
option && myChart.setOption(option) option && myChart.setOption(option)
} }
} }
@ -253,7 +246,7 @@ export default {
width: 20vw; width: 20vw;
height: 19vh; height: 19vh;
color: #edf1f7; color: #edf1f7;
background-image: url('../../../assets/picture/bg_1.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% auto; background-size: 100% auto;
@ -269,13 +262,13 @@ export default {
// right: 3.5vw; // right: 3.5vw;
// } // }
} }
// #man-charts { #man-charts {
// width: 10vw; width: 10vw;
// height: 19vh; height: 19vh;
// } }
// #car-charts { #car-charts {
// width: 10vw; width: 10vw;
// height: 19vh; height: 19vh;
// } }
} }
</style> </style>

Loading…
Cancel
Save