提交代码

This commit is contained in:
zlwu committed 2025-09-07 23:36:35 +08:00
1 parent 82b770ef24
commit 652285005a
5 files changed
+2777 -1

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -582,6 +582,7 @@ import { UploadFilled, Document, Loading, Download, Delete } from '@element-plus
import { getToken } from '@/utils/auth';
import ImagePreview from '@/components/ImagePreview/index.vue';
import request from '@/utils/request';
import { useUserStore } from '@/store/modules/user';
import {
listHolidayStay,
getHolidayStay,
@@ -611,6 +612,9 @@ import {
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { xg_holiday_type, xg_stay_reason_type, sys_yesno } = toRefs<any>(proxy?.useDict('xg_holiday_type', 'xg_stay_reason_type', 'sys_yesno'));
// 用户store - 用于获取当前登录用户信息,实现权限控制
const userStore = useUserStore();
const holidayStayList = ref<HolidayStayVO[]>([]);
const buttonLoading = ref(false);
const loading = ref(true);
@@ -756,9 +760,17 @@ const uploadData = computed(() => {
const getList = async () => {
loading.value = true;
// 确保用户信息已加载
if (!userStore.userId) {
await userStore.getInfo();
}
// 处理状态过滤逻辑
const requestParams = { ...queryParams.value };
// 添加创建人过滤条件 - 班主任只能看到自己创建的数据
requestParams.createBy = userStore.userId;
// 根据状态设置时间过滤条件
if (requestParams.status) {
const currentTime = new Date().toISOString().slice(0, 19).replace('T', ' ');