44 lines
1.2 KiB
TypeScript
44 lines
1.2 KiB
TypeScript
import request from '@/config/axios'
|
|
|
|
// 旅客信息 VO
|
|
export interface InformationVO {
|
|
id: number // 编号
|
|
deviceId: number // 设备编号
|
|
name: string // 姓名
|
|
idCard: string // 身份证
|
|
commitTime: Date // 上传时间
|
|
}
|
|
|
|
// 旅客信息 API
|
|
export const InformationApi = {
|
|
// 查询旅客信息分页
|
|
getInformationPage: async (params: any) => {
|
|
return await request.get({ url: `/ticket/information/page`, params })
|
|
},
|
|
|
|
// 查询旅客信息详情
|
|
getInformation: async (id: number) => {
|
|
return await request.get({ url: `/ticket/information/get?id=` + id })
|
|
},
|
|
|
|
// 新增旅客信息
|
|
createInformation: async (data: InformationVO) => {
|
|
return await request.post({ url: `/ticket/information/create`, data })
|
|
},
|
|
|
|
// 修改旅客信息
|
|
updateInformation: async (data: InformationVO) => {
|
|
return await request.put({ url: `/ticket/information/update`, data })
|
|
},
|
|
|
|
// 删除旅客信息
|
|
deleteInformation: async (id: number) => {
|
|
return await request.delete({ url: `/ticket/information/delete?id=` + id })
|
|
},
|
|
|
|
// 导出旅客信息 Excel
|
|
exportInformation: async (params) => {
|
|
return await request.download({ url: `/ticket/information/export-excel`, params })
|
|
}
|
|
}
|