|
@@ -4,7 +4,6 @@ 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 { ref, onMounted, nextTick } from 'vue'
|
|
|
|
|
import dayjs from 'dayjs'
|
|
import dayjs from 'dayjs'
|
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
|
|
|
|
|
@@ -73,8 +72,7 @@ const getTableColumns = async (isInit: boolean) => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
bookingTable.value.columns = [
|
|
bookingTable.value.columns = [
|
|
|
{ type: 'checkbox', width: 50, fixed: 'left' },
|
|
{ type: 'checkbox', width: 50, fixed: 'left' },
|
|
|
- ...handleColumns(res.data.BookingTableColumns),
|
|
|
|
|
- { field: '__serial_no', width: 300, fixed: 'left' }
|
|
|
|
|
|
|
+ ...handleColumns(res.data.BookingTableColumns)
|
|
|
]
|
|
]
|
|
|
tableOriginColumnsField.value = res.data.BookingTableColumns
|
|
tableOriginColumnsField.value = res.data.BookingTableColumns
|
|
|
}
|
|
}
|
|
@@ -85,21 +83,22 @@ const getTableColumns = async (isInit: boolean) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const pageInfo = ref({ pageNo: 1, pageSize: 100, total: 0 })
|
|
const pageInfo = ref({ pageNo: 1, pageSize: 100, total: 0 })
|
|
|
|
|
+const querydata = ref()
|
|
|
const TransportListItem = ref()
|
|
const TransportListItem = ref()
|
|
|
const TagsList = ref()
|
|
const TagsList = ref()
|
|
|
|
|
|
|
|
// 获取表格数据
|
|
// 获取表格数据
|
|
|
-let filterdataobj: any = {}
|
|
|
|
|
const getTableData = async (isInit: boolean, isPageChange?: boolean) => {
|
|
const getTableData = async (isInit: boolean, isPageChange?: boolean) => {
|
|
|
const rc = isPageChange ? pageInfo.value.total : -1
|
|
const rc = isPageChange ? pageInfo.value.total : -1
|
|
|
tableLoading.value = true
|
|
tableLoading.value = true
|
|
|
|
|
+ querydata.value = { cp: pageInfo.value.pageNo, ps: pageInfo.value.pageSize, rc: rc }
|
|
|
await $api
|
|
await $api
|
|
|
.getBookingTableData({
|
|
.getBookingTableData({
|
|
|
cp: pageInfo.value.pageNo,
|
|
cp: pageInfo.value.pageNo,
|
|
|
ps: pageInfo.value.pageSize,
|
|
ps: pageInfo.value.pageSize,
|
|
|
rc,
|
|
rc,
|
|
|
other_filed: '',
|
|
other_filed: '',
|
|
|
- ...filterdataobj
|
|
|
|
|
|
|
+ _textSearch: ''
|
|
|
})
|
|
})
|
|
|
.then((res: any) => {
|
|
.then((res: any) => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -126,20 +125,18 @@ const getTableData = async (isInit: boolean, isPageChange?: boolean) => {
|
|
|
const searchTableData = (data: any) => {
|
|
const searchTableData = (data: any) => {
|
|
|
tableLoading.value = true
|
|
tableLoading.value = true
|
|
|
console.log(data)
|
|
console.log(data)
|
|
|
- filterdataobj = data
|
|
|
|
|
$api
|
|
$api
|
|
|
.getBookingTableData({
|
|
.getBookingTableData({
|
|
|
cp: pageInfo.value.pageNo,
|
|
cp: pageInfo.value.pageNo,
|
|
|
ps: pageInfo.value.pageSize,
|
|
ps: pageInfo.value.pageSize,
|
|
|
- rc: -1,
|
|
|
|
|
|
|
+ rc: pageInfo.value.total,
|
|
|
other_filed: '',
|
|
other_filed: '',
|
|
|
_textSearch: '',
|
|
_textSearch: '',
|
|
|
- ...data
|
|
|
|
|
|
|
+ filterTag: data.filterTag ? data.filterTag : ['All']
|
|
|
})
|
|
})
|
|
|
.then((res: any) => {
|
|
.then((res: any) => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
bookingTable.value.data = res.data.searchData
|
|
bookingTable.value.data = res.data.searchData
|
|
|
- pageInfo.value.total = Number(res.data.rc)
|
|
|
|
|
tableLoading.value = false
|
|
tableLoading.value = false
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -330,6 +327,7 @@ const handleCheckAllChange = ({ records }: any) => {
|
|
|
selectedNumber.value = records.length
|
|
selectedNumber.value = records.length
|
|
|
}
|
|
}
|
|
|
defineExpose({
|
|
defineExpose({
|
|
|
|
|
+ querydata,
|
|
|
searchTableData,
|
|
searchTableData,
|
|
|
TransportListItem,
|
|
TransportListItem,
|
|
|
TagsList
|
|
TagsList
|