From fb963ff3a75bc966621081ca15afe715432da655 Mon Sep 17 00:00:00 2001 From: dev_ljl <2590379346@qq.com> Date: Wed, 9 Jul 2025 10:36:42 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=B7=A5=E5=8D=95=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../businessManagement/workOrders/index.ts | 61 ++++ .../businessManagement/workOrders/model.d.ts | 219 +++++++++++++++ .../conferenceAddServices/index.ts | 2 +- .../businessManagement/workOrders/data.ts | 263 ++++++++++++++++++ .../businessManagement/workOrders/index.vue | 168 +++++++++++ .../workOrders/workOrders-modal.vue | 101 +++++++ .../conferenceReservations-modal.vue | 13 +- .../conferenceReservations/index.vue | 4 +- 8 files changed, 820 insertions(+), 11 deletions(-) create mode 100644 apps/web-antd/src/api/property/businessManagement/workOrders/index.ts create mode 100644 apps/web-antd/src/api/property/businessManagement/workOrders/model.d.ts create mode 100644 apps/web-antd/src/views/property/businessManagement/workOrders/data.ts create mode 100644 apps/web-antd/src/views/property/businessManagement/workOrders/index.vue create mode 100644 apps/web-antd/src/views/property/businessManagement/workOrders/workOrders-modal.vue diff --git a/apps/web-antd/src/api/property/businessManagement/workOrders/index.ts b/apps/web-antd/src/api/property/businessManagement/workOrders/index.ts new file mode 100644 index 00000000..d1148daa --- /dev/null +++ b/apps/web-antd/src/api/property/businessManagement/workOrders/index.ts @@ -0,0 +1,61 @@ +import type { WorkOrdersVO, WorkOrdersForm, WorkOrdersQuery } 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 workOrdersList(params?: WorkOrdersQuery) { + return requestClient.get>('/property/workOrders/list', { params }); +} + +/** + * 导出工单处理列表 + * @param params + * @returns 工单处理列表 + */ +export function workOrdersExport(params?: WorkOrdersQuery) { + return commonExport('/property/workOrders/export', params ?? {}); +} + +/** + * 查询工单处理详情 + * @param id id + * @returns 工单处理详情 + */ +export function workOrdersInfo(id: ID) { + return requestClient.get(`/property/workOrders/${id}`); +} + +/** + * 新增工单处理 + * @param data + * @returns void + */ +export function workOrdersAdd(data: WorkOrdersForm) { + return requestClient.postWithMsg('/property/workOrders', data); +} + +/** + * 更新工单处理 + * @param data + * @returns void + */ +export function workOrdersUpdate(data: WorkOrdersForm) { + return requestClient.putWithMsg('/property/workOrders', data); +} + +/** + * 删除工单处理 + * @param id id + * @returns void + */ +export function workOrdersRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/workOrders/${id}`); +} diff --git a/apps/web-antd/src/api/property/businessManagement/workOrders/model.d.ts b/apps/web-antd/src/api/property/businessManagement/workOrders/model.d.ts new file mode 100644 index 00000000..3498c884 --- /dev/null +++ b/apps/web-antd/src/api/property/businessManagement/workOrders/model.d.ts @@ -0,0 +1,219 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface WorkOrdersVO { + /** + * id + */ + id: string | number; + + /** + * 工单编号 + */ + orderNo: string; + + /** + * 工单名称 + */ + orderName: string; + + /** + * 工单类型 + */ + type: number; + + /** + * 状态 + */ + status: number; + + /** + * 派单时间 + */ + dispatchTime: string; + + /** + * 发起人姓名 + */ + initiatorName: string; + + /** + * 发起人手机号 + */ + initiatorPhone: string; + + /** + * 处理人姓名 + */ + handler: string; + + /** + * 地址 + */ + location: string; + + /** + * 计划完成时间 + */ + planCompleTime: string; + + /** + * 完成时间 + */ + compleTime: string; + + /** + * 评价 + */ + serviceEvalua: string; + + /** + * 是否超时 + */ + isTimeOut: number; + +} + +export interface WorkOrdersForm extends BaseEntity { + /** + * id + */ + id?: string | number; + + /** + * 工单编号 + */ + orderNo?: string; + + /** + * 工单名称 + */ + orderName?: string; + + /** + * 工单类型 + */ + type?: number; + + /** + * 状态 + */ + status?: number; + + /** + * 派单时间 + */ + dispatchTime?: string; + + /** + * 发起人姓名 + */ + initiatorName?: string; + + /** + * 发起人手机号 + */ + initiatorPhone?: string; + + /** + * 处理人姓名 + */ + handler?: string; + + /** + * 地址 + */ + location?: string; + + /** + * 计划完成时间 + */ + planCompleTime?: string; + + /** + * 完成时间 + */ + compleTime?: string; + + /** + * 评价 + */ + serviceEvalua?: string; + + /** + * 是否超时 + */ + isTimeOut?: number; + +} + +export interface WorkOrdersQuery extends PageQuery { + /** + * 工单编号 + */ + orderNo?: string; + + /** + * 工单名称 + */ + orderName?: string; + + /** + * 工单类型 + */ + type?: number; + + /** + * 状态 + */ + status?: number; + + /** + * 派单时间 + */ + dispatchTime?: string; + + /** + * 发起人姓名 + */ + initiatorName?: string; + + /** + * 发起人手机号 + */ + initiatorPhone?: string; + + /** + * 处理人姓名 + */ + handler?: string; + + /** + * 地址 + */ + location?: string; + + /** + * 计划完成时间 + */ + planCompleTime?: string; + + /** + * 完成时间 + */ + compleTime?: string; + + /** + * 评价 + */ + serviceEvalua?: string; + + /** + * 是否超时 + */ + isTimeOut?: number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/api/property/roomBooking/conferenceAddServices/index.ts b/apps/web-antd/src/api/property/roomBooking/conferenceAddServices/index.ts index 7f57a6f4..4565ecd3 100644 --- a/apps/web-antd/src/api/property/roomBooking/conferenceAddServices/index.ts +++ b/apps/web-antd/src/api/property/roomBooking/conferenceAddServices/index.ts @@ -15,7 +15,7 @@ export function attachList(params?: AttachQuery) { return requestClient.get>('/property/attach/list', { params }); } export function attachListAll() { - return requestClient.get>('/property/attach/attachList', ); + return requestClient.get('/property/attach/attachList', ); } /** diff --git a/apps/web-antd/src/views/property/businessManagement/workOrders/data.ts b/apps/web-antd/src/views/property/businessManagement/workOrders/data.ts new file mode 100644 index 00000000..b7c7586d --- /dev/null +++ b/apps/web-antd/src/views/property/businessManagement/workOrders/data.ts @@ -0,0 +1,263 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; + + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'orderNo', + label: '工单编号', + }, + { + component: 'Input', + fieldName: 'orderName', + label: '工单名称', + }, + { + component: 'Select', + componentProps: { + }, + fieldName: 'type', + label: '工单类型', + }, + { + component: 'RadioGroup', + componentProps: { + buttonStyle: 'solid', + optionType: 'button', + }, + fieldName: 'status', + label: '状态', + }, + { + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + fieldName: 'dispatchTime', + label: '派单时间', + }, + { + component: 'Input', + fieldName: 'initiatorName', + label: '发起人姓名', + }, + { + component: 'Input', + fieldName: 'initiatorPhone', + label: '发起人手机号', + }, + { + component: 'Input', + fieldName: 'handler', + label: '处理人姓名', + }, + { + component: 'Input', + fieldName: 'location', + label: '地址', + }, + { + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + fieldName: 'planCompleTime', + label: '计划完成时间', + }, + { + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + fieldName: 'compleTime', + label: '完成时间', + }, + { + component: 'Input', + fieldName: 'serviceEvalua', + label: '评价', + }, + { + component: 'Input', + fieldName: 'isTimeOut', + label: '是否超时', + }, +]; + +// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 +// export const columns: () => VxeGridProps['columns'] = () => [ +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: 'id', + field: 'id', + }, + { + title: '工单编号', + field: 'orderNo', + }, + { + title: '工单名称', + field: 'orderName', + }, + { + title: '工单类型', + field: 'type', + }, + { + title: '状态', + field: 'status', + }, + { + title: '派单时间', + field: 'dispatchTime', + }, + { + title: '发起人姓名', + field: 'initiatorName', + }, + { + title: '发起人手机号', + field: 'initiatorPhone', + }, + { + title: '处理人姓名', + field: 'handler', + }, + { + title: '地址', + field: 'location', + }, + { + title: '计划完成时间', + field: 'planCompleTime', + }, + { + title: '完成时间', + field: 'compleTime', + }, + { + title: '评价', + field: 'serviceEvalua', + }, + { + title: '是否超时', + field: 'isTimeOut', + }, + { + 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: 'orderNo', + component: 'Input', + }, + { + label: '工单名称', + fieldName: 'orderName', + component: 'Input', + rules: 'required', + }, + { + label: '工单类型', + fieldName: 'type', + component: 'Select', + componentProps: { + }, + rules: 'selectRequired', + }, + { + label: '状态', + fieldName: 'status', + component: 'RadioGroup', + componentProps: { + buttonStyle: 'solid', + optionType: 'button', + }, + rules: 'selectRequired', + }, + { + label: '派单时间', + fieldName: 'dispatchTime', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + rules: 'required', + }, + { + label: '发起人姓名', + fieldName: 'initiatorName', + component: 'Input', + }, + { + label: '发起人手机号', + fieldName: 'initiatorPhone', + component: 'Input', + }, + { + label: '处理人姓名', + fieldName: 'handler', + component: 'Input', + }, + { + label: '地址', + fieldName: 'location', + component: 'Input', + }, + { + label: '计划完成时间', + fieldName: 'planCompleTime', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + }, + { + label: '完成时间', + fieldName: 'compleTime', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + }, + { + label: '评价', + fieldName: 'serviceEvalua', + component: 'Input', + }, + { + label: '是否超时', + fieldName: 'isTimeOut', + component: 'Input', + }, +]; diff --git a/apps/web-antd/src/views/property/businessManagement/workOrders/index.vue b/apps/web-antd/src/views/property/businessManagement/workOrders/index.vue new file mode 100644 index 00000000..0f88e535 --- /dev/null +++ b/apps/web-antd/src/views/property/businessManagement/workOrders/index.vue @@ -0,0 +1,168 @@ + + + diff --git a/apps/web-antd/src/views/property/businessManagement/workOrders/workOrders-modal.vue b/apps/web-antd/src/views/property/businessManagement/workOrders/workOrders-modal.vue new file mode 100644 index 00000000..f9cbccd0 --- /dev/null +++ b/apps/web-antd/src/views/property/businessManagement/workOrders/workOrders-modal.vue @@ -0,0 +1,101 @@ + + + + diff --git a/apps/web-antd/src/views/property/roomBooking/conferenceReservations/conferenceReservations-modal.vue b/apps/web-antd/src/views/property/roomBooking/conferenceReservations/conferenceReservations-modal.vue index 6a843f7d..11e0c516 100644 --- a/apps/web-antd/src/views/property/roomBooking/conferenceReservations/conferenceReservations-modal.vue +++ b/apps/web-antd/src/views/property/roomBooking/conferenceReservations/conferenceReservations-modal.vue @@ -76,8 +76,8 @@ async function handleConfirm() { } // getValues获取为一个readonly的对象 需要修改必须先深拷贝一次 const data = cloneDeep(await formApi.getValues()); - data.meetId=conferenceSettingDetail.value.id; - data.name=conferenceSettingDetail.value.name; + data.meetId=conferenceSettingDetail.value?.id; + data.name=conferenceSettingDetail.value?.name; if (data.timeSpan && data.timeSpan.length) { data.scheduledStarttime = data.timeSpan[0]?.format("HH:mm"); data.scheduledEndtime = data.timeSpan[1]?.format("HH:mm"); @@ -110,12 +110,7 @@ async function handleOpenChange() { } async function queryAddServices() { - let params = { - pageSize: 1000, - pageNum: 1, - state: 1 - } - const res = await attachListAll(params) + const res = await attachListAll() addServiceList.value = res.map(item => ({ meetAttachId: item.id, projectName: item.projectName, @@ -203,7 +198,7 @@ async function changeProjectNum() {