feat:积水点需求

This commit is contained in:
gounaikang 2022-08-26 19:35:18 +08:00
parent 3609bf595e
commit 23715f0314
8 changed files with 115 additions and 24 deletions

View File

@ -98,4 +98,13 @@ export function selectLocalMonthArea(params) {
})
}
// 弹窗--图片,周边监控
export function selectByAreaImage(params) {
return request({
url: 'api/project/keyArea/selectByAreaImage',
method: 'get',
params
})
}

View File

@ -56,3 +56,12 @@ export function selectCountLevel(params) {
params
})
}
// 查询交警上报数据
export function selectWaterPoliceList(params) {
return request({
url: 'api/project/water/selectWaterPoliceList',
method: 'get',
params
})
}

View File

@ -67,13 +67,14 @@
</div> -->
<div class="images img-container">
<!-- <el-image v-if="feature.data.picUrl && feature.data.picUrl.length" style="width:100%;height:100%;" :src="feature.data.picUrl[0]" :preview-src-list="feature.data.picUrl" alt="" /> -->
<el-image v-if="feature.data.picUrl && feature.data.picUrl.length" style="width:100%;height:100%;" :src="feature.data.picUrl" :preview-src-list="[feature.data.picUrl]" alt="" />
<el-image v-if="this.picUrl" style="width:100%;height:100%;" :src="this.picUrl" :preview-src-list="[this.picUrl]" alt="" />
<span v-else>暂无图片</span>
</div>
<div class="video-table">
<h4>周边监控</h4>
<el-table
:data="cameraData"
@row-click="openVideo"
:cell-style="{
color: '#fff',
cursor: 'pointer',
@ -100,7 +101,7 @@ import bus from "@/views/layout/bus";
import 'viewerjs/dist/viewer.css'
import { directive as viewer } from "v-viewer"
import * as echarts from 'echarts'
import {selectLocalWeekArea, selectLocalMonthArea} from '@/api/area.js'
import { selectLocalWeekArea, selectLocalMonthArea, selectByAreaImage } from '@/api/area.js'
export default {
name: "",
props: {
@ -128,6 +129,16 @@ export default {
this.monthData.outer.unshift(item.nonlocalNums)
})
})
selectByAreaImage({areaName: this.feature.data.areaName}).then((res) => {
let returnData = res.data.data
if (returnData.length) {
this.picUrl = returnData[0].picUrl
this.cameraData.push({
cameraName: returnData[0].channelName,
channelCode: returnData[0].channelCode
})
}
})
},
data() {
return {
@ -147,6 +158,7 @@ export default {
outer:[],
},
chartData:{},
picUrl: ''
};
},
methods: {
@ -173,9 +185,10 @@ export default {
}
this.initCharts()
},
openVideo(row){
bus.$emit('openCurrentVideoWaterPoint',row.channelCode)
},
initCharts () {
console.log('this.chartData---', this.chartData)
const option = {
grid: {
bottom: 34,

View File

@ -167,6 +167,11 @@ export default {
this.openVideo = true
this.channelCode.unshift(channelCode)
})
bus.$off('openCurrentVideoWaterPoint')
bus.$on('openCurrentVideoWaterPoint', channelCode => {
this.openVideo = true
this.channelCode.unshift(channelCode)
})
//
bus.$off("openCauseAnalysis");
bus.$on("openCauseAnalysis", (row) => {

View File

@ -37,14 +37,15 @@
</div>
</div>
<div class='box3'>
<div class="item" v-for='item in list' :key='item.index' @click="openDialog(item)">
<div class="item" v-for='(item, index) in list' :key='index' @click="openDialog(item)">
<div class="top">
<div>
<span class='name'>{{item.waterPointName}}</span>
<!-- <span class='topType' v-show="item.reportOrigin !== '2'">{{reportOrigin(item.reportOrigin)}}</span> -->
<span class='topType' v-show="item.reportOrigin !== '2' && tabsActiveName === '全部'">{{item.waterPointDepth != null ? '水务局' : '水务集团'}}</span>
<span class='topType' v-show="item.reportOrigin !== 'police' && item.reportOrigin !== '2' && tabsActiveName === '全部'">{{item.waterPointDepth != null ? '水务局' : '水务集团'}}</span>
<span class='topType' v-show="item.reportOrigin === 'police' && tabsActiveName === '全部'">交警</span>
</div>
<div>
<div v-show="item.reportOrigin !== 'police'">
<span class="img" :class=" item.pointLevel=='traffic' ? 'red' : item.pointLevel=='pedestrian' ? 'yellow' : 'green' "></span>
<span class="type">{{ getDesc(item) }}</span>
</div>
@ -61,7 +62,7 @@
<script>
import dayjs from 'dayjs'
import { selectRaise, getAndSaveRecords, selectNoiceEvent } from '@/api/construction/index'
import { selectWaterPoint,selectWaterCamera,selectReportOrigin } from '@/api/waterPoints'
import { selectWaterPoint,selectWaterCamera,selectReportOrigin, selectWaterPoliceList } from '@/api/waterPoints'
import StatisticalAnalysis from './StatisticalAnalysis.vue'
import bus from '@/views/layout/bus'
import {
@ -97,6 +98,10 @@ export default {
title:'群众上报',
id:'commonReport'
},
{
title:'交警',
id:'trafficPolice'
},
],
tabsActiveName: '全部',
statisticalAnalysisIsShow: false,
@ -121,7 +126,8 @@ export default {
// text: '12cm'
// },
],
listAll:[]
listAll:[],
policeList: []
}
},
components: {
@ -149,10 +155,16 @@ export default {
// this.selectNoiceEvent()
selectWaterPoint().then( (res) => {
console.log(res)
this.list = res.data.data
this.listAll = res.data.data
bus.$emit('waterPoint',res.data.data)
selectWaterPoliceList().then((policeRes) => {
this.policeList = policeRes.data.data || []
let dataAll = [...res.data.data, ...policeRes.data.data]
this.list = dataAll
this.listAll = dataAll
bus.$emit('waterPoint',dataAll)
})
// this.list = res.data.data
// this.listAll = res.data.data
// bus.$emit('waterPoint',res.data.data)
})
// selectWaterCamera().then( (res) => {
// console.log(res)
@ -221,10 +233,24 @@ export default {
if (item.title == '全部') {
selectWaterPoint().then( (res) => {
this.list = res.data.data
bus.$emit('waterPoint',res.data.data)
selectWaterPoliceList().then((policeRes) => {
let dataAll = [...res.data.data, ...policeRes.data.data]
this.list = dataAll
// this.listAll = dataAll
bus.$emit('waterPoint',dataAll)
})
})
} else if(item.title == '交警') {
this.list = this.policeList
bus.$emit('waterPoint',this.list)
} else if(item.id == 'auditorReport') {
this.list = []
this.listAll.forEach(tempItem => {
if(tempItem.reportOrigin === 'auditorReport') {
this.list.push(tempItem)
}
})
bus.$emit('waterPoint',this.list)
} else {
selectReportOrigin({reportOrigin:item.id}).then( (res) => {
@ -432,14 +458,14 @@ export default {
align-items: center;
justify-content: space-around;
.tabs-button-btn {
font-size: 18px;
font-size: 14px;
color: rgba($color: #fff, $alpha: 0.6);
position: relative;
cursor: pointer;
// min-width: 50px;
}
.tabs-button-btn-active {
font-size: 20px;
font-size: 16px;
color: #fff;
}
.tabs-button-btn-active::after {
@ -680,6 +706,7 @@ export default {
}
.name {
font-weight: 600;
font-size: 14px;
}
.topType {
margin-left: 5px;

View File

@ -47,7 +47,7 @@
<script>
import moment from 'moment'
import * as echarts from 'echarts'
import { selectCountWaters,selectCountLevel } from '@/api/waterPoints'
import { selectCountWaters,selectCountLevel, selectWaterPoliceList } from '@/api/waterPoints'
export default {
data () {
@ -109,6 +109,12 @@ export default {
unit: '个',
name: '水务局',
id:'null'
},
{
value: 0,
unit: '个',
name: '交警',
id:'trafficPolice'
}
],
rank: [
@ -135,7 +141,7 @@ export default {
selectCountWaters().then((res) => {
res.data.data.forEach((item) => {
if(item.reportOrigin == 'auditorReport') {
if(item.reportOrigin == 'null') {
this.source[0].value = item.count
}
if(item.reportOrigin == 'commonReport') {
@ -147,8 +153,14 @@ export default {
if(item.reportOrigin == 'video') {
this.source[3].value = item.count
}
if(item.reportOrigin == 'auditorReport') {
this.source[4].value = item.count
}
})
selectWaterPoliceList().then((policeRes) => {
this.source[5].value = policeRes.data.data.length
this.initEventTypeCharts()
})
this.initEventTypeCharts()
})
selectCountLevel().then((res) => {

View File

@ -8,7 +8,7 @@
所属区市: {{ feature.data.ssqy || "" }}
</div>
<div>
积水级别: {{feature.data.pointLevel=='traffic' ? '影响车辆(>30cm)' : feature.data.pointLevel=='pedestrian' ? '影响行人(<30cm)' : '无积水(<10cm)' }}
积水级别: {{ getLevel(feature.data) }}
</div>
<div>
液位:
@ -127,7 +127,17 @@ export default {
// console.log(data)
// bus.$emit("mainClick", data);
// },
getLevel(data) {
if(data.reportOrigin === 'police') {
return '暂无'
} else if(data.pointLevel=='traffic') {
return '影响车辆(>30cm)'
} else if(data.pointLevel=='pedestrian') {
return '影响行人(<30cm)'
} else {
return '无积水(<10cm)'
}
},
typeSelect(item) {
this.filterButton.typeSelectActive = item
},

View File

@ -369,7 +369,6 @@ export default {
},
waterPointOnMap (data) {
console.log(data)
this.hiMapFun.removeLayerByLayerName('waterPoint1')
this.hiMapFun.removeLayerByLayerName('waterPoint2')
this.hiMapFun.removeLayerByLayerName('waterPoint3')
@ -402,6 +401,13 @@ export default {
type: 'waterPoint'
})
break;
default:
dataEvent1.push({
latLng: { lat: Number(item.latitude), lng: Number(item.longitude) },
data: item,
type: 'waterPoint'
})
break;
}
}
})