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