|
|
@@ -172,6 +172,7 @@ import config from '@/config'
|
|
|
import detail from './detail.vue'
|
|
|
import { passengerinfoExport, passengerinfoPage } from '@/apis/lvke'
|
|
|
import { useAppStore } from '@/stores'
|
|
|
+import { isValue } from '@/utils/czr-util'
|
|
|
|
|
|
const AppStore = useAppStore()
|
|
|
const { loading, setLoading } = useLoading()
|
|
|
@@ -209,20 +210,23 @@ function onPageChange(currentPage: number) {
|
|
|
}
|
|
|
const onQuery = async () => {
|
|
|
setLoading(true)
|
|
|
- const params = {
|
|
|
- ...state.form,
|
|
|
+ const params: any = {
|
|
|
pageIndex: tablePagination.currentPage,
|
|
|
pageSize: tablePagination.pageSize,
|
|
|
queryType: 1
|
|
|
}
|
|
|
- if (params.personIdTypes?.length > 0) {
|
|
|
- params.personIdTypes = params.personIdTypes.join(',')
|
|
|
- }
|
|
|
- if (params.bayonetCodes?.length > 0) {
|
|
|
- params.bayonetCodes = params.bayonetCodes.join(',')
|
|
|
- }
|
|
|
- if (params.bayonetTypes?.length > 0) {
|
|
|
- params.bayonetTypes = params.bayonetTypes.join(',')
|
|
|
+ for (const [k, v] of Object.entries(state.form)) {
|
|
|
+ if (isValue(v)) {
|
|
|
+ if (k === 'personIdTypes') {
|
|
|
+ params.personIdTypes = v.join(',')
|
|
|
+ } else if (k === 'bayonetCodes') {
|
|
|
+ params.bayonetCodes = v.join(',')
|
|
|
+ } else if (k === 'bayonetTypes') {
|
|
|
+ params.bayonetTypes = v.join(',')
|
|
|
+ } else {
|
|
|
+ params[k] = v
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
const res: any = await passengerinfoPage(params)
|
|
|
if (res.code === SuccessResultCode) {
|