From fdc30067dedf076e45781dde8f3e779384dead26 Mon Sep 17 00:00:00 2001 From: louis <869322496@qq.com> Date: Fri, 8 Mar 2024 10:38:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=8B=A5=E5=B9=B2=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=8C=E8=A1=A8=E5=8D=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/backend/api/typings.d.ts | 11 +- .../core/schema-form/src/types/form.ts | 2 +- src/enums/dictEnum.ts | 3 +- src/enums/vehicleEnum.ts | 5 + src/layout/header/index.vue | 2 +- src/store/modules/dict.ts | 3 +- src/utils/dateUtil.ts | 2 +- src/views/contract/formSchemas.ts | 18 +- src/views/contract/index.vue | 13 +- src/views/vehicle-usage/columns.tsx | 198 ++++++++++--- src/views/vehicle-usage/formSchemas.ts | 267 ++++++++++++------ src/views/vehicle-usage/index.vue | 28 +- 12 files changed, 369 insertions(+), 183 deletions(-) create mode 100644 src/enums/vehicleEnum.ts diff --git a/src/api/backend/api/typings.d.ts b/src/api/backend/api/typings.d.ts index d7e2b29..56818be 100644 --- a/src/api/backend/api/typings.d.ts +++ b/src/api/backend/api/typings.d.ts @@ -1661,9 +1661,9 @@ declare namespace API { /** 年度 */ year: number; /** 外出使用的车辆Id */ - vechicleId: number; + vehicleId: number; /** 外出使用的车辆名称(字典) */ - vechicle: DictItemEntity; + vehicle: DictItemEntity; /** 申请人 */ applicant: string; /** 出行司机 */ @@ -1696,11 +1696,13 @@ declare namespace API { /** 年度 */ year: number; /** 外出使用的车辆名称(字典) */ - vechicleId: number; + vehicleId: number; /** 申请人 */ applicant: string; /** 出行司机 */ driver: string; + /** 随行人员 */ + partner: string; /** 当前车辆里程数(KM) */ currentMileage: number; /** 预计出行开始时间 */ @@ -1723,7 +1725,6 @@ declare namespace API { }; type VehicleUsageUpdateParams = { id: number; - }; type VehicleUsageParams = { page?: number; @@ -1739,7 +1740,7 @@ declare namespace API { /** 年度 */ year?: number; /** 外出使用的车辆名称(字典) */ - vechicleId?: number; + vehicleId?: number; /** 申请人 */ applicant?: string; /** 出行司机 */ diff --git a/src/components/core/schema-form/src/types/form.ts b/src/components/core/schema-form/src/types/form.ts index 8daf9ec..43a8b72 100644 --- a/src/components/core/schema-form/src/types/form.ts +++ b/src/components/core/schema-form/src/types/form.ts @@ -81,7 +81,7 @@ type ComponentSchema = /** 表单项 */ export type FormSchema = ComponentSchema & { /** 字段名 */ - field: GetFieldKeys; + field?: GetFieldKeys; // Event name triggered by internal value change, default change changeEvent?: string; // Variable name bound to v-model Default value diff --git a/src/enums/dictEnum.ts b/src/enums/dictEnum.ts index 7fd8eed..cdaaef7 100644 --- a/src/enums/dictEnum.ts +++ b/src/enums/dictEnum.ts @@ -1,4 +1,5 @@ export enum DictEnum { ContractType = 'contract_type', // 合同类型 - Unit = 'unit', // 单位 + Unit = 'unit', // 单位, + Vehicle = 'vehicle', // 车辆 } diff --git a/src/enums/vehicleEnum.ts b/src/enums/vehicleEnum.ts new file mode 100644 index 0000000..750a6b5 --- /dev/null +++ b/src/enums/vehicleEnum.ts @@ -0,0 +1,5 @@ +export enum VehicleUsageStatusEnum { + Pending = 0, // 待审核 + Approved = 1, // 已通过 + Rejected = 2, // 已拒绝 +} diff --git a/src/layout/header/index.vue b/src/layout/header/index.vue index b47a830..b5dc23b 100644 --- a/src/layout/header/index.vue +++ b/src/layout/header/index.vue @@ -35,7 +35,7 @@ - + {{ userInfo.username }}