diff --git a/apps/web-antd/src/api/property/inspectionManagement/inspectionPlan/index.ts b/apps/web-antd/src/api/property/inspectionManagement/inspectionPlan/index.ts new file mode 100644 index 00000000..2411dcb8 --- /dev/null +++ b/apps/web-antd/src/api/property/inspectionManagement/inspectionPlan/index.ts @@ -0,0 +1,61 @@ +import type { InspectionPlanVO, InspectionPlanForm, InspectionPlanQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询巡检计划列表 +* @param params +* @returns 巡检计划列表 +*/ +export function inspectionPlanList(params?: InspectionPlanQuery) { + return requestClient.get>('/property/inspectionPlan/list', { params }); +} + +/** + * 导出巡检计划列表 + * @param params + * @returns 巡检计划列表 + */ +export function inspectionPlanExport(params?: InspectionPlanQuery) { + return commonExport('/property/inspectionPlan/export', params ?? {}); +} + +/** + * 查询巡检计划详情 + * @param id id + * @returns 巡检计划详情 + */ +export function inspectionPlanInfo(id: ID) { + return requestClient.get(`/property/inspectionPlan/${id}`); +} + +/** + * 新增巡检计划 + * @param data + * @returns void + */ +export function inspectionPlanAdd(data: InspectionPlanForm) { + return requestClient.postWithMsg('/property/inspectionPlan', data); +} + +/** + * 更新巡检计划 + * @param data + * @returns void + */ +export function inspectionPlanUpdate(data: InspectionPlanForm) { + return requestClient.putWithMsg('/property/inspectionPlan', data); +} + +/** + * 删除巡检计划 + * @param id id + * @returns void + */ +export function inspectionPlanRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/inspectionPlan/${id}`); +} diff --git a/apps/web-antd/src/api/property/inspectionManagement/inspectionPlan/model.d.ts b/apps/web-antd/src/api/property/inspectionManagement/inspectionPlan/model.d.ts new file mode 100644 index 00000000..951a8553 --- /dev/null +++ b/apps/web-antd/src/api/property/inspectionManagement/inspectionPlan/model.d.ts @@ -0,0 +1,199 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface InspectionPlanVO { + /** + * 主键id + */ + id: string | number; + + /** + * 巡检计划名称 + */ + planName: string; + + /** + * 巡检路线id + */ + inspectionRouteId: string | number; + + /** + * 巡检周期 + */ + inspectionPlanPeriod: number; + + /** + * 任务提前分组 + */ + beforeTime: number; + + /** + * 开始日期 + */ + startDate: string; + + /** + * 结束日期 + */ + endDate: string; + + /** + * 开始时间 + */ + startTime: string; + + /** + * 结束时间 + */ + endTime: string; + + /** + * 签到方式(0现场定位,1现场定位) + */ + signType: number; + + /** + * 允许补检(0允许1不允许) + */ + canReexamine: number; + + /** + * 选择员工 + */ + userId: string | number; + + /** + * 备注 + */ + remark: string; + +} + +export interface InspectionPlanForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 巡检计划名称 + */ + planName?: string; + + /** + * 巡检路线id + */ + inspectionRouteId?: string | number; + + /** + * 巡检周期 + */ + inspectionPlanPeriod?: number; + + /** + * 任务提前分组 + */ + beforeTime?: number; + + /** + * 开始日期 + */ + startDate?: string; + + /** + * 结束日期 + */ + endDate?: string; + + /** + * 开始时间 + */ + startTime?: string; + + /** + * 结束时间 + */ + endTime?: string; + + /** + * 签到方式(0现场定位,1现场定位) + */ + signType?: number; + + /** + * 允许补检(0允许1不允许) + */ + canReexamine?: number; + + /** + * 选择员工 + */ + userId?: string | number; + + /** + * 备注 + */ + remark?: string; + +} + +export interface InspectionPlanQuery extends PageQuery { + /** + * 巡检计划名称 + */ + planName?: string; + + /** + * 巡检路线id + */ + inspectionRouteId?: string | number; + + /** + * 巡检周期 + */ + inspectionPlanPeriod?: number; + + /** + * 任务提前分组 + */ + beforeTime?: number; + + /** + * 开始日期 + */ + startDate?: string; + + /** + * 结束日期 + */ + endDate?: string; + + /** + * 开始时间 + */ + startTime?: string; + + /** + * 结束时间 + */ + endTime?: string; + + /** + * 签到方式(0现场定位,1现场定位) + */ + signType?: number; + + /** + * 允许补检(0允许1不允许) + */ + canReexamine?: number; + + /** + * 选择员工 + */ + userId?: string | number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/api/property/inspectionManagement/inspectionRoute/index.ts b/apps/web-antd/src/api/property/inspectionManagement/inspectionRoute/index.ts new file mode 100644 index 00000000..84eb165c --- /dev/null +++ b/apps/web-antd/src/api/property/inspectionManagement/inspectionRoute/index.ts @@ -0,0 +1,61 @@ +import type { InspectionRouteVO, InspectionRouteForm, InspectionRouteQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询巡检路线列表 +* @param params +* @returns 巡检路线列表 +*/ +export function inspectionRouteList(params?: InspectionRouteQuery) { + return requestClient.get>('/property/inspectionRoute/list', { params }); +} + +/** + * 导出巡检路线列表 + * @param params + * @returns 巡检路线列表 + */ +export function inspectionRouteExport(params?: InspectionRouteQuery) { + return commonExport('/property/inspectionRoute/export', params ?? {}); +} + +/** + * 查询巡检路线详情 + * @param id id + * @returns 巡检路线详情 + */ +export function inspectionRouteInfo(id: ID) { + return requestClient.get(`/property/inspectionRoute/${id}`); +} + +/** + * 新增巡检路线 + * @param data + * @returns void + */ +export function inspectionRouteAdd(data: InspectionRouteForm) { + return requestClient.postWithMsg('/property/inspectionRoute', data); +} + +/** + * 更新巡检路线 + * @param data + * @returns void + */ +export function inspectionRouteUpdate(data: InspectionRouteForm) { + return requestClient.putWithMsg('/property/inspectionRoute', data); +} + +/** + * 删除巡检路线 + * @param id id + * @returns void + */ +export function inspectionRouteRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/inspectionRoute/${id}`); +} diff --git a/apps/web-antd/src/api/property/inspectionManagement/inspectionRoute/model.d.ts b/apps/web-antd/src/api/property/inspectionManagement/inspectionRoute/model.d.ts new file mode 100644 index 00000000..5b4b0836 --- /dev/null +++ b/apps/web-antd/src/api/property/inspectionManagement/inspectionRoute/model.d.ts @@ -0,0 +1,49 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface InspectionRouteVO { + /** + * 主键id + */ + id: string | number; + + /** + * 路线名称 + */ + routeName: string; + + /** + * 备注 + */ + remark: string; + +} + +export interface InspectionRouteForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 路线名称 + */ + routeName?: string; + + /** + * 备注 + */ + remark?: string; + +} + +export interface InspectionRouteQuery extends PageQuery { + /** + * 路线名称 + */ + routeName?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionPlan/data.ts b/apps/web-antd/src/views/property/inspectionManagement/inspectionPlan/data.ts new file mode 100644 index 00000000..1fed16ca --- /dev/null +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionPlan/data.ts @@ -0,0 +1,220 @@ +import type {FormSchemaGetter} from '#/adapter/form'; +import type {VxeGridProps} from '#/adapter/vxe-table'; +import {getDictOptions} from "#/utils/dict"; +import {renderDict} from "#/utils/render"; + + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'planName', + label: '计划名称', + }, + + { + component: 'Select', + componentProps: { + options: getDictOptions('wy_xjzq'), + }, + fieldName: 'inspectionPlanPeriod', + label: '巡检周期', + }, + { + component: 'Select', + componentProps: { + options: getDictOptions('wy_xjqdfs'), + }, + fieldName: 'signType', + label: '签到方式', + }, +]; + +export const columns: VxeGridProps['columns'] = [ + {type: 'checkbox', width: 60}, + { + title: '主键id', + field: 'id', + }, + { + title: '巡检计划名称', + field: 'planName', + }, + { + title: '巡检路线', + field: 'inspectionRouteId', + }, + { + title: '巡检周期', + field: 'inspectionPlanPeriod', + slots: { + default: ({ row }) => { + return renderDict(row.inspectionPlanPeriod, 'wy_xjzq'); + }, + }, + }, + { + title: '任务提前分组', + field: 'beforeTime', + }, + { + title: '开始日期', + field: 'startDate', + }, + { + title: '结束日期', + field: 'endDate', + }, + { + title: '开始时间', + field: 'startTime', + }, + { + title: '结束时间', + field: 'endTime', + }, + { + title: '签到方式', + field: 'signType', + slots: { + default: ({ row }) => { + return renderDict(row.signType, 'wy_xjqdfs'); + }, + }, + }, + { + title: '是否允许补检', + field: 'canReexamine', + slots: { + default: ({ row }) => { + return renderDict(row.canReexamine, 'wy_sf'); + }, + }, + }, + { + title: '选择员工', + field: 'userId', + }, + { + title: '备注', + field: 'remark', + }, + { + field: 'action', + fixed: 'right', + slots: {default: 'action'}, + title: '操作', + width: 180, + }, +]; + +export const modalSchema: FormSchemaGetter = () => [ + { + label: '主键id', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '巡检计划名称', + fieldName: 'planName', + component: 'Input', + rules: 'required', + }, + { + label: '巡检路线', + fieldName: 'inspectionRouteId', + component: 'Input', + rules: 'required', + }, + { + label: '巡检周期', + fieldName: 'inspectionPlanPeriod', + component: 'Input', + rules: 'required', + componentProps: { + options: getDictOptions('wy_xjzq'), + }, + }, + { + label: '任务提前分组', + fieldName: 'beforeTime', + component: 'Input', + rules: 'required', + }, + { + label: '开始日期', + fieldName: 'startDate', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + rules: 'required', + }, + { + label: '结束日期', + fieldName: 'endDate', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + rules: 'required', + }, + { + label: '开始时间', + fieldName: 'startTime', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + rules: 'required', + }, + { + label: '结束时间', + fieldName: 'endTime', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + rules: 'required', + }, + { + label: '签到方式', + fieldName: 'signType', + component: 'Select', + componentProps: { + options: getDictOptions('wy_xjqdfs'), + }, + rules: 'selectRequired', + }, + { + label: '允许补检', + fieldName: 'canReexamine', + component: 'Select', + componentProps: { + options: getDictOptions('wy_sf'), + }, + rules: 'selectRequired', + }, + { + label: '选择员工', + fieldName: 'userId', + component: 'Input', + rules: 'required', + }, + { + label: '备注', + fieldName: 'remark', + component: 'Input', + }, +]; diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionPlan/index.vue b/apps/web-antd/src/views/property/inspectionManagement/inspectionPlan/index.vue new file mode 100644 index 00000000..c8554f64 --- /dev/null +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionPlan/index.vue @@ -0,0 +1,182 @@ + + + diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionPlan/inspectionPlan-modal.vue b/apps/web-antd/src/views/property/inspectionManagement/inspectionPlan/inspectionPlan-modal.vue new file mode 100644 index 00000000..65fa155f --- /dev/null +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionPlan/inspectionPlan-modal.vue @@ -0,0 +1,101 @@ + + + + diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/data.ts b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/data.ts new file mode 100644 index 00000000..ca886e6c --- /dev/null +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/data.ts @@ -0,0 +1,59 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; + + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'routeName', + label: '路线名称', + }, +]; + +// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 +// export const columns: () => VxeGridProps['columns'] = () => [ +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '主键id', + field: 'id', + }, + { + title: '路线名称', + field: 'routeName', + }, + { + title: '备注', + field: 'remark', + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; + +export const modalSchema: FormSchemaGetter = () => [ + { + label: '主键id', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '路线名称', + fieldName: 'routeName', + component: 'Input', + rules: 'required', + }, + { + label: '备注', + fieldName: 'remark', + component: 'Input', + }, +]; diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/index.vue b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/index.vue new file mode 100644 index 00000000..400e47f1 --- /dev/null +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/index.vue @@ -0,0 +1,182 @@ + + + diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/inspectionRoute-modal.vue b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/inspectionRoute-modal.vue new file mode 100644 index 00000000..52ced73e --- /dev/null +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionRoute/inspectionRoute-modal.vue @@ -0,0 +1,101 @@ + + + +