Compare commits
No commits in common. "master" and "zzw-one" have entirely different histories.
85
.drone.yml
85
.drone.yml
@ -1,56 +1,45 @@
|
||||
kind: pipeline # 定义对象类型,还有secret和signature两种类型
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: ludu-admin-vue3
|
||||
|
||||
type: docker # 定义流水线类型,还有kubernetes、exec、ssh等类型
|
||||
|
||||
name: filesystem-drone # 定义流水线名称
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
||||
|
||||
- name: build-copy-vue
|
||||
steps:
|
||||
# - name: build
|
||||
# image: node:18.18.0
|
||||
# volumes:
|
||||
# - name: build-file
|
||||
# path: /build/dist
|
||||
# commands:
|
||||
# - npm install --registry=https://registry.npmmirror.com/
|
||||
# - npm run build:prod
|
||||
# - cp -r dist-prod/. /build/dist
|
||||
|
||||
- name: remote_transmit
|
||||
|
||||
image: appleboy/drone-ssh # SSH工具镜像
|
||||
|
||||
settings:
|
||||
|
||||
|
||||
host: 101.43.112.107 # 远程连接地址
|
||||
|
||||
|
||||
username: root # 远程连接账号
|
||||
|
||||
password:
|
||||
|
||||
from_secret: ssh_password
|
||||
|
||||
|
||||
password:
|
||||
|
||||
from_secret: ssh_password # 从Secret中读取SSH密码
|
||||
|
||||
port: 22 # 远程连接端口
|
||||
command_timeout: 20m # 远程执行命令超时时间
|
||||
|
||||
|
||||
command_timeout: 5m # 远程执行命令超时时间
|
||||
|
||||
script:
|
||||
- ssh root@47.118.40.3 "sh -c 'cd /build_project/ludu-admin-vue3 && git pull origin master && /usr/bin/pnpm install && /usr/bin/pnpm run build:prod && zip -r pc.zip pc'"
|
||||
- scp root@47.118.40.3:/build_project/ludu-admin-vue3/pc.zip /build_package/
|
||||
- scp /build_package/pc.zip root@121.36.203.133:/build_package/
|
||||
- name: build-vue
|
||||
|
||||
image: appleboy/drone-ssh # SSH工具镜像
|
||||
|
||||
settings:
|
||||
|
||||
host: 121.36.203.133 # 远程连接地址
|
||||
|
||||
username: root # 远程连接账号
|
||||
|
||||
password:
|
||||
|
||||
from_secret: ssh_password2 # 从Secret中读取SSH密码
|
||||
|
||||
port: 22 # 远程连接端口
|
||||
|
||||
command_timeout: 30m # 远程执行命令超时时间
|
||||
|
||||
script:
|
||||
- echo "build-vue......"
|
||||
- cd /build_package
|
||||
- rm -rf pc
|
||||
- unzip pc.zip
|
||||
- rm -rf /nginx/html/pc
|
||||
- mv pc /nginx/html/pc
|
||||
- rm -rf ludu-admin-vue3
|
||||
- git clone http://101.43.112.107:3000/root/ludu-admin-vue3.git
|
||||
- cd ludu-admin-vue3
|
||||
- npm install --registry=https://registry.npmmirror.com/
|
||||
- npm run build:prod
|
||||
- cp -r dist-prod/. /lundu-build/font
|
||||
- scp -r /lundu-build/font/. root@120.46.37.243:/root/buildIndex
|
||||
|
||||
# volumes: # 定义流水线挂载目录,用于共享数据
|
||||
# - name: build-file
|
||||
# host:
|
||||
# path: /mydata/buildIndex # 从宿主机中挂载的目录
|
@ -24,7 +24,7 @@ VITE_DROP_CONSOLE=false
|
||||
VITE_SOURCEMAP=false
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH=/admin
|
||||
VITE_BASE_PATH=/
|
||||
|
||||
# 商城H5会员端域名
|
||||
VITE_MALL_H5_DOMAIN='http://localhost:3000'
|
||||
|
11
.env.prod
11
.env.prod
@ -4,12 +4,12 @@ NODE_ENV=production
|
||||
VITE_DEV=false
|
||||
|
||||
# 请求路径
|
||||
VITE_BASE_URL=''
|
||||
VITE_BASE_URL='http://localhost:48080'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://mt.ptzykjgs.com/admin-api/infra/file/upload'
|
||||
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
@ -24,13 +24,10 @@ VITE_DROP_CONSOLE=true
|
||||
VITE_SOURCEMAP=false
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH=/admin
|
||||
VITE_BASE_PATH=/
|
||||
|
||||
# 输出路径
|
||||
VITE_OUT_DIR=pc
|
||||
VITE_OUT_DIR=dist-prod
|
||||
|
||||
# 商城H5会员端域名
|
||||
VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn'
|
||||
|
||||
# 验证码的开关
|
||||
VITE_APP_CAPTCHA_ENABLE=false
|
||||
|
@ -1,9 +0,0 @@
|
||||
<?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>
|
@ -72,7 +72,7 @@ export const socialAuthRedirect = (type: number, redirectUri: string) => {
|
||||
}
|
||||
// 获取验证图片以及 token
|
||||
export const getCode = (data) => {
|
||||
// return request.postOriginal({ url: 'system/captcha/get', data })
|
||||
return request.postOriginal({ url: 'system/captcha/get', data })
|
||||
}
|
||||
|
||||
// 滑动或者点选验证
|
||||
|
@ -1,67 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 出场记录 VO
|
||||
export interface AppearanceRecordVO {
|
||||
id: number // id
|
||||
orderId: string // 入场记录编号
|
||||
parkNumber: string // 停车场编号
|
||||
operatorId: string // 操作员 Id
|
||||
operatorName: string // 操作员姓名
|
||||
invoiceNo: string // 发票号码
|
||||
plate: string // 车牌
|
||||
idCard: string // 证件号码
|
||||
inTime: string // 入场时间
|
||||
outTime: string // 出场时间
|
||||
inImage: string // 入场图片名
|
||||
outImage: string // 出场图片名
|
||||
inChannel: string // 入口通道名称
|
||||
outChannel: string // 出口通道名称
|
||||
openGateMode: string // 抬杆模式
|
||||
matchMode: string // 匹配模式
|
||||
charge: string // 总停车费
|
||||
onLineCharge: string // 线上总收费
|
||||
offLineCharge: string // 线下总收费
|
||||
profitChargeTotal: string // 线上线下金额和时间优惠累计抵扣值
|
||||
onLineProfitChargeNum: string // 线上累计优惠金额总面值
|
||||
onLineProfitChargeValue: string // 线上累计优惠金额总抵扣值
|
||||
offLineProfitChargeNum: string // 线下累计优惠金额总面值
|
||||
offLineProfitChargeValue: string // 线下累计优惠金额总抵扣值
|
||||
onLineProfitTimeNum: string // 线上累计优惠时间
|
||||
onLineProfitTimeValue: string // 线上累计优惠时间总抵扣值
|
||||
offLineProfitTimeNum: string // 线下累计优惠时间
|
||||
offLineProfitTimeValue: string // 线下累计优惠时间总抵扣值
|
||||
costTime: string // 时间
|
||||
}
|
||||
|
||||
// 出场记录 API
|
||||
export const AppearanceRecordApi = {
|
||||
// 查询出场记录分页
|
||||
getAppearanceRecordPage: async (params: any) => {
|
||||
return await request.get({ url: `/parking/appearance-record/page`, params })
|
||||
},
|
||||
|
||||
// 查询出场记录详情
|
||||
getAppearanceRecord: async (id: number) => {
|
||||
return await request.get({ url: `/parking/appearance-record/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增出场记录
|
||||
createAppearanceRecord: async (data: AppearanceRecordVO) => {
|
||||
return await request.post({ url: `/parking/appearance-record/create`, data })
|
||||
},
|
||||
|
||||
// 修改出场记录
|
||||
updateAppearanceRecord: async (data: AppearanceRecordVO) => {
|
||||
return await request.put({ url: `/parking/appearance-record/update`, data })
|
||||
},
|
||||
|
||||
// 删除出场记录
|
||||
deleteAppearanceRecord: async (id: number) => {
|
||||
return await request.delete({ url: `/parking/appearance-record/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出出场记录 Excel
|
||||
exportAppearanceRecord: async (params) => {
|
||||
return await request.download({ url: `/parking/appearance-record/export-excel`, params })
|
||||
},
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 黑名单 VO
|
||||
export interface BlackVO {
|
||||
id: number // id
|
||||
parkNumber: string // 场库编号
|
||||
source: string // 来源
|
||||
plate: string // 车牌号
|
||||
memo: string // 备注
|
||||
}
|
||||
|
||||
// 黑名单 API
|
||||
export const BlackApi = {
|
||||
// 查询黑名单分页
|
||||
getBlackPage: async (params: any) => {
|
||||
return await request.get({ url: `/parking/black/page`, params })
|
||||
},
|
||||
|
||||
// 查询黑名单详情
|
||||
getBlack: async (id: number) => {
|
||||
return await request.get({ url: `/parking/black/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增黑名单
|
||||
createBlack: async (data: BlackVO) => {
|
||||
return await request.post({ url: `/parking/black/create`, data })
|
||||
},
|
||||
|
||||
// 修改黑名单
|
||||
updateBlack: async (data: BlackVO) => {
|
||||
return await request.put({ url: `/parking/black/update`, data })
|
||||
},
|
||||
|
||||
// 删除黑名单
|
||||
deleteBlack: async (id: number) => {
|
||||
return await request.delete({ url: `/parking/black/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出黑名单 Excel
|
||||
exportBlack: async (params) => {
|
||||
return await request.download({ url: `/parking/black/export-excel`, params })
|
||||
},
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 预约车 VO
|
||||
export interface BookCarVO {
|
||||
id: number // id
|
||||
parkNumber: string // 场库编号
|
||||
plate: string // 预约车牌号
|
||||
start: string // 预约开始时间
|
||||
end: string // 预约结束时间
|
||||
areaId: string // 区域号
|
||||
flag: string // 操作
|
||||
charge: string // 金额
|
||||
bookOrderId: string // 预约订单号
|
||||
inTime: string // 入场时间
|
||||
downTime: string // 下发场库时间
|
||||
bookOrderTime: string // 订单下单时间
|
||||
letInStartTime: string // 准入开始时间
|
||||
letInEndTime: string // 准入结束时间
|
||||
memo: string // 备注
|
||||
}
|
||||
|
||||
// 预约车 API
|
||||
export const BookCarApi = {
|
||||
// 查询预约车分页
|
||||
getBookCarPage: async (params: any) => {
|
||||
return await request.get({ url: `/parking/book-car/page`, params })
|
||||
},
|
||||
|
||||
// 查询预约车详情
|
||||
getBookCar: async (id: number) => {
|
||||
return await request.get({ url: `/parking/book-car/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增预约车
|
||||
createBookCar: async (data: BookCarVO) => {
|
||||
return await request.post({ url: `/parking/book-car/create`, data })
|
||||
},
|
||||
|
||||
// 修改预约车
|
||||
updateBookCar: async (data: BookCarVO) => {
|
||||
return await request.put({ url: `/parking/book-car/update`, data })
|
||||
},
|
||||
|
||||
// 删除预约车
|
||||
deleteBookCar: async (id: number) => {
|
||||
return await request.delete({ url: `/parking/book-car/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出预约车 Excel
|
||||
exportBookCar: async (params) => {
|
||||
return await request.download({ url: `/parking/book-car/export-excel`, params })
|
||||
}
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 入场记录 VO
|
||||
export interface EntryRecordVO {
|
||||
id: number // 入场id
|
||||
orderId: string // 入场记录编号
|
||||
parkNumber: string // 场库编号
|
||||
plate: string // 车牌
|
||||
idCard: string // 证件号码
|
||||
inTime: string // 入场时间
|
||||
inChannel: string // 入场通道名称
|
||||
inImage: string // 入场图片名
|
||||
visitReason: string // 访问事由
|
||||
openGateMode: string // 放行类型
|
||||
matchMode: string // 匹配模式
|
||||
barriorOpen: string // 是否开闸
|
||||
costTime: string // 开闸耗时
|
||||
}
|
||||
|
||||
// 入场记录 API
|
||||
export const EntryRecordApi = {
|
||||
// 查询入场记录分页
|
||||
getEntryRecordPage: async (params: any) => {
|
||||
return await request.get({ url: `/parking/entry-record/page`, params })
|
||||
},
|
||||
|
||||
// 查询入场记录详情
|
||||
getEntryRecord: async (id: number) => {
|
||||
return await request.get({ url: `/parking/entry-record/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增入场记录
|
||||
createEntryRecord: async (data: EntryRecordVO) => {
|
||||
return await request.post({ url: `/parking/entry-record/create`, data })
|
||||
},
|
||||
|
||||
// 修改入场记录
|
||||
updateEntryRecord: async (data: EntryRecordVO) => {
|
||||
return await request.put({ url: `/parking/entry-record/update`, data })
|
||||
},
|
||||
|
||||
// 删除入场记录
|
||||
deleteEntryRecord: async (id: number) => {
|
||||
return await request.delete({ url: `/parking/entry-record/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出入场记录 Excel
|
||||
exportEntryRecord: async (params) => {
|
||||
return await request.download({ url: `/parking/entry-record/export-excel`, params })
|
||||
},
|
||||
}
|
@ -1,42 +1,41 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 远程抬杠日志 VO
|
||||
export interface LiftingRodVO {
|
||||
id: number // id
|
||||
parkNumber: string // 停车场编号
|
||||
passagewayId: string // 通道Id
|
||||
status: number // 状态
|
||||
}
|
||||
|
||||
// 远程抬杠日志 API
|
||||
export const LiftingRodApi = {
|
||||
// 查询远程抬杠日志分页
|
||||
getLiftingRodPage: async (params: any) => {
|
||||
return await request.get({ url: `/parking/lifting-rod/page`, params })
|
||||
},
|
||||
|
||||
// 查询远程抬杠日志详情
|
||||
getLiftingRod: async (id: number) => {
|
||||
return await request.get({ url: `/parking/lifting-rod/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增远程抬杠日志
|
||||
createLiftingRod: async (data: LiftingRodVO) => {
|
||||
return await request.post({ url: `/parking/lifting-rod/create`, data })
|
||||
},
|
||||
|
||||
// 修改远程抬杠日志
|
||||
updateLiftingRod: async (data: LiftingRodVO) => {
|
||||
return await request.put({ url: `/parking/lifting-rod/update`, data })
|
||||
},
|
||||
|
||||
// 删除远程抬杠日志
|
||||
deleteLiftingRod: async (id: number) => {
|
||||
return await request.delete({ url: `/parking/lifting-rod/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出远程抬杠日志 Excel
|
||||
exportLiftingRod: async (params) => {
|
||||
return await request.download({ url: `/parking/lifting-rod/export-excel`, params })
|
||||
},
|
||||
}
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 远程抬杠日志 VO
|
||||
export interface LiftingRodVO {
|
||||
id: number // id
|
||||
parkNumber: string // 停车场编号
|
||||
passagewayId: string // 通道Id
|
||||
}
|
||||
|
||||
// 远程抬杠日志 API
|
||||
export const LiftingRodApi = {
|
||||
// 查询远程抬杠日志分页
|
||||
getLiftingRodPage: async (params: any) => {
|
||||
return await request.get({ url: `/parking/lifting-rod/page`, params })
|
||||
},
|
||||
|
||||
// 查询远程抬杠日志详情
|
||||
getLiftingRod: async (id: number) => {
|
||||
return await request.get({ url: `/parking/lifting-rod/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增远程抬杠日志
|
||||
createLiftingRod: async (data: LiftingRodVO) => {
|
||||
return await request.post({ url: `/parking/lifting-rod/create`, data })
|
||||
},
|
||||
|
||||
// 修改远程抬杠日志
|
||||
updateLiftingRod: async (data: LiftingRodVO) => {
|
||||
return await request.put({ url: `/parking/lifting-rod/update`, data })
|
||||
},
|
||||
|
||||
// 删除远程抬杠日志
|
||||
deleteLiftingRod: async (id: number) => {
|
||||
return await request.delete({ url: `/parking/lifting-rod/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出远程抬杠日志 Excel
|
||||
exportLiftingRod: async (params) => {
|
||||
return await request.download({ url: `/parking/lifting-rod/export-excel`, params })
|
||||
},
|
||||
}
|
@ -12,15 +12,6 @@ export interface WhiteVO {
|
||||
dept: string // 部门
|
||||
memo: string // 备注
|
||||
source: string // 来源
|
||||
name: string //
|
||||
carType: string
|
||||
areaId: number
|
||||
areaStart: string
|
||||
areaEnd: string
|
||||
address: string
|
||||
phone: string
|
||||
plateColor: string
|
||||
|
||||
}
|
||||
|
||||
// 白名单管理 API
|
||||
@ -47,7 +38,7 @@ export const WhiteApi = {
|
||||
|
||||
// 删除白名单管理
|
||||
deleteWhite: async (id: number) => {
|
||||
return await request.delete({ url: `/parking/white/delete?fixedId=` + id })
|
||||
return await request.delete({ url: `/parking/white/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出白名单管理 Excel
|
||||
|
@ -1,47 +0,0 @@
|
||||
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 })
|
||||
},
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
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 })
|
||||
},
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
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 })
|
||||
},
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 372 KiB |
Binary file not shown.
Before Width: | Height: | Size: 51 KiB |
@ -5,7 +5,7 @@ import remainingRouter from './modules/remaining'
|
||||
|
||||
// 创建路由实例
|
||||
const router = createRouter({
|
||||
history: createWebHistory("/admin"), // createWebHashHistory URL带#,createWebHistory URL不带#
|
||||
history: createWebHistory(), // createWebHashHistory URL带#,createWebHistory URL不带#
|
||||
strict: true,
|
||||
routes: remainingRouter as RouteRecordRaw[],
|
||||
scrollBehavior: () => ({ left: 0, top: 0 })
|
||||
|
@ -116,9 +116,6 @@ export enum DICT_TYPE {
|
||||
//告警
|
||||
OBJECT_TYPE = 'object_type',
|
||||
WARNING_TYPE = 'warning_type',
|
||||
|
||||
//黑名单来源
|
||||
BLACK_SOURCE = 'black_source',
|
||||
|
||||
// ========== SYSTEM 模块 ==========
|
||||
SYSTEM_USER_SEX = 'system_user_sex',
|
||||
@ -228,8 +225,5 @@ export enum DICT_TYPE {
|
||||
// ========== TICKET - 票务系统模块 ==========
|
||||
ASSET_STATUS_TYPE = 'asset_status_type', // 设备状态
|
||||
TRANSACTION_TYPE_NO = 'transaction_type_no', // 交易类型(订单类型)
|
||||
CERTIFICATE_TYPE = 'certificate_type', // 证件类型
|
||||
|
||||
// ========== LIFT_ROD - 远程抬杠模块 ==========
|
||||
LIFTINGROD_STATUS = 'liftingrod_status'
|
||||
CERTIFICATE_TYPE = 'certificate_type' // 证件类型
|
||||
}
|
||||
|
@ -22,17 +22,32 @@
|
||||
<div class="h-70px flex items-center justify-end lt-sm:mt-10px">
|
||||
<div class="px-8px text-right">
|
||||
<div class="mb-16px text-14px text-gray-400">{{ t('workplace.project') }}</div>
|
||||
<CountTo class="text-20px" :start-val="0" :end-val="totalSate.project" :duration="2600" />
|
||||
<CountTo
|
||||
class="text-20px"
|
||||
:start-val="0"
|
||||
:end-val="totalSate.project"
|
||||
:duration="2600"
|
||||
/>
|
||||
</div>
|
||||
<el-divider direction="vertical" />
|
||||
<div class="px-8px text-right">
|
||||
<div class="mb-16px text-14px text-gray-400">{{ t('workplace.toDo') }}</div>
|
||||
<CountTo class="text-20px" :start-val="0" :end-val="totalSate.todo" :duration="2600" />
|
||||
<CountTo
|
||||
class="text-20px"
|
||||
:start-val="0"
|
||||
:end-val="totalSate.todo"
|
||||
:duration="2600"
|
||||
/>
|
||||
</div>
|
||||
<el-divider direction="vertical" border-style="dashed" />
|
||||
<div class="px-8px text-right">
|
||||
<div class="mb-16px text-14px text-gray-400">{{ t('workplace.access') }}</div>
|
||||
<CountTo class="text-20px" :start-val="0" :end-val="totalSate.access" :duration="2600" />
|
||||
<CountTo
|
||||
class="text-20px"
|
||||
:start-val="0"
|
||||
:end-val="totalSate.access"
|
||||
:duration="2600"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
@ -40,24 +55,9 @@
|
||||
</el-skeleton>
|
||||
</el-card>
|
||||
</div>
|
||||
<!-- <el-card style="width: 100%; margin: 8px 0; text-align: center;" shadow="never"> -->
|
||||
<div class="flex flex-wrap gap-4" style="float: right;">
|
||||
<el-card
|
||||
style="width: 170px;margin: 8px 0;text-align: center;color:#409eff; cursor: pointer;" shadow="hover"
|
||||
@click="goToXXLJob">任务调度中心</el-card>
|
||||
</div>
|
||||
<!-- </el-card> -->
|
||||
<!-- 新增的静态图片部分 -->
|
||||
<div>
|
||||
<!-- <el-card style="width: 100%; text-align: center;" shadow="never"> -->
|
||||
<div style="overflow: hidden; margin: 8px 0;height: calc(100% - 2px);">
|
||||
<el-image :src="luduViewImage" fit="contain" style="width: 99%; transform: translateY(-2px);" />
|
||||
</div>
|
||||
<!-- </el-card> -->
|
||||
<div class="flex flex-wrap gap-4" style="margin: 20px 0;">
|
||||
<el-card style="width: 420px;text-align: center;cursor: pointer;" shadow="hover" @click="goToXXLJob">任务调度中心</el-card>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- <el-row class="mt-8px" :gutter="8" justify="space-between">
|
||||
<el-col :xl="16" :lg="16" :md="24" :sm="24" :xs="24" class="mb-8px">
|
||||
<el-card shadow="never">
|
||||
@ -74,328 +74,323 @@ style="width: 170px;margin: 8px 0;text-align: center;color:#409eff; cursor: poin
|
||||
</el-link>
|
||||
</div>
|
||||
</template>
|
||||
<el-skeleton :loading="loading" animated>
|
||||
<el-row>
|
||||
<el-col v-for="(item, index) in projects" :key="`card-${index}`" :xl="8" :lg="8" :md="8" :sm="24" :xs="24">
|
||||
<el-card shadow="hover" class="mr-5px mt-5px">
|
||||
<div class="flex items-center">
|
||||
<Icon :icon="item.icon" :size="25" class="mr-8px" />
|
||||
<span class="text-16px">{{ item.name }}</span>
|
||||
</div>
|
||||
<div class="mt-12px text-9px text-gray-400">{{ t(item.message) }}</div>
|
||||
<div class="mt-12px flex justify-between text-12px text-gray-400">
|
||||
<span>{{ item.personal }}</span>
|
||||
<span>{{ formatTime(item.time, 'yyyy-MM-dd') }}</span>
|
||||
</div>
|
||||
<el-skeleton :loading="loading" animated>
|
||||
<el-row>
|
||||
<el-col
|
||||
v-for="(item, index) in projects"
|
||||
:key="`card-${index}`"
|
||||
:xl="8"
|
||||
:lg="8"
|
||||
:md="8"
|
||||
:sm="24"
|
||||
:xs="24"
|
||||
>
|
||||
<el-card shadow="hover" class="mr-5px mt-5px">
|
||||
<div class="flex items-center">
|
||||
<Icon :icon="item.icon" :size="25" class="mr-8px" />
|
||||
<span class="text-16px">{{ item.name }}</span>
|
||||
</div>
|
||||
<div class="mt-12px text-9px text-gray-400">{{ t(item.message) }}</div>
|
||||
<div class="mt-12px flex justify-between text-12px text-gray-400">
|
||||
<span>{{ item.personal }}</span>
|
||||
<span>{{ formatTime(item.time, 'yyyy-MM-dd') }}</span>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-skeleton>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt-8px">
|
||||
<el-skeleton :loading="loading" animated>
|
||||
<el-row :gutter="20" justify="space-between">
|
||||
<el-col :xl="10" :lg="10" :md="24" :sm="24" :xs="24">
|
||||
<el-card shadow="hover" class="mb-8px">
|
||||
<el-skeleton :loading="loading" animated>
|
||||
<Echart :options="pieOptionsData" :height="280" />
|
||||
</el-skeleton>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :xl="14" :lg="14" :md="24" :sm="24" :xs="24">
|
||||
<el-card shadow="hover" class="mb-8px">
|
||||
<el-skeleton :loading="loading" animated>
|
||||
<Echart :options="barOptionsData" :height="280" />
|
||||
</el-skeleton>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-skeleton>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-skeleton>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt-8px">
|
||||
<el-skeleton :loading="loading" animated>
|
||||
<el-row :gutter="20" justify="space-between">
|
||||
<el-col :xl="10" :lg="10" :md="24" :sm="24" :xs="24">
|
||||
<el-card shadow="hover" class="mb-8px">
|
||||
<el-skeleton :loading="loading" animated>
|
||||
<Echart :options="pieOptionsData" :height="280" />
|
||||
</el-skeleton>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :xl="14" :lg="14" :md="24" :sm="24" :xs="24">
|
||||
<el-card shadow="hover" class="mb-8px">
|
||||
<el-skeleton :loading="loading" animated>
|
||||
<Echart :options="barOptionsData" :height="280" />
|
||||
</el-skeleton>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-skeleton>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :xl="8" :lg="8" :md="24" :sm="24" :xs="24" class="mb-8px">
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-col :xl="8" :lg="8" :md="24" :sm="24" :xs="24" class="mb-8px">
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<div class="h-3 flex justify-between">
|
||||
<span>{{ t('workplace.shortcutOperation') }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-skeleton :loading="loading" animated>
|
||||
<el-row>
|
||||
<el-col v-for="item in shortcut" :key="`team-${item.name}`" :span="8" class="mb-8px">
|
||||
<div class="flex items-center">
|
||||
<Icon :icon="item.icon" class="mr-8px" />
|
||||
<el-link type="default" :underline="false" @click="setWatermark(item.name)">
|
||||
{{ item.name }}
|
||||
</el-link>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-skeleton>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt-8px">
|
||||
<template #header>
|
||||
<el-skeleton :loading="loading" animated>
|
||||
<el-row>
|
||||
<el-col v-for="item in shortcut" :key="`team-${item.name}`" :span="8" class="mb-8px">
|
||||
<div class="flex items-center">
|
||||
<Icon :icon="item.icon" class="mr-8px" />
|
||||
<el-link type="default" :underline="false" @click="setWatermark(item.name)">
|
||||
{{ item.name }}
|
||||
</el-link>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-skeleton>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt-8px">
|
||||
<template #header>
|
||||
<div class="h-3 flex justify-between">
|
||||
<span>{{ t('workplace.notice') }}</span>
|
||||
<el-link type="primary" :underline="false">{{ t('action.more') }}</el-link>
|
||||
</div>
|
||||
</template>
|
||||
<el-skeleton :loading="loading" animated>
|
||||
<div v-for="(item, index) in notice" :key="`dynamics-${index}`">
|
||||
<div class="flex items-center">
|
||||
<el-avatar :src="avatar" :size="35" class="mr-16px">
|
||||
<img src="@/assets/imgs/avatar.gif" alt="" />
|
||||
</el-avatar>
|
||||
<div>
|
||||
<div class="text-14px">
|
||||
<Highlight :keys="item.keys.map((v) => t(v))">
|
||||
{{ item.type }} : {{ item.title }}
|
||||
</Highlight>
|
||||
</div>
|
||||
<div class="mt-16px text-12px text-gray-400">
|
||||
{{ formatTime(item.date, 'yyyy-MM-dd') }}
|
||||
<el-skeleton :loading="loading" animated>
|
||||
<div v-for="(item, index) in notice" :key="`dynamics-${index}`">
|
||||
<div class="flex items-center">
|
||||
<el-avatar :src="avatar" :size="35" class="mr-16px">
|
||||
<img src="@/assets/imgs/avatar.gif" alt="" />
|
||||
</el-avatar>
|
||||
<div>
|
||||
<div class="text-14px">
|
||||
<Highlight :keys="item.keys.map((v) => t(v))">
|
||||
{{ item.type }} : {{ item.title }}
|
||||
</Highlight>
|
||||
</div>
|
||||
<div class="mt-16px text-12px text-gray-400">
|
||||
{{ formatTime(item.date, 'yyyy-MM-dd') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider />
|
||||
</div>
|
||||
</div>
|
||||
<el-divider />
|
||||
</div>
|
||||
</el-skeleton>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
</el-skeleton>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { set } from 'lodash-es'
|
||||
import { EChartsOption } from 'echarts'
|
||||
import { formatTime } from '@/utils'
|
||||
import luduView from '@/assets/imgs/ludu_view.png'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { useWatermark } from '@/hooks/web/useWatermark'
|
||||
import type { WorkplaceTotal, Project, Notice, Shortcut } from './types'
|
||||
import { pieOptions, barOptions } from './echarts-data'
|
||||
import { set } from 'lodash-es'
|
||||
import { EChartsOption } from 'echarts'
|
||||
import { formatTime } from '@/utils'
|
||||
|
||||
defineOptions({ name: 'Home' })
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { useWatermark } from '@/hooks/web/useWatermark'
|
||||
import type { WorkplaceTotal, Project, Notice, Shortcut } from './types'
|
||||
import { pieOptions, barOptions } from './echarts-data'
|
||||
|
||||
const luduViewImage = ref(luduView);
|
||||
const { t } = useI18n()
|
||||
const userStore = useUserStore()
|
||||
const { setWatermark } = useWatermark()
|
||||
const loading = ref(true)
|
||||
const avatar = userStore.getUser.avatar
|
||||
const username = userStore.getUser.nickname
|
||||
const pieOptionsData = reactive<EChartsOption>(pieOptions) as EChartsOption
|
||||
// 获取统计数
|
||||
let totalSate = reactive<WorkplaceTotal>({
|
||||
project: 0,
|
||||
access: 0,
|
||||
todo: 0
|
||||
})
|
||||
defineOptions({ name: 'Home' })
|
||||
|
||||
const getCount = async () => {
|
||||
const data = {
|
||||
project: 40,
|
||||
access: 2340,
|
||||
todo: 10
|
||||
const { t } = useI18n()
|
||||
const userStore = useUserStore()
|
||||
const { setWatermark } = useWatermark()
|
||||
const loading = ref(true)
|
||||
const avatar = userStore.getUser.avatar
|
||||
const username = userStore.getUser.nickname
|
||||
const pieOptionsData = reactive<EChartsOption>(pieOptions) as EChartsOption
|
||||
// 获取统计数
|
||||
let totalSate = reactive<WorkplaceTotal>({
|
||||
project: 0,
|
||||
access: 0,
|
||||
todo: 0
|
||||
})
|
||||
|
||||
const getCount = async () => {
|
||||
const data = {
|
||||
project: 40,
|
||||
access: 2340,
|
||||
todo: 10
|
||||
}
|
||||
totalSate = Object.assign(totalSate, data)
|
||||
}
|
||||
|
||||
// 获取项目数
|
||||
let projects = reactive<Project[]>([])
|
||||
const getProject = async () => {
|
||||
const data = [
|
||||
{
|
||||
name: 'ruoyi-vue-pro',
|
||||
icon: 'akar-icons:github-fill',
|
||||
message: 'https://github.com/YunaiV/ruoyi-vue-pro',
|
||||
personal: 'Spring Boot 单体架构',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'yudao-ui-admin-vue3',
|
||||
icon: 'logos:vue',
|
||||
message: 'https://github.com/yudaocode/yudao-ui-admin-vue3',
|
||||
personal: 'Vue3 + element-plus',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'yudao-ui-admin-vben',
|
||||
icon: 'logos:vue',
|
||||
message: 'https://github.com/yudaocode/yudao-ui-admin-vben',
|
||||
personal: 'Vue3 + vben(antd)',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'yudao-cloud',
|
||||
icon: 'akar-icons:github',
|
||||
message: 'https://github.com/YunaiV/yudao-cloud',
|
||||
personal: 'Spring Cloud 微服务架构',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'yudao-ui-mall-uniapp',
|
||||
icon: 'logos:vue',
|
||||
message: 'https://github.com/yudaocode/yudao-ui-admin-uniapp',
|
||||
personal: 'Vue3 + uniapp',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'yudao-ui-admin-vue2',
|
||||
icon: 'logos:vue',
|
||||
message: 'https://github.com/yudaocode/yudao-ui-admin-vue2',
|
||||
personal: 'Vue2 + element-ui',
|
||||
time: new Date()
|
||||
}
|
||||
totalSate = Object.assign(totalSate, data)
|
||||
}
|
||||
]
|
||||
projects = Object.assign(projects, data)
|
||||
}
|
||||
|
||||
// 获取项目数
|
||||
let projects = reactive<Project[]>([])
|
||||
const getProject = async () => {
|
||||
const data = [
|
||||
{
|
||||
name: 'ruoyi-vue-pro',
|
||||
icon: 'akar-icons:github-fill',
|
||||
message: 'https://github.com/YunaiV/ruoyi-vue-pro',
|
||||
personal: 'Spring Boot 单体架构',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'yudao-ui-admin-vue3',
|
||||
icon: 'logos:vue',
|
||||
message: 'https://github.com/yudaocode/yudao-ui-admin-vue3',
|
||||
personal: 'Vue3 + element-plus',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'yudao-ui-admin-vben',
|
||||
icon: 'logos:vue',
|
||||
message: 'https://github.com/yudaocode/yudao-ui-admin-vben',
|
||||
personal: 'Vue3 + vben(antd)',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'yudao-cloud',
|
||||
icon: 'akar-icons:github',
|
||||
message: 'https://github.com/YunaiV/yudao-cloud',
|
||||
personal: 'Spring Cloud 微服务架构',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'yudao-ui-mall-uniapp',
|
||||
icon: 'logos:vue',
|
||||
message: 'https://github.com/yudaocode/yudao-ui-admin-uniapp',
|
||||
personal: 'Vue3 + uniapp',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'yudao-ui-admin-vue2',
|
||||
icon: 'logos:vue',
|
||||
message: 'https://github.com/yudaocode/yudao-ui-admin-vue2',
|
||||
personal: 'Vue2 + element-ui',
|
||||
time: new Date()
|
||||
}
|
||||
]
|
||||
projects = Object.assign(projects, data)
|
||||
}
|
||||
// 获取通知公告
|
||||
let notice = reactive<Notice[]>([])
|
||||
const getNotice = async () => {
|
||||
const data = [
|
||||
{
|
||||
title: '系统支持 JDK 8/17/21,Vue 2/3',
|
||||
type: '通知',
|
||||
keys: ['通知', '8', '17', '21', '2', '3'],
|
||||
date: new Date()
|
||||
},
|
||||
{
|
||||
title: '后端提供 Spring Boot 2.7/3.2 + Cloud 双架构',
|
||||
type: '公告',
|
||||
keys: ['公告', 'Boot', 'Cloud'],
|
||||
date: new Date()
|
||||
},
|
||||
{
|
||||
title: '全部开源,个人与企业可 100% 直接使用,无需授权',
|
||||
type: '通知',
|
||||
keys: ['通知', '无需授权'],
|
||||
date: new Date()
|
||||
},
|
||||
{
|
||||
title: '国内使用最广泛的快速开发平台,超 300+ 人贡献',
|
||||
type: '公告',
|
||||
keys: ['公告', '最广泛'],
|
||||
date: new Date()
|
||||
}
|
||||
]
|
||||
notice = Object.assign(notice, data)
|
||||
}
|
||||
|
||||
// 获取通知公告
|
||||
let notice = reactive<Notice[]>([])
|
||||
const getNotice = async () => {
|
||||
const data = [
|
||||
{
|
||||
title: '系统支持 JDK 8/17/21,Vue 2/3',
|
||||
type: '通知',
|
||||
keys: ['通知', '8', '17', '21', '2', '3'],
|
||||
date: new Date()
|
||||
},
|
||||
{
|
||||
title: '后端提供 Spring Boot 2.7/3.2 + Cloud 双架构',
|
||||
type: '公告',
|
||||
keys: ['公告', 'Boot', 'Cloud'],
|
||||
date: new Date()
|
||||
},
|
||||
{
|
||||
title: '全部开源,个人与企业可 100% 直接使用,无需授权',
|
||||
type: '通知',
|
||||
keys: ['通知', '无需授权'],
|
||||
date: new Date()
|
||||
},
|
||||
{
|
||||
title: '国内使用最广泛的快速开发平台,超 300+ 人贡献',
|
||||
type: '公告',
|
||||
keys: ['公告', '最广泛'],
|
||||
date: new Date()
|
||||
}
|
||||
]
|
||||
notice = Object.assign(notice, data)
|
||||
}
|
||||
// 获取快捷入口
|
||||
let shortcut = reactive<Shortcut[]>([])
|
||||
|
||||
// 获取快捷入口
|
||||
let shortcut = reactive<Shortcut[]>([])
|
||||
const getShortcut = async () => {
|
||||
const data = [
|
||||
{
|
||||
name: 'Github',
|
||||
icon: 'akar-icons:github-fill',
|
||||
url: 'github.io'
|
||||
},
|
||||
{
|
||||
name: 'Vue',
|
||||
icon: 'logos:vue',
|
||||
url: 'vuejs.org'
|
||||
},
|
||||
{
|
||||
name: 'Vite',
|
||||
icon: 'vscode-icons:file-type-vite',
|
||||
url: 'https://vitejs.dev/'
|
||||
},
|
||||
{
|
||||
name: 'Angular',
|
||||
icon: 'logos:angular-icon',
|
||||
url: 'github.io'
|
||||
},
|
||||
{
|
||||
name: 'React',
|
||||
icon: 'logos:react',
|
||||
url: 'github.io'
|
||||
},
|
||||
{
|
||||
name: 'Webpack',
|
||||
icon: 'logos:webpack',
|
||||
url: 'github.io'
|
||||
}
|
||||
]
|
||||
shortcut = Object.assign(shortcut, data)
|
||||
}
|
||||
|
||||
const getShortcut = async () => {
|
||||
const data = [
|
||||
{
|
||||
name: 'Github',
|
||||
icon: 'akar-icons:github-fill',
|
||||
url: 'github.io'
|
||||
},
|
||||
{
|
||||
name: 'Vue',
|
||||
icon: 'logos:vue',
|
||||
url: 'vuejs.org'
|
||||
},
|
||||
{
|
||||
name: 'Vite',
|
||||
icon: 'vscode-icons:file-type-vite',
|
||||
url: 'https://vitejs.dev/'
|
||||
},
|
||||
{
|
||||
name: 'Angular',
|
||||
icon: 'logos:angular-icon',
|
||||
url: 'github.io'
|
||||
},
|
||||
{
|
||||
name: 'React',
|
||||
icon: 'logos:react',
|
||||
url: 'github.io'
|
||||
},
|
||||
{
|
||||
name: 'Webpack',
|
||||
icon: 'logos:webpack',
|
||||
url: 'github.io'
|
||||
}
|
||||
]
|
||||
shortcut = Object.assign(shortcut, data)
|
||||
}
|
||||
// 用户来源
|
||||
const getUserAccessSource = async () => {
|
||||
const data = [
|
||||
{ value: 335, name: 'analysis.directAccess' },
|
||||
{ value: 310, name: 'analysis.mailMarketing' },
|
||||
{ value: 234, name: 'analysis.allianceAdvertising' },
|
||||
{ value: 135, name: 'analysis.videoAdvertising' },
|
||||
{ value: 1548, name: 'analysis.searchEngines' }
|
||||
]
|
||||
set(
|
||||
pieOptionsData,
|
||||
'legend.data',
|
||||
data.map((v) => t(v.name))
|
||||
)
|
||||
pieOptionsData!.series![0].data = data.map((v) => {
|
||||
return {
|
||||
name: t(v.name),
|
||||
value: v.value
|
||||
}
|
||||
})
|
||||
}
|
||||
const barOptionsData = reactive<EChartsOption>(barOptions) as EChartsOption
|
||||
|
||||
// 用户来源
|
||||
const getUserAccessSource = async () => {
|
||||
const data = [
|
||||
{ value: 335, name: 'analysis.directAccess' },
|
||||
{ value: 310, name: 'analysis.mailMarketing' },
|
||||
{ value: 234, name: 'analysis.allianceAdvertising' },
|
||||
{ value: 135, name: 'analysis.videoAdvertising' },
|
||||
{ value: 1548, name: 'analysis.searchEngines' }
|
||||
]
|
||||
set(
|
||||
pieOptionsData,
|
||||
'legend.data',
|
||||
data.map((v) => t(v.name))
|
||||
)
|
||||
pieOptionsData!.series![0].data = data.map((v) => {
|
||||
return {
|
||||
name: t(v.name),
|
||||
value: v.value
|
||||
}
|
||||
})
|
||||
}
|
||||
const barOptionsData = reactive<EChartsOption>(barOptions) as EChartsOption
|
||||
// 周活跃量
|
||||
const getWeeklyUserActivity = async () => {
|
||||
const data = [
|
||||
{ value: 13253, name: 'analysis.monday' },
|
||||
{ value: 34235, name: 'analysis.tuesday' },
|
||||
{ value: 26321, name: 'analysis.wednesday' },
|
||||
{ value: 12340, name: 'analysis.thursday' },
|
||||
{ value: 24643, name: 'analysis.friday' },
|
||||
{ value: 1322, name: 'analysis.saturday' },
|
||||
{ value: 1324, name: 'analysis.sunday' }
|
||||
]
|
||||
set(
|
||||
barOptionsData,
|
||||
'xAxis.data',
|
||||
data.map((v) => t(v.name))
|
||||
)
|
||||
set(barOptionsData, 'series', [
|
||||
{
|
||||
name: t('analysis.activeQuantity'),
|
||||
data: data.map((v) => v.value),
|
||||
type: 'bar'
|
||||
}
|
||||
])
|
||||
}
|
||||
|
||||
// 周活跃量
|
||||
const getWeeklyUserActivity = async () => {
|
||||
const data = [
|
||||
{ value: 13253, name: 'analysis.monday' },
|
||||
{ value: 34235, name: 'analysis.tuesday' },
|
||||
{ value: 26321, name: 'analysis.wednesday' },
|
||||
{ value: 12340, name: 'analysis.thursday' },
|
||||
{ value: 24643, name: 'analysis.friday' },
|
||||
{ value: 1322, name: 'analysis.saturday' },
|
||||
{ value: 1324, name: 'analysis.sunday' }
|
||||
]
|
||||
set(
|
||||
barOptionsData,
|
||||
'xAxis.data',
|
||||
data.map((v) => t(v.name))
|
||||
)
|
||||
set(barOptionsData, 'series', [
|
||||
{
|
||||
name: t('analysis.activeQuantity'),
|
||||
data: data.map((v) => v.value),
|
||||
type: 'bar'
|
||||
}
|
||||
])
|
||||
}
|
||||
const getAllApi = async () => {
|
||||
await Promise.all([
|
||||
getCount(),
|
||||
getProject(),
|
||||
getNotice(),
|
||||
getShortcut(),
|
||||
getUserAccessSource(),
|
||||
getWeeklyUserActivity()
|
||||
])
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
const getAllApi = async () => {
|
||||
await Promise.all([
|
||||
getCount(),
|
||||
getProject(),
|
||||
getNotice(),
|
||||
getShortcut(),
|
||||
getUserAccessSource(),
|
||||
getWeeklyUserActivity()
|
||||
])
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
const goToXXLJob = async () => {
|
||||
window.open('http://121.36.203.133/xxl-job-admin/');
|
||||
}
|
||||
getAllApi()
|
||||
const goToXXLJob = async () => {
|
||||
window.open('http://127.0.0.1:9090/xxl-job-admin/');
|
||||
}
|
||||
getAllApi()
|
||||
</script>
|
||||
<style scoped>
|
||||
.image-container {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.el-image img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
@ -1,262 +0,0 @@
|
||||
<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="orderId">
|
||||
<el-input v-model="formData.orderId" placeholder="请输入入场记录编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="停车场编号" prop="parkNumber">
|
||||
<el-input v-model="formData.parkNumber" placeholder="请输入停车场编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作员 Id" prop="operatorId">
|
||||
<el-input v-model="formData.operatorId" placeholder="请输入操作员 Id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作员姓名" prop="operatorName">
|
||||
<el-input v-model="formData.operatorName" placeholder="请输入操作员姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发票号码" prop="invoiceNo">
|
||||
<el-input v-model="formData.invoiceNo" placeholder="请输入发票号码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌" prop="plate">
|
||||
<el-input v-model="formData.plate" 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="inTime">
|
||||
<el-date-picker
|
||||
v-model="formData.inTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择入场时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出场时间" prop="outTime">
|
||||
<el-date-picker
|
||||
v-model="formData.outTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择出场时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入场图片名" prop="inImage">
|
||||
<UploadImg v-model="formData.inImage" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出场图片名" prop="outImage">
|
||||
<UploadImg v-model="formData.outImage" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入口通道名称" prop="inChannel">
|
||||
<el-input v-model="formData.inChannel" placeholder="请输入入口通道名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出口通道名称" prop="outChannel">
|
||||
<el-input v-model="formData.outChannel" placeholder="请输入出口通道名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="抬杆模式" prop="openGateMode">
|
||||
<el-input v-model="formData.openGateMode" placeholder="请输入抬杆模式" />
|
||||
</el-form-item>
|
||||
<el-form-item label="匹配模式" prop="matchMode">
|
||||
<el-input v-model="formData.matchMode" placeholder="请输入匹配模式" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总停车费" prop="charge">
|
||||
<el-input v-model="formData.charge" placeholder="请输入总停车费" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线上总收费" prop="onLineCharge">
|
||||
<el-input v-model="formData.onLineCharge" placeholder="请输入线上总收费" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线下总收费" prop="offLineCharge">
|
||||
<el-input v-model="formData.offLineCharge" placeholder="请输入线下总收费" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线上线下金额和时间优惠累计抵扣值" prop="profitChargeTotal">
|
||||
<el-input v-model="formData.profitChargeTotal" placeholder="请输入线上线下金额和时间优惠累计抵扣值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线上累计优惠金额总面值" prop="onLineProfitChargeNum">
|
||||
<el-input v-model="formData.onLineProfitChargeNum" placeholder="请输入线上累计优惠金额总面值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线上累计优惠金额总抵扣值" prop="onLineProfitChargeValue">
|
||||
<el-input v-model="formData.onLineProfitChargeValue" placeholder="请输入线上累计优惠金额总抵扣值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线下累计优惠金额总面值" prop="offLineProfitChargeNum">
|
||||
<el-input v-model="formData.offLineProfitChargeNum" placeholder="请输入线下累计优惠金额总面值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线下累计优惠金额总抵扣值" prop="offLineProfitChargeValue">
|
||||
<el-input v-model="formData.offLineProfitChargeValue" placeholder="请输入线下累计优惠金额总抵扣值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线上累计优惠时间" prop="onLineProfitTimeNum">
|
||||
<el-input v-model="formData.onLineProfitTimeNum" placeholder="请输入线上累计优惠时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线上累计优惠时间总抵扣值" prop="onLineProfitTimeValue">
|
||||
<el-input v-model="formData.onLineProfitTimeValue" placeholder="请输入线上累计优惠时间总抵扣值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线下累计优惠时间" prop="offLineProfitTimeNum">
|
||||
<el-input v-model="formData.offLineProfitTimeNum" placeholder="请输入线下累计优惠时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线下累计优惠时间总抵扣值" prop="offLineProfitTimeValue">
|
||||
<el-input v-model="formData.offLineProfitTimeValue" placeholder="请输入线下累计优惠时间总抵扣值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="时间" prop="costTime">
|
||||
<el-date-picker
|
||||
v-model="formData.costTime"
|
||||
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 { AppearanceRecordApi, AppearanceRecordVO } from '@/api/parking/appearancerecord'
|
||||
|
||||
/** 出场记录 表单 */
|
||||
defineOptions({ name: 'AppearanceRecordForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
orderId: undefined,
|
||||
parkNumber: undefined,
|
||||
operatorId: undefined,
|
||||
operatorName: undefined,
|
||||
invoiceNo: undefined,
|
||||
plate: undefined,
|
||||
idCard: undefined,
|
||||
inTime: undefined,
|
||||
outTime: undefined,
|
||||
inImage: undefined,
|
||||
outImage: undefined,
|
||||
inChannel: undefined,
|
||||
outChannel: undefined,
|
||||
openGateMode: undefined,
|
||||
matchMode: undefined,
|
||||
charge: undefined,
|
||||
onLineCharge: undefined,
|
||||
offLineCharge: undefined,
|
||||
profitChargeTotal: undefined,
|
||||
onLineProfitChargeNum: undefined,
|
||||
onLineProfitChargeValue: undefined,
|
||||
offLineProfitChargeNum: undefined,
|
||||
offLineProfitChargeValue: undefined,
|
||||
onLineProfitTimeNum: undefined,
|
||||
onLineProfitTimeValue: undefined,
|
||||
offLineProfitTimeNum: undefined,
|
||||
offLineProfitTimeValue: undefined,
|
||||
costTime: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
orderId: [{ required: true, message: '入场记录编号不能为空', trigger: 'blur' }],
|
||||
parkNumber: [{ required: true, message: '停车场编号不能为空', trigger: 'blur' }],
|
||||
plate: [{ required: true, message: '车牌不能为空', trigger: 'blur' }],
|
||||
outTime: [{ required: true, message: '出场时间不能为空', trigger: 'blur' }],
|
||||
outImage: [{ required: true, message: '出场图片名不能为空', trigger: 'blur' }],
|
||||
outChannel: [{ required: true, message: '出口通道名称不能为空', trigger: 'blur' }],
|
||||
openGateMode: [{ required: true, message: '抬杆模式不能为空', trigger: 'blur' }],
|
||||
matchMode: [{ required: true, message: '匹配模式不能为空', trigger: 'blur' }],
|
||||
charge: [{ required: true, message: '总停车费不能为空', trigger: 'blur' }],
|
||||
onLineCharge: [{ required: true, message: '线上总收费不能为空', trigger: 'blur' }],
|
||||
offLineCharge: [{ required: true, message: '线下总收费不能为空', trigger: 'blur' }],
|
||||
profitChargeTotal: [{ required: true, message: '线上线下金额和时间优惠累计抵扣值不能为空', trigger: 'blur' }],
|
||||
onLineProfitChargeNum: [{ required: true, message: '线上累计优惠金额总面值不能为空', trigger: 'blur' }],
|
||||
onLineProfitChargeValue: [{ required: true, message: '线上累计优惠金额总抵扣值不能为空', trigger: 'blur' }],
|
||||
offLineProfitChargeNum: [{ required: true, message: '线下累计优惠金额总面值不能为空', trigger: 'blur' }],
|
||||
offLineProfitChargeValue: [{ required: true, message: '线下累计优惠金额总抵扣值不能为空', trigger: 'blur' }],
|
||||
onLineProfitTimeNum: [{ required: true, message: '线上累计优惠时间不能为空', trigger: 'blur' }],
|
||||
onLineProfitTimeValue: [{ required: true, message: '线上累计优惠时间总抵扣值不能为空', trigger: 'blur' }],
|
||||
offLineProfitTimeNum: [{ required: true, message: '线下累计优惠时间不能为空', trigger: 'blur' }],
|
||||
offLineProfitTimeValue: [{ required: true, message: '线下累计优惠时间总抵扣值不能为空', trigger: 'blur' }],
|
||||
costTime: [{ 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 AppearanceRecordApi.getAppearanceRecord(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 AppearanceRecordVO
|
||||
if (formType.value === 'create') {
|
||||
await AppearanceRecordApi.createAppearanceRecord(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await AppearanceRecordApi.updateAppearanceRecord(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
orderId: undefined,
|
||||
parkNumber: undefined,
|
||||
operatorId: undefined,
|
||||
operatorName: undefined,
|
||||
invoiceNo: undefined,
|
||||
plate: undefined,
|
||||
idCard: undefined,
|
||||
inTime: undefined,
|
||||
outTime: undefined,
|
||||
inImage: undefined,
|
||||
outImage: undefined,
|
||||
inChannel: undefined,
|
||||
outChannel: undefined,
|
||||
openGateMode: undefined,
|
||||
matchMode: undefined,
|
||||
charge: undefined,
|
||||
onLineCharge: undefined,
|
||||
offLineCharge: undefined,
|
||||
profitChargeTotal: undefined,
|
||||
onLineProfitChargeNum: undefined,
|
||||
onLineProfitChargeValue: undefined,
|
||||
offLineProfitChargeNum: undefined,
|
||||
offLineProfitChargeValue: undefined,
|
||||
onLineProfitTimeNum: undefined,
|
||||
onLineProfitTimeValue: undefined,
|
||||
offLineProfitTimeNum: undefined,
|
||||
offLineProfitTimeValue: undefined,
|
||||
costTime: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
@ -1,472 +0,0 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="入场记录编号" prop="orderId">
|
||||
<el-input
|
||||
v-model="queryParams.orderId"
|
||||
placeholder="请输入入场记录编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="停车场编号" prop="parkNumber">
|
||||
<el-input
|
||||
v-model="queryParams.parkNumber"
|
||||
placeholder="请输入停车场编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="操作员 Id" prop="operatorId">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.operatorId"-->
|
||||
<!-- placeholder="请输入操作员 Id"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter="handleQuery"-->
|
||||
<!-- class="!w-240px"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="操作员姓名" prop="operatorName">
|
||||
<el-input
|
||||
v-model="queryParams.operatorName"
|
||||
placeholder="请输入操作员姓名"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发票号码" prop="invoiceNo">
|
||||
<el-input
|
||||
v-model="queryParams.invoiceNo"
|
||||
placeholder="请输入发票号码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌" prop="plate">
|
||||
<el-input
|
||||
v-model="queryParams.plate"
|
||||
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="inTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.inTime"
|
||||
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="outTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.outTime"
|
||||
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="inChannel">
|
||||
<el-input
|
||||
v-model="queryParams.inChannel"
|
||||
placeholder="请输入入口通道名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出口通道名称" prop="outChannel">
|
||||
<el-input
|
||||
v-model="queryParams.outChannel"
|
||||
placeholder="请输入出口通道名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="抬杆模式" prop="openGateMode">
|
||||
<el-input
|
||||
v-model="queryParams.openGateMode"
|
||||
placeholder="请输入抬杆模式"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="匹配模式" prop="matchMode">
|
||||
<el-input
|
||||
v-model="queryParams.matchMode"
|
||||
placeholder="请输入匹配模式"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="总停车费" prop="charge">
|
||||
<el-input
|
||||
v-model="queryParams.charge"
|
||||
placeholder="请输入总停车费"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线上总收费" prop="onLineCharge">
|
||||
<el-input
|
||||
v-model="queryParams.onLineCharge"
|
||||
placeholder="请输入线上总收费"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线下总收费" prop="offLineCharge">
|
||||
<el-input
|
||||
v-model="queryParams.offLineCharge"
|
||||
placeholder="请输入线下总收费"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线上线下金额和时间优惠累计抵扣值" prop="profitChargeTotal">
|
||||
<el-input
|
||||
v-model="queryParams.profitChargeTotal"
|
||||
placeholder="请输入线上线下金额和时间优惠累计抵扣值"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线上累计优惠金额总面值" prop="onLineProfitChargeNum">
|
||||
<el-input
|
||||
v-model="queryParams.onLineProfitChargeNum"
|
||||
placeholder="请输入线上累计优惠金额总面值"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线上累计优惠金额总抵扣值" prop="onLineProfitChargeValue">
|
||||
<el-input
|
||||
v-model="queryParams.onLineProfitChargeValue"
|
||||
placeholder="请输入线上累计优惠金额总抵扣值"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线下累计优惠金额总面值" prop="offLineProfitChargeNum">
|
||||
<el-input
|
||||
v-model="queryParams.offLineProfitChargeNum"
|
||||
placeholder="请输入线下累计优惠金额总面值"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线下累计优惠金额总抵扣值" prop="offLineProfitChargeValue">
|
||||
<el-input
|
||||
v-model="queryParams.offLineProfitChargeValue"
|
||||
placeholder="请输入线下累计优惠金额总抵扣值"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线上累计优惠时间" prop="onLineProfitTimeNum">
|
||||
<el-input
|
||||
v-model="queryParams.onLineProfitTimeNum"
|
||||
placeholder="请输入线上累计优惠时间"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线上累计优惠时间总抵扣值" prop="onLineProfitTimeValue">
|
||||
<el-input
|
||||
v-model="queryParams.onLineProfitTimeValue"
|
||||
placeholder="请输入线上累计优惠时间总抵扣值"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线下累计优惠时间" prop="offLineProfitTimeNum">
|
||||
<el-input
|
||||
v-model="queryParams.offLineProfitTimeNum"
|
||||
placeholder="请输入线下累计优惠时间"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线下累计优惠时间总抵扣值" prop="offLineProfitTimeValue">
|
||||
<el-input
|
||||
v-model="queryParams.offLineProfitTimeValue"
|
||||
placeholder="请输入线下累计优惠时间总抵扣值"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="时间" prop="costTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.costTime"
|
||||
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="['parking:appearance-record:create']"-->
|
||||
<!-- >-->
|
||||
<!-- <Icon icon="ep:plus" class="mr-5px" /> 新增-->
|
||||
<!-- </el-button>-->
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['parking:appearance-record: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="orderId" width='110px' />
|
||||
<el-table-column label="停车场编号" align="center" prop="parkNumber" width='110px'/>
|
||||
<el-table-column label="操作员 Id" align="center" prop="operatorId" width='110px' />
|
||||
<el-table-column label="操作员姓名" align="center" prop="operatorName" width='110px' />
|
||||
<el-table-column label="发票号码" align="center" prop="invoiceNo" />
|
||||
<el-table-column label="车牌" align="center" prop="plate" />
|
||||
<el-table-column label="证件号码" align="center" prop="idCard" />
|
||||
<el-table-column label="入场时间" align="center" prop="inTime" />
|
||||
<el-table-column label="出场时间" align="center" prop="outTime" />
|
||||
<el-table-column label="入场图片名" align="center" prop="inImage" width='110px'/>
|
||||
<el-table-column label="出场图片名" align="center" prop="outImage" width='110px'/>
|
||||
<el-table-column label="入口通道名称" align="center" prop="inChannel" width='110px'/>
|
||||
<el-table-column label="出口通道名称" align="center" prop="outChannel" width='110px'/>
|
||||
<el-table-column label="抬杆模式" align="center" prop="openGateMode" />
|
||||
<el-table-column label="匹配模式" align="center" prop="matchMode" />
|
||||
<el-table-column label="总停车费" align="center" prop="charge" />
|
||||
<el-table-column label="线上总收费" align="center" prop="onLineCharge" width='110px'/>
|
||||
<el-table-column label="线下总收费" align="center" prop="offLineCharge" width='110px'/>
|
||||
<!-- <el-table-column label="线上线下金额和时间优惠累计抵扣值" align="center" prop="profitChargeTotal" />
|
||||
<el-table-column label="线上累计优惠金额总面值" align="center" prop="onLineProfitChargeNum" />
|
||||
<el-table-column label="线上累计优惠金额总抵扣值" align="center" prop="onLineProfitChargeValue" />
|
||||
<el-table-column label="线下累计优惠金额总面值" align="center" prop="offLineProfitChargeNum" />
|
||||
<el-table-column label="线下累计优惠金额总抵扣值" align="center" prop="offLineProfitChargeValue" />
|
||||
<el-table-column label="线上累计优惠时间" align="center" prop="onLineProfitTimeNum" />
|
||||
<el-table-column label="线上累计优惠时间总抵扣值" align="center" prop="onLineProfitTimeValue" />
|
||||
<el-table-column label="线下累计优惠时间" align="center" prop="offLineProfitTimeNum" />
|
||||
<el-table-column label="线下累计优惠时间总抵扣值" align="center" prop="offLineProfitTimeValue" /> -->
|
||||
<el-table-column label="时间" align="center" prop="costTime" />
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="110">
|
||||
<template #default="scope">
|
||||
<!-- <el-button-->
|
||||
<!-- link-->
|
||||
<!-- type="primary"-->
|
||||
<!-- @click="openForm('update', scope.row.id)"-->
|
||||
<!-- v-hasPermi="['parking:appearance-record:update']"-->
|
||||
<!-- >-->
|
||||
<!-- 编辑-->
|
||||
<!-- </el-button>-->
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['parking:appearance-record: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>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<AppearanceRecordForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { AppearanceRecordApi, AppearanceRecordVO } from '@/api/parking/appearancerecord'
|
||||
import AppearanceRecordForm from './AppearanceRecordForm.vue'
|
||||
|
||||
/** 出场记录 列表 */
|
||||
defineOptions({ name: 'AppearanceRecord' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<AppearanceRecordVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
orderId: undefined,
|
||||
parkNumber: undefined,
|
||||
operatorId: undefined,
|
||||
operatorName: undefined,
|
||||
invoiceNo: undefined,
|
||||
plate: undefined,
|
||||
idCard: undefined,
|
||||
inTime: [],
|
||||
outTime: [],
|
||||
inImage: undefined,
|
||||
outImage: undefined,
|
||||
inChannel: undefined,
|
||||
outChannel: undefined,
|
||||
openGateMode: undefined,
|
||||
matchMode: undefined,
|
||||
charge: undefined,
|
||||
onLineCharge: undefined,
|
||||
offLineCharge: undefined,
|
||||
profitChargeTotal: undefined,
|
||||
onLineProfitChargeNum: undefined,
|
||||
onLineProfitChargeValue: undefined,
|
||||
offLineProfitChargeNum: undefined,
|
||||
offLineProfitChargeValue: undefined,
|
||||
onLineProfitTimeNum: undefined,
|
||||
onLineProfitTimeValue: undefined,
|
||||
offLineProfitTimeNum: undefined,
|
||||
offLineProfitTimeValue: undefined,
|
||||
costTime: [],
|
||||
createTime: [],
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await AppearanceRecordApi.getAppearanceRecordPage(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 AppearanceRecordApi.deleteAppearanceRecord(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await AppearanceRecordApi.exportAppearanceRecord(queryParams)
|
||||
download.excel(data, '出场记录.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
@ -1,118 +0,0 @@
|
||||
<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="parkNumber">
|
||||
<el-input v-model="formData.parkNumber" placeholder="请输入场库编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="来源" prop="source">
|
||||
<el-select v-model="formData.source" placeholder="请选择来源">
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.BLACK_SOURCE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="plate">
|
||||
<el-input v-model="formData.plate" placeholder="请输入车牌号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="memo">
|
||||
<el-input v-model="formData.memo" 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 { getStrDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { BlackApi, BlackVO } from '@/api/parking/black'
|
||||
|
||||
/** 黑名单 表单 */
|
||||
defineOptions({ name: 'BlackForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
parkNumber: undefined,
|
||||
source: undefined,
|
||||
plate: undefined,
|
||||
memo: undefined,
|
||||
})
|
||||
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 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 BlackApi.getBlack(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 BlackVO
|
||||
if (formType.value === 'create') {
|
||||
await BlackApi.createBlack(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await BlackApi.updateBlack(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
parkNumber: undefined,
|
||||
source: undefined,
|
||||
plate: undefined,
|
||||
memo: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
@ -1,231 +0,0 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="场库编号" prop="parkNumber">
|
||||
<el-input
|
||||
v-model="queryParams.parkNumber"
|
||||
placeholder="请输入场库编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="来源" prop="source">
|
||||
<el-select
|
||||
v-model="queryParams.source"
|
||||
placeholder="请选择来源"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.BLACK_SOURCE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="plate">
|
||||
<el-input
|
||||
v-model="queryParams.plate"
|
||||
placeholder="请输入车牌号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="备注" prop="memo">
|
||||
<el-input
|
||||
v-model="queryParams.memo"
|
||||
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="['parking:black:create']"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['parking:black: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="parkNumber" />
|
||||
<el-table-column label="来源" align="center" prop="source">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.BLACK_SOURCE" :value="scope.row.source" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="车牌号" align="center" prop="plate" />
|
||||
<el-table-column label="备注" align="center" prop="memo" />
|
||||
<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="['parking:black:update']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['parking:black: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>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<BlackForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getStrDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { BlackApi, BlackVO } from '@/api/parking/black'
|
||||
import BlackForm from './BlackForm.vue'
|
||||
|
||||
/** 黑名单 列表 */
|
||||
defineOptions({ name: 'Black' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<BlackVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
parkNumber: undefined,
|
||||
source: undefined,
|
||||
plate: undefined,
|
||||
memo: undefined,
|
||||
createTime: [],
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await BlackApi.getBlackPage(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 BlackApi.deleteBlack(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await BlackApi.exportBlack(queryParams)
|
||||
download.excel(data, '黑名单.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
@ -1,189 +0,0 @@
|
||||
<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="parkNumber">
|
||||
<el-input v-model="formData.parkNumber" placeholder="请输入场库编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预约车牌号" prop="plate">
|
||||
<el-input v-model="formData.plate" placeholder="请输入预约车牌号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预约开始时间" prop="start">
|
||||
<el-input v-model="formData.start" placeholder="请输入预约开始时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预约结束时间" prop="end">
|
||||
<el-input v-model="formData.end" placeholder="请输入预约结束时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区域号" prop="areaId">
|
||||
<el-input v-model="formData.areaId" placeholder="请输入区域号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作" prop="flag">
|
||||
<el-input v-model="formData.flag" placeholder="请输入操作" />
|
||||
</el-form-item>
|
||||
<el-form-item label="金额" prop="charge">
|
||||
<el-input v-model="formData.charge" placeholder="请输入金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预约订单号" prop="bookOrderId">
|
||||
<el-input v-model="formData.bookOrderId" placeholder="请输入预约订单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入场时间" prop="inTime">
|
||||
<el-date-picker
|
||||
v-model="formData.inTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择入场时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="下发场库时间" prop="downTime">
|
||||
<el-date-picker
|
||||
v-model="formData.downTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择下发场库时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单下单时间" prop="bookOrderTime">
|
||||
<el-date-picker
|
||||
v-model="formData.bookOrderTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择订单下单时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="准入开始时间" prop="letInStartTime">
|
||||
<el-date-picker
|
||||
v-model="formData.letInStartTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择准入开始时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="准入结束时间" prop="letInEndTime">
|
||||
<el-date-picker
|
||||
v-model="formData.letInEndTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择准入结束时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="memo">
|
||||
<el-input v-model="formData.memo" 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 { BookCarApi, BookCarVO } from '@/api/parking/bookcar'
|
||||
|
||||
/** 预约车 表单 */
|
||||
defineOptions({ name: 'BookCarForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
parkNumber: undefined,
|
||||
plate: undefined,
|
||||
start: undefined,
|
||||
end: undefined,
|
||||
areaId: undefined,
|
||||
flag: undefined,
|
||||
charge: undefined,
|
||||
bookOrderId: undefined,
|
||||
inTime: undefined,
|
||||
downTime: undefined,
|
||||
bookOrderTime: undefined,
|
||||
letInStartTime: undefined,
|
||||
letInEndTime: undefined,
|
||||
memo: undefined
|
||||
})
|
||||
const formRules = reactive({
|
||||
parkNumber: [{ required: true, message: '场库编号不能为空', trigger: 'blur' }],
|
||||
plate: [{ required: true, message: '预约车牌号不能为空', trigger: 'blur' }],
|
||||
start: [{ required: true, message: '预约开始时间不能为空', trigger: 'blur' }],
|
||||
end: [{ required: true, message: '预约结束时间不能为空', trigger: 'blur' }],
|
||||
bookOrderId: [{ required: true, message: '预约订单号不能为空', trigger: 'blur' }],
|
||||
bookOrderTime: [{ required: true, message: '订单下单时间不能为空', trigger: 'blur' }],
|
||||
letInStartTime: [{ required: true, message: '准入开始时间不能为空', trigger: 'blur' }],
|
||||
letInEndTime: [{ 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 BookCarApi.getBookCar(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 BookCarVO
|
||||
if (formType.value === 'create') {
|
||||
await BookCarApi.createBookCar(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await BookCarApi.updateBookCar(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
parkNumber: undefined,
|
||||
plate: undefined,
|
||||
start: undefined,
|
||||
end: undefined,
|
||||
areaId: undefined,
|
||||
flag: undefined,
|
||||
charge: undefined,
|
||||
bookOrderId: undefined,
|
||||
inTime: undefined,
|
||||
downTime: undefined,
|
||||
bookOrderTime: undefined,
|
||||
letInStartTime: undefined,
|
||||
letInEndTime: undefined,
|
||||
memo: undefined
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
@ -1,340 +0,0 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="auto"
|
||||
>
|
||||
<el-form-item label="场库编号" prop="parkNumber">
|
||||
<el-input
|
||||
v-model="queryParams.parkNumber"
|
||||
placeholder="请输入场库编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预约车牌号" prop="plate">
|
||||
<el-input
|
||||
v-model="queryParams.plate"
|
||||
placeholder="请输入预约车牌号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="预约开始时间" prop="start">
|
||||
<el-input
|
||||
v-model="queryParams.start"
|
||||
placeholder="请输入预约开始时间"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预约结束时间" prop="end">
|
||||
<el-input
|
||||
v-model="queryParams.end"
|
||||
placeholder="请输入预约结束时间"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="区域号" prop="areaId">
|
||||
<el-input
|
||||
v-model="queryParams.areaId"
|
||||
placeholder="请输入区域号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="操作" prop="flag">
|
||||
<el-input
|
||||
v-model="queryParams.flag"
|
||||
placeholder="请输入操作"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="金额" prop="charge">
|
||||
<el-input
|
||||
v-model="queryParams.charge"
|
||||
placeholder="请输入金额"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="预约订单号" prop="bookOrderId">
|
||||
<el-input
|
||||
v-model="queryParams.bookOrderId"
|
||||
placeholder="请输入预约订单号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="入场时间" prop="inTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.inTime"
|
||||
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="downTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.downTime"
|
||||
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="bookOrderTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.bookOrderTime"
|
||||
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="letInStartTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.letInStartTime"
|
||||
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="letInEndTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.letInEndTime"
|
||||
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="memo">
|
||||
<el-input
|
||||
v-model="queryParams.memo"
|
||||
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="['parking:book-car:create']"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['parking:book-car: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="parkNumber" />
|
||||
<el-table-column label="预约车牌号" align="center" prop="plate" />
|
||||
<el-table-column label="预约开始时间" align="center" prop="start" />
|
||||
<el-table-column label="预约结束时间" align="center" prop="end" />
|
||||
<el-table-column label="区域号" align="center" prop="areaId" />
|
||||
<el-table-column label="操作" align="center" prop="flag" />
|
||||
<el-table-column label="金额" align="center" prop="charge" />
|
||||
<el-table-column label="预约订单号" align="center" prop="bookOrderId" />
|
||||
<el-table-column label="入场时间" align="center" prop="inTime" />
|
||||
<el-table-column label="下发场库时间" align="center" prop="downTime" />
|
||||
<el-table-column label="订单下单时间" align="center" prop="bookOrderTime" />
|
||||
<el-table-column label="准入开始时间" align="center" prop="letInStartTime" />
|
||||
<el-table-column label="准入结束时间" align="center" prop="letInEndTime" />
|
||||
<el-table-column label="备注" align="center" prop="memo" />
|
||||
<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="['parking:book-car:update']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['parking:book-car: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>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<BookCarForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { BookCarApi, BookCarVO } from '@/api/parking/bookcar'
|
||||
import BookCarForm from './BookCarForm.vue'
|
||||
|
||||
/** 预约车 列表 */
|
||||
defineOptions({ name: 'BookCar' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<BookCarVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
parkNumber: undefined,
|
||||
plate: undefined,
|
||||
start: undefined,
|
||||
end: undefined,
|
||||
areaId: undefined,
|
||||
flag: undefined,
|
||||
charge: undefined,
|
||||
bookOrderId: undefined,
|
||||
inTime: [],
|
||||
downTime: [],
|
||||
bookOrderTime: [],
|
||||
letInStartTime: [],
|
||||
letInEndTime: [],
|
||||
memo: undefined,
|
||||
createTime: []
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await BookCarApi.getBookCarPage(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 BookCarApi.deleteBookCar(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await BookCarApi.exportBookCar(queryParams)
|
||||
download.excel(data, '预约车.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
@ -1,168 +0,0 @@
|
||||
<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="orderId">
|
||||
<el-input v-model="formData.orderId" placeholder="请输入入场记录编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="场库编号" prop="parkNumber">
|
||||
<el-input v-model="formData.parkNumber" placeholder="请输入场库编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌" prop="plate">
|
||||
<el-input v-model="formData.plate" 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="inTime">
|
||||
<el-date-picker
|
||||
v-model="formData.inTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择入场时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入场通道名称" prop="inChannel">
|
||||
<el-input v-model="formData.inChannel" placeholder="请输入入场通道名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入场图片名" prop="inImage">
|
||||
<UploadImg v-model="formData.inImage" />
|
||||
</el-form-item>
|
||||
<el-form-item label="访问事由" prop="visitReason">
|
||||
<el-input v-model="formData.visitReason" placeholder="请输入访问事由" />
|
||||
</el-form-item>
|
||||
<el-form-item label="放行类型" prop="openGateMode">
|
||||
<el-input v-model="formData.openGateMode" placeholder="请输入放行类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="匹配模式" prop="matchMode">
|
||||
<el-input v-model="formData.matchMode" placeholder="请输入匹配模式" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否开闸" prop="barriorOpen">
|
||||
<el-input v-model="formData.barriorOpen" placeholder="请输入是否开闸" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开闸耗时" prop="costTime">
|
||||
<el-date-picker
|
||||
v-model="formData.costTime"
|
||||
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 { EntryRecordApi, EntryRecordVO } from '@/api/parking/entryrecord'
|
||||
|
||||
/** 入场记录 表单 */
|
||||
defineOptions({ name: 'EntryRecordForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
orderId: undefined,
|
||||
parkNumber: undefined,
|
||||
plate: undefined,
|
||||
idCard: undefined,
|
||||
inTime: undefined,
|
||||
inChannel: undefined,
|
||||
inImage: undefined,
|
||||
visitReason: undefined,
|
||||
openGateMode: undefined,
|
||||
matchMode: undefined,
|
||||
barriorOpen: undefined,
|
||||
costTime: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
orderId: [{ required: true, message: '入场记录编号不能为空', trigger: 'blur' }],
|
||||
parkNumber: [{ required: true, message: '场库编号不能为空', trigger: 'blur' }],
|
||||
plate: [{ required: true, message: '车牌不能为空', trigger: 'blur' }],
|
||||
idCard: [{ required: true, message: '证件号码不能为空', trigger: 'blur' }],
|
||||
inTime: [{ required: true, message: '入场时间不能为空', trigger: 'blur' }],
|
||||
inChannel: [{ required: true, message: '入场通道名称不能为空', trigger: 'blur' }],
|
||||
inImage: [{ required: true, message: '入场图片名不能为空', trigger: 'blur' }],
|
||||
visitReason: [{ required: true, message: '访问事由不能为空', trigger: 'blur' }],
|
||||
openGateMode: [{ required: true, message: '放行类型不能为空', trigger: 'blur' }],
|
||||
matchMode: [{ required: true, message: '匹配模式不能为空', trigger: 'blur' }],
|
||||
barriorOpen: [{ required: true, message: '是否开闸不能为空', trigger: 'blur' }],
|
||||
costTime: [{ 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 EntryRecordApi.getEntryRecord(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 EntryRecordVO
|
||||
if (formType.value === 'create') {
|
||||
await EntryRecordApi.createEntryRecord(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await EntryRecordApi.updateEntryRecord(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
orderId: undefined,
|
||||
parkNumber: undefined,
|
||||
plate: undefined,
|
||||
idCard: undefined,
|
||||
inTime: undefined,
|
||||
inChannel: undefined,
|
||||
inImage: undefined,
|
||||
visitReason: undefined,
|
||||
openGateMode: undefined,
|
||||
matchMode: undefined,
|
||||
barriorOpen: undefined,
|
||||
costTime: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
@ -1,303 +0,0 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="入场记录编号" prop="orderId">
|
||||
<el-input
|
||||
v-model="queryParams.orderId"
|
||||
placeholder="请输入入场记录编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="场库编号" prop="parkNumber">
|
||||
<el-input
|
||||
v-model="queryParams.parkNumber"
|
||||
placeholder="请输入场库编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌" prop="plate">
|
||||
<el-input
|
||||
v-model="queryParams.plate"
|
||||
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="inTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.inTime"
|
||||
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="inChannel">
|
||||
<el-input
|
||||
v-model="queryParams.inChannel"
|
||||
placeholder="请输入入场通道名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="访问事由" prop="visitReason">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.visitReason"-->
|
||||
<!-- placeholder="请输入访问事由"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter="handleQuery"-->
|
||||
<!-- class="!w-240px"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="放行类型" prop="openGateMode">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.openGateMode"-->
|
||||
<!-- placeholder="请输入放行类型"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter="handleQuery"-->
|
||||
<!-- class="!w-240px"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="匹配模式" prop="matchMode">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.matchMode"-->
|
||||
<!-- placeholder="请输入匹配模式"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter="handleQuery"-->
|
||||
<!-- class="!w-240px"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="是否开闸" prop="barriorOpen">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.barriorOpen"-->
|
||||
<!-- placeholder="请输入是否开闸"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter="handleQuery"-->
|
||||
<!-- class="!w-240px"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="开闸耗时" prop="costTime">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="queryParams.costTime"-->
|
||||
<!-- 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="['parking:entry-record:create']"-->
|
||||
<!-- >-->
|
||||
<!-- <Icon icon="ep:plus" class="mr-5px" /> 新增-->
|
||||
<!-- </el-button>-->
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['parking:entry-record: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="orderId" width='110px'/>
|
||||
<el-table-column label="场库编号" align="center" prop="parkNumber" />
|
||||
<el-table-column label="车牌" align="center" prop="plate" />
|
||||
<el-table-column label="证件号码" align="center" prop="idCard" />
|
||||
<el-table-column label="入场时间" align="center" prop="inTime" />
|
||||
<el-table-column label="入场通道名称" align="center" prop="inChannel" width='110px'/>
|
||||
<el-table-column label="入场图片名" align="center" prop="inImage" width='100px'/>
|
||||
<el-table-column label="访问事由" align="center" prop="visitReason" />
|
||||
<el-table-column label="放行类型" align="center" prop="openGateMode" />
|
||||
<el-table-column label="匹配模式" align="center" prop="matchMode" />
|
||||
<el-table-column label="是否开闸" align="center" prop="barriorOpen" />
|
||||
<el-table-column label="开闸耗时" align="center" prop="costTime" />
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="110">
|
||||
<template #default="scope">
|
||||
<!-- <el-button-->
|
||||
<!-- link-->
|
||||
<!-- type="primary"-->
|
||||
<!-- @click="openForm('update', scope.row.id)"-->
|
||||
<!-- v-hasPermi="['parking:entry-record:update']"-->
|
||||
<!-- >-->
|
||||
<!-- 编辑-->
|
||||
<!-- </el-button>-->
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['parking:entry-record: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>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<EntryRecordForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { EntryRecordApi, EntryRecordVO } from '@/api/parking/entryrecord'
|
||||
import EntryRecordForm from './EntryRecordForm.vue'
|
||||
|
||||
/** 入场记录 列表 */
|
||||
defineOptions({ name: 'EntryRecord' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<EntryRecordVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
orderId: undefined,
|
||||
parkNumber: undefined,
|
||||
plate: undefined,
|
||||
idCard: undefined,
|
||||
inTime: [],
|
||||
inChannel: undefined,
|
||||
inImage: undefined,
|
||||
visitReason: undefined,
|
||||
openGateMode: undefined,
|
||||
matchMode: undefined,
|
||||
barriorOpen: undefined,
|
||||
costTime: [],
|
||||
createTime: [],
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await EntryRecordApi.getEntryRecordPage(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 EntryRecordApi.deleteEntryRecord(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await EntryRecordApi.exportEntryRecord(queryParams)
|
||||
download.excel(data, '入场记录.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
@ -1,17 +1,18 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="100px" v-loading="formLoading">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="停车场编号" prop="parkNumber">
|
||||
<el-input v-model="formData.parkNumber" placeholder="请输入停车场编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="通道Id" prop="passagewayId">
|
||||
<el-input v-model="formData.passagewayId" placeholder="请输入通道Id" />
|
||||
</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>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
@ -20,80 +21,78 @@
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { LiftingRodApi, LiftingRodVO } from '@/api/parking/instructiondelivery/liftingrod'
|
||||
import { LiftingRodApi, LiftingRodVO } from '@/api/parking/instructiondelivery/liftingrod'
|
||||
|
||||
/** 远程抬杠日志 表单 */
|
||||
defineOptions({ name: 'LiftingRodForm' })
|
||||
/** 远程抬杠日志 表单 */
|
||||
defineOptions({ name: 'LiftingRodForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
parkNumber: undefined,
|
||||
passagewayId: undefined,
|
||||
status: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
parkNumber: [{ required: true, message: '停车场编号不能为空', trigger: 'blur' }],
|
||||
passagewayId: [{ required: true, message: '通道Id不能为空', trigger: 'blur' }],
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
parkNumber: undefined,
|
||||
passagewayId: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
parkNumber: [{ required: true, message: '停车场编号不能为空', trigger: 'blur' }],
|
||||
passagewayId: [{ required: true, message: '通道Id不能为空', trigger: 'blur' }],
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = type == 'upload' ? "下发指令" : t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await LiftingRodApi.getLiftingRod(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
/** 打开弹窗 */
|
||||
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 {
|
||||
const data = formData.value as unknown as LiftingRodVO
|
||||
if (formType.value === 'create') {
|
||||
await LiftingRodApi.createLiftingRod(data)
|
||||
message.success('下发成功')
|
||||
} else {
|
||||
await LiftingRodApi.updateLiftingRod(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
formData.value = await LiftingRodApi.getLiftingRod(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
parkNumber: undefined,
|
||||
passagewayId: undefined,
|
||||
status: undefined,
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as LiftingRodVO
|
||||
if (formType.value === 'create') {
|
||||
await LiftingRodApi.createLiftingRod(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await LiftingRodApi.updateLiftingRod(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
parkNumber: undefined,
|
||||
passagewayId: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
@ -37,26 +37,16 @@
|
||||
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>
|
||||
<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('upload')"
|
||||
@click="openForm('create')"
|
||||
v-hasPermi="['parking:lifting-rod:create']"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 下发指令
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
@ -84,12 +74,6 @@
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
|
||||
<el-table-column label="状态" align="center" prop="status" >
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.LIFTINGROD_STATUS" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
@ -129,7 +113,6 @@ import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { LiftingRodApi, LiftingRodVO } from '@/api/parking/instructiondelivery/liftingrod'
|
||||
import LiftingRodForm from './LiftingRodForm.vue'
|
||||
import { getStrDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
|
||||
/** 远程抬杠日志 列表 */
|
||||
defineOptions({ name: 'LiftingRod' })
|
||||
@ -146,7 +129,6 @@ const queryParams = reactive({
|
||||
parkNumber: undefined,
|
||||
passagewayId: undefined,
|
||||
createTime: [],
|
||||
status: undefined,
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
@ -50,7 +50,7 @@
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="生效日期" prop="start">
|
||||
<el-form-item label="生效日期" prop="start">
|
||||
<el-input
|
||||
v-model="queryParams.start"
|
||||
placeholder="请输入生效日期"
|
||||
@ -67,8 +67,8 @@
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="部门" prop="dept">
|
||||
</el-form-item>
|
||||
<el-form-item label="部门" prop="dept">
|
||||
<el-input
|
||||
v-model="queryParams.dept"
|
||||
placeholder="请输入部门"
|
||||
@ -94,8 +94,8 @@
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="创建时间" prop="createTime">
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
@ -105,7 +105,7 @@
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
</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>
|
||||
@ -147,14 +147,6 @@
|
||||
<el-table-column label="部门" align="center" prop="dept" />
|
||||
<el-table-column label="备注" align="center" prop="memo" />
|
||||
<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
|
||||
label="创建时间"
|
||||
align="center"
|
||||
@ -162,7 +154,7 @@
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="110">
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
@ -175,7 +167,7 @@
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.fixedId)"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['parking:white:delete']"
|
||||
>
|
||||
删除
|
||||
|
@ -1,92 +0,0 @@
|
||||
<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) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
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>
|
@ -1,187 +0,0 @@
|
||||
<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>
|
@ -1,123 +0,0 @@
|
||||
<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) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
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>
|
@ -1,230 +0,0 @@
|
||||
<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>
|
@ -1,136 +0,0 @@
|
||||
<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) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
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>
|
@ -1,254 +0,0 @@
|
||||
<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>
|
Loading…
Reference in New Issue
Block a user