feat:迟到、早退人员bug

This commit is contained in:
dzc committed 2025-09-11 20:16:15 +08:00
1 parent aa6b586fba
commit 0a64c701d7
5 files changed
+78 -36

No files matched your search

+16 -22
View File
@@ -1,19 +1,10 @@
<!-- excel 导入组件 -->
<template>
<el-dialog :title="prop.title" v-model="state.upload.open" :close-on-click-modal="false" draggable>
<el-upload
ref="uploadRef"
:limit="1"
accept=".xlsx, .xls"
:headers="headers"
:action="baseURL + other.adaptationUrl(url)"
:disabled="state.upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:on-error="handleFileError"
:auto-upload="false"
drag
>
<el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="headers"
:action="baseURL + other.adaptationUrl(url)" :disabled="state.upload.isUploading"
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :on-error="handleFileError"
:auto-upload="false" drag>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
{{ $t('excel.operationNotice') }}
@@ -23,8 +14,7 @@
<div class="el-upload__tip text-center">
<span>{{ $t('excel.fileFormat') }}</span>
<el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
@click="downExcelTemp" v-if="tempUrl"
>{{ $t('excel.downloadTemplate') }}
@click="downExcelTemp" v-if="tempUrl">{{ $t('excel.downloadTemplate') }}
</el-link>
</div>
</template>
@@ -49,11 +39,11 @@
</template>
<script setup lang="ts" name="upload-excel">
import {useMessage} from '/@/hooks/message';
import { useMessage } from '/@/hooks/message';
import other from '/@/utils/other';
import {Session} from '/@/utils/storage';
import { Session } from '/@/utils/storage';
const emit = defineEmits(['sizeChange', 'refreshDataList']);
const emit = defineEmits(['sizeChange', 'refreshDataList', 'downExcelTemp']);
const prop = defineProps({
url: {
type: String,
@@ -85,11 +75,15 @@ const state = reactive({
* 下载模板文件
*/
const downExcelTemp = async () => {
try {
await other.downBlobFile(other.adaptationUrl(prop.tempUrl), {}, 'temp.xlsx');
} catch (error) {
useMessage().error('模板下载失败,请先维护模板文件');
if (prop.tempUrl) {
try {
await other.downBlobFile(other.adaptationUrl(prop.tempUrl), {}, 'temp.xlsx');
} catch (error) {
useMessage().error('模板下载失败,请先维护模板文件');
}
return
}
emit("downExcelTemp")
};
/**