监测点框位置,tab切换缓存
This commit is contained in:
@@ -89,7 +89,7 @@
|
||||
<el-dialog
|
||||
v-model="detailDialogVisible"
|
||||
:title="detailDialogTitle"
|
||||
width="80%"
|
||||
|
||||
>
|
||||
<div v-loading="detailLoading">
|
||||
<div style="margin-bottom: 10px; text-align: right;">
|
||||
@@ -329,6 +329,9 @@ const tableStore = new TableStore({
|
||||
allData.value = expandedData;
|
||||
tableStore.table.total = updateTotal.value;
|
||||
tableStore.table.data = currentPageData.value;
|
||||
},
|
||||
resetCallback: () => {
|
||||
clearQueryParams()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -437,8 +440,21 @@ onBeforeUnmount(() => {
|
||||
window.removeEventListener('resize', debouncedCalculateTableHeight)
|
||||
})
|
||||
|
||||
const clearQueryParams = () => {
|
||||
// 将区域恢复成第一层
|
||||
if (areOptions && areOptions.length > 0) {
|
||||
selectedArea.value = areOptions[0].id
|
||||
tableStore.table.params.id = areOptions[0].id
|
||||
}
|
||||
|
||||
// 清空搜索关键词
|
||||
searchKeyword.value = ''
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
refresh: () => {
|
||||
clearQueryParams()
|
||||
tableHeaderRef.value.setTheDate(3)
|
||||
tableStore.index()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user