积水点echarts图

This commit is contained in:
gaoyuanwei 2022-09-07 14:19:57 +08:00
parent 1cd04c95fc
commit 3aa1284cfb
4 changed files with 689 additions and 192 deletions

View File

@ -8,7 +8,6 @@ export function selectWaterPoint(params) {
}) })
} }
export function selectWaterCamera(params) { export function selectWaterCamera(params) {
return request({ return request({
url: 'api/project/water/selectWaterCamera', url: 'api/project/water/selectWaterCamera',
@ -65,3 +64,35 @@ export function selectWaterPoliceList(params) {
params params
}) })
} }
// 根据积水点查询该点存在积水情况的日期
export function selectWaterPondingDate(params) {
return request({
url: 'api/project/water/selectWaterPondingDate',
method: 'get',
params
})
}
// 查询当天的积水点深度情况
export function selectWaterPondingInDay(params) {
return request({
url: 'api/project/water/selectWaterPondingInDay',
method: 'get',
params
})
}
// 查询积水点当月内每天最深深度
export function selectWaterPondingInMonth(params) {
return request({
url: 'api/project/water/selectWaterPondingInMonth',
method: 'get',
params
})
}
// 查询积水点当月内每天积水时长
export function selectWaterPondingHoursInMonth(params) {
return request({
url: 'api/project/water/selectWaterPondingHoursInMonth',
method: 'get',
params
})
}

View File

@ -23,6 +23,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="allNum">总数{{allNum}}</div>
<div class="filter-btn-box"> <div class="filter-btn-box">
<div class="filter-btn-processStateSelect"> <div class="filter-btn-processStateSelect">
<div class="processStateSelect-btn" <div class="processStateSelect-btn"
@ -62,7 +63,7 @@
<script> <script>
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { selectRaise, getAndSaveRecords, selectNoiceEvent } from '@/api/construction/index' import { selectRaise, getAndSaveRecords, selectNoiceEvent } from '@/api/construction/index'
import { selectWaterPoint,selectWaterCamera,selectReportOrigin, selectWaterPoliceList } from '@/api/waterPoints' import { selectWaterPoint, selectWaterCamera, selectReportOrigin, selectWaterPoliceList } from '@/api/waterPoints'
import StatisticalAnalysis from './StatisticalAnalysis.vue' import StatisticalAnalysis from './StatisticalAnalysis.vue'
import bus from '@/views/layout/bus' import bus from '@/views/layout/bus'
import { import {
@ -75,33 +76,33 @@ export default {
return { return {
tabsButton: [ tabsButton: [
{ {
title:'全部', title: '全部',
id:'all' id: 'all'
}, },
{ {
title:'水务局', title: '水务局',
id:'auditorReport' id: 'auditorReport'
}, },
{ {
title:'城管局', title: '交警',
id:'case' id: 'trafficPolice'
}, },
{ {
title:'智能算法识别', title: '群众上报',
id:'video' id: 'commonReport'
}, },
{ {
title:'水务集团', title: '智能算法识别',
id:'null' id: 'video'
}, },
{ {
title:'群众上报', title: '城管局',
id:'commonReport' id: 'case'
}, }
{ // {
title:'交警', // title:'',
id:'trafficPolice' // id:'null'
}, // },
], ],
tabsActiveName: '全部', tabsActiveName: '全部',
statisticalAnalysisIsShow: false, statisticalAnalysisIsShow: false,
@ -124,10 +125,12 @@ export default {
// topType: '', // topType: '',
// type: '(>30cm)', // type: '(>30cm)',
// text: '12cm' // text: '12cm'
// }, // },
], ],
listAll:[], listAll: [],
policeList: [] policeList: [],
//
allNum: 0
} }
}, },
components: { components: {
@ -137,8 +140,8 @@ export default {
const currentDate = new Date() const currentDate = new Date()
currentDate.setTime(currentDate.getTime()) currentDate.setTime(currentDate.getTime())
currentDate.setTime(currentDate.getTime() - 24 * 60 * 60 * 1000) currentDate.setTime(currentDate.getTime() - 24 * 60 * 60 * 1000)
const yMonth = currentDate.getMonth() > 8 ? currentDate.getMonth() + 1: '0' + (currentDate.getMonth()+1) const yMonth = currentDate.getMonth() > 8 ? currentDate.getMonth() + 1 : '0' + (currentDate.getMonth() + 1)
const yDate = currentDate.getDate() > 9 ? currentDate.getDate(): '0' + currentDate.getDate() const yDate = currentDate.getDate() > 9 ? currentDate.getDate() : '0' + currentDate.getDate()
this.preTime = this.preTime =
currentDate.getFullYear() + currentDate.getFullYear() +
'-' + '-' +
@ -154,13 +157,14 @@ export default {
// this.selectRaise() // this.selectRaise()
// this.selectNoiceEvent() // this.selectNoiceEvent()
selectWaterPoint().then( (res) => { selectWaterPoint().then((res) => {
selectWaterPoliceList().then((policeRes) => { selectWaterPoliceList().then((policeRes) => {
this.policeList = policeRes.data.data || [] this.policeList = policeRes.data.data || []
let dataAll = [...res.data.data, ...policeRes.data.data] const dataAll = [...res.data.data, ...policeRes.data.data]
this.list = dataAll this.list = dataAll
this.listAll = dataAll this.listAll = dataAll
bus.$emit('waterPoint',dataAll) this.allNum = this.list.length
bus.$emit('waterPoint', dataAll)
}) })
// this.list = res.data.data // this.list = res.data.data
// this.listAll = res.data.data // this.listAll = res.data.data
@ -173,9 +177,9 @@ export default {
// }) // })
}, },
methods: { methods: {
getDesc(item) { getDesc (item) {
let deepth = item.waterPointDepth ? parseFloat(item.waterPointDepth) * 100 : 0 const deepth = item.waterPointDepth ? (parseFloat(item.waterPointDepth) * 100).toFixed(0) : 0
switch(item.pointLevel) { switch (item.pointLevel) {
case 'traffic': case 'traffic':
return `影响车辆(${deepth}cm)` return `影响车辆(${deepth}cm)`
break break
@ -190,76 +194,80 @@ export default {
selectType (item) { selectType (item) {
if (this.filterButton.typeActive.indexOf(item) > -1) { if (this.filterButton.typeActive.indexOf(item) > -1) {
this.filterButton.typeActive.splice(this.filterButton.typeActive.indexOf(item), 1) this.filterButton.typeActive.splice(this.filterButton.typeActive.indexOf(item), 1)
if(this.filterButton.typeActive.length == 0){ if (this.filterButton.typeActive.length == 0) {
this.list = [] this.list = []
} else{ } else {
switch(item){ switch (item) {
case '影响车辆(>30cm)': case '影响车辆(>30cm)':
this.list = this.list.filter( v => v.pointLevel != 'traffic') this.list = this.list.filter(v => v.pointLevel != 'traffic')
break; break
case '影响行人(<30cm)': case '影响行人(<30cm)':
this.list = this.list.filter( v => v.pointLevel != 'pedestrian') this.list = this.list.filter(v => v.pointLevel != 'pedestrian')
break; break
case '无积水(<10cm)': case '无积水(<10cm)':
this.list = this.list.filter( v => v.pointLevel != 'non') this.list = this.list.filter(v => v.pointLevel != 'non')
break; break
} }
} }
} else { } else {
this.filterButton.typeActive.push(item) this.filterButton.typeActive.push(item)
if(this.filterButton.typeActive.length == 3){ if (this.filterButton.typeActive.length == 3) {
this.list = this.listAll this.list = this.listAll
} else { } else {
switch(item){ switch (item) {
case '影响车辆(>30cm)': case '影响车辆(>30cm)':
this.list = this.list.concat(this.listAll.filter( v => v.pointLevel == 'traffic')) this.list = this.list.concat(this.listAll.filter(v => v.pointLevel == 'traffic'))
break; break
case '影响行人(<30cm)': case '影响行人(<30cm)':
this.list = this.list.concat(this.listAll.filter( v => v.pointLevel == 'pedestrian')) this.list = this.list.concat(this.listAll.filter(v => v.pointLevel == 'pedestrian'))
break; break
case '无积水(<10cm)': case '无积水(<10cm)':
this.list = this.list.concat(this.listAll.filter( v => v.pointLevel == 'non')) this.list = this.list.concat(this.listAll.filter(v => v.pointLevel == 'non'))
break; break
} }
} }
} }
bus.$emit('waterPoint',this.list) bus.$emit('waterPoint', this.list)
this.$parent.eventCheckList = this.filterButton.typeActive this.$parent.eventCheckList = this.filterButton.typeActive
}, },
tabHandleClick (item) { tabHandleClick (item) {
this.allNum = 0
this.tabsActiveName = item.title this.tabsActiveName = item.title
this.filterButton.typeActive = ['影响车辆(>30cm)', '影响行人(<30cm)', '无积水(<10cm)'] this.filterButton.typeActive = ['影响车辆(>30cm)', '影响行人(<30cm)', '无积水(<10cm)']
if (item.title == '全部') { if (item.title == '全部') {
selectWaterPoint().then( (res) => { selectWaterPoint().then((res) => {
selectWaterPoliceList().then((policeRes) => { selectWaterPoliceList().then((policeRes) => {
let dataAll = [...res.data.data, ...policeRes.data.data] const dataAll = [...res.data.data, ...policeRes.data.data]
this.list = dataAll this.list = dataAll
// this.listAll = dataAll // this.listAll = dataAll
bus.$emit('waterPoint',dataAll) bus.$emit('waterPoint', dataAll)
this.allNum = this.list.length
}) })
}) })
} else if(item.title == '交警') { } else if (item.title == '交警') {
this.list = this.policeList this.list = this.policeList
bus.$emit('waterPoint',this.list) this.allNum = this.list.length
} else if(item.id == 'auditorReport') { bus.$emit('waterPoint', this.list)
} else if (item.id == 'auditorReport') {
this.list = [] this.list = []
this.listAll.forEach(tempItem => { this.listAll.forEach(tempItem => {
if(tempItem.reportOrigin === 'auditorReport') { if (tempItem.reportOrigin === 'auditorReport') {
this.list.push(tempItem) this.list.push(tempItem)
} }
}) })
bus.$emit('waterPoint',this.list) this.allNum = this.list.length
bus.$emit('waterPoint', this.list)
} else { } else {
selectReportOrigin({reportOrigin:item.id}).then( (res) => { selectReportOrigin({ reportOrigin: item.id }).then((res) => {
this.list = res.data.data this.list = res.data.data
bus.$emit('waterPoint',res.data.data) this.allNum = this.list.length
bus.$emit('waterPoint', res.data.data)
}) })
} }
}, },
reportOrigin(reportOrigin){ reportOrigin (reportOrigin) {
switch (reportOrigin) { switch (reportOrigin) {
case 'auditorReport': case 'auditorReport':
return '水务集团上报' return '水务集团上报'
@ -272,7 +280,6 @@ export default {
default: default:
return '未知' return '未知'
} }
}, },
openStatisticalAnalysis () { openStatisticalAnalysis () {
this.statisticalAnalysisIsShow = true this.statisticalAnalysisIsShow = true
@ -347,8 +354,8 @@ export default {
} }
}, },
openDialog(item) { openDialog (item) {
bus.$emit("openWaterPointDialog", item); bus.$emit('openWaterPointDialog', item)
} }
} }
} }
@ -494,7 +501,10 @@ export default {
cursor: pointer; cursor: pointer;
} }
} }
.allNum {
color: #ffffff;
margin: 12px 0px 0 12px;
}
.filter-btn-box { .filter-btn-box {
margin-top: 16px; margin-top: 16px;
.filter-btn-typeSelect { .filter-btn-typeSelect {
@ -535,17 +545,17 @@ export default {
margin-left: 8px; margin-left: 8px;
} }
} }
.processStateSelect-btn:nth-child(1){ .processStateSelect-btn:nth-child(1) {
.select-circle { .select-circle {
border: 1px solid #f74b3f; border: 1px solid #f74b3f;
} }
} }
.processStateSelect-btn:nth-child(2){ .processStateSelect-btn:nth-child(2) {
.select-circle { .select-circle {
border: 1px solid #ffae2b; border: 1px solid #ffae2b;
} }
} }
.processStateSelect-btn:nth-child(3){ .processStateSelect-btn:nth-child(3) {
.select-circle { .select-circle {
border: 1px solid #31d779; border: 1px solid #31d779;
} }
@ -565,17 +575,17 @@ export default {
border-radius: 50%; border-radius: 50%;
} }
} }
.processStateSelect-btn-active:nth-child(1){ .processStateSelect-btn-active:nth-child(1) {
.select-circle::after { .select-circle::after {
background: #f74b3f; background: #f74b3f;
} }
} }
.processStateSelect-btn-active:nth-child(2){ .processStateSelect-btn-active:nth-child(2) {
.select-circle::after { .select-circle::after {
background: #ffae2b; background: #ffae2b;
} }
} }
.processStateSelect-btn-active:nth-child(3){ .processStateSelect-btn-active:nth-child(3) {
.select-circle::after { .select-circle::after {
background: #31d779; background: #31d779;
} }
@ -691,7 +701,7 @@ export default {
.box3 { .box3 {
color: #fff; color: #fff;
margin-top: 10px; margin-top: 10px;
height: 620px; height: 600px;
overflow-y: scroll; overflow-y: scroll;
cursor: pointer; cursor: pointer;
.item { .item {

View File

@ -0,0 +1,445 @@
<template>
<div class="wrapper">
<h1>历史水位趋势图</h1>
<div style="padding: 0.1rem 0">
<el-radio-group v-model="radio" @change="radioChange">
<el-radio label="day">积水历史查询</el-radio>
<el-radio label="month">历史积水高点趋势</el-radio>
<el-radio label="monthTime">历史积水时长</el-radio>
</el-radio-group>
</div>
<div>
请选择日期
<el-cascader
v-if="radio === 'day'"
placeholder="请选择日期"
:options="dateYearBtns"
v-model="dateYearData"
popper-class="pc-sel-area-cascader"
filterable></el-cascader>
<el-cascader
v-if="radio === 'month'"
placeholder="请选择日期"
:options="dateMonthBtns"
v-model="dateMonthData"
popper-class="pc-sel-area-cascader"
filterable></el-cascader>
<el-cascader
v-if="radio === 'monthTime'"
placeholder="请选择日期"
:options="dateMonthBtns"
v-model="dateMonthTimeData"
popper-class="pc-sel-area-cascader"
filterable></el-cascader>
</div>
<div v-if="radio === 'day'">
<div id="water-points-curve"></div>
</div>
<div v-else-if="radio === 'month'">
<div id="water-points-columnar"></div>
</div>
<div v-else-if="radio === 'monthTime'">
<div id="water-points-time"></div>
</div>
</div>
</template>
<script>
import * as echarts from 'echarts'
import { selectWaterPondingDate, selectWaterPondingInMonth, selectWaterPondingInDay, selectWaterPondingHoursInMonth } from '@/api/waterPoints'
import { months } from 'moment'
export default {
components: {},
props: {
feature: {
type: Object,
default: () => {
return {}
}
}
},
data () {
return {
radio: 'day',
//
dateList: [],
// 线
dateYearBtns: [],
//
dateMonthBtns: [],
// 线
depthDayX: [],
depthDayY: [],
//
depthMonthX: [],
depthMonthY: [],
//
depthMonthTimeY: [],
depthMonthTimeX: [],
//
dateYearData: [],
dateMonthData: [],
dateMonthTimeData: []
}
},
watch: {
dateYearData (val) {
console.log(this.dateYearData, val, 'aaaaa')
this.depthDayX = []
this.depthDayY = []
selectWaterPondingInDay({ water_point_id: this.feature.data.waterPointId, year: String(this.dateYearData[0]), month: String(this.dateYearData[1]), day: String(this.dateYearData[2]) }).then((res) => {
console.log(res.data.data, 'res')
res.data.data.map(val => {
this.depthDayX.push(val.hour + ':' + val.minute)
this.depthDayY.push(Number(val.depth) * 100)
})
console.log(this.depthDayX, this.depthDayY, ' this.depthDayX')
this.initEventTypeCharts()
})
},
dateMonthData (val) {
console.log(this.dateMonthData, val, 'aaaaa')
this.depthMonthX = []
this.depthMonthY = []
selectWaterPondingInMonth({ water_point_id: this.feature.data.waterPointId, year: String(this.dateMonthData[0]), month: String(this.dateMonthData[1]) }).then((res) => {
console.log(res.data.data, 'res')
res.data.data.map(val => {
this.depthMonthY.push(Number(val.depth) * 100)
this.depthMonthX.push(val.year + '/' + val.month + '/' + val.day)
})
console.log(this.depthMonthX, this.depthMonthY, ' this.depthDayX')
this.initEventTypeCharts2()
})
},
dateMonthTimeData (val) {
console.log(this.dateMonthTimeData, val, 'aaaaa')
this.depthMonthTimeX = []
this.depthMonthTimeY = []
selectWaterPondingHoursInMonth({ water_point_id: this.feature.data.waterPointId, year: String(this.dateMonthTimeData[0]), month: String(this.dateMonthTimeData[1]) }).then((res) => {
console.log(res.data.data, 'res')
res.data.data.map(val => {
this.depthMonthTimeY.push(Number(val.hours))
this.depthMonthTimeX.push(val.year + '/' + val.month + '/' + val.day)
})
console.log(this.depthMonthX, this.depthMonthY, ' this.depthDayX')
this.initEventTypeCharts3()
})
}
},
computed: {},
methods: {
radioChange (value) {
switch (value) {
case 'day':
this.initEventTypeCharts()
break
case 'month':
this.initEventTypeCharts2()
break
case 'monthTime':
this.initEventTypeCharts3()
break
}
},
dataChange () {
console.log(this.feature.data.waterPointId, 'feature')
selectWaterPondingDate({ water_point_id: this.feature.data.waterPointId }).then((res) => {
this.dateList = res.data.data
this.dateList.map(val => {
console.log('111111111111111111111', this.dateYearBtns, val)
let flag1 = false
let index1 = -1
this.dateYearBtns.map((v, index) => {
if (v.label == val.year) {
flag1 = true
index1 = index
}
})
if (!flag1) {
this.dateYearBtns.push({ label: val.year, value: val.year, children: [{ label: val.month, value: val.month, children: [{ label: val.day, value: val.day }] }] })
} else {
let flag2 = false
let index2 = -1
console.log('11111111111', this.dateYearBtns[index1], index1)
this.dateYearBtns[index1].children.map((item, i) => {
if (item.label == val.month) {
flag2 = true
index2 = i
}
})
if (!flag2) {
this.dateYearBtns[index1].children.push({ label: val.month, value: val.month, children: [{ label: val.day, value: val.day }] })
} else {
this.dateYearBtns[index1].children[index2].children.push({ label: val.day, value: val.day })
}
}
})
this.dateList.map(val => {
let flag1 = false
let index1 = -1
this.dateMonthBtns.map((v, index) => {
if (v.label == val.year) {
flag1 = true
index1 = index
}
})
if (!flag1) {
this.dateMonthBtns.push({ label: val.year, value: val.year, children: [{ label: val.month, value: val.month }] })
} else {
let flag2 = false
let index2 = -1
console.log('2222222', this.dateMonthBtns[index1], index1)
this.dateMonthBtns[index1].children.map((item, i) => {
if (item.label == val.month) {
flag2 = true
index2 = i
}
})
if (!flag2) {
this.dateMonthBtns[index1].children.push({ label: val.month, value: val.month })
}
}
})
console.log('33333333', this.dateMonthBtns)
console.log(this.dateList[0], ' this.dateMonthBtns')
this.dateYearData.push(this.dateList[0].year, this.dateList[0].month, this.dateList[0].day)
this.dateMonthData.push(this.dateList[0].year, this.dateList[0].month)
this.dateMonthTimeData.push(this.dateList[0].year, this.dateList[0].month)
console.log(this.dateYearData, 'this.dateMonthBtns')
})
},
// 线
initEventTypeCharts () {
const option = {
xAxis: {
type: 'category',
data: this.depthDayX,
axisLine: {
lineStyle: {
color: 'rgba(255, 255, 255,1)'
}
}
},
yAxis: {
type: 'value',
name: '单位cm',
axisLine: {
lineStyle: {
color: 'rgba(255, 255, 255,1)'
}
},
splitLine: {
show: false // 线线
}
},
series: [
{
name: '深度',
data: this.depthDayY,
type: 'line',
smooth: true,
lineStyle: {
color: '#1ffefd'
},
itemStyle: {
normal: {
borderColor: '#1ffefd' //
}
}
}
],
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
}
}
const eventType = echarts.init(
document.getElementById('water-points-curve')
)
eventType.setOption(option)
},
//
initEventTypeCharts2 () {
const option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [
{
type: 'category',
data: this.depthMonthX,
axisTick: {
alignWithLabel: true
}
}
],
yAxis: [
{
type: 'value',
name: '单位cm',
splitLine: {
show: false // 线线
}
}
],
series: [
{
name: '深度',
type: 'bar',
barWidth: '60%',
data: this.depthMonthY,
itemStyle: {
color: '#1ffefd'
}
}
]
}
const eventType = echarts.init(
document.getElementById('water-points-columnar')
)
eventType.setOption(option)
},
//
initEventTypeCharts3 () {
const option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [
{
type: 'category',
data: this.depthMonthTimeX,
axisTick: {
alignWithLabel: true
}
}
],
yAxis: [
{
type: 'value',
name: '单位h',
splitLine: {
show: false // 线线
}
}
],
series: [
{
name: '时长',
type: 'bar',
barWidth: '60%',
data: this.depthMonthTimeY,
itemStyle: {
color: '#1ffefd'
}
}
]
}
const eventType = echarts.init(
document.getElementById('water-points-time')
)
eventType.setOption(option)
}
},
created () {},
mounted () {
this.dataChange()
console.log(this.dateYearBtns[0], 'aaaaaaa')
}
}
</script>
<style lang="scss" scoped>
.wrapper {
width: 100%;
h1 {
margin: 0;
font-weight: normal;
font-size: 0.18rem;
}
::v-deep .el-dropdown {
color: #ffffff;
}
#water-points-curve,
#water-points-columnar {
width: 100%;
height: 210px;
}
::v-deep .el-radio {
color: #ffffff;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
border-color: #1ffefd;
background: #1ffefd;
}
::v-deep .el-radio.is-checked {
.el-radio__label {
color: #1ffefd !important;
}
}
::v-deep .el-input__inner {
border: none;
background-color: rgba(24, 51, 76, 0.95);
color: #ffffff;
}
}
</style>
<style lang="scss">
.pc-sel-area-cascader {
border: 1px solid #1ffefd !important;
.el-cascader-node.in-active-path,
.el-cascader-node.is-active,
.el-cascader-node.is-selectable.in-checked-path {
color: #1ffefd;
}
.el-cascader-node:hover {
//
color: #1ffefd;
}
.el-cascader-menu {
background: rgba(24, 51, 76, 0.95) !important;
border-right: 1px solid #1ffefd;
color: #ffffff;
}
.el-cascader-node:not(.is-disabled):focus,
.el-cascader-node:not(.is-disabled):hover {
background: rgba(24, 51, 76, 0.95);
}
.el-popper[x-placement^="bottom"] .popper__arrow::after {
border-bottom-color: rgba(24, 51, 76, 0.95) !important;
}
.el-popper[x-placement^="bottom"] .popper__arrow {
border-bottom-color: rgba(24, 51, 76, 0.95) !important;
}
.popper__arrow {
border-bottom-color: #1ffefd !important;
}
.popper__arrow::after {
border-bottom-color: #1ffefd !important;
}
}
</style>

View File

@ -17,7 +17,7 @@
<div class="site-content"> <div class="site-content">
<div class="site-content-right"> <div class="site-content-right">
<div <div
class="images" class="images"
v-viewer="{movable: false}" v-viewer="{movable: false}"
style=" style="
width: 280px; width: 280px;
@ -71,40 +71,46 @@
<div class="btn-area"> <div class="btn-area">
<button class="button" @click="analyse(feature)">线索分析</button> <button class="button" @click="analyse(feature)">线索分析</button>
</div> </div>
<WaterHistory v-if="feature.data.reportOrigin!='police'" :feature='feature' />
</div> </div>
</template> </template>
<script> <script>
import bus from "@/views/layout/bus"; import bus from '@/views/layout/bus'
import 'viewerjs/dist/viewer.css' import 'viewerjs/dist/viewer.css'
import { directive as viewer } from "v-viewer" import { directive as viewer } from 'v-viewer'
// import * as echarts from 'echarts' // import * as echarts from 'echarts'
// import {selectWeekPmAndNoice,selectMonthPmAndNoice} from '@/api/construction/index.js' // import {selectWeekPmAndNoice,selectMonthPmAndNoice} from '@/api/construction/index.js'
import { selectCameraByName } from '@/api/waterPoints' import { selectCameraByName } from '@/api/waterPoints'
import WaterHistory from './WaterHistory.vue'
export default { export default {
name: "", name: '',
props: { props: {
feature: { feature: {
type: Object, type: Object,
default: () => { default: () => {
return {}; return {}
}, }
},
},
mounted() {
selectCameraByName({ waterPointName: this.feature.data.waterPointName }).then((res) => {
if(res.data.data){
this.feature.data.channelCode = res.data.data[0].channelCode
this.feature.data.channelName = res.data.data[0].channelName
this.feature.data.ssqy = res.data.data[0].ssqy
this.feature.data.videoCapture = res.data.data[0].videoCapture
console.log(this.feature);
this.cameraData.push({
cameraName: this.feature.data.channelName,
channelCode: this.feature.data.channelCode
})
} }
}) },
components: {
WaterHistory
},
mounted () {
console.log(this.feature, 'feature')
selectCameraByName({ waterPointName: this.feature.data.waterPointName }).then((res) => {
if (res.data.data) {
this.feature.data.channelCode = res.data.data[0].channelCode
this.feature.data.channelName = res.data.data[0].channelName
this.feature.data.ssqy = res.data.data[0].ssqy
this.feature.data.videoCapture = res.data.data[0].videoCapture
console.log(this.feature)
this.cameraData.push({
cameraName: this.feature.data.channelName,
channelCode: this.feature.data.channelCode
})
}
})
// selectWeekPmAndNoice({buildLicense:this.feature.data.buildLicense}).then((res) => { // selectWeekPmAndNoice({buildLicense:this.feature.data.buildLicense}).then((res) => {
// console.log(res) // console.log(res)
// }) // })
@ -112,33 +118,33 @@ export default {
// console.log(res) // console.log(res)
// }) // })
}, },
data() { data () {
return { return {
filterButton:{ filterButton: {
typeSelect:['近7天','近30天',], typeSelect: ['近7天', '近30天'],
typeSelectActive:'近7天', typeSelectActive: '近7天'
}, },
cameraData: [] cameraData: []
}; }
}, },
methods: { methods: {
// particularsClick(data){ // particularsClick(data){
// console.log(data) // console.log(data)
// bus.$emit("mainClick", data); // bus.$emit("mainClick", data);
// }, // },
getLevel(data) { getLevel (data) {
if(data.reportOrigin === 'police') { if (data.reportOrigin === 'police') {
return '暂无' return '暂无'
} else if(data.pointLevel=='traffic') { } else if (data.pointLevel == 'traffic') {
return '影响车辆(>30cm)' return '影响车辆(>30cm)'
} else if(data.pointLevel=='pedestrian') { } else if (data.pointLevel == 'pedestrian') {
return '影响行人(<30cm)' return '影响行人(<30cm)'
} else { } else {
return '无积水(<10cm)' return '无积水(<10cm)'
} }
}, },
typeSelect(item) { typeSelect (item) {
this.filterButton.typeSelectActive = item this.filterButton.typeSelectActive = item
}, },
@ -147,121 +153,126 @@ export default {
viewer.show() viewer.show()
}, },
// 线 // 线
analyse(data) { analyse (data) {
bus.$emit('waterPointAnalysis',data) bus.$emit('waterPointAnalysis', data)
}, },
openVideo(row){ openVideo (row) {
console.log(row) console.log(row)
bus.$emit('openCurrentVideoWaterPoint',row.channelCode) bus.$emit('openCurrentVideoWaterPoint', row.channelCode)
}, }
}, },
directives: { directives: {
viewer: viewer({ viewer: viewer({
debug: true, debug: true
}), })
}, }
}; }
</script> </script>
<style lang="scss"> <style lang="scss">
// .leaflet-popup { // .leaflet-popup {
// width: auto !important; // width: auto !important;
// } // }
.water-point-pop { .water-point-pop {
.leaflet-popup-content-wrapper { .leaflet-popup-content-wrapper {
box-shadow: 0 0 10px rgba($color: #1ffefd, $alpha: .4); box-shadow: 0 0 10px rgba($color: #1ffefd, $alpha: 0.4);
background: rgba(24,51,76,.95); background: rgba(24, 51, 76, 0.95);
border: 1px solid rgba(50,227,235,.95); border: 1px solid rgba(50, 227, 235, 0.95);
} }
.leaflet-popup-content { .leaflet-popup-content {
width: 634px !important; width: 634px !important;
height: 420px; // height: 420px;
padding: 12px 16px; padding: 12px 16px;
.pop-box { .pop-box {
width: 100%;
height: 100%;
.title-bg {
position: absolute;
top: 0;
left: 0;
height: 42px;
width: 100%; width: 100%;
height: 100%; opacity: 0.4;
background: linear-gradient(
180deg,
rgba($color: #1fa2fe, $alpha: 1) 0,
rgba($color: #1fa2fe, $alpha: 0) 100%
);
}
.title-bg { .title {
position: absolute; color: #1ffefd;
top: 0; font-size: 16px;
left: 0; font-weight: bold;
height: 42px; span:nth-child(2) {
width: 100%; display: inline-block;
opacity: .4; width: 40px;
background: linear-gradient(180deg, rgba($color: #1fa2fe, $alpha: 1) 0, rgba($color: #1fa2fe, $alpha: 0) 100%); height: 22px;
margin-left: 8px;
border-radius: 2px;
border: 1px solid #0494ff;
color: #1ffefd;
text-align: center;
font-size: 14px;
} }
}
.title{ .site-address {
color: #1ffefd; margin: 12px 0;
font-size: 16px; padding-left: 20px;
font-weight: bold; background: url(../../../../assets/construction/iconAddress.png)
span:nth-child(2) { no-repeat left center;
display: inline-block; color: rgba(255, 255, 255, 0.6);
width: 40px; }
height: 22px;
margin-left: 8px; .site-content {
border-radius: 2px; .site-content-right {
border: 1px solid #0494ff; display: flex;
color: #1ffefd; justify-content: space-between;
text-align: center; // width: 280px;
font-size: 14px; .images {
margin-top: 30px;
}
.video-table {
margin-top: 20px;
width: 300px;
h4 {
color: #fff;
} }
} .el-table {
margin-top: 8px;
.site-address { border: 1px solid #325d94;
margin: 12px 0; .el-table__body-wrapper {
padding-left: 20px; height: 90px;
background: url(../../../../assets/construction/iconAddress.png) no-repeat left center; overflow-y: auto;
color: rgba(255, 255, 255, .6); &::-webkit-scrollbar {
}
.site-content {
.site-content-right {
display: flex;
justify-content: space-between;
// width: 280px;
.images {
margin-top: 30px;
}
.video-table {
margin-top: 20px;
width: 300px;
h4 {
color: #fff;
}
.el-table{
margin-top: 8px;
border: 1px solid #325d94;
.el-table__body-wrapper{
height: 90px;
overflow-y: auto;
&::-webkit-scrollbar {
width: 8px; width: 8px;
background-color: #10335e; background-color: #10335e;
}
&::-webkit-scrollbar-thumb {
background-color: #446dac !important;
}
} }
th,td { &::-webkit-scrollbar-thumb {
border-right: 1px solid #325d94; background-color: #446dac !important;
} }
} }
.el-table::before { th,
display: none; td {
border-right: 1px solid #325d94;
} }
} }
.el-table::before {
display: none;
}
} }
} }
} }
}
.leaflet-popup-close-button {
color: #3afefc !important;
font-size: 12px;
} }
} }
.leaflet-popup-close-button {
color: #3afefc !important;
font-size: 12px;
}
}
</style> </style>
<style lang='scss' scoped> <style lang='scss' scoped>
.particulars { .particulars {