From b0e6a3324bcc0e073c4f864cb537e1725685b0c5 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 09 十月 2026 21:10:20 +0800
Subject: [PATCH] 天津-奇缘恒艺 1.录数据需求修改
---
src/views/personnelManagement/classsSheduling/index.vue | 28 ++++++++++++++++++++++------
1 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/src/views/personnelManagement/classsSheduling/index.vue b/src/views/personnelManagement/classsSheduling/index.vue
index 59e65b4..9e816db 100644
--- a/src/views/personnelManagement/classsSheduling/index.vue
+++ b/src/views/personnelManagement/classsSheduling/index.vue
@@ -147,9 +147,9 @@
class="shift-dropdown">
<div class="shift-box"
:class="{
- 'shift-box-early': m.shift === '鏃╃彮',
- 'shift-box-mid': m.shift === '涓彮',
- 'shift-box-night': m.shift === '澶滅彮',
+ 'shift-box-early': m.shift && m.shift.includes('鏃╃彮'),
+ 'shift-box-mid': m.shift && m.shift.includes('涓彮'),
+ 'shift-box-night': m.shift && m.shift.includes('澶滅彮'),
'shift-box-rest': !m.shift || m.shift === '浼戞伅',
'shift-box-leave': m.shift === '璇峰亣',
'shift-box-other': m.shift === '澶�11',
@@ -159,7 +159,7 @@
</div>
<template #dropdown>
<el-dropdown-menu>
- <el-dropdown-item v-for="(n, j) in classType"
+ <el-dropdown-item v-for="(n, j) in getRowClassType(item)"
:key="'h' + j"
:command="n.id">{{ n.shift || '鈥�'
}}</el-dropdown-item>
@@ -422,10 +422,26 @@
if (!schedulingQuery.deptId) return classType.value || [];
return (classType.value || []).filter(item => {
if (["998", "999"].includes(String(item?.id))) return true;
- const itemDeptId = item.deptId ?? item.sysDeptId ?? item.dept_id;
+ const itemDeptId = item.sysDeptId ?? item.deptId ?? item.dept_id;
return String(itemDeptId) === String(schedulingQuery.deptId);
});
});
+
+ // 鏍煎瓙鍐呮敼鐝鏃讹紝鎸夎鍛樺伐鐨勯儴闂ㄨ繃婊ゅ彲閫夌彮娆★紙閬垮厤涓嶅悓閮ㄩ棬鐨勫悓鍚嶇彮娆℃贩娣嗭級
+ const getRowClassType = row => {
+ const list = classType.value || [];
+ const staffId = row?.userId ?? row?.user_id ?? row?.id;
+ const staff = (personListAll.value || []).find(
+ item => String(item.id) === String(staffId)
+ );
+ const deptId = staff?.sysDeptId ?? staff?.deptId ?? staff?.dept_id;
+ if (!deptId) return list;
+ return list.filter(item => {
+ if (["998", "999"].includes(String(item?.id))) return true;
+ const itemDeptId = item.sysDeptId ?? item.deptId ?? item.dept_id;
+ return String(itemDeptId) === String(deptId);
+ });
+ };
// 鍒楄〃鏁版嵁
const listForm = ref([]);
@@ -853,7 +869,7 @@
const node = findDeptNodeById(schedulingQuery.deptId);
const deptIds = new Set(collectDeptIds(node));
personList.value = (personListAll.value || []).filter(item => {
- const itemDeptId = item.deptId ?? item.sysDeptId ?? item.dept_id;
+ const itemDeptId = item.sysDeptId ?? item.deptId ?? item.dept_id;
return deptIds.has(String(itemDeptId)) && !isEmployeeBlockedByLeaveDate(item);
});
};
--
Gitblit v1.9.3