fix:根据建议优化代码,修改bug

This commit is contained in:
gounaikang@hisense.com 2022-08-22 10:47:56 +08:00
parent 5664a37a17
commit 9e4e0eedc9
6 changed files with 31 additions and 16 deletions

View File

@ -42,6 +42,16 @@ export function selectByAreaEvent(params) {
})
}
// 重点区域--根据事件类型查询列表
export function selectByNameAreaEvent(params) {
return request({
url: 'api/project/keyArea/selectByNameAreaEvent',
method: 'get',
params
})
}
// 重点区域--视频当天事件
export function selectByDayAreaEvent(params) {
return request({

View File

@ -45,7 +45,7 @@
</div>
</div>
</div> -->
<!-- <el-dropdown trigger="click">
<el-dropdown trigger="click">
<span class="el-dropdown-link">
{{ listTypeSelect || '全部'}}<i class="el-icon-arrow-down el-icon--right"></i>
</span>
@ -58,7 +58,7 @@
</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown> -->
</el-dropdown>
<div class="event-list" :style="{ 'margin-top': (tabsActiveName == '走航监测'? '60px' :'12px')}">
<div class="event-details" v-for="item in eventListData" :key="item.index" @click="openDetailsDialog(item)">
<div class="event-details-title">
@ -97,14 +97,9 @@
</div>
</template>
<script>
import { selectByAreaEvent, selectByDayAreaEvent } from "@/api/area";
import { selectByAreaEvent, selectByNameAreaEvent, selectByDayAreaEvent } from "@/api/area";
import StatisticalAnalysis from "./StatisticalAnalysis.vue";
import bus from "@/views/layout/bus";
import {
selectEvent,
selectByName,
selectByTime,
} from "@/api/civilizedCity";
export default {
data() {
return {
@ -194,7 +189,7 @@ export default {
this.total = res.data.data.sum
});
} else {
selectByName({eventNewName: this.listTypeSelect, pageSize: 4,page: val,}).then((res) => {
selectByNameAreaEvent({eventNewName: this.listTypeSelect, pageSize: 4,page: val,}).then((res) => {
// res.data.data.sort(this.compare("captureTime", "inverted"));
// console.log(res.data.data)
this.eventListData = res.data.data.events;
@ -208,12 +203,12 @@ export default {
this.currentPage = 1
this.listTypeSelect = item;
if(item == '全部'){
selectAllVideo({ pageSize: 4,page: 1,}).then((res) => {
this.eventListData = res.data.data.data
selectByAreaEvent({ pageSize: 4,page: 1,}).then((res) => {
this.eventListData = res.data.data.events
this.total = res.data.data.sum
});
} else {
selectByName({eventNewName: item, pageSize: 4,page: 1,}).then((res) => {
selectByNameAreaEvent({eventNewName: item, pageSize: 4,page: 1,}).then((res) => {
// res.data.data.sort(this.compare("captureTime", "inverted"));
// console.log(res.data.data)
this.eventListData = res.data.data.events;

View File

@ -292,7 +292,7 @@ export default {
},
};
</script>
<style lang="scss" scoped>
<style lang="scss">
// .leaflet-popup {
// width: auto !important;
// }
@ -424,6 +424,9 @@ export default {
&::-webkit-scrollbar-thumb {
background-color: #446dac !important;
}
.el-table__empty-block {
background: rgba(24,51,76,.95);
}
}
th,td {
border-right: 1px solid #325d94;

View File

@ -344,9 +344,11 @@ export default {
case "景区景点":
case "海水浴场":
case "窗口单位":
case "AI事件":
this.hiMapFun.removeLayerByLayerName(item)
break;
case "AI事件":
this.hiMapFun.removeLayerByLayerName('EventListDetail')
break;
case "视频监控":
this.hiMapFun.removeLayerByLayerName('全部')
break;
@ -450,6 +452,11 @@ export default {
this.hiMapFun.removeLayerByLayerName('roadPoint')
this.hiMapFun.removeLayerByLayerName('EventListDetail')
this.hiMapFun.removeLayerByLayerName('全部')
this.hiMapFun.removeLayerByLayerName('公园广场')
this.hiMapFun.removeLayerByLayerName('商业街区')
this.hiMapFun.removeLayerByLayerName('景区景点')
this.hiMapFun.removeLayerByLayerName('海水浴场')
this.hiMapFun.removeLayerByLayerName('窗口单位')
}
},
beforeDestroy() {},

View File

@ -21,7 +21,7 @@
<img src="../../../../assets/construction/raiseDust.png" alt="">
<div>
<p>扬尘</p>
<p><span>{{ feature.data.pm10 || feature.data.noice == 0 ? feature.data.noice : '' }}</span>ug/m<sup>3</sup> </p>
<p><span>{{ feature.data.pm10 || feature.data.pm10 == 0 ? feature.data.pm10 : '' }}</span>ug/m<sup>3</sup> </p>
</div>
</div>
</div>

View File

@ -8,7 +8,7 @@
</div>
<header>
<div class="title">在建工地综合监管平台</div>
<div class="title">工地扬尘噪音监管</div>
<div></div>
</header>