Compare commits

...

7 Commits

25 changed files with 2556 additions and 91 deletions

9
ludu-admin-vue.iml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -12,6 +12,15 @@ export interface WhiteVO {
dept: string // 部门 dept: string // 部门
memo: string // 备注 memo: string // 备注
source: string // 来源 source: string // 来源
name: string //
carType: string
areaId: number
areaStart: string
areaEnd: string
address: string
phone: string
plateColor: string
} }
// 白名单管理 API // 白名单管理 API

View File

@ -0,0 +1,47 @@
import request from '@/config/axios'
// 设备登录日志 VO
export interface VO {
id: number // 编号
loginTime: Date // 登录时间
deviceId: string // 设备编号
assetType: string // 设备类型
assetName: string // 设备名称
identificationCode: string // 识别码
status: boolean // 登录结果
loginRemark: string // 登录备注
loginParameter: string // 登录参数
}
// 设备登录日志 API
export const Api = {
// 查询设备登录日志分页
getPage: async (params: any) => {
return await request.get({ url: `/ticket/assetLoginLog/page`, params })
},
// 查询设备登录日志详情
get: async (id: number) => {
return await request.get({ url: `/ticket/assetLoginLog/get?id=` + id })
},
// 新增设备登录日志
create: async (data: VO) => {
return await request.post({ url: `/ticket/assetLoginLog/create`, data })
},
// 修改设备登录日志
update: async (data: VO) => {
return await request.put({ url: `/ticket/assetLoginLog/update`, data })
},
// 删除设备登录日志
delete: async (id: number) => {
return await request.delete({ url: `/ticket/assetLoginLog/delete?id=` + id })
},
// 导出设备登录日志 Excel
export: async (params) => {
return await request.download({ url: `/ticket/assetLoginLog/export-excel`, params })
}
}

View File

@ -0,0 +1,47 @@
import request from '@/config/axios'
// 航班 VO
export interface FlightVO {
id: number // id
flightName: string // 航班名称
}
// 航班 API
export const FlightApi = {
//查询航班下拉框数据
getFlightName: async () =>{
return await request.get({ url : `/ticket/flight/flightNameOption`})
},
// 查询航班分页
getFlightPage: async (params: any) => {
return await request.get({ url: `/ticket/flight/page`, params })
},
// 查询航班详情
getFlight: async (id: number) => {
return await request.get({ url: `/ticket/flight/get?id=` + id })
},
// 新增航班
createFlight: async (data: FlightVO) => {
return await request.post({ url: `/ticket/flight/create`, data })
},
// 修改航班
updateFlight: async (data: FlightVO) => {
return await request.put({ url: `/ticket/flight/update`, data })
},
// 删除航班
deleteFlight: async (id: number) => {
return await request.delete({ url: `/ticket/flight/delete?id=` + id })
},
// 导出航班 Excel
exportFlight: async (params) => {
return await request.download({ url: `/ticket/flight/export-excel`, params })
},
}

View File

@ -0,0 +1,43 @@
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 })
}
}

View File

@ -0,0 +1,47 @@
import request from '@/config/axios'
// 航线 VO
export interface ShipRouteVO {
id: number // id
flightId: number // 航班
routeName: string // 航线名称
}
// 航线 API
export const ShipRouteApi = {
//查询航班下拉框数据
getRouteName: async () =>{
return await request.get({ url : `/ticket/ship-route/routeNameOption`})
},
// 查询航线分页
getShipRoutePage: async (params: any) => {
return await request.get({ url: `/ticket/ship-route/page`, params })
},
// 查询航线详情
getShipRoute: async (id: number) => {
return await request.get({ url: `/ticket/ship-route/get?id=` + id })
},
// 新增航线
createShipRoute: async (data: ShipRouteVO) => {
return await request.post({ url: `/ticket/ship-route/create`, data })
},
// 修改航线
updateShipRoute: async (data: ShipRouteVO) => {
return await request.put({ url: `/ticket/ship-route/update`, data })
},
// 删除航线
deleteShipRoute: async (id: number) => {
return await request.delete({ url: `/ticket/ship-route/delete?id=` + id })
},
// 导出航线 Excel
exportShipRoute: async (params) => {
return await request.download({ url: `/ticket/ship-route/export-excel`, params })
},
}

View File

@ -0,0 +1,43 @@
import request from '@/config/axios'
// 今日航班 VO
export interface TodayFlightVO {
id: number // id
shipRouteId: number // 航线
classes: string // 班次
flightDate: string // 当日日期
startTime: string // 开始时间
}
// 今日航班 API
export const TodayFlightApi = {
// 查询今日航班分页
getTodayFlightPage: async (params: any) => {
return await request.get({ url: `/ticket/today-flight/page`, params })
},
// 查询今日航班详情
getTodayFlight: async (id: number) => {
return await request.get({ url: `/ticket/today-flight/get?id=` + id })
},
// 新增今日航班
createTodayFlight: async (data: TodayFlightVO) => {
return await request.post({ url: `/ticket/today-flight/create`, data })
},
// 修改今日航班
updateTodayFlight: async (data: TodayFlightVO) => {
return await request.put({ url: `/ticket/today-flight/update`, data })
},
// 删除今日航班
deleteTodayFlight: async (id: number) => {
return await request.delete({ url: `/ticket/today-flight/delete?id=` + id })
},
// 导出今日航班 Excel
exportTodayFlight: async (params) => {
return await request.download({ url: `/ticket/today-flight/export-excel`, params })
},
}

View File

@ -0,0 +1,45 @@
import request from '@/config/axios'
// 上行报文 VO
export interface VO {
id: number // 编号
commitTime: Date // 上报时间
deviceId: string // 设备编号
deviceName: string // 设备名称
status: boolean // 状态
resBody: string // 上行报文
remark: string // 备注
}
// 上行报文 API
export const Api = {
// 查询上行报文分页
getPage: async (params: any) => {
return await request.get({ url: `/ticket/uplinkMessage/page`, params })
},
// 查询上行报文详情
get: async (id: number) => {
return await request.get({ url: `/ticket/uplinkMessage/get?id=` + id })
},
// 新增上行报文
create: async (data: VO) => {
return await request.post({ url: `/ticket/uplinkMessage/create`, data })
},
// 修改上行报文
update: async (data: VO) => {
return await request.put({ url: `/ticket/uplinkMessage/update`, data })
},
// 删除上行报文
delete: async (id: number) => {
return await request.delete({ url: `/ticket/uplinkMessage/delete?id=` + id })
},
// 导出上行报文 Excel
export: async (params) => {
return await request.download({ url: `/ticket/uplinkMessage/export-excel`, params })
}
}

View File

@ -103,6 +103,7 @@ export const getDictLabel = (dictType: string, value: any): string => {
export enum DICT_TYPE { export enum DICT_TYPE {
USER_TYPE = 'user_type', USER_TYPE = 'user_type',
COMMON_STATUS = 'common_status', COMMON_STATUS = 'common_status',
UPLINK_MESSAGE_STATUS = 'uplink_message_status',
TERMINAL = 'terminal', // 终端 TERMINAL = 'terminal', // 终端
DATE_INTERVAL = 'date_interval', // 数据间隔 DATE_INTERVAL = 'date_interval', // 数据间隔

View File

@ -26,15 +26,15 @@
class="!w-240px" class="!w-240px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="操作员 Id" prop="operatorId"> <!-- <el-form-item label="操作员 Id" prop="operatorId">-->
<el-input <!-- <el-input-->
v-model="queryParams.operatorId" <!-- v-model="queryParams.operatorId"-->
placeholder="请输入操作员 Id" <!-- placeholder="请输入操作员 Id"-->
clearable <!-- clearable-->
@keyup.enter="handleQuery" <!-- @keyup.enter="handleQuery"-->
class="!w-240px" <!-- class="!w-240px"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="操作员姓名" prop="operatorName"> <el-form-item label="操作员姓名" prop="operatorName">
<el-input <el-input
v-model="queryParams.operatorName" v-model="queryParams.operatorName"
@ -262,14 +262,14 @@
<el-form-item> <el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button> <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button <!-- <el-button-->
type="primary" <!-- type="primary"-->
plain <!-- plain-->
@click="openForm('create')" <!-- @click="openForm('create')"-->
v-hasPermi="['parking:appearance-record:create']" <!-- v-hasPermi="['parking:appearance-record:create']"-->
> <!-- >-->
<Icon icon="ep:plus" class="mr-5px" /> 新增 <!-- <Icon icon="ep:plus" class="mr-5px" /> 新增-->
</el-button> <!-- </el-button>-->
<el-button <el-button
type="success" type="success"
plain plain
@ -324,14 +324,14 @@
/> />
<el-table-column label="操作" align="center" fixed="right" width="110"> <el-table-column label="操作" align="center" fixed="right" width="110">
<template #default="scope"> <template #default="scope">
<el-button <!-- <el-button-->
link <!-- link-->
type="primary" <!-- type="primary"-->
@click="openForm('update', scope.row.id)" <!-- @click="openForm('update', scope.row.id)"-->
v-hasPermi="['parking:appearance-record:update']" <!-- v-hasPermi="['parking:appearance-record:update']"-->
> <!-- >-->
编辑 <!-- 编辑-->
</el-button> <!-- </el-button>-->
<el-button <el-button
link link
type="danger" type="danger"

View File

@ -55,6 +55,10 @@ const formData = ref({
memo: undefined, memo: undefined,
}) })
const formRules = reactive({ const formRules = reactive({
parkNumber: [{ required: true, message: '场库编号不能为空', trigger: 'blur' }],
plate: [{ required: true, message: '车牌号不能为空', trigger: 'blur' }],
memo: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
source: [{ required: true, message: '来源不能为空', trigger: 'blur' }],
}) })
const formRef = ref() // Ref const formRef = ref() // Ref

View File

@ -64,53 +64,53 @@
class="!w-240px" class="!w-240px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="访问事由" prop="visitReason"> <!-- <el-form-item label="访问事由" prop="visitReason">-->
<el-input <!-- <el-input-->
v-model="queryParams.visitReason" <!-- v-model="queryParams.visitReason"-->
placeholder="请输入访问事由" <!-- placeholder="请输入访问事由"-->
clearable <!-- clearable-->
@keyup.enter="handleQuery" <!-- @keyup.enter="handleQuery"-->
class="!w-240px" <!-- class="!w-240px"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="放行类型" prop="openGateMode"> <!-- <el-form-item label="放行类型" prop="openGateMode">-->
<el-input <!-- <el-input-->
v-model="queryParams.openGateMode" <!-- v-model="queryParams.openGateMode"-->
placeholder="请输入放行类型" <!-- placeholder="请输入放行类型"-->
clearable <!-- clearable-->
@keyup.enter="handleQuery" <!-- @keyup.enter="handleQuery"-->
class="!w-240px" <!-- class="!w-240px"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="匹配模式" prop="matchMode"> <!-- <el-form-item label="匹配模式" prop="matchMode">-->
<el-input <!-- <el-input-->
v-model="queryParams.matchMode" <!-- v-model="queryParams.matchMode"-->
placeholder="请输入匹配模式" <!-- placeholder="请输入匹配模式"-->
clearable <!-- clearable-->
@keyup.enter="handleQuery" <!-- @keyup.enter="handleQuery"-->
class="!w-240px" <!-- class="!w-240px"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="是否开闸" prop="barriorOpen"> <!-- <el-form-item label="是否开闸" prop="barriorOpen">-->
<el-input <!-- <el-input-->
v-model="queryParams.barriorOpen" <!-- v-model="queryParams.barriorOpen"-->
placeholder="请输入是否开闸" <!-- placeholder="请输入是否开闸"-->
clearable <!-- clearable-->
@keyup.enter="handleQuery" <!-- @keyup.enter="handleQuery"-->
class="!w-240px" <!-- class="!w-240px"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="开闸耗时" prop="costTime"> <!-- <el-form-item label="开闸耗时" prop="costTime">-->
<el-date-picker <!-- <el-date-picker-->
v-model="queryParams.costTime" <!-- v-model="queryParams.costTime"-->
value-format="YYYY-MM-DD HH:mm:ss" <!-- value-format="YYYY-MM-DD HH:mm:ss"-->
type="daterange" <!-- type="daterange"-->
start-placeholder="开始日期" <!-- start-placeholder="开始日期"-->
end-placeholder="结束日期" <!-- end-placeholder="结束日期"-->
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" <!-- :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"-->
class="!w-240px" <!-- class="!w-240px"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="创建时间" prop="createTime"> <el-form-item label="创建时间" prop="createTime">
<el-date-picker <el-date-picker
v-model="queryParams.createTime" v-model="queryParams.createTime"
@ -125,14 +125,14 @@
<el-form-item> <el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button> <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button <!-- <el-button-->
type="primary" <!-- type="primary"-->
plain <!-- plain-->
@click="openForm('create')" <!-- @click="openForm('create')"-->
v-hasPermi="['parking:entry-record:create']" <!-- v-hasPermi="['parking:entry-record:create']"-->
> <!-- >-->
<Icon icon="ep:plus" class="mr-5px" /> 新增 <!-- <Icon icon="ep:plus" class="mr-5px" /> 新增-->
</el-button> <!-- </el-button>-->
<el-button <el-button
type="success" type="success"
plain plain
@ -171,14 +171,14 @@
/> />
<el-table-column label="操作" align="center" fixed="right" width="110"> <el-table-column label="操作" align="center" fixed="right" width="110">
<template #default="scope"> <template #default="scope">
<el-button <!-- <el-button-->
link <!-- link-->
type="primary" <!-- type="primary"-->
@click="openForm('update', scope.row.id)" <!-- @click="openForm('update', scope.row.id)"-->
v-hasPermi="['parking:entry-record:update']" <!-- v-hasPermi="['parking:entry-record:update']"-->
> <!-- >-->
编辑 <!-- 编辑-->
</el-button> <!-- </el-button>-->
<el-button <el-button
link link
type="danger" type="danger"

View File

@ -147,6 +147,14 @@
<el-table-column label="部门" align="center" prop="dept" /> <el-table-column label="部门" align="center" prop="dept" />
<el-table-column label="备注" align="center" prop="memo" /> <el-table-column label="备注" align="center" prop="memo" />
<el-table-column label="来源" align="center" prop="source" /> <el-table-column label="来源" align="center" prop="source" />
<el-table-column label="车主姓名" align="center" prop="name" />
<el-table-column label="车子类型" align="center" prop="carType" />
<el-table-column label="地址id" align="center" prop="areaId" />
<el-table-column label="地址有效日期" align="center" prop="areaStart" />
<el-table-column label="地址失效日期" align="center" prop="areaEnd" />
<el-table-column label="地址" align="center" prop="address" />
<el-table-column label="手机号码" align="center" prop="phone" />
<el-table-column label="车牌颜色" align="center" prop="palteColor" />
<el-table-column <el-table-column
label="创建时间" label="创建时间"
align="center" align="center"

View File

@ -0,0 +1,135 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
>
<el-form-item label="登录时间" prop="loginTime">
<el-date-picker
v-model="formData.loginTime"
type="date"
value-format="x"
placeholder="选择登录时间"
/>
</el-form-item>
<el-form-item label="设备编号" prop="deviceId">
<el-input v-model="formData.deviceId" placeholder="请输入设备编号" />
</el-form-item>
<el-form-item label="设备类型" prop="assetType">
<el-select v-model="formData.assetType" placeholder="请选择设备类型">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="设备名称" prop="assetName">
<el-input v-model="formData.assetName" placeholder="请输入设备名称" />
</el-form-item>
<el-form-item label="识别码" prop="identificationCode">
<el-input v-model="formData.identificationCode" placeholder="请输入识别码" />
</el-form-item>
<el-form-item label="登录结果" prop="status">
<el-radio-group v-model="formData.status">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="登录备注" prop="loginRemark">
<el-input v-model="formData.loginRemark" placeholder="请输入登录备注" />
</el-form-item>
<el-form-item label="登录参数" prop="loginParameter">
<el-input v-model="formData.loginParameter" placeholder="请输入登录参数" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { Api, VO } from '@/api/ticket/assetLoginLog'
/** 设备登录日志 表单 */
defineOptions({ name: 'Form' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
loginTime: undefined,
deviceId: undefined,
assetType: undefined,
assetName: undefined,
identificationCode: undefined,
status: undefined,
loginRemark: undefined,
loginParameter: undefined
})
const formRules = reactive({
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await Api.get(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = formData.value as unknown as VO
if (formType.value === 'create') {
await Api.create(data)
message.success(t('common.createSuccess'))
} else {
await Api.update(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
loginTime: undefined,
deviceId: undefined,
assetType: undefined,
assetName: undefined,
identificationCode: undefined,
status: undefined,
loginRemark: undefined,
loginParameter: undefined
}
formRef.value?.resetFields()
}
</script>

View File

@ -0,0 +1,274 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="68px"
>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="queryParams.createTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="登录时间" prop="loginTime">
<el-date-picker
v-model="queryParams.loginTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="设备编号" prop="deviceId">
<el-input
v-model="queryParams.deviceId"
placeholder="请输入设备编号"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="设备类型" prop="assetType">
<el-select
v-model="queryParams.assetType"
placeholder="请选择设备类型"
clearable
class="!w-240px"
>
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="设备名称" prop="assetName">
<el-input
v-model="queryParams.assetName"
placeholder="请输入设备名称"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="识别码" prop="identificationCode">
<el-input
v-model="queryParams.identificationCode"
placeholder="请输入识别码"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="登录结果" prop="status">
<el-select
v-model="queryParams.status"
placeholder="请选择登录结果"
clearable
class="!w-240px"
>
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="登录备注" prop="loginRemark">
<el-input
v-model="queryParams.loginRemark"
placeholder="请输入登录备注"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="登录参数" prop="loginParameter">
<el-input
v-model="queryParams.loginParameter"
placeholder="请输入登录参数"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['assetLoginLog::create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['assetLoginLog::export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="编号" align="center" prop="id" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column
label="登录时间"
align="center"
prop="loginTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="设备编号" align="center" prop="deviceId" />
<el-table-column label="设备类型" align="center" prop="assetType" />
<el-table-column label="设备名称" align="center" prop="assetName" />
<el-table-column label="识别码" align="center" prop="identificationCode" />
<el-table-column label="登录结果" align="center" prop="status" />
<el-table-column label="登录备注" align="center" prop="loginRemark" />
<el-table-column label="登录参数" align="center" prop="loginParameter" />
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['assetLoginLog::update']"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['assetLoginLog::delete']"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<Form ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { Api, VO } from '@/api/ticket/assetLoginLog'
import Form from './Form.vue'
/** 设备登录日志 列表 */
defineOptions({ name: 'AssetLoginLog' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<VO[]>([]) //
const total = ref(0) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
createTime: [],
loginTime: [],
deviceId: undefined,
assetType: undefined,
assetName: undefined,
identificationCode: undefined,
status: undefined,
loginRemark: undefined,
loginParameter: undefined
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await Api.getPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await Api.delete(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await Api.export(queryParams)
download.excel(data, '设备登录日志.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>

View File

@ -0,0 +1,92 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
>
<el-form-item label="航班名称" prop="flightName">
<el-input v-model="formData.flightName" placeholder="请输入航班名称" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { FlightApi, FlightVO } from '@/api/ticket/flight'
/** 航班 表单 */
defineOptions({ name: 'FlightForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
flightName: undefined,
})
const formRules = reactive({
flightName: [{ required: true, message: '航班名称不能为空', trigger: 'blur' }],
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await FlightApi.getFlight(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = formData.value as unknown as FlightVO
if (formType.value === 'create') {
await FlightApi.createFlight(data)
message.success(t('common.createSuccess'))
} else {
await FlightApi.updateFlight(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
flightName: undefined,
}
formRef.value?.resetFields()
}
</script>

View File

@ -0,0 +1,187 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="68px"
>
<el-form-item label="航班名称" prop="flightName">
<el-input
v-model="queryParams.flightName"
placeholder="请输入航班名称"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="queryParams.createTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['ticket:flight:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['ticket:flight:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="id" align="center" prop="id" />
<el-table-column label="航班名称" align="center" prop="flightName" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['ticket:flight:update']"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['ticket:flight:delete']"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<FlightForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { FlightApi, FlightVO } from '@/api/ticket/flight'
import FlightForm from './FlightForm.vue'
/** 航班 列表 */
defineOptions({ name: 'Flight' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<FlightVO[]>([]) //
const total = ref(0) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
flightName: undefined,
createTime: [],
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await FlightApi.getFlightPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await FlightApi.deleteFlight(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await FlightApi.exportFlight(queryParams)
download.excel(data, '航班.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>

View File

@ -0,0 +1,111 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
>
<el-form-item label="设备编号" prop="deviceId">
<el-input v-model="formData.deviceId" placeholder="请输入设备编号" />
</el-form-item>
<el-form-item label="姓名" prop="name">
<el-input v-model="formData.name" placeholder="请输入姓名" />
</el-form-item>
<el-form-item label="身份证" prop="idCard">
<el-input v-model="formData.idCard" placeholder="请输入身份证" />
</el-form-item>
<el-form-item label="上传时间" prop="commitTime">
<el-date-picker
v-model="formData.commitTime"
type="date"
value-format="x"
placeholder="选择上传时间"
/>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { InformationApi, InformationVO } from '@/api/ticket/information'
/** 旅客信息 表单 */
defineOptions({ name: 'InformationForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
deviceId: undefined,
name: undefined,
idCard: undefined,
commitTime: undefined
})
const formRules = reactive({
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await InformationApi.getInformation(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = formData.value as unknown as InformationVO
if (formType.value === 'create') {
await InformationApi.createInformation(data)
message.success(t('common.createSuccess'))
} else {
await InformationApi.updateInformation(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
deviceId: undefined,
name: undefined,
idCard: undefined,
commitTime: undefined
}
formRef.value?.resetFields()
}
</script>

View File

@ -0,0 +1,228 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="68px"
>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="queryParams.createTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="设备编号" prop="deviceId">
<el-input
v-model="queryParams.deviceId"
placeholder="请输入设备编号"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="姓名" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入姓名"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="身份证" prop="idCard">
<el-input
v-model="queryParams.idCard"
placeholder="请输入身份证"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="上传时间" prop="commitTime">
<el-date-picker
v-model="queryParams.commitTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['passenger:information:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['passenger:information:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="编号" align="center" prop="id" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="设备编号" align="center" prop="deviceId" />
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="身份证" align="center" prop="idCard" />
<el-table-column
label="上传时间"
align="center"
prop="commitTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['passenger:information:update']"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['passenger:information:delete']"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<InformationForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { InformationApi, InformationVO } from '@/api/ticket/information'
import InformationForm from './InformationForm.vue'
/** 旅客信息 列表 */
defineOptions({ name: 'Information' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<InformationVO[]>([]) //
const total = ref(0) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
createTime: [],
deviceId: undefined,
name: undefined,
idCard: undefined,
commitTime: []
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await InformationApi.getInformationPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await InformationApi.deleteInformation(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await InformationApi.exportInformation(queryParams)
download.excel(data, '旅客信息.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>

View File

@ -0,0 +1,123 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
>
<!-- <el-form-item label="归属航班" prop="flightId">
<el-input v-model="formData.flightId" placeholder="请输入航班" />
</el-form-item> -->
<el-form-item label="所属航班" prop="flightId">
<el-select v-model="formData.flightId" placeholder="请选择所属航班" clearable class="!w-240px">
<el-option v-for="flightNameOptions in option" :key="flightNameOptions.id"
:label="flightNameOptions.flightName" :value="flightNameOptions.id" />
</el-select>
</el-form-item>
<el-form-item label="航线名称" prop="routeName">
<el-input v-model="formData.routeName" placeholder="请输入航线名称" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { ShipRouteApi, ShipRouteVO } from '@/api/ticket/shiproute'
import { FlightApi, FlightVO } from '@/api/ticket/flight'
/** 航线 表单 */
defineOptions({ name: 'ShipRouteForm' })
const { t } = useI18n() //
const message = useMessage() //
const loading = ref(true) //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const option = ref<FlightVO[]>([]);
const formData = ref({
id: undefined,
flightId: undefined,
routeName: undefined,
})
const formRules = reactive({
flightId: [{ required: true, message: '归属航班不能为空', trigger: 'blur' }],
routeName: [{ required: true, message: '航线名称不能为空', trigger: 'blur' }],
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await ShipRouteApi.getShipRoute(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
//
const getFlightName = async () => {
loading.value = true
try {
option.value = await FlightApi.getFlightName()
} finally {
loading.value = false
}
}
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = formData.value as unknown as ShipRouteVO
if (formType.value === 'create') {
await ShipRouteApi.createShipRoute(data)
message.success(t('common.createSuccess'))
} else {
await ShipRouteApi.updateShipRoute(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
flightId: undefined,
routeName: undefined,
}
formRef.value?.resetFields()
}
/** 初始化 **/
onMounted(() => {
getFlightName()
})
</script>

View File

@ -0,0 +1,230 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="68px"
>
<!-- <el-form-item label="归属航班" prop="flightId">
<el-input
v-model="queryParams.flightId"
placeholder="请输入航班"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item> -->
<el-form-item label="所属航班" prop="flightId">
<el-select
v-model="queryParams.flightId"
placeholder="请选择属于航班"
clearable
class="!w-200px"
>
<el-option
v-for="flightNameOptions in option"
:key="flightNameOptions.id"
:label="flightNameOptions.flightName"
:value="flightNameOptions.id"
/>
</el-select>
</el-form-item>
<el-form-item label="航线名称" prop="routeName">
<el-input
v-model="queryParams.routeName"
placeholder="请输入航线名称"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="queryParams.createTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['ticket:ship-route:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['ticket:ship-route:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="ID" align="center" prop="id" />
<el-table-column label="所属航班" align="center" prop="flightName" />
<el-table-column label="航线名称" align="center" prop="routeName" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['ticket:ship-route:update']"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['ticket:ship-route:delete']"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<ShipRouteForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { ShipRouteApi, ShipRouteVO } from '@/api/ticket/shiproute'
import ShipRouteForm from './ShipRouteForm.vue'
import { FlightApi, FlightVO } from '@/api/ticket/flight'
/** 航线 列表 */
defineOptions({ name: 'ShipRoute' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<ShipRouteVO[]>([]) //
const total = ref(0) //
const option = ref<FlightVO[]>([]);
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
flightId: undefined,
routeName: undefined,
createTime: [],
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await ShipRouteApi.getShipRoutePage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
//
const getFlightName = async () => {
loading.value = true
try {
option.value = await FlightApi.getFlightName()
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ShipRouteApi.deleteShipRoute(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await ShipRouteApi.exportShipRoute(queryParams)
download.excel(data, '航线.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
getFlightName()
})
</script>

View File

@ -0,0 +1,136 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
>
<el-form-item label="航线" prop="shipRouteId">
<el-select v-model="formData.shipRouteId" placeholder="请选择所属航线" clearable class="!w-240px">
<el-option v-for="shipRouteNameOptions in option" :key="shipRouteNameOptions.id"
:label="shipRouteNameOptions.routeName" :value="shipRouteNameOptions.id" />
</el-select>
</el-form-item>
<el-form-item label="班次" prop="classes">
<el-input v-model="formData.classes" placeholder="请输入班次" />
</el-form-item>
<el-form-item label="出发时间" prop="startTime">
<el-time-select
v-model="formData.startTime"
start="05:00"
step="00:05"
end="20:00"
placeholder="选择出发时间"
/>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { TodayFlightApi, TodayFlightVO } from '@/api/ticket/todayflight'
import { ShipRouteApi, ShipRouteVO } from '@/api/ticket/shiproute'
/** 今日航班 表单 */
defineOptions({ name: 'TodayFlightForm' })
const { t } = useI18n() //
const message = useMessage() //
// const value = ref('');
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const loading = ref(true) //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const option = ref<ShipRouteVO[]>([]);
const formData = ref({
id: undefined,
shipRouteId: undefined,
classes: undefined,
// flightDate: undefined,
startTime: undefined,
})
const formRules = reactive({
shipRouteId: [{ required: true, message: '航线不能为空', trigger: 'blur' }],
classes: [{ required: true, message: '班次不能为空', trigger: 'blur' }],
// flightDate: [{ required: true, message: '', trigger: 'blur' }],
startTime: [{ required: true, message: '出发时间不能为空', trigger: 'blur' }],
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await TodayFlightApi.getTodayFlight(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = formData.value as unknown as TodayFlightVO
if (formType.value === 'create') {
await TodayFlightApi.createTodayFlight(data)
message.success(t('common.createSuccess'))
} else {
await TodayFlightApi.updateTodayFlight(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
//线
const getRouteName = async () => {
loading.value = true
try {
option.value = await ShipRouteApi.getRouteName()
} finally {
loading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
shipRouteId: undefined,
classes: undefined,
// flightDate: undefined,
startTime: undefined,
}
formRef.value?.resetFields()
}
/** 初始化 **/
onMounted(() => {
getRouteName()
})
</script>

View File

@ -0,0 +1,254 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="68px"
>
<!-- <el-form-item label="航线" prop="shipRouteId">
<el-input
v-model="queryParams.shipRouteId"
placeholder="请输入航线"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item> -->
<el-form-item label="航线" prop="shipRouteId">
<el-select
v-model="queryParams.shipRouteId"
placeholder="请选择属于航线"
clearable
class="!w-200px"
>
<el-option
v-for="shipRouteNameOptions in option"
:key="shipRouteNameOptions.id"
:label="shipRouteNameOptions.routeName"
:value="shipRouteNameOptions.id"
/>
</el-select>
</el-form-item>
<el-form-item label="班次" prop="classes">
<el-input
v-model="queryParams.classes"
placeholder="请输入班次"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<!-- <el-form-item label="当日日期" prop="flightDate">
<el-date-picker
v-model="queryParams.flightDate"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item> -->
<el-form-item label="出发时间" prop="startTime">
<el-date-picker
v-model="queryParams.startTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="queryParams.createTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['ticket:today-flight:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['ticket:today-flight:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="ID" align="center" prop="id" />
<el-table-column label="航线" align="center" prop="shipRouteName" />
<el-table-column label="班次" align="center" prop="classes" />
<el-table-column label="出发时间" align="center" prop="startTime" width="180px"/>
<!-- <el-table-column label="当日日期" align="center" prop="flightDate" /> -->
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['ticket:today-flight:update']"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['ticket:today-flight:delete']"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<TodayFlightForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { TodayFlightApi, TodayFlightVO } from '@/api/ticket/todayflight'
import TodayFlightForm from './TodayFlightForm.vue'
import { ShipRouteApi, ShipRouteVO } from '@/api/ticket/shiproute'
/** 今日航班 列表 */
defineOptions({ name: 'TodayFlight' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<TodayFlightVO[]>([]) //
const total = ref(0) //
const option = ref<ShipRouteVO[]>([]);
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
shipRouteId: undefined,
classes: undefined,
flightDate: [],
startTime: [],
createTime: [],
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await TodayFlightApi.getTodayFlightPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
//线
const getRouteName = async () => {
loading.value = true
try {
option.value = await ShipRouteApi.getRouteName()
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await TodayFlightApi.deleteTodayFlight(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await TodayFlightApi.exportTodayFlight(queryParams)
download.excel(data, '今日航班.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
getRouteName()
})
</script>

View File

@ -0,0 +1,131 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
>
<el-form-item label="上报时间" prop="commitTime">
<el-date-picker
v-model="formData.commitTime"
type="date"
value-format="x"
placeholder="选择上报时间"
/>
</el-form-item>
<el-form-item label="设备编号" prop="deviceId">
<el-input v-model="formData.deviceId" placeholder="请输入设备编号" />
</el-form-item>
<el-form-item label="设备名称" prop="deviceName">
<el-input v-model="formData.deviceName" placeholder="请输入设备名称" />
</el-form-item>
<el-form-item label="状态" prop="status">
<el-radio-group v-model="formData.status">
<el-radio
v-for="dict in getBoolDictOptions(DICT_TYPE.UPLINK_MESSAGE_STATUS)"
:key="dict.value"
:label="dict.value"
>
{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="上行报文" prop="resBody">
<el-input v-model="formData.resBody" placeholder="请输入上行报文" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" placeholder="请输入备注" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { getBoolDictOptions, DICT_TYPE } from '@/utils/dict'
import { Api, VO } from '@/api/ticket/uplinkMessage'
/** 上行报文 表单 */
defineOptions({ name: 'Form' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
commitTime: undefined,
deviceId: undefined,
deviceName: undefined,
status: undefined,
resBody: undefined,
remark: undefined
})
const formRules = reactive({
resBody: [{ required: true, message: '上行报文不能为空', trigger: 'blur' }]
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await Api.get(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = formData.value as unknown as VO
if (formType.value === 'create') {
await Api.create(data)
message.success(t('common.createSuccess'))
} else {
await Api.update(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
commitTime: undefined,
deviceId: undefined,
deviceName: undefined,
status: undefined,
resBody: undefined,
remark: undefined
}
formRef.value?.resetFields()
}
</script>

View File

@ -0,0 +1,261 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="68px"
>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="queryParams.createTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="上报时间" prop="commitTime">
<el-date-picker
v-model="queryParams.commitTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="设备编号" prop="deviceId">
<el-input
v-model="queryParams.deviceId"
placeholder="请输入设备编号"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="设备名称" prop="deviceName">
<el-input
v-model="queryParams.deviceName"
placeholder="请输入设备名称"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select
v-model="queryParams.status"
placeholder="请选择状态"
clearable
class="!w-240px"
>
<el-option
v-for="dict in getBoolDictOptions(DICT_TYPE.UPLINK_MESSAGE_STATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="上行报文" prop="resBody">
<el-input
v-model="queryParams.resBody"
placeholder="请输入上行报文"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input
v-model="queryParams.remark"
placeholder="请输入备注"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['uplinkMessage::create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['uplinkMessage::export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="编号" align="center" prop="id" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column
label="上报时间"
align="center"
prop="commitTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="设备编号" align="center" prop="deviceId" />
<el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="状态" align="center" prop="status">
<template #default="scope">
<dict-tag :type="DICT_TYPE.UPLINK_MESSAGE_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="上行报文" align="center" prop="resBody" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['uplinkMessage::update']"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['uplinkMessage::delete']"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<Form ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { getBoolDictOptions, DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { Api, VO } from '@/api/ticket/uplinkMessage'
import Form from './Form.vue'
/** 上行报文 列表 */
defineOptions({ name: 'UplinkMessage' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<VO[]>([]) //
const total = ref(0) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
createTime: [],
commitTime: [],
deviceId: undefined,
deviceName: undefined,
status: undefined,
resBody: undefined,
remark: undefined
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await Api.getPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await Api.delete(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await Api.export(queryParams)
download.excel(data, '上行报文.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>