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

This commit is contained in:
lSun 2025-02-24 10:33:12 +08:00
parent bdbf2f22fd
commit 23dbd68fad
3 changed files with 65 additions and 49 deletions

View File

@ -113,7 +113,7 @@
<el-table-column label="修改后附件" align="center" :show-overflow-tooltip="true"> <el-table-column label="修改后附件" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="cursor:pointer;color: #29C9C9 " 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(scope.row.filesVoList, '1')">
{{ getFileName(scope.row.filesVoList, '1') }} {{ getFileName(scope.row.filesVoList, '1') }}
</div> </div>
</template> </template>
@ -158,7 +158,7 @@
<el-table-column label="修改后附件" align="center" :show-overflow-tooltip="true"> <el-table-column label="修改后附件" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="cursor:pointer;color: #29C9C9 " 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(scope.row.filesVoList, '2')">
{{ getFileName(scope.row.filesVoList, '2') }} {{ getFileName(scope.row.filesVoList, '2') }}
</div> </div>
</template> </template>
@ -217,7 +217,7 @@
</el-table-column> </el-table-column>
<el-table-column label="修改后附件" align="center" width="150" :show-overflow-tooltip="true"> <el-table-column label="修改后附件" align="center" width="150" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="cursor:pointer;color: #29C9C9 " 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(scope.row.filesVoList, '1')">
{{ getFileName(scope.row.filesVoList, '1') }} {{ getFileName(scope.row.filesVoList, '1') }}
</div> </div>
</template> </template>
@ -260,7 +260,7 @@
<el-table-column label="修改后附件" align="center" width="150" :show-overflow-tooltip="true"> <el-table-column label="修改后附件" align="center" width="150" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="cursor:pointer;color: #29C9C9 " 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(scope.row.filesVoList, '2')">
{{ getFileName(scope.row.filesVoList, '2') }} {{ getFileName(scope.row.filesVoList, '2') }}
</div> </div>
</template> </template>
@ -341,7 +341,6 @@ export default {
}, },
fileView: false, fileView: false,
fileData:[],
kkFilePreview: { kkFilePreview: {
filePreviewUrl: undefined, filePreviewUrl: undefined,
fileName: undefined, fileName: undefined,
@ -537,20 +536,26 @@ export default {
return file ? file.filePath : ''; return file ? file.filePath : '';
}, },
previewFile(filePath) { previewFile(filesVoList,type) {
var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken(); var filePath = this.getFilePath(filesVoList, type);
window.open(url_) var fileName = this.getFileName(filesVoList, type);
var url_="http://192.168.0.14:8100/statics" + filePath +"?token="+ getToken();
console.log("http://192.168.0.14:8100/statics" + filePath +"?token="+ getToken())
console.log("http://192.168.0.14:1810/statics" + filePath +"?token="+ getToken())
// var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken();
// window.open(url_)
// //
// this.fileView= true; this.fileView= true;
// this.fileData = filePath; this.kkFilePreview = {
// this.kkFilePreview = { filePreviewUrl: url_,
// // filePreviewUrl: filePath.data[0].filePath, fileName: fileName,
// // fileName: filePath.data[0].fileName, // filePreviewUrl: "http://192.168.0.14:31909/file/ynRealName/proFile/2025/02/19/5bb40b949c3b490b85540e6289a24c962.docx",
// filePreviewUrl: "http://192.168.0.14:31909/file/ynRealName/proFile/2025/02/19/5bb40b949c3b490b85540e6289a24c962.docx", // fileName: "aaaa.docx",
// fileName: "aaaa.docx", showDownloadButton: false
// showDownloadButton: false }
// } console.log(this.kkFilePreview)
// console.log(this.kkFilePreview)
}, },
} }
}; };

View File

@ -163,7 +163,7 @@
> >
<el-button size="small" type="primary">选择文件</el-button> <el-button size="small" type="primary">选择文件</el-button>
</el-upload> </el-upload>
<div style="cursor:pointer;color: #29C9C9 " 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(scope.row.filesVoList,'1')">
{{ getFileName(scope.row.filesVoList, '1') }} {{ getFileName(scope.row.filesVoList, '1') }}
</div> </div>
</template> </template>
@ -221,7 +221,7 @@
> >
<el-button size="small" type="primary">选择文件</el-button> <el-button size="small" type="primary">选择文件</el-button>
</el-upload> </el-upload>
<div style="cursor:pointer;color: #29C9C9" 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(scope.row.filesVoList,'2')">
{{ getFileName(scope.row.filesVoList, '2') }} {{ getFileName(scope.row.filesVoList, '2') }}
</div> </div>
</template> </template>
@ -865,20 +865,26 @@ export default {
} }
}, },
previewFile(filePath) { previewFile(filesVoList,type) {
var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken(); var filePath = this.getFilePath(filesVoList, type);
window.open(url_) var fileName = this.getFileName(filesVoList, type);
var url_="http://192.168.0.14:8100/statics" + filePath +"?token="+ getToken();
console.log("http://192.168.0.14:8100/statics" + filePath +"?token="+ getToken())
console.log("http://192.168.0.14:1810/statics" + filePath +"?token="+ getToken())
// var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken();
// window.open(url_)
// //
// this.fileView= true; this.fileView= true;
// this.fileData = filePath; this.kkFilePreview = {
// this.kkFilePreview = { filePreviewUrl: url_,
// // filePreviewUrl: filePath.data[0].filePath, fileName: fileName,
// // fileName: filePath.data[0].fileName, // filePreviewUrl: "http://192.168.0.14:31909/file/ynRealName/proFile/2025/02/19/5bb40b949c3b490b85540e6289a24c962.docx",
// filePreviewUrl: "http://192.168.0.14:31909/file/ynRealName/proFile/2025/02/19/5bb40b949c3b490b85540e6289a24c962.docx", // fileName: "aaaa.docx",
// fileName: "aaaa.docx", showDownloadButton: false
// showDownloadButton: false }
// } console.log(this.kkFilePreview)
// console.log(this.kkFilePreview)
}, },
// //

View File

@ -90,7 +90,7 @@
</el-table-column> </el-table-column>
<el-table-column label="修改后附件" align="center" width="100" :show-overflow-tooltip="true"> <el-table-column label="修改后附件" align="center" width="100" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="cursor:pointer;color: #29C9C9 " 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(scope.row.filesVoList, '1')">
{{ getFileName(scope.row.filesVoList, '1') }} {{ getFileName(scope.row.filesVoList, '1') }}
</div> </div>
</template> </template>
@ -111,7 +111,7 @@
<el-table-column label="修改后附件" align="center" width="100" :show-overflow-tooltip="true"> <el-table-column label="修改后附件" align="center" width="100" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="cursor:pointer;color: #29C9C9 " 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(scope.row.filesVoList, '2')">
{{ getFileName(scope.row.filesVoList, '2') }} {{ getFileName(scope.row.filesVoList, '2') }}
</div> </div>
</template> </template>
@ -235,7 +235,6 @@ export default {
attStatus: undefined attStatus: undefined
}, },
fileView: false, fileView: false,
fileData:[],
kkFilePreview: { kkFilePreview: {
filePreviewUrl: undefined, filePreviewUrl: undefined,
fileName: undefined, fileName: undefined,
@ -430,20 +429,26 @@ export default {
return file ? file.filePath : ''; return file ? file.filePath : '';
}, },
previewFile(filePath) { previewFile(filesVoList,type) {
var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken(); var filePath = this.getFilePath(filesVoList, type);
window.open(url_) var fileName = this.getFileName(filesVoList, type);
var url_="http://192.168.0.14:8001/gzatt-api/system/statics" + filePath +"?token="+ getToken();
console.log("http://192.168.0.14:8100/statics" + filePath +"?token="+ getToken())
console.log("http://192.168.0.14:1810/statics" + filePath +"?token="+ getToken())
// var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken();
// window.open(url_)
// //
// this.fileView= true; this.fileView= true;
// this.fileData = filePath; this.kkFilePreview = {
// this.kkFilePreview = { filePreviewUrl: url_,
// // filePreviewUrl: filePath.data[0].filePath, fileName: fileName,
// // fileName: filePath.data[0].fileName, // filePreviewUrl: "http://192.168.0.14:31909/file/ynRealName/proFile/2025/02/19/5bb40b949c3b490b85540e6289a24c962.docx",
// filePreviewUrl: "http://192.168.0.14:31909/file/ynRealName/proFile/2025/02/19/5bb40b949c3b490b85540e6289a24c962.docx", // fileName: "aaaa.docx",
// fileName: "aaaa.docx", showDownloadButton: false
// showDownloadButton: false }
// } console.log(this.kkFilePreview)
// console.log(this.kkFilePreview)
}, },
} }