|
@@ -117,10 +117,13 @@ import type {
|
|
|
import SimCardDataView from './component/simCardDataView.vue'
|
|
import SimCardDataView from './component/simCardDataView.vue'
|
|
|
import SiteInfoView from '../site-info-manage/component/siteInfoView.vue'
|
|
import SiteInfoView from '../site-info-manage/component/siteInfoView.vue'
|
|
|
import { useSimCardMonthlyCache, cacheKey } from './useSimCardMonthlyCache'
|
|
import { useSimCardMonthlyCache, cacheKey } from './useSimCardMonthlyCache'
|
|
|
|
|
+import { useSimCardManageStateStore } from '@/stores/modules/views/simCardManageState'
|
|
|
|
|
|
|
|
const dialog = useDialog()
|
|
const dialog = useDialog()
|
|
|
const message = useMessage()
|
|
const message = useMessage()
|
|
|
|
|
|
|
|
|
|
+const simCardManageStateStore = useSimCardManageStateStore()
|
|
|
|
|
+
|
|
|
const { memoryCache, loadingSet, failedSet, computeDailyIncrement, onPageChange, getWithPriority } =
|
|
const { memoryCache, loadingSet, failedSet, computeDailyIncrement, onPageChange, getWithPriority } =
|
|
|
useSimCardMonthlyCache()
|
|
useSimCardMonthlyCache()
|
|
|
|
|
|
|
@@ -414,10 +417,27 @@ const handleListQuery = async () => {
|
|
|
const status = selectStatus.value.length > 0 ? selectStatus.value.join(',') : undefined
|
|
const status = selectStatus.value.length > 0 ? selectStatus.value.join(',') : undefined
|
|
|
const platform = selectPlatform.value.length > 0 ? selectPlatform.value.join(',') : undefined
|
|
const platform = selectPlatform.value.length > 0 ? selectPlatform.value.join(',') : undefined
|
|
|
|
|
|
|
|
|
|
+ // 保存当前界面状态(每次查询都反映了完整的搜索/筛选/分页状态),刷新 1 小时过期时间
|
|
|
|
|
+ simCardManageStateStore.save({
|
|
|
|
|
+ searchKeyword: searchKeyword.value,
|
|
|
|
|
+ selectStatus: selectStatus.value,
|
|
|
|
|
+ selectPlatform: selectPlatform.value,
|
|
|
|
|
+ page: pageNum,
|
|
|
|
|
+ pageSize,
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
await querySimCardInfoList(pageSize, pageNum, searchKeyword.value, status, platform)
|
|
await querySimCardInfoList(pageSize, pageNum, searchKeyword.value, status, platform)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
|
|
+ // 恢复上次界面状态(超过 1 小时自动失效,返回默认值)
|
|
|
|
|
+ const saved = simCardManageStateStore.restore()
|
|
|
|
|
+ searchKeyword.value = saved.searchKeyword
|
|
|
|
|
+ selectStatus.value = saved.selectStatus
|
|
|
|
|
+ selectPlatform.value = saved.selectPlatform
|
|
|
|
|
+ tablePagination.page = saved.page
|
|
|
|
|
+ tablePagination.pageSize = saved.pageSize
|
|
|
|
|
+
|
|
|
// 请求查询数据
|
|
// 请求查询数据
|
|
|
await handleListQuery()
|
|
await handleListQuery()
|
|
|
|
|
|