diff --git a/yanzhu-ui-vue3/src/views/manage/attendanceUbiData/index.vue b/yanzhu-ui-vue3/src/views/manage/attendanceUbiData/index.vue index 81414a4c..f4b3df74 100644 --- a/yanzhu-ui-vue3/src/views/manage/attendanceUbiData/index.vue +++ b/yanzhu-ui-vue3/src/views/manage/attendanceUbiData/index.vue @@ -381,7 +381,11 @@ queryParams.value.inTime = proxy.$dt(new Date()).format("YYYY-MM-DD"); function getCfgList() { listAttendance_cfg({ projectId: userStore.currentPrjId, pageNum: 1, pageSize: 100 }).then(response => { data.cfgOptions = response.rows || [] - queryParams.value.cfgId = data.cfgOptions[0]?.id || null + if (data.cfgOptions.length > 0) { + queryParams.value.cfgId = data.cfgOptions[0].id + } else { + queryParams.value.cfgId = null + } getList() }); } diff --git a/yanzhu-ui-vue3/src/views/manage/attendanceUbiData/statistics.vue b/yanzhu-ui-vue3/src/views/manage/attendanceUbiData/statistics.vue index 2e166e83..0f7eb809 100644 --- a/yanzhu-ui-vue3/src/views/manage/attendanceUbiData/statistics.vue +++ b/yanzhu-ui-vue3/src/views/manage/attendanceUbiData/statistics.vue @@ -211,7 +211,11 @@ queryParams.value.inTime = proxy.$dt(new Date()).format("YYYY-MM-DD"); function getCfgList() { listAttendance_cfg({ projectId: userStore.currentPrjId, pageNum: 1, pageSize: 100 }).then(response => { data.cfgOptions = response.rows || [] - queryParams.value.cfgId = data.cfgOptions[0]?.id || null + if (data.cfgOptions.length > 0) { + queryParams.value.cfgId = data.cfgOptions[0].id + } else { + queryParams.value.cfgId = null + } handleQuery(); }); } diff --git a/yanzhu-ui-vue3/src/views/manage/attendance_ubi_device/index.vue b/yanzhu-ui-vue3/src/views/manage/attendance_ubi_device/index.vue index 8ff8d80a..9b447ab7 100644 --- a/yanzhu-ui-vue3/src/views/manage/attendance_ubi_device/index.vue +++ b/yanzhu-ui-vue3/src/views/manage/attendance_ubi_device/index.vue @@ -417,7 +417,11 @@ function getWorkAreaTree() { function getCfgList() { listAttendance_cfg({ projectId: userStore.currentPrjId, pageNum: 1, pageSize: 100 }).then(response => { data.cfgOptions = response.rows || [] - queryParams.value.cfgId = data.cfgOptions[0]?.id || null + if (data.cfgOptions.length > 0) { + queryParams.value.cfgId = data.cfgOptions[0].id + } else { + queryParams.value.cfgId = null + } getList() }); } diff --git a/yanzhu-ui-vue3/src/views/manage/mobileAttendanceData/index.vue b/yanzhu-ui-vue3/src/views/manage/mobileAttendanceData/index.vue index ede36479..2357b91c 100644 --- a/yanzhu-ui-vue3/src/views/manage/mobileAttendanceData/index.vue +++ b/yanzhu-ui-vue3/src/views/manage/mobileAttendanceData/index.vue @@ -293,7 +293,11 @@ function handleExport() { function getCfgList() { listAttendance_cfg({ projectId: userStore.currentPrjId, pageNum: 1, pageSize: 100 }).then(response => { data.cfgOptions = response.rows || [] - queryParams.value.cfgId = data.cfgOptions[0]?.id || null + if (data.cfgOptions.length > 0) { + queryParams.value.cfgId = data.cfgOptions[0].id + } else { + queryParams.value.cfgId = null + } getList() }); }