From 93be4f1891c9046008ea1df12cf87076835ee7aa Mon Sep 17 00:00:00 2001 From: fyy <2717885210@qq.com> Date: Mon, 18 Aug 2025 11:27:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8E=92=E7=8F=AD=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8C=BA=E5=9F=9F=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../attendanceArea/model.d.ts | 4 +-- .../workforceManagement/arrangement-modal.vue | 28 ++++++++++++++++- .../workforceManagement/data.ts | 17 +++++++++++ .../workforceManagement/workforce-detail.vue | 30 ++++++++++++++++++- 4 files changed, 75 insertions(+), 4 deletions(-) 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 index e912be71..ffc7106b 100644 --- a/apps/web-antd/src/api/property/attendanceManagement/attendanceArea/model.d.ts +++ b/apps/web-antd/src/api/property/attendanceManagement/attendanceArea/model.d.ts @@ -7,9 +7,9 @@ export interface AttendanceAreaVO { id: string | number; /** - * 摄像机id + * 摄像机列表 */ - deviceManageId: string | number; + deviceManageId: any[]; /** * 区域 diff --git a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/arrangement-modal.vue b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/arrangement-modal.vue index 13251334..536c74c1 100644 --- a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/arrangement-modal.vue +++ b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/arrangement-modal.vue @@ -20,6 +20,10 @@ import dayjs from 'dayjs'; import type { PersonVO } from './type'; import { ref, h } from 'vue'; import { Tag, Table } from 'ant-design-vue'; +import { + attendanceAreaList, +} from '#/api/property/attendanceManagement/attendanceArea'; + const emit = defineEmits<{ reload: [] }>(); //表单项 let formModal = reactive<{ @@ -29,6 +33,7 @@ let formModal = reactive<{ dateType: number | undefined; startDate: string; endDate: string; + areaId:string; userGroupList: any[]; }>({ id: '', @@ -40,6 +45,7 @@ let formModal = reactive<{ // dateRange: [null, null], startDate: '', //开始日期 endDate: '', //结束日期 + areaId:'',//区域 userGroupList: [ // scheduleId:undefined,//排班ID // employeeId:undefined,//员工ID @@ -57,7 +63,8 @@ const rules = { attendanceType: [{ required: true }], dateType: [{ required: true, message: '请选择排班日期' }], }; -const groupOptions = ref([]); +const groupOptions = ref([]);//考勤组 +const areaOptions = ref([]);//区域 const groupMap = ref>({}); // 用于快速查找 let tableData = reactive< { dept: { deptId: string | number; deptName: string }; users: PersonVO[] }[] @@ -209,6 +216,7 @@ const [BasicModal, modalApi] = useVbenModal({ } modalApi.modalLoading(true); await getGroupList(); + await getAreaList(); // await markInitialized(); modalApi.modalLoading(false); }, @@ -238,6 +246,14 @@ async function getGroupList() { groupMap.value[item.id] = item; }); } +async function getAreaList(){ + const res = await attendanceAreaList({ pageSize: 1000000000, + pageNum: 1,}) + areaOptions.value = (res.rows || []).map((item)=>({ + label:item.area, + value:item.id + })); +} function chooseGroup(value: any) { const group = groupMap.value[value]; if (group) { @@ -300,6 +316,7 @@ async function handleConfirm() { dateType: undefined, startDate: '', endDate: '', + areaId:'', userGroupList: [], }); // 重置其他数据 @@ -324,6 +341,7 @@ async function handleClosed() { dateType: undefined, startDate: '', endDate: '', + areaId:'', userGroupList: [], }); @@ -402,6 +420,14 @@ onMounted(() => {}); + + +