修改班组长请求bug

This commit is contained in:
Teo
2025-07-28 19:49:17 +08:00
parent 09c8cf2333
commit ed996ee7f4
11 changed files with 24 additions and 17 deletions

View File

@ -5,7 +5,7 @@ VITE_APP_TITLE = 新能源项目管理平台
VITE_APP_ENV = 'development' VITE_APP_ENV = 'development'
# 开发环境 # 开发环境
VITE_APP_BASE_API = 'http://192.168.110.119:8899' VITE_APP_BASE_API = 'http://192.168.110.159:8899'
# 无人机接口地址 # 无人机接口地址

View File

@ -14,7 +14,7 @@ VITE_APP_MONITOR_ADMIN = '/admin/applications'
VITE_APP_SNAILJOB_ADMIN = '/snail-job' VITE_APP_SNAILJOB_ADMIN = '/snail-job'
# 生产环境 # 生产环境
VITE_APP_BASE_API = 'http://192.168.110.2:8899' VITE_APP_BASE_API = 'http://58.17.134.85:8899'
# 是否在打包时开启压缩,支持 gzip 和 brotli # 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip VITE_BUILD_COMPRESS = gzip

View File

@ -27,6 +27,7 @@ const getSelectedProjectFromStorage = () => {
const getProjectTeamListFromStorage = () => { const getProjectTeamListFromStorage = () => {
const stored = $cache.local.getJSON('ProjectTeamList'); const stored = $cache.local.getJSON('ProjectTeamList');
console.log('获取缓存的项目班组列表:', stored);
return stored ? stored : null; return stored ? stored : null;
}; };

View File

@ -212,7 +212,8 @@ import type { CalendarDateType, CalendarInstance } from 'element-plus';
const userStore = useUserStoreHook(); const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目 // 从 store 中获取项目列表和当前选中的项目
const currentProject = computed(() => userStore.selectedProject); const currentProject = computed(() => userStore.selectedProject);
const ProjectTeam = computed(() => userStore.ProjectTeamList); const ProjectTeam = computed(() => proxy?.$cache.local.getJSON('ProjectTeamList') || []);
const attendanceList = ref<AttendanceVO[]>([]); const attendanceList = ref<AttendanceVO[]>([]);
const attendanceTwoWeekList = ref<AttendanceTwoWeekVO[]>([]); const attendanceTwoWeekList = ref<AttendanceTwoWeekVO[]>([]);
const buttonLoading = ref(false); const buttonLoading = ref(false);

View File

@ -96,7 +96,8 @@ const dialog = reactive<DialogOption>({
const userStore = useUserStoreHook(); const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目 // 从 store 中获取项目列表和当前选中的项目
const currentProject = computed(() => userStore.selectedProject); const currentProject = computed(() => userStore.selectedProject);
const ProjectTeam = computed(() => userStore.ProjectTeamList); const ProjectTeam = computed(() => proxy?.$cache.local.getJSON('ProjectTeamList') || []);
const initFormData: AttendanceForm = { const initFormData: AttendanceForm = {
id: undefined, id: undefined,
userId: undefined, userId: undefined,

View File

@ -524,7 +524,8 @@ const { type_of_work, user_sex_type, user_clock_type, user_file_type, user_statu
const userStore = useUserStoreHook(); const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目 // 从 store 中获取项目列表和当前选中的项目
const currentProject = computed(() => userStore.selectedProject); const currentProject = computed(() => userStore.selectedProject);
const ProjectTeam = computed(() => userStore.ProjectTeamList); const ProjectTeam = computed(() => proxy?.$cache.local.getJSON('ProjectTeamList') || []);
const constructionUserList = ref<ConstructionUserVO[]>([]); const constructionUserList = ref<ConstructionUserVO[]>([]);
const buttonLoading = ref(false); const buttonLoading = ref(false);
const loading = ref(true); const loading = ref(true);
@ -829,10 +830,10 @@ const updateProjectFile = async () => {
await getList(); await getList();
}; };
const getTeamName = (teamId: string | number) => { const getTeamName = computed(() => (teamId: string | number) => {
const team = ProjectTeam.value.find((item: any) => item.value === teamId); const team = Array.isArray(ProjectTeam.value) ? ProjectTeam.value.find((item: any) => item.value === teamId) : null;
return team ? team.label : teamId; return team ? team.label : teamId;
}; });
/** 取消按钮 */ /** 取消按钮 */
const cancel = () => { const cancel = () => {

View File

@ -246,7 +246,8 @@ const dialog = reactive<DialogOption>({
const userStore = useUserStoreHook(); const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目 // 从 store 中获取项目列表和当前选中的项目
const currentProject = computed(() => userStore.selectedProject); const currentProject = computed(() => userStore.selectedProject);
const ProjectTeam = computed(() => userStore.ProjectTeamList); const ProjectTeam = computed(() => proxy?.$cache.local.getJSON('ProjectTeamList') || []);
const initFormData: LeaveForm = { const initFormData: LeaveForm = {
id: undefined, id: undefined,
userId: undefined, userId: undefined,

View File

@ -101,7 +101,7 @@
</el-row> </el-row>
</template> </template>
<el-table v-loading="loading" :data="constructionUserList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="constructionUserList" @selection-change="handleSelectionChange" v-cloak>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" type="index" width="60" align="center" /> <el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column label="姓名" align="center" prop="userName"> <el-table-column label="姓名" align="center" prop="userName">
@ -521,7 +521,7 @@ const { type_of_work, user_sex_type, user_clock_type, user_file_type, user_statu
const userStore = useUserStoreHook(); const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目 // 从 store 中获取项目列表和当前选中的项目
const currentProject = computed(() => userStore.selectedProject); const currentProject = computed(() => userStore.selectedProject);
const ProjectTeam = computed(() => userStore.ProjectTeamList); const ProjectTeam = computed(() => proxy?.$cache.local.getJSON('ProjectTeamList') || []);
const constructionUserList = ref<ConstructionUserVO[]>([]); const constructionUserList = ref<ConstructionUserVO[]>([]);
const buttonLoading = ref(false); const buttonLoading = ref(false);
const loading = ref(true); const loading = ref(true);
@ -825,10 +825,10 @@ const updateProjectFile = async () => {
await getList(); await getList();
}; };
const getTeamName = (teamId: string | number) => { const getTeamName = computed(() => (teamId: string | number) => {
const team = ProjectTeam.value.find((item: any) => item.value === teamId); const team = Array.isArray(ProjectTeam.value) ? ProjectTeam.value.find((item: any) => item.value === teamId) : null;
return team ? team.label : teamId; return team ? team.label : teamId;
}; });
/** 取消按钮 */ /** 取消按钮 */
const cancel = () => { const cancel = () => {

View File

@ -222,7 +222,8 @@ const dialog = reactive<DialogOption>({
const userStore = useUserStoreHook(); const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目 // 从 store 中获取项目列表和当前选中的项目
const currentProject = computed(() => userStore.selectedProject); const currentProject = computed(() => userStore.selectedProject);
const ProjectTeam = computed(() => userStore.ProjectTeamList); const ProjectTeam = computed(() => proxy?.$cache.local.getJSON('ProjectTeamList') || []);
const initFormData: ReissueCardForm = { const initFormData: ReissueCardForm = {
id: undefined, id: undefined,
userId: undefined, userId: undefined,

View File

@ -117,7 +117,8 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const userStore = useUserStoreHook(); const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目 // 从 store 中获取项目列表和当前选中的项目
const currentProject = computed(() => userStore.selectedProject); const currentProject = computed(() => userStore.selectedProject);
const ProjectTeam = computed(() => userStore.ProjectTeamList); const ProjectTeam = computed(() => proxy?.$cache.local.getJSON('ProjectTeamList') || []);
const workerDailyReportList = ref<WorkerDailyReportVO[]>([]); const workerDailyReportList = ref<WorkerDailyReportVO[]>([]);
const buttonLoading = ref(false); const buttonLoading = ref(false);
const loading = ref(true); const loading = ref(true);

View File

@ -104,7 +104,7 @@ const { user_exam_type } = toRefs<any>(proxy?.useDict('user_exam_type'));
const userStore = useUserStoreHook(); const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目 // 从 store 中获取项目列表和当前选中的项目
const currentProject = computed(() => userStore.selectedProject); const currentProject = computed(() => userStore.selectedProject);
const ProjectTeam = computed(() => userStore.ProjectTeamList); const ProjectTeam = computed(() => proxy?.$cache.local.getJSON('ProjectTeamList') || []);
const questionUserAnswerList = ref<QuestionUserAnswerVO[]>([]); const questionUserAnswerList = ref<QuestionUserAnswerVO[]>([]);
const buttonLoading = ref(false); const buttonLoading = ref(false);