监测点框位置,tab切换缓存

This commit is contained in:
sjl
2025-11-14 08:42:07 +08:00
parent e655611954
commit 0a52d1afae
3 changed files with 46 additions and 13 deletions

View File

@@ -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()
}
})