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

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

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