|
|
@@ -11,8 +11,10 @@ import { useVisitedRowState } from '@/stores/modules/visitedRow'
|
|
|
import { formatTimezone, formatNumber } from '@/utils/tools'
|
|
|
import { useTrackingDownloadData } from '@/stores/modules/trackingDownloadData'
|
|
|
import { useFiltersStore } from '@/stores/modules/filtersList'
|
|
|
+import { useHeaderSearch } from '@/stores/modules/headerSearch'
|
|
|
|
|
|
const filtersStore = useFiltersStore()
|
|
|
+const headerSearchStore = useHeaderSearch()
|
|
|
|
|
|
const visitedRowState = useVisitedRowState()
|
|
|
const themeStore = useThemeStore()
|
|
|
@@ -156,22 +158,6 @@ const assignTableData = (data: any) => {
|
|
|
}, 1000)
|
|
|
}
|
|
|
|
|
|
-const getSharedTableData = () => {
|
|
|
- const trackingData = JSON.parse(localStorage.getItem('searchData'))?.trackingData
|
|
|
- if (trackingData) {
|
|
|
- pageInfo.value.pageSize = Number(trackingData.ps)
|
|
|
- sessionStorage.setItem('trackingTablePageInfo', JSON.stringify(pageInfo.value))
|
|
|
- assignTableData(trackingData)
|
|
|
- selectedNumber.value = 0
|
|
|
- selectedTableData.value = []
|
|
|
- nextTick(() => {
|
|
|
- tableRef.value && autoWidth(trackingTable.value, tableRef.value)
|
|
|
- })
|
|
|
- return true
|
|
|
- }
|
|
|
- return false
|
|
|
-}
|
|
|
-
|
|
|
// 切换分页时重新获取表格数据
|
|
|
const getTableData = async (isPageChange?: boolean) => {
|
|
|
// 保存页长以及当前页码
|
|
|
@@ -574,9 +560,12 @@ const SubscribeShipments = (row: any) => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+onUnmounted(() => {
|
|
|
+ headerSearchStore.clearSearchData()
|
|
|
+})
|
|
|
+
|
|
|
defineExpose({
|
|
|
searchTableData,
|
|
|
- getSharedTableData,
|
|
|
getLoadingData,
|
|
|
pageInfo
|
|
|
})
|