Browse Source

路段重置时,定位不对

wangqin
zhoule 9 months ago
parent
commit
370efd877e
  1. 12
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue
  2. 15
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/progressBar.vue

12
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue

@ -1,7 +1,8 @@
<template>
<div class="congestion">
<div class="board">
<ProgressBar class="keep-ratio" @selectItem="selectProgress" :dataList="dataList" :selectIndex="selectIndex" />
<ProgressBar class="keep-ratio" @selectItem="selectProgress" :dataList="dataList" :selectIndex="selectIndex"
:reset="reset" />
<div class="searchPanel">
<RadioGroup :options="[
{ key: '1', label: '菏泽' },
@ -26,7 +27,8 @@
: ''
" placeholder="请选择" :clearable="false" />
<el-button type="primary" size="mini" class="btnSearch" @click="searchQuery" icon="el-icon-search">查询</el-button>
<el-button type="primary" size="mini" class="btnSearch" @click="searchQuery"
icon="el-icon-search">查询</el-button>
<el-button class="btnReset" size="mini" icon="el-icon-refresh-left" @click="onReset">重置</el-button>
</div>
</div>
@ -151,6 +153,7 @@ export default {
dataList: [],
selectIndex: 2,
selectId: 2,
reset: false,
type: "year",
chart1List: [],
chart2List: [],
@ -206,16 +209,17 @@ export default {
selectProgress(item, index) {
this.selectIndex = index;
this.selectId = item.id;
this.reset = false;
this.searchQuery();
},
onReset() {
this.direction = "1";
this.type = "year";
this.dateTime = "2024";
this.selectId = this.dataList[0].id;
this.selectId = 2;
this.selectIndex = 2;
this.searchQuery()
this.reset = true;
this.searchQuery();
},
searchQuery() {
let startTime = "";

15
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/progressBar.vue

@ -36,6 +36,10 @@ export default {
selectIndex: {
type: Number,
default: 1
},
reset: {
type: Boolean,
default: false
}
},
data() {
@ -46,6 +50,16 @@ export default {
},
created() {
},
watch: {
reset: {
handler(newV) {
if (newV) {
this.selectLine = -1;
}
},
immediate: true,
},
},
methods: {
selectItem(index, num, item) {
@ -205,4 +219,3 @@ export default {
}
}
</style>
Loading…
Cancel
Save