+
@@ -316,28 +360,30 @@ onMounted(()=>{
-
+
-
+
-
+
@@ -346,8 +392,8 @@ onMounted(()=>{
@@ -382,6 +428,25 @@ onMounted(()=>{
max-height: 87vh;
overflow-x: hidden;
overflow-y: auto;
+
+ .option-item {
+ :deep(.ant-form-item .ant-form-item-control-input) {
+ margin-bottom: -20px;
+ }
+ }
+
+ .empty-box {
+ height: 50vh;
+ border: 2px dashed #dce0e6;
+ border-radius: 10px;
+
+ :deep(.ant-empty .ant-empty-image) {
+ margin-top: 15vh;
+ }
+
+ margin-bottom: 10px;
+ margin-left: 80px;
+ }
}
.footer-button {
@@ -399,23 +464,7 @@ onMounted(()=>{
background-color: #ffffff;
}
- .empty-box {
- height: 50vh;
- border: 2px dashed #dce0e6;
- border-radius: 10px;
- :deep(.ant-empty .ant-empty-image) {
- margin-top: 15vh;
- }
-
- margin-bottom: 10px;
- margin-left: 80px;
- }
-
- .question-item-title {
- font-weight: bold;
- margin: 5px 12px;
- }
}
From ca4f180e7ea0d70caa5e01e2c64f4401e08b701c Mon Sep 17 00:00:00 2001
From: fyy <2717885210@qq.com>
Date: Tue, 19 Aug 2025 10:52:50 +0800
Subject: [PATCH 2/4] =?UTF-8?q?feat:=20=E5=AE=8C=E6=88=90=E8=80=83?=
=?UTF-8?q?=E5=8B=A4=E7=AE=A1=E7=90=86=E4=B8=8B=E7=9A=84=E5=8C=BA=E5=9F=9F?=
=?UTF-8?q?=E7=AE=A1=E7=90=86=E5=92=8C=E6=8E=92=E7=8F=AD=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../arrangement/model.d.ts | 1 +
.../attendanceArea/data.ts | 15 +++++++++++++--
.../workforceManagement/arrangement-modal.vue | 9 +++++----
.../workforceManagement/data.ts | 18 +++++++++++++++++-
.../workforceManagement/workforce-detail.vue | 13 ++++++-------
5 files changed, 42 insertions(+), 14 deletions(-)
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 5dd87db2..596a3177 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
@@ -43,6 +43,7 @@ export interface ArrangementVO {
userGroupList?: any[];
attendanceGroup?: any;
dateType?: number;
+ areaList: any[]; //区域
}
export interface ArrangementForm extends BaseEntity {
diff --git a/apps/web-antd/src/views/property/attendanceManagement/attendanceArea/data.ts b/apps/web-antd/src/views/property/attendanceManagement/attendanceArea/data.ts
index 9f0abf52..fe433e70 100644
--- a/apps/web-antd/src/views/property/attendanceManagement/attendanceArea/data.ts
+++ b/apps/web-antd/src/views/property/attendanceManagement/attendanceArea/data.ts
@@ -19,9 +19,20 @@ export const columns: VxeGridProps['columns'] = [
width: 'auto',
},
{
- title: '摄像机id',
- field: 'deviceManageId',
+ title: '摄像机',
+ field: 'areaDevice',
minWidth: 300,
+ slots: {
+ default: ({ row }: { row: any }) => {
+ if (!row.areaDevice || !Array.isArray(row.areaDevice)) {
+ return '';
+ }
+ return row.areaDevice
+ .map((device: any) => device.remoteSisDeviceManage?.deviceName || '')
+ .filter((deviceName: string) => deviceName)
+ .join(', ');
+ },
+ },
},
{
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 cc36d025..7d227467 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
@@ -31,7 +31,7 @@ let formModal = reactive<{
dateType: number | undefined;
startDate: string;
endDate: string;
- areaId: string;
+ areaId: string[];
userGroupList: any[];
}>({
id: '',
@@ -43,7 +43,7 @@ let formModal = reactive<{
// dateRange: [null, null],
startDate: '', //开始日期
endDate: '', //结束日期
- areaId: '', //区域
+ areaId: [], //区域
userGroupList: [
// scheduleId:undefined,//排班ID
// employeeId:undefined,//员工ID
@@ -313,7 +313,7 @@ async function handleConfirm() {
dateType: undefined,
startDate: '',
endDate: '',
- areaId: '',
+ areaId: [],
userGroupList: [],
});
// 重置其他数据
@@ -338,7 +338,7 @@ async function handleClosed() {
dateType: undefined,
startDate: '',
endDate: '',
- areaId: '',
+ areaId: [],
userGroupList: [],
});
@@ -422,6 +422,7 @@ onMounted(() => {});
v-model:value="formModal.areaId"
:options="areaOptions"
placeholder="请选择"
+ mode="multiple"
@change="chooseGroup"
/>
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 3756201a..1134544e 100644
--- a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/data.ts
+++ b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/data.ts
@@ -59,7 +59,7 @@ export const querySchema: FormSchemaGetter = () => [
export const unitQuerySchema: FormSchemaGetter = () => [
{
component: 'Input',
- fieldName: 'scheduleName',
+ fieldName: 'userName',
label: '姓名',
},
{
@@ -339,6 +339,22 @@ export const workforceDayDetailColumns: VxeGridProps['columns'] = [
},
},
},
+ {
+ title: '区域',
+ field: 'areaList',
+ width: 'auto',
+ slots: {
+ default: ({ row }: { row: any }) => {
+ if (!row.areaList || !Array.isArray(row.areaList)) {
+ return '';
+ }
+ return row.areaList
+ .map((item: any) => item.area || '')
+ .filter((areaName: string) => areaName)
+ .join(', ');
+ },
+ },
+ },
{
title: '班组人数',
field: 'userCount',
diff --git a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/workforce-detail.vue b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/workforce-detail.vue
index 06817e6b..c7e6f34b 100644
--- a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/workforce-detail.vue
+++ b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/workforce-detail.vue
@@ -22,14 +22,14 @@ let formModal = reactive<{
id: string | number;
groupId?: string | number;
attendanceType: string;
- areaId: string;
+ areaId: string[];
userGroupList: any[];
dateType: number | undefined;
}>({
id: '',
groupId: '',
attendanceType: '', //考勤组类型
- areaId: '', //区域
+ areaId: [], //区域
userGroupList: [
// scheduleId:undefined,//排班ID
// employeeId:undefined,//员工ID
@@ -179,6 +179,7 @@ const [BasicModal, modalApi] = useVbenModal({
formModal.id = record.id;
formModal.groupId = record.attendanceGroup.id;
formModal.dateType = record.dateType;
+ formModal.areaId = record.areaList?.map((area: any) => area.id) || [];
if (record.userGroupList) {
// 按部门分组处理 userGroupList
@@ -203,8 +204,6 @@ const [BasicModal, modalApi] = useVbenModal({
tableData.splice(0, 0, ...Array.from(deptMap.values()));
}
}
- console.log(tableData);
-
// await markInitialized();
modalApi.modalLoading(false);
},
@@ -251,7 +250,6 @@ async function handleConfirm() {
modalApi.lock(true);
await formRef.value.validate(); // 先校验
const data = formModal;
- console.log(tableData);
data.userGroupList = tableData.flatMap((item) =>
item.users.map((user) => ({
deptId: item.dept.unitId,
@@ -270,7 +268,7 @@ async function handleConfirm() {
dateType: undefined,
startDate: '',
endDate: '',
- areaId: '',
+ areaId: [],
userGroupList: [],
});
// 重置其他数据
@@ -292,7 +290,7 @@ async function handleClosed() {
dateType: undefined,
startDate: '',
endDate: '',
- areaId: '',
+ areaId: [],
userGroupList: [],
});
@@ -332,6 +330,7 @@ onMounted(() => {});
v-model:value="formModal.areaId"
:options="areaOptions"
placeholder="请选择"
+ mode="multiple"
@change="chooseGroup"
/>
From 1a9927e60a5631dc3a626de7654ce92698d6c59b Mon Sep 17 00:00:00 2001
From: fyy <2717885210@qq.com>
Date: Tue, 19 Aug 2025 11:15:19 +0800
Subject: [PATCH 3/4] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2?=
=?UTF-8?q?=E8=A7=86=E5=9B=BE=E6=9C=AA=E9=87=8D=E6=96=B0=E8=8E=B7=E5=8F=96?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../workforceManagement/calendarView.vue | 43 +++----------------
.../workforceManagement/index.vue | 18 +++++++-
.../workforceManagement/scheduleView.vue | 10 ++---
3 files changed, 27 insertions(+), 44 deletions(-)
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 a91c95b9..6f33ca09 100644
--- a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/calendarView.vue
+++ b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/calendarView.vue
@@ -160,9 +160,7 @@ const scheduleData: {
date: string;
list: { type: BadgeProps['status']; content: string }[];
}[] = [
- { date: '2025-07-08', list: [{ type: 'warning', content: '7月8日事件' }] },
- { date: '2025-07-06', list: [{ type: 'success', content: '8月8日事件' }] },
- // ...
+ //组件需要数据结构 { date: '2025-07-08', list: [{ type: 'warning', content: '7月8日事件' }] },
];
// 切换视图模式
function handleViewModeChange(e: RadioChangeEvent): void {
@@ -180,45 +178,11 @@ const getListData2 = (
if (found) {
return found.list;
}
-
}
// 如果没有找到数据,返回空数组
return [];
};
-const getListData = (
- value: Dayjs,
-): { type: BadgeProps['status']; content: string }[] => {
- let listData: { type: BadgeProps['status']; content: string }[] | undefined;
- switch (value.date()) {
- case 8:
- listData = [
- { type: 'warning', content: 'This is warning event.' },
- { type: 'success', content: 'This is usual event.' },
- ];
- break;
- case 10:
- listData = [
- { type: 'warning', content: 'This is warning event.' },
- { type: 'success', content: 'This is usual event.' },
- { type: 'error', content: 'This is error event.' },
- ];
- break;
- case 15:
- listData = [
- { type: 'warning', content: 'This is warning event' },
- { type: 'success', content: 'This is very long usual event。。....' },
- { type: 'error', content: 'This is error event 1.' },
- { type: 'error', content: 'This is error event 2.' },
- { type: 'error', content: 'This is error event 3.' },
- { type: 'error', content: 'This is error event 4.' },
- ];
- break;
- default:
- }
- return listData || [];
-};
-
function customHeader() {
// 返回想要的VNode或null
return null; // 什么都不显示
@@ -284,6 +248,11 @@ function handleViewDateDetails(date: string) {
onMounted(() => {
fetchCalendarData();
});
+
+// 暴露方法给父组件调用
+defineExpose({
+ fetchCalendarData,
+});
diff --git a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/index.vue b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/index.vue
index d85ffa0e..2a49695f 100644
--- a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/index.vue
+++ b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/index.vue
@@ -1,22 +1,36 @@
) {
- modalApi.setData({ id: row.scheduleId });
- modalApi.open();
-}
-
async function handleDelete(row: Required) {
await arrangementRemove(row.scheduleId);
await tableApi.query();
}
+
+// 暴露方法给父组件调用
+defineExpose({
+ tableApi,
+});
From 87fc96500ad6a1de24a2c8d08b6c60c7dbf2bdc8 Mon Sep 17 00:00:00 2001
From: fyy <2717885210@qq.com>
Date: Tue, 19 Aug 2025 11:50:57 +0800
Subject: [PATCH 4/4] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91?=
=?UTF-8?q?=E8=80=83=E5=8B=A4=E7=BB=84=E4=BA=BA=E5=91=98=E5=B1=95=E7=A4=BA?=
=?UTF-8?q?bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../workforceManagement/arrangement-modal.vue | 4 ++--
.../workforceManagement/workforce-detail.vue | 17 ++++++++---------
2 files changed, 10 insertions(+), 11 deletions(-)
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 7d227467..c497417f 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
@@ -77,7 +77,7 @@ const columns = [
},
{
title: '部门',
- dataIndex: ['dept', 'unitName'],
+ dataIndex: ['dept', 'deptName'],
key: 'dept',
width: 120,
customRender: ({
@@ -443,7 +443,7 @@ onMounted(() => {});
:columns="columns"
:dataSource="tableData"
:pagination="false"
- rowKey="dept.unitId"
+ rowKey="dept.deptId"
bordered
/>
diff --git a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/workforce-detail.vue b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/workforce-detail.vue
index c7e6f34b..de9b4d0e 100644
--- a/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/workforce-detail.vue
+++ b/apps/web-antd/src/views/property/attendanceManagement/workforceManagement/workforce-detail.vue
@@ -44,7 +44,7 @@ const groupOptions = ref([]); //考勤组
const areaOptions = ref([]); //区域
const groupMap = ref>({}); // 用于快速查找
let tableData = reactive<
- { dept: { unitId: string | number; unitName: string }; users: PersonVO[] }[]
+ { dept: { deptId: string | number; deptName: string }; users: PersonVO[] }[]
>([]); //存放考勤组人员列表数据
const columns = [
{
@@ -56,10 +56,10 @@ const columns = [
},
{
title: '部门',
- dataIndex: ['dept', 'unitName'],
+ dataIndex: ['dept', 'deptName'],
key: 'dept',
width: 120,
- customRender: ({ record }: { record: any }) => record.dept.unitName,
+ customRender: ({ record }: { record: any }) => record.dept.deptName,
},
{
title: '已选人数',
@@ -124,12 +124,11 @@ function handleTableData(newTableData: any) {
if (newTableData.length === 0) {
return;
}
-
// 处理有数据的情况
for (const newItem of newTableData) {
// 查找是否已存在相同部门
const existingDeptIndex = tableData.findIndex(
- (item) => item.dept.unitId === newItem.dept.unitId,
+ (item) => item.dept.deptId === newItem.dept.deptId,
);
if (existingDeptIndex !== -1) {
@@ -191,7 +190,7 @@ const [BasicModal, modalApi] = useVbenModal({
if (!deptMap.has(deptId)) {
deptMap.set(deptId, {
- dept: { unitId: deptId, unitName: deptName },
+ dept: { deptId: deptId, deptName: deptName },
users: [],
});
}
@@ -252,8 +251,8 @@ async function handleConfirm() {
const data = formModal;
data.userGroupList = tableData.flatMap((item) =>
item.users.map((user) => ({
- deptId: item.dept.unitId,
- deptName: item.dept.unitName,
+ deptId: item.dept.deptId,
+ deptName: item.dept.deptName,
employeeId: user.userId,
employeeName: user.userName,
})),
@@ -351,7 +350,7 @@ onMounted(() => {});
:columns="columns"
:dataSource="tableData"
:pagination="false"
- rowKey="dept.unitId"
+ rowKey="dept.deptId"
bordered
/>