|
@@ -1,12 +1,12 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { transportationMode } from '@/components/TransportationMode'
|
|
|
|
|
import { type VxeGridInstance, type VxeGridProps } from 'vxe-table'
|
|
import { type VxeGridInstance, type VxeGridProps } from 'vxe-table'
|
|
|
import DownloadDialog from './components/DownloadDialog.vue'
|
|
import DownloadDialog from './components/DownloadDialog.vue'
|
|
|
import { autoWidth } from '@/utils/table'
|
|
import { autoWidth } from '@/utils/table'
|
|
|
import { useRowClickStyle } from '@/hooks/rowClickStyle'
|
|
import { useRowClickStyle } from '@/hooks/rowClickStyle'
|
|
|
import dayjs from 'dayjs'
|
|
import dayjs from 'dayjs'
|
|
|
-import { ref, watch, onMounted } from 'vue'
|
|
|
|
|
|
|
+import { ref, onMounted } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
|
|
|
+import { transportationMode } from '@/components/TransportationMode'
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -93,6 +93,17 @@ const getTableColumns = async () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const pageInfo = ref({ pageNo: 1, pageSize: 50, total: 0 })
|
|
const pageInfo = ref({ pageNo: 1, pageSize: 50, total: 0 })
|
|
|
|
|
+// 从sessionStorage中获取页长以及当前页码
|
|
|
|
|
+const assignPageInfo = () => {
|
|
|
|
|
+ const oldPageInfo = sessionStorage.getItem('bookingTablePageInfo')
|
|
|
|
|
+ if (oldPageInfo) {
|
|
|
|
|
+ const data = JSON.parse(oldPageInfo)
|
|
|
|
|
+ pageInfo.value.pageNo = data.pageNo
|
|
|
|
|
+ pageInfo.value.pageSize = data.pageSize
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+assignPageInfo()
|
|
|
|
|
+
|
|
|
const curTableData = ref([])
|
|
const curTableData = ref([])
|
|
|
const tempSearch = ref()
|
|
const tempSearch = ref()
|
|
|
const filterdataobj = ref()
|
|
const filterdataobj = ref()
|
|
@@ -114,6 +125,8 @@ const assignTableData = (data: any) => {
|
|
|
}
|
|
}
|
|
|
// 获取表格数据
|
|
// 获取表格数据
|
|
|
const getTableData = () => {
|
|
const getTableData = () => {
|
|
|
|
|
+ // 保存页长以及当前页码
|
|
|
|
|
+ sessionStorage.setItem('bookingTablePageInfo', JSON.stringify(pageInfo.value))
|
|
|
tableLoadingTable.value = true
|
|
tableLoadingTable.value = true
|
|
|
$api
|
|
$api
|
|
|
.getBookingTableData({
|
|
.getBookingTableData({
|