diff --git a/apps/web-antd/src/api/property/attendanceManagement/arrangement/model.d.ts b/apps/web-antd/src/api/property/attendanceManagement/arrangement/model.d.ts index 89b0748c..91efa8ce 100644 --- a/apps/web-antd/src/api/property/attendanceManagement/arrangement/model.d.ts +++ b/apps/web-antd/src/api/property/attendanceManagement/arrangement/model.d.ts @@ -89,6 +89,10 @@ export interface ArrangementForm extends BaseEntity { * 排班人员详情 */ userGroupList: any[]; + /** + * 排班id + */ + scheduleId: string | number; } export interface ArrangementQuery extends PageQuery { diff --git a/apps/web-antd/src/api/property/attendanceManagement/attendanceArea/index.ts b/apps/web-antd/src/api/property/attendanceManagement/attendanceArea/index.ts new file mode 100644 index 00000000..ff3291a0 --- /dev/null +++ b/apps/web-antd/src/api/property/attendanceManagement/attendanceArea/index.ts @@ -0,0 +1,61 @@ +import type { AttendanceAreaVO, AttendanceAreaForm, AttendanceAreaQuery } 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 attendanceAreaList(params?: AttendanceAreaQuery) { + return requestClient.get>('/property/attendanceArea/list', { params }); +} + +/** + * 导出区域区域管理列表 + * @param params + * @returns 区域区域管理列表 + */ +export function attendanceAreaExport(params?: AttendanceAreaQuery) { + return commonExport('/property/attendanceArea/export', params ?? {}); +} + +/** + * 查询区域区域管理详情 + * @param id id + * @returns 区域区域管理详情 + */ +export function attendanceAreaInfo(id: ID) { + return requestClient.get(`/property/attendanceArea/${id}`); +} + +/** + * 新增区域区域管理 + * @param data + * @returns void + */ +export function attendanceAreaAdd(data: AttendanceAreaForm) { + return requestClient.postWithMsg('/property/attendanceArea', data); +} + +/** + * 更新区域区域管理 + * @param data + * @returns void + */ +export function attendanceAreaUpdate(data: AttendanceAreaForm) { + return requestClient.putWithMsg('/property/attendanceArea', data); +} + +/** + * 删除区域区域管理 + * @param id id + * @returns void + */ +export function attendanceAreaRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/attendanceArea/${id}`); +} diff --git a/apps/web-antd/src/api/property/attendanceManagement/attendanceArea/model.d.ts b/apps/web-antd/src/api/property/attendanceManagement/attendanceArea/model.d.ts new file mode 100644 index 00000000..e912be71 --- /dev/null +++ b/apps/web-antd/src/api/property/attendanceManagement/attendanceArea/model.d.ts @@ -0,0 +1,69 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface AttendanceAreaVO { + /** + * 主键id + */ + id: string | number; + + /** + * 摄像机id + */ + deviceManageId: string | number; + + /** + * 区域 + */ + area: string; + + /** + * 备注 + */ + reamark: string; + +} + +export interface AttendanceAreaForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 摄像机id + */ + deviceManageId?: string | number; + + /** + * 区域 + */ + area?: string; + + /** + * 备注 + */ + reamark?: string; + +} + +export interface AttendanceAreaQuery extends PageQuery { + /** + * 摄像机id + */ + deviceManageId?: string | number; + + /** + * 区域 + */ + area?: string; + + /** + * 备注 + */ + reamark?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/property/attendanceManagement/attendanceArea/attendanceArea-modal.vue b/apps/web-antd/src/views/property/attendanceManagement/attendanceArea/attendanceArea-modal.vue new file mode 100644 index 00000000..36ca4e4a --- /dev/null +++ b/apps/web-antd/src/views/property/attendanceManagement/attendanceArea/attendanceArea-modal.vue @@ -0,0 +1,101 @@ + + + + diff --git a/apps/web-antd/src/views/property/attendanceManagement/attendanceArea/data.ts b/apps/web-antd/src/views/property/attendanceManagement/attendanceArea/data.ts new file mode 100644 index 00000000..35a9ec6f --- /dev/null +++ b/apps/web-antd/src/views/property/attendanceManagement/attendanceArea/data.ts @@ -0,0 +1,68 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; + + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'area', + label: '区域', + } +]; + +// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 +// export const columns: () => VxeGridProps['columns'] = () => [ +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '区域', + field: 'area', + width: 'auto', + }, + { + title: '摄像机id', + field: 'deviceManageId', + minWidth: 300, + }, + + { + title: '备注', + field: 'reamark', + }, + { + 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: 'area', + component: 'Input', + }, + { + label: '摄像机id', + fieldName: 'deviceManageId', + component: 'Select', + componentProps: { + }, + }, + { + label: '备注', + fieldName: 'reamark', + component: 'Input', + }, +]; diff --git a/apps/web-antd/src/views/property/attendanceManagement/attendanceArea/index.vue b/apps/web-antd/src/views/property/attendanceManagement/attendanceArea/index.vue new file mode 100644 index 00000000..52cc246e --- /dev/null +++ b/apps/web-antd/src/views/property/attendanceManagement/attendanceArea/index.vue @@ -0,0 +1,182 @@ + + + diff --git a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/calendarView.vue b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/calendarView.vue index 87f5d535..a91c95b9 100644 --- a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/calendarView.vue +++ b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/calendarView.vue @@ -180,8 +180,8 @@ const getListData2 = ( if (found) { return found.list; } - } + } // 如果没有找到数据,返回空数组 return []; }; diff --git a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/data.ts b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/data.ts index 42f47b65..ddf61fb8 100644 --- a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/data.ts +++ b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/data.ts @@ -82,13 +82,13 @@ export const columns: VxeGridProps['columns'] = [ }, { title: '人员', - field: 'employeeName', + field: 'sysUser.userName', width: 120, // width: 'auto', }, { title: '单位', - field: 'deptName', + field: 'sysUser.deptName', width: 'auto', }, // { diff --git a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/scheduleView.vue b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/scheduleView.vue index 6a22a6aa..dd0262d7 100644 --- a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/scheduleView.vue +++ b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/scheduleView.vue @@ -83,12 +83,12 @@ function handleAdd() { } async function handleEdit(row: Required) { - modalApi.setData({ id: row.id }); + modalApi.setData({ id: row.scheduleId }); modalApi.open(); } async function handleDelete(row: Required) { - await arrangementRemove(row.id); + await arrangementRemove(row.scheduleId); await tableApi.query(); } @@ -129,12 +129,6 @@ async function handleDelete(row: Required) {