考勤明细修改审批、考勤明细修改记录增加上传文件附件

This commit is contained in:
lSun 2025-02-21 14:00:56 +08:00
parent d831cf72e4
commit 2f37a8cb2e
3 changed files with 198 additions and 67 deletions

View File

@ -96,23 +96,28 @@
<el-table-column label="修改后时间" align="center" prop="toWorkUpdateAttCurrentTime" :show-overflow-tooltip="true"/>
<el-table-column label="修改后状态" align="center" prop="toWorkUpdateAttStatus" :show-overflow-tooltip="true">
<template slot-scope="scope">
<div v-if="scope.row.toWorkUpdateAttStatus==0" @click="reasonDialog(scope.row.toErrorRemake)">未打卡</div>
<div v-if="scope.row.toWorkUpdateAttStatus==1" @click="reasonDialog(scope.row.toErrorRemake)">正常</div>
<div style="color: #F1A4AD" v-if="scope.row.toWorkUpdateAttStatus==2" @click="reasonDialog(scope.row.toErrorRemake)">迟到</div>
<div style="color: #29C9C9" v-if="scope.row.toWorkUpdateAttStatus==3" @click="reasonDialog(scope.row.toErrorRemake)">旷工</div>
<div v-if="scope.row.toWorkUpdateAttStatus==4" @click="reasonDialog(scope.row.toErrorRemake)">早退</div>
<div v-if="scope.row.toWorkUpdateAttStatus==5" @click="reasonDialog(scope.row.toErrorRemake)">轮休</div>
<div style="color: #14ACF0" v-if="scope.row.toWorkUpdateAttStatus==6" @click="reasonDialog(scope.row.toErrorRemake)">请假</div>
<div v-if="scope.row.toWorkUpdateAttStatus==7" @click="reasonDialog(scope.row.toErrorRemake)">临时外出</div>
<div style="color: #DD1E36" v-if="scope.row.toWorkUpdateAttStatus==8" @click="reasonDialog(scope.row.toErrorRemake)">出入异常</div>
<div v-if="scope.row.toWorkUpdateAttStatus==9" @click="reasonDialog(scope.row.toErrorRemake)">打卡地异常</div>
<div v-if="scope.row.toWorkUpdateAttStatus==10" @click="reasonDialog(scope.row.toErrorRemake)">出差</div>
<div v-if="scope.row.toWorkUpdateAttStatus==11" @click="reasonDialog(scope.row.toErrorRemake)">法定节假日</div>
<div style="cursor: pointer;" v-if="scope.row.toWorkUpdateAttStatus==0" @click="reasonDialog(scope.row.toErrorRemake)">未打卡</div>
<div style="cursor: pointer;" v-if="scope.row.toWorkUpdateAttStatus==1" @click="reasonDialog(scope.row.toErrorRemake)">正常</div>
<div style="cursor: pointer;color: #F1A4AD" v-if="scope.row.toWorkUpdateAttStatus==2" @click="reasonDialog(scope.row.toErrorRemake)">迟到</div>
<div style="cursor: pointer;color: #29C9C9" v-if="scope.row.toWorkUpdateAttStatus==3" @click="reasonDialog(scope.row.toErrorRemake)">旷工</div>
<div style="cursor: pointer;" v-if="scope.row.toWorkUpdateAttStatus==4" @click="reasonDialog(scope.row.toErrorRemake)">早退</div>
<div style="cursor: pointer;" v-if="scope.row.toWorkUpdateAttStatus==5" @click="reasonDialog(scope.row.toErrorRemake)">轮休</div>
<div style="cursor: pointer;color: #14ACF0" v-if="scope.row.toWorkUpdateAttStatus==6" @click="reasonDialog(scope.row.toErrorRemake)">请假</div>
<div style="cursor: pointer;" v-if="scope.row.toWorkUpdateAttStatus==7" @click="reasonDialog(scope.row.toErrorRemake)">临时外出</div>
<div style="cursor: pointer;color: #DD1E36" v-if="scope.row.toWorkUpdateAttStatus==8" @click="reasonDialog(scope.row.toErrorRemake)">出入异常</div>
<div style="cursor: pointer;" v-if="scope.row.toWorkUpdateAttStatus==9" @click="reasonDialog(scope.row.toErrorRemake)">打卡地异常</div>
<div style="cursor: pointer;" v-if="scope.row.toWorkUpdateAttStatus==10" @click="reasonDialog(scope.row.toErrorRemake)">出差</div>
<div style="cursor: pointer;" v-if="scope.row.toWorkUpdateAttStatus==11" @click="reasonDialog(scope.row.toErrorRemake)">法定节假日</div>
</template>
</el-table-column>
<el-table-column label="修改后附件" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<div style="cursor:pointer;color: #29C9C9 " v-if="getFileName(scope.row.filesVoList, '1')" @click="previewFile(getFilePath(scope.row.filesVoList, '1'))">
{{ getFileName(scope.row.filesVoList, '1') }}
</div>
</template>
</el-table-column>
<el-table-column label="下班打卡时间" align="center" prop="offWorkOriginalAttCurrentTime" width="180"></el-table-column>
<el-table-column label="下班状态" align="center" prop="offWorkOriginalAttStatus">
@ -135,18 +140,27 @@
<el-table-column label="修改后时间" align="center" prop="offWorkUpdateAttCurrentTime" :show-overflow-tooltip="true"/>
<el-table-column label="修改后状态" align="center" prop="offWorkUpdateAttStatus" :show-overflow-tooltip="true">
<template slot-scope="scope">
<div v-if="scope.row.offWorkUpdateAttStatus==0" @click="reasonDialog(scope.row.offErrorRemake)">未打卡</div>
<div v-if="scope.row.offWorkUpdateAttStatus==1" @click="reasonDialog(scope.row.offErrorRemake)">正常</div>
<div style="color: #F1A4AD" v-if="scope.row.offWorkUpdateAttStatus==2" @click="reasonDialog(scope.row.offErrorRemake)">迟到</div>
<div style="color: #29C9C9" v-if="scope.row.offWorkUpdateAttStatus==3" @click="reasonDialog(scope.row.offErrorRemake)">旷工</div>
<div v-if="scope.row.offWorkUpdateAttStatus==4" @click="reasonDialog(scope.row.offErrorRemake)">早退</div>
<div v-if="scope.row.offWorkUpdateAttStatus==5" @click="reasonDialog(scope.row.offErrorRemake)">轮休</div>
<div style="color: #14ACF0" v-if="scope.row.offWorkUpdateAttStatus==6" @click="reasonDialog(scope.row.offErrorRemake)">请假</div>
<div v-if="scope.row.offWorkUpdateAttStatus==7" @click="reasonDialog(scope.row.offErrorRemake)">临时外出</div>
<div style="color: #DD1E36" v-if="scope.row.offWorkUpdateAttStatus==8" @click="reasonDialog(scope.row.offErrorRemake)">出入异常</div>
<div v-if="scope.row.offWorkUpdateAttStatus==9" @click="reasonDialog(scope.row.offErrorRemake)">打卡地异常</div>
<div v-if="scope.row.offWorkUpdateAttStatus==10" @click="reasonDialog(scope.row.offErrorRemake)">出差</div>
<div v-if="scope.row.offWorkUpdateAttStatus==11" @click="reasonDialog(scope.row.offErrorRemake)">法定节假日</div>
<div style="cursor: pointer;" v-if="scope.row.offWorkUpdateAttStatus==0" @click="reasonDialog(scope.row.offErrorRemake)">未打卡</div>
<div style="cursor: pointer;" v-if="scope.row.offWorkUpdateAttStatus==1" @click="reasonDialog(scope.row.offErrorRemake)">正常</div>
<div style="cursor: pointer;color: #F1A4AD" v-if="scope.row.offWorkUpdateAttStatus==2" @click="reasonDialog(scope.row.offErrorRemake)">迟到</div>
<div style="cursor: pointer;color: #29C9C9" v-if="scope.row.offWorkUpdateAttStatus==3" @click="reasonDialog(scope.row.offErrorRemake)">旷工</div>
<div style="cursor: pointer;" v-if="scope.row.offWorkUpdateAttStatus==4" @click="reasonDialog(scope.row.offErrorRemake)">早退</div>
<div style="cursor: pointer;" v-if="scope.row.offWorkUpdateAttStatus==5" @click="reasonDialog(scope.row.offErrorRemake)">轮休</div>
<div style="cursor: pointer;color: #14ACF0" v-if="scope.row.offWorkUpdateAttStatus==6" @click="reasonDialog(scope.row.offErrorRemake)">请假</div>
<div style="cursor: pointer;" v-if="scope.row.offWorkUpdateAttStatus==7" @click="reasonDialog(scope.row.offErrorRemake)">临时外出</div>
<div style="cursor: pointer;color: #DD1E36" v-if="scope.row.offWorkUpdateAttStatus==8" @click="reasonDialog(scope.row.offErrorRemake)">出入异常</div>
<div style="cursor: pointer;" v-if="scope.row.offWorkUpdateAttStatus==9" @click="reasonDialog(scope.row.offErrorRemake)">打卡地异常</div>
<div style="cursor: pointer;" v-if="scope.row.offWorkUpdateAttStatus==10" @click="reasonDialog(scope.row.offErrorRemake)">出差</div>
<div style="cursor: pointer;" v-if="scope.row.offWorkUpdateAttStatus==11" @click="reasonDialog(scope.row.offErrorRemake)">法定节假日</div>
</template>
</el-table-column>
<el-table-column label="修改后附件" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<div style="cursor:pointer;color: #29C9C9 " v-if="getFileName(scope.row.filesVoList, '2')" @click="previewFile(getFilePath(scope.row.filesVoList, '2'))">
{{ getFileName(scope.row.filesVoList, '2') }}
</div>
</template>
</el-table-column>
</el-table>
@ -187,18 +201,25 @@
<el-table-column label="修改后时间" align="center" prop="toWorkUpdateAttCurrentTime" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="修改后状态" align="center" prop="toWorkUpdateAttStatus" :show-overflow-tooltip="true" width="120">
<template slot-scope="scope">
<div v-if="scope.row.toWorkUpdateAttStatus==0" @click="reasonDialog(scope.row.toErrorRemake)">未打卡</div>
<div v-if="scope.row.toWorkUpdateAttStatus==1" @click="reasonDialog(scope.row.toErrorRemake)">正常</div>
<div style="color: #F1A4AD" v-if="scope.row.toWorkUpdateAttStatus==2" @click="reasonDialog(scope.row.toErrorRemake)">迟到</div>
<div style="color: #29C9C9" v-if="scope.row.toWorkUpdateAttStatus==3" @click="reasonDialog(scope.row.toErrorRemake)">旷工</div>
<div v-if="scope.row.toWorkUpdateAttStatus==4" @click="reasonDialog(scope.row.toErrorRemake)">早退</div>
<div v-if="scope.row.toWorkUpdateAttStatus==5" @click="reasonDialog(scope.row.toErrorRemake)">轮休</div>
<div style="color: #14ACF0" v-if="scope.row.toWorkUpdateAttStatus==6" @click="reasonDialog(scope.row.toErrorRemake)">请假</div>
<div v-if="scope.row.toWorkUpdateAttStatus==7" @click="reasonDialog(scope.row.toErrorRemake)">临时外出</div>
<div style="color: #DD1E36" v-if="scope.row.toWorkUpdateAttStatus==8" @click="reasonDialog(scope.row.toErrorRemake)">出入异常</div>
<div v-if="scope.row.toWorkUpdateAttStatus==9" @click="reasonDialog(scope.row.toErrorRemake)">打卡地异常</div>
<div v-if="scope.row.toWorkUpdateAttStatus==10" @click="reasonDialog(scope.row.toErrorRemake)">出差</div>
<div v-if="scope.row.toWorkUpdateAttStatus==11" @click="reasonDialog(scope.row.toErrorRemake)">法定节假日</div>
<div style="cursor:pointer;" v-if="scope.row.toWorkUpdateAttStatus==0" @click="reasonDialog(scope.row.toErrorRemake)">未打卡</div>
<div style="cursor:pointer;" v-if="scope.row.toWorkUpdateAttStatus==1" @click="reasonDialog(scope.row.toErrorRemake)">正常</div>
<div style="cursor:pointer;color: #F1A4AD" v-if="scope.row.toWorkUpdateAttStatus==2" @click="reasonDialog(scope.row.toErrorRemake)">迟到</div>
<div style="cursor:pointer;color: #29C9C9" v-if="scope.row.toWorkUpdateAttStatus==3" @click="reasonDialog(scope.row.toErrorRemake)">旷工</div>
<div style="cursor:pointer;" v-if="scope.row.toWorkUpdateAttStatus==4" @click="reasonDialog(scope.row.toErrorRemake)">早退</div>
<div style="cursor:pointer;" v-if="scope.row.toWorkUpdateAttStatus==5" @click="reasonDialog(scope.row.toErrorRemake)">轮休</div>
<div style="cursor:pointer;color: #14ACF0" v-if="scope.row.toWorkUpdateAttStatus==6" @click="reasonDialog(scope.row.toErrorRemake)">请假</div>
<div style="cursor:pointer;" v-if="scope.row.toWorkUpdateAttStatus==7" @click="reasonDialog(scope.row.toErrorRemake)">临时外出</div>
<div style="cursor:pointer;color: #DD1E36" v-if="scope.row.toWorkUpdateAttStatus==8" @click="reasonDialog(scope.row.toErrorRemake)">出入异常</div>
<div style="cursor:pointer;" v-if="scope.row.toWorkUpdateAttStatus==9" @click="reasonDialog(scope.row.toErrorRemake)">打卡地异常</div>
<div style="cursor:pointer;" v-if="scope.row.toWorkUpdateAttStatus==10" @click="reasonDialog(scope.row.toErrorRemake)">出差</div>
<div style="cursor:pointer;" v-if="scope.row.toWorkUpdateAttStatus==11" @click="reasonDialog(scope.row.toErrorRemake)">法定节假日</div>
</template>
</el-table-column>
<el-table-column label="修改后附件" align="center" width="150" :show-overflow-tooltip="true">
<template slot-scope="scope">
<div style="cursor:pointer;color: #29C9C9 " v-if="getFileName(scope.row.filesVoList, '1')" @click="previewFile(getFilePath(scope.row.filesVoList, '1'))">
{{ getFileName(scope.row.filesVoList, '1') }}
</div>
</template>
</el-table-column>
<el-table-column label="下班打卡时间" align="center" prop="offWorkOriginalAttCurrentTime" width="150"></el-table-column>
@ -222,18 +243,26 @@
<el-table-column label="修改后时间" align="center" prop="offWorkUpdateAttCurrentTime" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="修改后状态" align="center" prop="offWorkUpdateAttStatus" :show-overflow-tooltip="true" width="120">
<template slot-scope="scope">
<div v-if="scope.row.offWorkUpdateAttStatus==0" @click="reasonDialog(scope.row.offErrorRemake)">未打卡</div>
<div v-if="scope.row.offWorkUpdateAttStatus==1" @click="reasonDialog(scope.row.offErrorRemake)">正常</div>
<div style="color: #F1A4AD" v-if="scope.row.offWorkUpdateAttStatus==2" @click="reasonDialog(scope.row.offErrorRemake)">迟到</div>
<div style="color: #29C9C9" v-if="scope.row.offWorkUpdateAttStatus==3" @click="reasonDialog(scope.row.offErrorRemake)">旷工</div>
<div v-if="scope.row.offWorkUpdateAttStatus==4" @click="reasonDialog(scope.row.offErrorRemake)">早退</div>
<div v-if="scope.row.offWorkUpdateAttStatus==5" @click="reasonDialog(scope.row.offErrorRemake)">轮休</div>
<div style="color: #14ACF0" v-if="scope.row.offWorkUpdateAttStatus==6" @click="reasonDialog(scope.row.offErrorRemake)">请假</div>
<div v-if="scope.row.offWorkUpdateAttStatus==7" @click="reasonDialog(scope.row.offErrorRemake)">临时外出</div>
<div style="color: #DD1E36" v-if="scope.row.offWorkUpdateAttStatus==8" @click="reasonDialog(scope.row.offErrorRemake)">出入异常</div>
<div v-if="scope.row.offWorkUpdateAttStatus==9" @click="reasonDialog(scope.row.offErrorRemake)">打卡地异常</div>
<div v-if="scope.row.offWorkUpdateAttStatus==10" @click="reasonDialog(scope.row.offErrorRemake)">出差</div>
<div v-if="scope.row.offWorkUpdateAttStatus==11" @click="reasonDialog(scope.row.offErrorRemake)">法定节假日</div>
<div style="cursor:pointer;" v-if="scope.row.offWorkUpdateAttStatus==0" @click="reasonDialog(scope.row.offErrorRemake)">未打卡</div>
<div style="cursor:pointer;" v-if="scope.row.offWorkUpdateAttStatus==1" @click="reasonDialog(scope.row.offErrorRemake)">正常</div>
<div style="cursor:pointer;color: #F1A4AD" v-if="scope.row.offWorkUpdateAttStatus==2" @click="reasonDialog(scope.row.offErrorRemake)">迟到</div>
<div style="cursor:pointer;color: #29C9C9" v-if="scope.row.offWorkUpdateAttStatus==3" @click="reasonDialog(scope.row.offErrorRemake)">旷工</div>
<div style="cursor:pointer;" v-if="scope.row.offWorkUpdateAttStatus==4" @click="reasonDialog(scope.row.offErrorRemake)">早退</div>
<div style="cursor:pointer;" v-if="scope.row.offWorkUpdateAttStatus==5" @click="reasonDialog(scope.row.offErrorRemake)">轮休</div>
<div style="cursor:pointer;color: #14ACF0" v-if="scope.row.offWorkUpdateAttStatus==6" @click="reasonDialog(scope.row.offErrorRemake)">请假</div>
<div style="cursor:pointer;" v-if="scope.row.offWorkUpdateAttStatus==7" @click="reasonDialog(scope.row.offErrorRemake)">临时外出</div>
<div style="cursor:pointer;color: #DD1E36" v-if="scope.row.offWorkUpdateAttStatus==8" @click="reasonDialog(scope.row.offErrorRemake)">出入异常</div>
<div style="cursor:pointer;" v-if="scope.row.offWorkUpdateAttStatus==9" @click="reasonDialog(scope.row.offErrorRemake)">打卡地异常</div>
<div style="cursor:pointer;" v-if="scope.row.offWorkUpdateAttStatus==10" @click="reasonDialog(scope.row.offErrorRemake)">出差</div>
<div style="cursor:pointer;" v-if="scope.row.offWorkUpdateAttStatus==11" @click="reasonDialog(scope.row.offErrorRemake)">法定节假日</div>
</template>
</el-table-column>
<el-table-column label="修改后附件" align="center" width="150" :show-overflow-tooltip="true">
<template slot-scope="scope">
<div style="cursor:pointer;color: #29C9C9 " v-if="getFileName(scope.row.filesVoList, '2')" @click="previewFile(getFilePath(scope.row.filesVoList, '2'))">
{{ getFileName(scope.row.filesVoList, '2') }}
</div>
</template>
</el-table-column>
</el-table>
@ -255,18 +284,27 @@
</div>
</el-dialog>
<el-dialog title="文件预览" :visible.sync="fileView" width="1200px" height="1200px" >
<bns-kk-file-preview :items="kkFilePreview">
</bns-kk-file-preview>
</el-dialog>
</div>
</template>
<script>
import {getDetailsRecordList, updateAttDetailsDataExamine,listDept} from "@/api/report/attReport";
import Treeselect from "@riophae/vue-treeselect";
import BnsKkFilePreview from '@/views/bns-kkFile-preview'
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { getToken } from '@/utils/auth'
export default {
name: "Check",
dicts: ['att_status'],
components: {Treeselect},
components: {Treeselect,BnsKkFilePreview},
data() {
return {
//
@ -301,6 +339,13 @@ export default {
orgId: undefined,
attStatus: undefined
},
fileView: false,
fileData:[],
kkFilePreview: {
filePreviewUrl: undefined,
fileName: undefined,
}
};
},
created() {
@ -463,6 +508,34 @@ export default {
}, `type_${new Date().getTime()}.xlsx`)
},
//
getFileName(filesVoList, attType) {
if (!filesVoList) return '';
const file = filesVoList.find(file => file.attType === attType);
return file ? file.fileName : '';
},
//
getFilePath(filesVoList, attType) {
if (!filesVoList) return '';
const file = filesVoList.find(file => file.attType === attType);
return file ? file.filePath : '';
},
previewFile(filePath) {
var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken();
window.open(url_)
//
// this.fileView= true;
// this.fileData = filePath;
// this.kkFilePreview = {
// // filePreviewUrl: filePath.data[0].filePath,
// // fileName: filePath.data[0].fileName,
// filePreviewUrl: "http://192.168.0.14:31909/file/ynRealName/proFile/2025/02/19/5bb40b949c3b490b85540e6289a24c962.docx",
// fileName: "aaaa.docx",
// showDownloadButton: false
// }
// console.log(this.kkFilePreview)
},
}
};
</script>

View File

@ -163,7 +163,7 @@
>
<el-button size="small" type="primary">选择文件</el-button>
</el-upload>
<div style="cursor:pointer " v-if="getFileName(scope.row.filesVoList, '1')" @click="previewFile(getFilePath(scope.row.filesVoList, '1'))">
<div style="cursor:pointer;color: #29C9C9 " v-if="getFileName(scope.row.filesVoList, '1')" @click="previewFile(getFilePath(scope.row.filesVoList, '1'))">
{{ getFileName(scope.row.filesVoList, '1') }}
</div>
</template>
@ -221,7 +221,7 @@
>
<el-button size="small" type="primary">选择文件</el-button>
</el-upload>
<div style="cursor:pointer" v-if="getFileName(scope.row.filesVoList, '2')" @click="previewFile(getFilePath(scope.row.filesVoList, '2'))">
<div style="cursor:pointer;color: #29C9C9" v-if="getFileName(scope.row.filesVoList, '2')" @click="previewFile(getFilePath(scope.row.filesVoList, '2'))">
{{ getFileName(scope.row.filesVoList, '2') }}
</div>
</template>
@ -368,6 +368,7 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { checkPersonAssignment } from '@/api/system/userInfo'
import { getDetail } from '@/api/report/monthlyError'
import { getToken } from '@/utils/auth'
export default {
name: 'AttDetails',
dicts: ['att_status'],
@ -439,8 +440,8 @@ export default {
fileView: false,
fileData:[],
kkFilePreview: {
filePreviewUrl: "http://192.168.0.14:31909/file/ynRealName/proFile/2025/02/19/5bb40b949c3b490b85540e6289a24c962.docx",
fileName: "aaaa.docx",
filePreviewUrl: undefined,
fileName: undefined,
}
}
},
@ -823,17 +824,19 @@ export default {
},
previewFile(filePath) {
var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken();
window.open(url_)
//
this.fileView= true;
this.fileData = filePath;
this.kkFilePreview = {
// filePreviewUrl: filePath.data[0].filePath,
// fileName: filePath.data[0].fileName,
filePreviewUrl: "http://192.168.0.14:31909/file/ynRealName/proFile/2025/02/19/5bb40b949c3b490b85540e6289a24c962.docx",
fileName: "aaaa.docx",
showDownloadButton: false
}
console.log(this.kkFilePreview)
// this.fileView= true;
// this.fileData = filePath;
// this.kkFilePreview = {
// // filePreviewUrl: filePath.data[0].filePath,
// // fileName: filePath.data[0].fileName,
// filePreviewUrl: "http://192.168.0.14:31909/file/ynRealName/proFile/2025/02/19/5bb40b949c3b490b85540e6289a24c962.docx",
// fileName: "aaaa.docx",
// showDownloadButton: false
// }
// console.log(this.kkFilePreview)
},
//

View File

@ -82,14 +82,19 @@
</template>
</el-table-column>
<el-table-column label="打卡地址" align="center" prop="toWorkAttAddress" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="修改后时间" align="center" prop="toWorkUpdateAttCurrentTime" width="180" :show-overflow-tooltip="true"/>
<el-table-column label="修改后状态" align="center" prop="toWorkUpdateAttStatus" width="100" :show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag :options="dict.type.att_status" :value="scope.row.toWorkUpdateAttStatus"/>
</template>
</el-table-column>
<el-table-column label="修改后附件" align="center" width="100" :show-overflow-tooltip="true">
<template slot-scope="scope">
<div style="cursor:pointer;color: #29C9C9 " v-if="getFileName(scope.row.filesVoList, '1')" @click="previewFile(getFilePath(scope.row.filesVoList, '1'))">
{{ getFileName(scope.row.filesVoList, '1') }}
</div>
</template>
</el-table-column>
<el-table-column label="下班打卡时间" align="center" prop="offWorkOriginalAttCurrentTime" width="180" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="下班状态" align="center" prop="offWorkOriginalAttStatus" width="100" :show-overflow-tooltip="true">
<template slot-scope="scope">
@ -103,6 +108,14 @@
<dict-tag :options="dict.type.att_status" :value="scope.row.offWorkUpdateAttStatus"/>
</template>
</el-table-column>
<el-table-column label="修改后附件" align="center" width="100" :show-overflow-tooltip="true">
<template slot-scope="scope">
<div style="cursor:pointer;color: #29C9C9 " v-if="getFileName(scope.row.filesVoList, '2')" @click="previewFile(getFilePath(scope.row.filesVoList, '2'))">
{{ getFileName(scope.row.filesVoList, '2') }}
</div>
</template>
</el-table-column>
</el-table>
<pagination
@ -168,6 +181,12 @@
</div>
</el-dialog>
<el-dialog title="文件预览" :visible.sync="fileView" width="1200px" height="1200px" >
<bns-kk-file-preview :items="kkFilePreview">
</bns-kk-file-preview>
</el-dialog>
</div>
</template>
@ -175,6 +194,7 @@
import {getDetailsRecordList, updateAttDetailsDataExamine,listDept} from "@/api/report/attReport";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { getToken } from '@/utils/auth'
export default {
name: "Record",
@ -214,6 +234,12 @@ export default {
orgId: undefined,
attStatus: undefined
},
fileView: false,
fileData:[],
kkFilePreview: {
filePreviewUrl: undefined,
fileName: undefined,
}
};
},
created() {
@ -375,6 +401,35 @@ export default {
}, `type_${new Date().getTime()}.xlsx`)
},
//
getFileName(filesVoList, attType) {
if (!filesVoList) return '';
const file = filesVoList.find(file => file.attType === attType);
return file ? file.fileName : '';
},
//
getFilePath(filesVoList, attType) {
if (!filesVoList) return '';
const file = filesVoList.find(file => file.attType === attType);
return file ? file.filePath : '';
},
previewFile(filePath) {
var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken();
window.open(url_)
//
// this.fileView= true;
// this.fileData = filePath;
// this.kkFilePreview = {
// // filePreviewUrl: filePath.data[0].filePath,
// // fileName: filePath.data[0].fileName,
// filePreviewUrl: "http://192.168.0.14:31909/file/ynRealName/proFile/2025/02/19/5bb40b949c3b490b85540e6289a24c962.docx",
// fileName: "aaaa.docx",
// showDownloadButton: false
// }
// console.log(this.kkFilePreview)
},
}
};
</script>