diff --git a/apps/web-antd/src/api/property/inspectionManagement/inspectionPoint/index.ts b/apps/web-antd/src/api/property/inspectionManagement/inspectionPoint/index.ts new file mode 100644 index 00000000..c96eb528 --- /dev/null +++ b/apps/web-antd/src/api/property/inspectionManagement/inspectionPoint/index.ts @@ -0,0 +1,61 @@ +import type { InspectionPointVO, InspectionPointForm, InspectionPointQuery } 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 inspectionPointList(params?: InspectionPointQuery) { + return requestClient.get>('/property/inspectionPoint/list', { params }); +} + +/** + * 导出巡检点列表 + * @param params + * @returns 巡检点列表 + */ +export function inspectionPointExport(params?: InspectionPointQuery) { + return commonExport('/property/inspectionPoint/export', params ?? {}); +} + +/** + * 查询巡检点详情 + * @param id id + * @returns 巡检点详情 + */ +export function inspectionPointInfo(id: ID) { + return requestClient.get(`/property/inspectionPoint/${id}`); +} + +/** + * 新增巡检点 + * @param data + * @returns void + */ +export function inspectionPointAdd(data: InspectionPointForm) { + return requestClient.postWithMsg('/property/inspectionPoint', data); +} + +/** + * 更新巡检点 + * @param data + * @returns void + */ +export function inspectionPointUpdate(data: InspectionPointForm) { + return requestClient.putWithMsg('/property/inspectionPoint', data); +} + +/** + * 删除巡检点 + * @param id id + * @returns void + */ +export function inspectionPointRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/inspectionPoint/${id}`); +} diff --git a/apps/web-antd/src/api/property/inspectionManagement/inspectionPoint/model.d.ts b/apps/web-antd/src/api/property/inspectionManagement/inspectionPoint/model.d.ts new file mode 100644 index 00000000..dd4e4824 --- /dev/null +++ b/apps/web-antd/src/api/property/inspectionManagement/inspectionPoint/model.d.ts @@ -0,0 +1,139 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface InspectionPointVO { + /** + * 主键id + */ + id: string | number; + + /** + * 巡检项目id + */ + itemId: string | number; + + /** + * 巡检点名称 + */ + pointName: string; + + /** + * 巡检点类型 + */ + pointType: number; + + /** + * nfc编码 + */ + nfcCode: string; + + /** + * 备注 + */ + remark: string; + + /** + * 创建人id + */ + createById: string | number; + + /** + * 更新人id + */ + updateById: string | number; + + /** + * 搜索值 + */ + searchValue: string; + +} + +export interface InspectionPointForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 巡检项目id + */ + itemId?: string | number; + + /** + * 巡检点名称 + */ + pointName?: string; + + /** + * 巡检点类型 + */ + pointType?: number; + + /** + * nfc编码 + */ + nfcCode?: string; + + /** + * 备注 + */ + remark?: string; + + /** + * 创建人id + */ + createById?: string | number; + + /** + * 更新人id + */ + updateById?: string | number; + + /** + * 搜索值 + */ + searchValue?: string; + +} + +export interface InspectionPointQuery extends PageQuery { + /** + * 巡检项目id + */ + itemId?: string | number; + + /** + * 巡检点名称 + */ + pointName?: string; + + /** + * 巡检点类型 + */ + pointType?: number; + + /** + * nfc编码 + */ + nfcCode?: string; + + /** + * 创建人id + */ + createById?: string | number; + + /** + * 更新人id + */ + updateById?: string | number; + + /** + * 搜索值 + */ + searchValue?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/api/property/inspectionManagement/inspectionTask/index.ts b/apps/web-antd/src/api/property/inspectionManagement/inspectionTask/index.ts new file mode 100644 index 00000000..1d94e435 --- /dev/null +++ b/apps/web-antd/src/api/property/inspectionManagement/inspectionTask/index.ts @@ -0,0 +1,61 @@ +import type { InspectionTaskVO, InspectionTaskForm, InspectionTaskQuery } 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 inspectionTaskList(params?: InspectionTaskQuery) { + return requestClient.get>('/property/inspectionTask/list', { params }); +} + +/** + * 导出巡检任务列表 + * @param params + * @returns 巡检任务列表 + */ +export function inspectionTaskExport(params?: InspectionTaskQuery) { + return commonExport('/property/inspectionTask/export', params ?? {}); +} + +/** + * 查询巡检任务详情 + * @param id id + * @returns 巡检任务详情 + */ +export function inspectionTaskInfo(id: ID) { + return requestClient.get(`/property/inspectionTask/${id}`); +} + +/** + * 新增巡检任务 + * @param data + * @returns void + */ +export function inspectionTaskAdd(data: InspectionTaskForm) { + return requestClient.postWithMsg('/property/inspectionTask', data); +} + +/** + * 更新巡检任务 + * @param data + * @returns void + */ +export function inspectionTaskUpdate(data: InspectionTaskForm) { + return requestClient.putWithMsg('/property/inspectionTask', data); +} + +/** + * 删除巡检任务 + * @param id id + * @returns void + */ +export function inspectionTaskRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/inspectionTask/${id}`); +} diff --git a/apps/web-antd/src/api/property/inspectionManagement/inspectionTask/model.d.ts b/apps/web-antd/src/api/property/inspectionManagement/inspectionTask/model.d.ts new file mode 100644 index 00000000..80d0adbb --- /dev/null +++ b/apps/web-antd/src/api/property/inspectionManagement/inspectionTask/model.d.ts @@ -0,0 +1,169 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface InspectionTaskVO { + /** + * 主键id + */ + id: string | number; + + /** + * 巡检计划id + */ + inspectionPlanId: string | number; + + /** + * 实际巡检时间 + */ + actInsTime: string; + + /** + * 当前巡检人 + */ + actUserId: string | number; + + /** + * 巡检方式 + */ + taskType: string; + + /** + * 转移描述 + */ + transferDesc: string; + + /** + * 巡检状态 + */ + status: string; + + /** + * 备注 + */ + remark: string; + + /** + * 创建人id + */ + createById: string | number; + + /** + * 更新人id + */ + updateById: string | number; + + /** + * 搜索值 + */ + searchValue: string; + +} + +export interface InspectionTaskForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 巡检计划id + */ + inspectionPlanId?: string | number; + + /** + * 实际巡检时间 + */ + actInsTime?: string; + + /** + * 当前巡检人 + */ + actUserId?: string | number; + + /** + * 巡检方式 + */ + taskType?: string; + + /** + * 转移描述 + */ + transferDesc?: string; + + /** + * 巡检状态 + */ + status?: string; + + /** + * 备注 + */ + remark?: string; + + /** + * 创建人id + */ + createById?: string | number; + + /** + * 更新人id + */ + updateById?: string | number; + + /** + * 搜索值 + */ + searchValue?: string; + +} + +export interface InspectionTaskQuery extends PageQuery { + /** + * 巡检计划id + */ + inspectionPlanId?: string | number; + + /** + * 实际巡检时间 + */ + actInsTime?: string; + + /** + * 当前巡检人 + */ + actUserId?: string | number; + + /** + * 巡检方式 + */ + taskType?: string; + + /** + * 转移描述 + */ + transferDesc?: string; + + /** + * 巡检状态 + */ + status?: string; + + /** + * 创建人id + */ + createById?: string | number; + + /** + * 更新人id + */ + updateById?: string | number; + + /** + * 搜索值 + */ + searchValue?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionItem/data.ts b/apps/web-antd/src/views/property/inspectionManagement/inspectionItem/data.ts index a270c375..1cc20e42 100644 --- a/apps/web-antd/src/views/property/inspectionManagement/inspectionItem/data.ts +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionItem/data.ts @@ -3,10 +3,15 @@ import type { VxeGridProps } from '#/adapter/vxe-table'; export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'id', + label: '编号', + }, { component: 'Input', fieldName: 'itemName', - label: '项目名称', + label: '巡检项目', }, ]; @@ -15,13 +20,17 @@ export const querySchema: FormSchemaGetter = () => [ export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, { - title: '主键id', + title: '编号', field: 'id', }, { - title: '项目名称', + title: '巡检项目', field: 'itemName', }, + { + title: '创建时间', + field: 'createTime', + }, { title: '备注', field: 'remark', @@ -46,7 +55,7 @@ export const modalSchema: FormSchemaGetter = () => [ }, }, { - label: '项目名称', + label: '巡检项目', fieldName: 'itemName', component: 'Input', rules: 'required', @@ -54,6 +63,6 @@ export const modalSchema: FormSchemaGetter = () => [ { label: '备注', fieldName: 'remark', - component: 'Input', + component: 'Textarea', }, ]; diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionPoint/data.ts b/apps/web-antd/src/views/property/inspectionManagement/inspectionPoint/data.ts new file mode 100644 index 00000000..d4fd584f --- /dev/null +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionPoint/data.ts @@ -0,0 +1,149 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; + + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'itemId', + label: '巡检项目id', + }, + { + component: 'Input', + fieldName: 'pointName', + label: '巡检点名称', + }, + { + component: 'Select', + componentProps: { + }, + fieldName: 'pointType', + label: '巡检点类型', + }, + { + component: 'Input', + fieldName: 'nfcCode', + label: 'nfc编码', + }, + { + component: 'Input', + fieldName: 'createById', + label: '创建人id', + }, + { + component: 'Input', + fieldName: 'updateById', + label: '更新人id', + }, + { + component: 'Input', + fieldName: 'searchValue', + label: '搜索值', + }, +]; + +// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 +// export const columns: () => VxeGridProps['columns'] = () => [ +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '主键id', + field: 'id', + }, + { + title: '巡检项目id', + field: 'itemId', + }, + { + title: '巡检点名称', + field: 'pointName', + }, + { + title: '巡检点类型', + field: 'pointType', + }, + { + title: 'nfc编码', + field: 'nfcCode', + }, + { + title: '备注', + field: 'remark', + }, + { + title: '创建人id', + field: 'createById', + }, + { + title: '更新人id', + field: 'updateById', + }, + { + title: '搜索值', + field: 'searchValue', + }, + { + 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: '巡检项目id', + fieldName: 'itemId', + component: 'Input', + rules: 'required', + }, + { + label: '巡检点名称', + fieldName: 'pointName', + component: 'Input', + rules: 'required', + }, + { + label: '巡检点类型', + fieldName: 'pointType', + component: 'Select', + componentProps: { + }, + rules: 'selectRequired', + }, + { + label: 'nfc编码', + fieldName: 'nfcCode', + component: 'Input', + }, + { + label: '备注', + fieldName: 'remark', + component: 'Textarea', + }, + { + label: '创建人id', + fieldName: 'createById', + component: 'Input', + }, + { + label: '更新人id', + fieldName: 'updateById', + component: 'Input', + }, + { + label: '搜索值', + fieldName: 'searchValue', + component: 'Input', + }, +]; diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionPoint/index.vue b/apps/web-antd/src/views/property/inspectionManagement/inspectionPoint/index.vue new file mode 100644 index 00000000..77621ef6 --- /dev/null +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionPoint/index.vue @@ -0,0 +1,182 @@ + + + diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionPoint/inspectionPoint-modal.vue b/apps/web-antd/src/views/property/inspectionManagement/inspectionPoint/inspectionPoint-modal.vue new file mode 100644 index 00000000..5cd51b95 --- /dev/null +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionPoint/inspectionPoint-modal.vue @@ -0,0 +1,101 @@ + + + + diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionTask/data.ts b/apps/web-antd/src/views/property/inspectionManagement/inspectionTask/data.ts new file mode 100644 index 00000000..c12ee44d --- /dev/null +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionTask/data.ts @@ -0,0 +1,192 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; + + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'inspectionPlanId', + label: '巡检计划id', + }, + { + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + fieldName: 'actInsTime', + label: '实际巡检时间', + }, + { + component: 'Input', + fieldName: 'actUserId', + label: '当前巡检人', + }, + { + component: 'Select', + componentProps: { + }, + fieldName: 'taskType', + label: '巡检方式', + }, + { + component: 'Textarea', + fieldName: 'transferDesc', + label: '转移描述', + }, + { + component: 'RadioGroup', + componentProps: { + buttonStyle: 'solid', + optionType: 'button', + }, + fieldName: 'status', + label: '巡检状态', + }, + { + component: 'Input', + fieldName: 'createById', + label: '创建人id', + }, + { + component: 'Input', + fieldName: 'updateById', + label: '更新人id', + }, + { + component: 'Input', + fieldName: 'searchValue', + label: '搜索值', + }, +]; + +// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 +// export const columns: () => VxeGridProps['columns'] = () => [ +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '主键id', + field: 'id', + }, + { + title: '巡检计划id', + field: 'inspectionPlanId', + }, + { + title: '实际巡检时间', + field: 'actInsTime', + }, + { + title: '当前巡检人', + field: 'actUserId', + }, + { + title: '巡检方式', + field: 'taskType', + }, + { + title: '转移描述', + field: 'transferDesc', + }, + { + title: '巡检状态', + field: 'status', + }, + { + title: '备注', + field: 'remark', + }, + { + title: '创建人id', + field: 'createById', + }, + { + title: '更新人id', + field: 'updateById', + }, + { + title: '搜索值', + field: 'searchValue', + }, + { + 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: '巡检计划id', + fieldName: 'inspectionPlanId', + component: 'Input', + }, + { + label: '实际巡检时间', + fieldName: 'actInsTime', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + }, + { + label: '当前巡检人', + fieldName: 'actUserId', + component: 'Input', + }, + { + label: '巡检方式', + fieldName: 'taskType', + component: 'Select', + componentProps: { + }, + }, + { + label: '转移描述', + fieldName: 'transferDesc', + component: 'Textarea', + }, + { + label: '巡检状态', + fieldName: 'status', + component: 'RadioGroup', + componentProps: { + buttonStyle: 'solid', + optionType: 'button', + }, + }, + { + label: '备注', + fieldName: 'remark', + component: 'Input', + }, + { + label: '创建人id', + fieldName: 'createById', + component: 'Input', + }, + { + label: '更新人id', + fieldName: 'updateById', + component: 'Input', + }, + { + label: '搜索值', + fieldName: 'searchValue', + component: 'Input', + }, +]; diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionTask/index.vue b/apps/web-antd/src/views/property/inspectionManagement/inspectionTask/index.vue new file mode 100644 index 00000000..e257535e --- /dev/null +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionTask/index.vue @@ -0,0 +1,182 @@ + + + diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionTask/inspectionTask-modal.vue b/apps/web-antd/src/views/property/inspectionManagement/inspectionTask/inspectionTask-modal.vue new file mode 100644 index 00000000..b1d11246 --- /dev/null +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionTask/inspectionTask-modal.vue @@ -0,0 +1,101 @@ + + + +