diff --git a/src/api/hjm/hjmCar/index.ts b/src/api/hjm/hjmCar/index.ts index 3279faf..c9db868 100644 --- a/src/api/hjm/hjmCar/index.ts +++ b/src/api/hjm/hjmCar/index.ts @@ -120,3 +120,16 @@ export async function importHjmCar(file: File) { } return Promise.reject(new Error(res.data.message)); } + +/** + * 根据code查询黄家明_车辆管理 + */ +export async function getHjmCarByCode(code: string) { + const res = await request.get>( + MODULES_API_URL + '/hjm/hjm-car/getByCode/' + code + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/hjm/hjmViolation/index.ts b/src/api/hjm/hjmViolation/index.ts new file mode 100644 index 0000000..6b48a73 --- /dev/null +++ b/src/api/hjm/hjmViolation/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { HjmViolation, HjmViolationParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询黄家明_违章记录 + */ +export async function pageHjmViolation(params: HjmViolationParam) { + const res = await request.get>>( + MODULES_API_URL + '/hjm/hjm-violation/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询黄家明_违章记录列表 + */ +export async function listHjmViolation(params?: HjmViolationParam) { + const res = await request.get>( + MODULES_API_URL + '/hjm/hjm-violation', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加黄家明_违章记录 + */ +export async function addHjmViolation(data: HjmViolation) { + const res = await request.post>( + MODULES_API_URL + '/hjm/hjm-violation', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改黄家明_违章记录 + */ +export async function updateHjmViolation(data: HjmViolation) { + const res = await request.put>( + MODULES_API_URL + '/hjm/hjm-violation', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除黄家明_违章记录 + */ +export async function removeHjmViolation(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/hjm/hjm-violation/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除黄家明_违章记录 + */ +export async function removeBatchHjmViolation(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/hjm/hjm-violation/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询黄家明_违章记录 + */ +export async function getHjmViolation(id: number) { + const res = await request.get>( + MODULES_API_URL + '/hjm/hjm-violation/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/hjm/hjmViolation/model/index.ts b/src/api/hjm/hjmViolation/model/index.ts new file mode 100644 index 0000000..3c1bc20 --- /dev/null +++ b/src/api/hjm/hjmViolation/model/index.ts @@ -0,0 +1,43 @@ +import type { PageParam } from '@/api'; + +/** + * 黄家明_违章记录 + */ +export interface HjmViolation { + // 自增ID + id?: number; + // 车辆编号 + code?: string; + // 标题 + title?: string; + // 文章分类ID + categoryId?: number; + // 处罚金额 + money?: string; + // 扣分 + score?: string; + // 录入员 + adminId?: number; + // 用户ID + userId?: number; + // 排序(数字越小越靠前) + sortNumber?: number; + // 备注 + comments?: string; + // 状态, 0未处理, 1已处理 + status?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; + // 修改时间 + updateTime?: string; +} + +/** + * 黄家明_违章记录搜索条件 + */ +export interface HjmViolationParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/views/hjm/hjmViolation/components/hjmViolationEdit.vue b/src/views/hjm/hjmViolation/components/hjmViolationEdit.vue new file mode 100644 index 0000000..1e6e9ba --- /dev/null +++ b/src/views/hjm/hjmViolation/components/hjmViolationEdit.vue @@ -0,0 +1,214 @@ + + + + diff --git a/src/views/hjm/hjmViolation/components/search.vue b/src/views/hjm/hjmViolation/components/search.vue new file mode 100644 index 0000000..82fea9d --- /dev/null +++ b/src/views/hjm/hjmViolation/components/search.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/hjm/hjmViolation/index.vue b/src/views/hjm/hjmViolation/index.vue new file mode 100644 index 0000000..16f27ab --- /dev/null +++ b/src/views/hjm/hjmViolation/index.vue @@ -0,0 +1,243 @@ + + + + + + +