diff --git a/apps/web-antd/src/api/property/roomBooking/index.ts b/apps/web-antd/src/api/property/roomBooking/index.ts index 2619975f..39a18981 100644 --- a/apps/web-antd/src/api/property/roomBooking/index.ts +++ b/apps/web-antd/src/api/property/roomBooking/index.ts @@ -1,4 +1,9 @@ -import type { RoomBookingVO, RoomBookingForm, RoomBookingQuery,GetMeetNameVO } from './model'; +import type { + RoomBookingVO, + RoomBookingForm, + RoomBookingQuery, + GetMeetNameVO, +} from './model'; import type { ID, IDS } from '#/api/common'; import type { PageResult } from '#/api/common'; @@ -7,21 +12,26 @@ import { commonExport } from '#/api/helper'; import { requestClient } from '#/api/request'; /** -* 查询会议室名称列表 -* @param getMeetName 后端约定传'getMeetName' -* @returns 会议室名称列表 -*/ + * 查询会议室名称列表 + * @param getMeetName 后端约定传'getMeetName' + * @returns 会议室名称列表 + */ export function getMeetName() { - return requestClient.get>(`/property/enum-fetcher/enum-values/${'getMeetName'}`); + return requestClient.get( + `/property/enum-fetcher/enum-values/${'getMeetName'}`, + ); } /** -* 查询会议管理列表 -* @param params -* @returns 会议管理列表 -*/ + * 查询会议管理列表 + * @param params + * @returns 会议管理列表 + */ export function roomBookingList(params?: RoomBookingQuery) { - return requestClient.get>('/property/roomBooking/list', { params }); + return requestClient.get>( + '/property/roomBooking/list', + { params }, + ); } /** @@ -69,10 +79,15 @@ export function roomBookingRemove(id: ID | IDS) { return requestClient.deleteWithMsg(`/property/roomBooking/${id}`); } /** -* 按照日期查询已预约会议预约记录列表 -* @param params -* @returns 会议预约列表 -*/ -export function meetbookingAppointmentList(params?: MeetbookingAppointmentQuery) { - return requestClient.get>('/property/meetbooking/appointment-list', { params }); -} \ No newline at end of file + * 按照日期查询已预约会议预约记录列表 + * @param params + * @returns 会议预约列表 + */ +export function meetbookingAppointmentList( + params?: MeetbookingAppointmentQuery, +) { + return requestClient.get>( + '/property/meetbooking/appointment-list', + { params }, + ); +} diff --git a/apps/web-antd/src/views/property/clean/cleanOrders/index.vue b/apps/web-antd/src/views/property/clean/cleanOrders/index.vue index be5b2af8..4ef06d35 100644 --- a/apps/web-antd/src/views/property/clean/cleanOrders/index.vue +++ b/apps/web-antd/src/views/property/clean/cleanOrders/index.vue @@ -127,24 +127,24 @@ function handleDownloadExcel() { ); } - function handleView(row: Required) { +function handleView(row: Required) { modalApi.setData({ id: row.id, readonly: true }); modalApi.open(); } -function handleAudit(row:any) { +function handleAudit(row: any) { // 审核逻辑 // TODO: 实现审核功能 console.log('审核', row); - modalApi.setData({ id: row.id, readonly: true,audit:true,row:row }); + modalApi.setData({ id: row.id, readonly: true, audit: true, row: row }); modalApi.open(); } -function handleRefund(row:any) { +function handleRefund(row: any) { // 退定逻辑 // TODO: 实现退定功能 console.log('退定', row); - modalApi.setData({ id: row.id, readonly: true,refund:true,row:row }); + modalApi.setData({ id: row.id, readonly: true, refund: true, row: row }); modalApi.open(); } @@ -160,15 +160,6 @@ function handleRefund(row:any) { > {{ $t('pages.common.export') }} - - {{ $t('pages.common.delete') }} - 查看 diff --git a/apps/web-antd/src/views/property/clean/cleanSettings/data.ts b/apps/web-antd/src/views/property/clean/cleanSettings/data.ts index b376ed7e..d4ddf3f2 100644 --- a/apps/web-antd/src/views/property/clean/cleanSettings/data.ts +++ b/apps/web-antd/src/views/property/clean/cleanSettings/data.ts @@ -42,7 +42,7 @@ export const columns: VxeGridProps['columns'] = [ { title: '劳务名称', field: 'name', - width: '120', + minWidth: '120', }, { title: '计量单位', @@ -95,6 +95,7 @@ export const columns: VxeGridProps['columns'] = [ fixed: 'right', slots: { default: 'action' }, title: '操作', + width: '230', }, ]; diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionTask/index.vue b/apps/web-antd/src/views/property/inspectionManagement/inspectionTask/index.vue index 06ceda3e..251f59a4 100644 --- a/apps/web-antd/src/views/property/inspectionManagement/inspectionTask/index.vue +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionTask/index.vue @@ -12,7 +12,7 @@ import dayjs from 'dayjs'; import { useVbenVxeGrid, vxeCheckboxChecked, - type VxeGridProps + type VxeGridProps, } from '#/adapter/vxe-table'; import { @@ -76,7 +76,7 @@ const gridOptions: VxeGridProps = { keyField: 'id', }, // 表格全局唯一表示 保存列配置需要用到 - id: 'property-inspectionTask-index' + id: 'property-inspectionTask-index', }; const [BasicTable, tableApi] = useVbenVxeGrid({ @@ -118,9 +118,14 @@ function handleMultiDelete() { } function handleDownloadExcel() { - commonDownloadExcel(inspectionTaskExport, '巡检任务数据', tableApi.formApi.form.values, { - fieldMappingTime: formOptions.fieldMappingTime, - }); + commonDownloadExcel( + inspectionTaskExport, + '巡检任务数据', + tableApi.formApi.form.values, + { + fieldMappingTime: formOptions.fieldMappingTime, + }, + ); } @@ -140,16 +145,9 @@ function handleDownloadExcel() { danger type="primary" v-access:code="['property:inspectionTask:remove']" - @click="handleMultiDelete"> - {{ $t('pages.common.delete') }} - - - {{ $t('pages.common.add') }} + {{ $t('pages.common.delete') }} @@ -158,7 +156,7 @@ function handleDownloadExcel() { 详情 + >详情 - diff --git a/apps/web-antd/src/views/property/roomBooking/conferenceView/index.vue b/apps/web-antd/src/views/property/roomBooking/conferenceView/index.vue index 1f7b8474..05e99caa 100644 --- a/apps/web-antd/src/views/property/roomBooking/conferenceView/index.vue +++ b/apps/web-antd/src/views/property/roomBooking/conferenceView/index.vue @@ -5,7 +5,10 @@ import dayjs from 'dayjs'; import type { TableColumnType } from 'ant-design-vue'; import { Radio, Select, Button, Table } from 'ant-design-vue'; import { getMeetName } from '#/api/property/roomBooking'; -import { getAppointmentListByDate,getAppointmentListBymeetId } from '#/api/property/roomBooking/conferenceView'; +import { + getAppointmentListByDate, + getAppointmentListBymeetId, +} from '#/api/property/roomBooking/conferenceView'; import type { RadioChangeEvent } from 'ant-design-vue'; import type { SelectValue } from 'ant-design-vue/es/select'; @@ -17,13 +20,13 @@ interface ConferenceRoom { interface ConferenceBooking { id: string | number; tbConferenceId: string | number; // 会议室ID - bookingName: string; // 预约人 - deptName: string; // 部门名称 - subject: string; // 会议主题 - startTime: string; // 开始时间 - endTime: string; // 结束时间 - bookingDate: string; // 预约日期 - status: number; // 状态 + bookingName: string; // 预约人 + deptName: string; // 部门名称 + subject: string; // 会议主题 + startTime: string; // 开始时间 + endTime: string; // 结束时间 + bookingDate: string; // 预约日期 + status: number; // 状态 } // 视图模式 @@ -70,12 +73,12 @@ async function fetchBookings(): Promise { try { if (viewMode.value === 'date') { const roomRes = await getMeetName(); - roomList.value = ([roomRes]).map((item: any) => ({ + roomList.value = roomRes.map((item: any) => ({ id: item.value, - name: item.name + name: item.name, })); const appointmentRes = await getAppointmentListByDate({ - appointmentDate: selectedDate.value + appointmentDate: selectedDate.value, }); bookings.value = (appointmentRes || []).map((item: any) => ({ id: item.id, @@ -98,17 +101,19 @@ async function fetchBookings(): Promise { // 兼容后续渲染 })); // 处理为表格结构 - const table: Record> = { '上午': {}, '下午': {} }; - roomList.value.forEach(room => { - ['上午', '下午'].forEach(slot => { - const booking = bookings.value.find(b => b.name === room.name && b.slots === slot); + const table: Record> = { 上午: {}, 下午: {} }; + roomList.value.forEach((room) => { + ['上午', '下午'].forEach((slot) => { + const booking = bookings.value.find( + (b) => b.name === room.name && b.slots === slot, + ); table[slot][room.name] = booking || null; }); }); bookingTable.value = table; } else { const res = await getAppointmentListBymeetId({ - meetId: selectedRoom.value + meetId: selectedRoom.value, }); bookings.value = (res || []).map((item: any) => ({ id: item.id, @@ -129,16 +134,19 @@ async function fetchBookings(): Promise { bookingDate: item.scheduledStarttime, tbConferenceId: item.meetId, })); - const table: Record> = { '上午': {}, '下午': {} }; - weekDates.value.forEach(date => { - ['上午', '下午'].forEach(slot => { - const booking = bookings.value.find(b => dayjs(b.scheduledStarttime).format('YYYY-MM-DD') === date && b.slots === slot); + const table: Record> = { 上午: {}, 下午: {} }; + weekDates.value.forEach((date) => { + ['上午', '下午'].forEach((slot) => { + const booking = bookings.value.find( + (b) => + dayjs(b.scheduledStarttime).format('YYYY-MM-DD') === date && + b.slots === slot, + ); table[slot][date] = booking || null; }); }); bookingTable.value = table; } - } catch (error) { console.error('获取预约数据失败:', error); } finally { @@ -150,8 +158,8 @@ async function fetchBookings(): Promise { function handleViewModeChange(e: RadioChangeEvent): void { viewMode.value = e.target.value; if (viewMode.value === 'date') { - // 默认选中今天 - selectedDate.value = dayjs().format('YYYY-MM-DD'); + // 默认选中今天 + selectedDate.value = dayjs().format('YYYY-MM-DD'); } else { selectedRoom.value = roomList.value[0]?.id ?? ''; } @@ -171,46 +179,45 @@ function handleRoomChange(value: SelectValue): void { } // 获取单元格预约信息(上午/下午) -function getCellBooking(col: string, time: string): ConferenceBooking | undefined { +function getCellBooking( + col: string, + time: string, +): ConferenceBooking | undefined { // 判断时间属于上午还是下午 function isMorning(startTime: string) { const hour = dayjs(startTime).hour(); return hour < 12; } if (viewMode.value === 'date') { - const room = roomList.value.find(r => r.name === col); - return bookings.value.find(b => - b.tbConferenceId === room?.id && - ((time === '上午' && isMorning(b.startTime)) || (time === '下午' && !isMorning(b.startTime))) + const room = roomList.value.find((r) => r.name === col); + return bookings.value.find( + (b) => + b.tbConferenceId === room?.id && + ((time === '上午' && isMorning(b.startTime)) || + (time === '下午' && !isMorning(b.startTime))), ); } else { - return bookings.value.find(b => - dayjs(b.bookingDate).format('YYYY-MM-DD') === col && - ((time === '上午' && isMorning(b.startTime)) || (time === '下午' && !isMorning(b.startTime))) + return bookings.value.find( + (b) => + dayjs(b.bookingDate).format('YYYY-MM-DD') === col && + ((time === '上午' && isMorning(b.startTime)) || + (time === '下午' && !isMorning(b.startTime))), ); } } // 修改渲染预约单元格的函数 function renderBookingCell(booking: ConferenceBooking) { - return h('div', + return h( + 'div', { - class: 'booking-cell' + class: 'booking-cell', }, [ - h('span', - { class: 'booking-user' }, - `预约人:${booking.bookingName}` - ), - h('span', - { class: 'booking-dept' }, - `单位:${booking.deptName}` - ), - h('span', - { class: 'booking-subject' }, - `主题:${booking.subject}` - ) - ] + h('span', { class: 'booking-user' }, `预约人:${booking.bookingName}`), + h('span', { class: 'booking-dept' }, `单位:${booking.deptName}`), + h('span', { class: 'booking-subject' }, `主题:${booking.subject}`), + ], ); } @@ -223,7 +230,7 @@ function getRandomBgColor() { background: `rgba(${r},${g},${b},0.5)`, borderRadius: '6px', padding: '60px 10px', - transition: 'background 0.3s' + transition: 'background 0.3s', }; } @@ -247,37 +254,41 @@ function getFullRoomList() { } const columns = computed[]>(() => { - const baseColumns: TableColumnType[] = [{ - title: '时间', - dataIndex: 'slot', - key: 'slot', - width: 100, - fixed: 'left' as const - }]; - const dynamicColumns: TableColumnType[] = viewMode.value === 'date' - ? getFullRoomList().map(room => ({ - title: room.name || ' ', - dataIndex: room.name, - key: room.name, - width: 200, - })) - : weekDates.value.map(date => ({ - title: dayjs(date).format('YYYY-MM-DD'), - dataIndex: date, - key: date, - width: 200, - })); + const baseColumns: TableColumnType[] = [ + { + title: '时间', + dataIndex: 'slot', + key: 'slot', + width: 100, + fixed: 'left' as const, + }, + ]; + const dynamicColumns: TableColumnType[] = + viewMode.value === 'date' + ? getFullRoomList().map((room) => ({ + title: room.name || ' ', + dataIndex: room.name, + key: room.name, + width: 200, + })) + : weekDates.value.map((date) => ({ + title: dayjs(date).format('YYYY-MM-DD'), + dataIndex: date, + key: date, + width: 200, + })); return [...baseColumns, ...dynamicColumns]; }); const tableData = computed(() => { const slots = ['上午', '下午']; - return slots.map(slot => { + return slots.map((slot) => { const row: any = { slot }; - const cols = viewMode.value === 'date' - ? getFullRoomList().map(room => room.name) - : weekDates.value; - cols.forEach(col => { + const cols = + viewMode.value === 'date' + ? getFullRoomList().map((room) => room.name) + : weekDates.value; + cols.forEach((col) => { row[col] = bookingTable.value[slot]?.[col] || null; }); return row; @@ -336,10 +347,7 @@ onMounted(() => { >