Compare commits

...

2 Commits

Author SHA1 Message Date
851673013@qq.com f68ac3812c 统计分析 2022-07-05 20:03:41 +08:00
851673013@qq.com f4717b5744 统计分析 2022-07-05 20:01:31 +08:00
2 changed files with 377 additions and 214 deletions

View File

@ -1,200 +1,349 @@
<template> <template>
<div class="box"> <div class="box">
<div class="title">统计分析</div>
<div class="tabs-button"> <div class="water-points-content">
<div class="tabs-button-box"> <div class="time">更新时间{{ time }}</div>
<div class="tabs-button-btn" <div class="water-point-reporting-title">
@click="tabHandleClick(item)" <div class="water-point-reporting-title-top">积水点上报Top10</div>
v-for="item in tabsButton" <div class="water-point-reporting-title-bottom"></div>
:key="item" </div>
:class="tabsActiveName == item?'tabs-button-btn-active':''" <div class="water-point-reporting-table">
> <div class="table-title">
{{item}} <span>序号</span><span>积水点</span><span>上报次数</span>
</div>
<div class="table-content">
<div
class="table-content-card"
v-for="(item, index) in dataList"
:key="`table-${index}`"
>
<span>{{ index + 1 }}</span>
<el-tooltip
class="item"
effect="dark"
:content="item.name"
placement="top"
>
<span>{{ item.name }}</span></el-tooltip
><span>{{ item.number }}</span>
</div>
</div> </div>
</div> </div>
</div> <div class="water-point-analysis">
<div class="water-point-reporting-title">
<div class="label-content"> <div class="water-point-reporting-title-top">积水点来源分析</div>
<el-input <div class="water-point-reporting-title-bottom"></div>
placeholder="请输入关键词" </div>
prefix-icon="el-icon-search" <div class="water-point-reporting-title">
v-model="labelSearch" <div class="water-point-reporting-title-top">积水点级别分析</div>
@input="searchLabel" <div class="water-point-reporting-title-bottom"></div>
> </div>
</el-input> </div>
<el-checkbox-group v-model="checkboxGroup"> <div class="water-point-analysis-eachars">
<el-checkbox-button <div id="analysis-of-water-source"></div>
v-for="item in tabList" <div id="analysis-of-water-level"></div>
:label="item.labelName" </div>
:key="item.id"
@change="tabChange(item)"
>
{{item.labelName}}
</el-checkbox-button>
</el-checkbox-group>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import moment from 'moment'
import { getCameraAll,getCameraLabel,getCameraAllLabel,searchCamera,getCameraAllOrgan,getCameraByParentId,selectByLabelName,selectByChannelName } from '@/api/videoSurveillance/index' import * as echarts from 'echarts'
import bus from "@/views/layout/bus";
export default { export default {
data() { data () {
return { return {
tabsButton: ["视频标签","视频列表"], time: moment().format('YYYY-MM-DD HH:mm:ss'),
tabsActiveName: "视频标签", dataList: [
tabList:[], {
labelSearch:'', name: '积水点位置66666666666666666666666',
checkboxGroup: [], number: '15'
cameraAllData:[], },
}; {
name: '积水点位置666666666666',
number: '15'
},
{
name: '积水点位置6666666666666666666666666',
number: '15'
},
{
name: '积水点位置666666666666',
number: '15'
},
{
name: '积水点位置66666666666666666666666',
number: '15'
},
{
name: '积水点位置666666666666',
number: '15'
}
]
}
}, },
mounted() { mounted () {
getCameraAllLabel().then((res) => { this.$nextTick(() => {
this.tabList = res.data.data // charts
}); this.initEventTypeCharts()
getCameraAll().then((res) => { this.initEventTypeCharts2()
this.cameraAllData = res.data
// this.addResourceTomap('cameraAll',res.data);
}) })
}, },
methods: { methods: {
tabHandleClick(item) { // charts
this.tabsActiveName = item initEventTypeCharts () {
}, const inner = [
tabChange(item){ {
if(this.checkboxGroup.indexOf(item.labelName) !== -1){ value: 2,
bus.$emit("removeCameraLayer",'全部') unit: '个',
getCameraLabel({labelCode:item.labelCode}).then((res) => { name: '物联感知'
bus.$emit("CameraSingleDataOnMap",item.labelName,res.data.data) },
{
// this.addResourceTomap(item.labelName,res.data.data); value: 2,
// res.data.data.forEach((item) => { unit: '个',
// this.camreaTreeSingle.forEach((val) => { name: '视频感知'
// if(item.nodeName == val.channelName){ },
// val.children.push(item) {
// } value: 4,
// }) unit: '个',
// }) name: '市民上报'
// this.camreaTreeIsShow = false; },
}) {
}else { value: 2,
bus.$emit("removeCameraLayer",item.labelName) unit: '个',
// this.checkStatus = "2" name: '巡查上报'
// this.camreaTreeIsShow = true }
// getCameraAllOrgan({parentId:'S4NbecfYB1DBH8HNULGS34'}).then((res) => { ]
// this.camreaTree = res.data.data const legend1 = inner.map((v) => v.name)
// }) const legendData = [...legend1]
const option = {
color: ['#FBBD00', '#A3A3A3', '#E97C30', '#5A99D3'],
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b}: {c} ({d}%)'
},
grid: {
height: '10px'
},
// itemStyle: {
// normal: {
// borderWidth: 2
// },
// label: {
// textStyle: {
// color: 'black',
// fontSize: 14,
// fontWeight: 'bolder'
// }
// }
// },
chart: {
type: 'pie',
options3d: {
enabled: true,
alpha: 45,
beta: 0
}
},
series: [
{
name: '访问来源',
type: 'pie',
radius: ['0%', '80%'],
label: {
normal: {
position: 'inner'
}
},
labelLine: {
normal: {
show: false
}
},
data: inner
}
]
} }
const eventType = echarts.init(
document.getElementById('analysis-of-water-source')
)
eventType.setOption(option)
}, },
searchLabel(value) { initEventTypeCharts2 () {
const params = { const inner = [
labelName:value {
value: 2,
unit: '个',
name: '物联感知'
},
{
value: 2,
unit: '个',
name: '视频感知'
},
{
value: 4,
unit: '个',
name: '市民上报'
},
{
value: 2,
unit: '个',
name: '巡查上报'
}
]
const legend1 = inner.map((v) => v.name)
const legendData = [...legend1]
const option = {
color: ['#FBBD00', '#A3A3A3', '#E97C30', '#5A99D3'],
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b}: {c} ({d}%)'
},
grid: {
height: '10px'
},
// itemStyle: {
// normal: {
// borderWidth: 2
// },
// label: {
// textStyle: {
// color: 'black',
// fontSize: 14,
// fontWeight: 'bolder'
// }
// }
// },
chart: {
type: 'pie',
options3d: {
enabled: true,
alpha: 45,
beta: 0
}
},
series: [
{
name: '访问来源',
type: 'pie',
radius: ['45%', '80%'],
label: {
normal: {
position: 'inner'
}
},
labelLine: {
normal: {
show: false
}
},
data: inner
}
]
} }
selectByLabelName(params).then((res) => { const eventType = echarts.init(
console.log(res) document.getElementById('analysis-of-water-level')
this.tabList = res.data.data )
}) eventType.setOption(option)
}, }
}, }
}; }
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.box { .box {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: url(../../../../assets/construction/listTopBg.png) no-repeat, background: url(../../../../assets/construction/subTitle.png) no-repeat;
url(../../../../assets/construction/videoTag.png) no-repeat 324px 17px; text-align: center;
padding: 30px 0 18px 18px; color: #fff;
.title {
.tabs-button { font-size: 26px;
position: relative; font-weight: bold;
.tabs-button-box { background: linear-gradient(0deg, #9dbbd2 0%, #ffffff 100%);
width: 358px; background-clip: text;
padding-bottom: 11px; -webkit-background-clip: text;
border-bottom: 3px solid #2c619c; -webkit-text-fill-color: transparent;
display: flex; font-family: 'Tensentype-ZhiHeiJ-W5';
align-items: center; }
.tabs-button-btn { .time {
font-size: 18px; text-align: left;
color: rgba($color: #fff, $alpha: 0.6); margin-bottom: 10px;
position: relative; margin-top: 10px;
cursor: pointer; }
margin-right: 28px; .water-point-reporting-title {
text-align: left;
padding-top: 5px;
font-weight: bold;
background: linear-gradient(
to right,
rgba(27, 103, 176, 1),
rgba(27, 103, 176, 0)
);
.water-point-reporting-title-top {
margin-left: 10px;
}
.water-point-reporting-title-bottom {
height: 5px;
background: linear-gradient(
to right,
rgba(55, 185, 192, 1),
rgba(55, 185, 192, 0)
);
}
}
.water-point-reporting-table {
.table-title {
margin: 10px 0;
span {
display: inline-block;
text-align: center;
width: 25%;
} }
.tabs-button-btn-active { span:nth-child(2) {
font-size: 20px; width: 199px;
color: #fff;
} }
.tabs-button-btn-active::after { }
content: ''; .table-content {
position: absolute; height: 180px;
bottom: -15px; overflow-y: auto;
right: 6%; .table-content-card {
width: 64px; display: flex;
height: 5px; align-items: center;
border-radius: 5px; margin-bottom: 5px;
background-color: #1ffffc; span {
display: inline-block;
text-align: center;
width: 25%;
}
span:nth-child(2) {
width: 199px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: left;
}
} }
} }
} }
.water-point-analysis {
::v-deep .label-content { display: flex;
margin-top: 16px; & > div:first-child {
.el-input { width: 60%;
width: 358px;
} }
.el-input__inner { & > div:last-child {
border: 1px solid rgba(31,254,253,.9); width: 40%;
color: #fff;
border-radius: unset;
background: rgba($color: #203b5d, $alpha: .8);
&::placeholder {
color: rgba($color: #fff, $alpha: 0.6);
}
} }
.el-input__prefix { }
color: rgba(31,254,253,.9); .water-point-analysis-eachars {
display: flex;
// height: 165px;
& > div:first-child {
width: 60%;
height: 165px;
} }
& > div:last-child {
.el-checkbox-group { width: 40%;
height: 316px; height: 165px;
width: 372px;
overflow-y: auto;
margin-top: 6px;
&::-webkit-scrollbar {
width: 8px;
background-color: #10335e;
}
&::-webkit-scrollbar-thumb {
background-color: #446dac !important;
}
}
.el-checkbox-button {
border-radius: 15px;
margin: 10px;
.el-checkbox-button__inner {
height: 30px;
line-height: 6px;
border-radius: 15px;
background: linear-gradient(0deg, rgba($color: #24517b, $alpha: 1) 0, rgba($color: #24517b, $alpha: 0) 100%);
border: 1px solid #1d98a0;
font-size: 16px;
color: #1ffefd;
}
.el-checkbox-button__inner:hover {
border: 1px solid #1ffefd;
background: linear-gradient(0deg, #1577d3 0%, #1251ab 100%);
}
}
.el-checkbox-button.is-checked {
.el-checkbox-button__inner{
color: #fff;
border: 1px solid #1ffefd;
background: linear-gradient(0deg, #1577d3 0%, #1251ab 100%);
}
} }
} }
} }

View File

@ -26,10 +26,10 @@
> >
<template slot-scope="{ item }"> <template slot-scope="{ item }">
<div style="margin-bottom: -10px" class="name"> <div style="margin-bottom: -10px" class="name">
{{ item.text || "" }} {{ item.text || '' }}
</div> </div>
<span style="font-size: 10px; color: #afbcc5">{{ <span style="font-size: 10px; color: #afbcc5">{{
item.detail.address || "" item.detail.address || ''
}}</span> }}</span>
</template> </template>
<!-- <template slot="append">搜索</template> --> <!-- <template slot="append">搜索</template> -->
@ -72,7 +72,13 @@
<div class="title">地图图层</div> <div class="title">地图图层</div>
<div class="change-btn-box"> <div class="change-btn-box">
<el-checkbox-group v-model="changeLayerBtnGroup"> <el-checkbox-group v-model="changeLayerBtnGroup">
<el-checkbox-button v-for="item in changeLayerBtnList" :key="item.index" :label="item" @change="layerHandleChange(item)" border></el-checkbox-button> <el-checkbox-button
v-for="item in changeLayerBtnList"
:key="item.index"
:label="item"
@change="layerHandleChange(item)"
border
></el-checkbox-button>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
</div> </div>
@ -89,7 +95,10 @@ import complaintEvent from './components/ComplaintEvent'
import VideoList from './components/VideoList' import VideoList from './components/VideoList'
import SiteList from './components/SiteList' import SiteList from './components/SiteList'
import { selectByJdWd } from '@/api/construction/index' import { selectByJdWd } from '@/api/construction/index'
import { createSiteListPop, createCameraDetailsPop } from '@/supermap/createMarkerPopup' import {
createSiteListPop,
createCameraDetailsPop
} from '@/supermap/createMarkerPopup'
export default { export default {
data () { data () {
@ -102,7 +111,6 @@ export default {
changeLayerBtnList: ['视频监控', '积水点'], changeLayerBtnList: ['视频监控', '积水点'],
changeLayerBtnGroup: [], changeLayerBtnGroup: [],
eventCheckList: [] eventCheckList: []
} }
}, },
components: { components: {
@ -129,11 +137,13 @@ export default {
// this.circle(latLng); // this.circle(latLng);
this.hiMap.mapObj.map.flyTo({ lat: row.wd, lng: row.jd }) this.hiMap.mapObj.map.flyTo({ lat: row.wd, lng: row.jd })
// this.WithinRadiusSite(latLng); // this.WithinRadiusSite(latLng);
const dataEvent = [{ const dataEvent = [
latLng: { lat: row.wd, lng: row.jd }, {
data: row, latLng: { lat: row.wd, lng: row.jd },
type: 'site' data: row,
}] type: 'site'
}
]
this.hiMapFun.addPointsToMap( this.hiMapFun.addPointsToMap(
dataEvent, dataEvent,
'construction.png', 'construction.png',
@ -293,7 +303,12 @@ export default {
}) })
} }
}) })
this.hiMapFun.addResourceOnMapWithoutSuperMapCluster(dataEvent, 'videoSurveillance.png', type, createCameraDetailsPop) this.hiMapFun.addResourceOnMapWithoutSuperMapCluster(
dataEvent,
'videoSurveillance.png',
type,
createCameraDetailsPop
)
} }
}, },
beforeDestroy () {} beforeDestroy () {}
@ -304,7 +319,7 @@ export default {
@font-face { @font-face {
font-family: 'Tensentype-ZhiHeiJ-W5'; font-family: 'Tensentype-ZhiHeiJ-W5';
src: url("../../../assets/construction/TTZhiHeiJ-W5.ttf"); src: url('../../../assets/construction/TTZhiHeiJ-W5.ttf');
} }
.map-box { .map-box {
width: 100%; width: 100%;
@ -323,7 +338,7 @@ export default {
z-index: 1000; z-index: 1000;
width: 100%; width: 100%;
height: 166px; height: 166px;
background: url("~@/assets/construction/title.png") no-repeat; background: url('~@/assets/construction/title.png') no-repeat;
text-align: center; text-align: center;
.title { .title {
font-size: 46px; font-size: 46px;
@ -336,7 +351,7 @@ export default {
} }
.title::before { .title::before {
content: '青岛市积水点地图'; content: '青岛市积水点地图';
text-shadow: 0px 3px 10px rgba(0,0,0,.9); text-shadow: 0px 3px 10px rgba(0, 0, 0, 0.9);
position: absolute; position: absolute;
z-index: -1; z-index: -1;
} }
@ -347,20 +362,20 @@ export default {
z-index: 1000; z-index: 1000;
left: 496px; left: 496px;
top: 90px; top: 90px;
border: 1px solid rgba(31,254,253,.9); border: 1px solid rgba(31, 254, 253, 0.9);
::v-deep .el-input__inner { ::v-deep .el-input__inner {
color: #fff; color: #fff;
background: rgba($color: #203b5d, $alpha: .8); background: rgba($color: #203b5d, $alpha: 0.8);
width: 226px; width: 226px;
height: 36px; height: 36px;
border:none; border: none;
&::placeholder { &::placeholder {
color: rgba($color: #fff, $alpha: 0.6); color: rgba($color: #fff, $alpha: 0.6);
} }
} }
::v-deep .el-input__prefix { ::v-deep .el-input__prefix {
top: -1px; top: -1px;
color: rgba(31,254,253,.9); color: rgba(31, 254, 253, 0.9);
} }
::v-deep .el-input-group__append { ::v-deep .el-input-group__append {
width: 54px; width: 54px;
@ -379,7 +394,7 @@ export default {
z-index: -1 !important; z-index: -1 !important;
width: 226px !important; width: 226px !important;
left: 0px !important; left: 0px !important;
background: rgba(32,59,93,.8); background: rgba(32, 59, 93, 0.8);
border: 1px solid #1ffefd; border: 1px solid #1ffefd;
li { li {
color: #fff; color: #fff;
@ -395,9 +410,9 @@ export default {
z-index: 1000; z-index: 1000;
left: 10px; left: 10px;
top: 90px; top: 90px;
height:908px; height: 908px;
width: 478px; width: 478px;
background: rgba($color: #05213b, $alpha: .85) background: rgba($color: #05213b, $alpha: 0.85);
} }
.eventNum { .eventNum {
@ -418,7 +433,7 @@ export default {
span { span {
font-size: 46px; font-size: 46px;
font-weight: bold; font-weight: bold;
background: linear-gradient(0deg, #91f4f8 0%, #ffffff 100% ); background: linear-gradient(0deg, #91f4f8 0%, #ffffff 100%);
background-clip: text; background-clip: text;
-webkit-background-clip: text; -webkit-background-clip: text;
-webkit-text-fill-color: transparent; -webkit-text-fill-color: transparent;
@ -433,8 +448,8 @@ export default {
right: 8px; right: 8px;
top: 92px; top: 92px;
width: 398px; width: 398px;
height:460px; // height:460px;
background: rgba($color: #05213b, $alpha: .85); background: rgba($color: #05213b, $alpha: 0.85);
} }
.siteList { .siteList {
@ -444,13 +459,13 @@ export default {
top: 660px; top: 660px;
width: 398px; width: 398px;
// height:500px; // height:500px;
background: rgba($color: #05213b, $alpha: .85); background: rgba($color: #05213b, $alpha: 0.85);
} }
.changeLayer { .changeLayer {
width: 332px; width: 332px;
height: 67px; height: 67px;
background: rgba(7,26,44,.8); background: rgba(7, 26, 44, 0.8);
position: absolute; position: absolute;
bottom: 10px; bottom: 10px;
left: 50%; left: 50%;
@ -461,7 +476,7 @@ export default {
width: 96px; width: 96px;
height: 100%; height: 100%;
font-size: 16px; font-size: 16px;
color: rgba(255,255,255,.6); color: rgba(255, 255, 255, 0.6);
text-align: center; text-align: center;
line-height: 67px; line-height: 67px;
} }
@ -472,17 +487,16 @@ export default {
padding-left: 20px; padding-left: 20px;
::v-deep .el-checkbox-group { ::v-deep .el-checkbox-group {
.el-checkbox-button__inner{ .el-checkbox-button__inner {
padding: 6px 14px; padding: 6px 14px;
border: 0; border: 0;
border-radius: 10px; border-radius: 10px;
} }
.el-checkbox-button:first-child .el-checkbox-button__inner{ .el-checkbox-button:first-child .el-checkbox-button__inner {
margin-right: 10px; margin-right: 10px;
} }
.el-checkbox-button.is-checked .el-checkbox-button__inner{ .el-checkbox-button.is-checked .el-checkbox-button__inner {
background: #027DB4; background: #027db4;
color: #ffffff; color: #ffffff;
box-shadow: unset; box-shadow: unset;
} }
@ -490,7 +504,7 @@ export default {
} }
} }
.eventSelection{ .eventSelection {
width: 170px; width: 170px;
height: 100px; height: 100px;
background: rgba(7, 26, 44, 0.8); background: rgba(7, 26, 44, 0.8);
@ -501,16 +515,16 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
z-index: 1000; z-index: 1000;
::v-deep .el-checkbox__label{ ::v-deep .el-checkbox__label {
color: #ffffff; color: #ffffff;
} }
::v-deep .el-checkbox{ ::v-deep .el-checkbox {
margin:0 15px; margin: 0 15px;
.el-checkbox__inner{ .el-checkbox__inner {
margin-right: 15px; margin-right: 15px;
} }
} }
.eventSelectionIcon{ .eventSelectionIcon {
display: block; display: block;
width: 14px; width: 14px;
height: 14px; height: 14px;
@ -520,13 +534,13 @@ export default {
left: 34.5px; left: 34.5px;
top: 21px; top: 21px;
} }
.eventSelectionIcon:nth-child(2){ .eventSelectionIcon:nth-child(2) {
background: #ffae2b; background: #ffae2b;
position: absolute; position: absolute;
left: 34.5px; left: 34.5px;
top: 42px; top: 42px;
} }
.eventSelectionIcon:nth-child(3){ .eventSelectionIcon:nth-child(3) {
background: #31d779; background: #31d779;
position: absolute; position: absolute;
left: 34.5px; left: 34.5px;
@ -535,7 +549,7 @@ export default {
} }
} }
</style> </style>
<style lang='scss'> <style lang="scss">
// ::-webkit-scrollbar { // ::-webkit-scrollbar {
// width: 8px; // width: 8px;
// background: rgba(255, 255, 255, 0.1); // background: rgba(255, 255, 255, 0.1);