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

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">
<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') }}
</div>
</template>
@ -158,7 +158,7 @@
<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'))">
<div style="cursor:pointer;color: #29C9C9 " v-if="getFileName(scope.row.filesVoList, '2')" @click="previewFile(scope.row.filesVoList, '2')">
{{ getFileName(scope.row.filesVoList, '2') }}
</div>
</template>
@ -217,7 +217,7 @@
</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'))">
<div style="cursor:pointer;color: #29C9C9 " v-if="getFileName(scope.row.filesVoList, '1')" @click="previewFile(scope.row.filesVoList, '1')">
{{ getFileName(scope.row.filesVoList, '1') }}
</div>
</template>
@ -260,7 +260,7 @@
<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'))">
<div style="cursor:pointer;color: #29C9C9 " v-if="getFileName(scope.row.filesVoList, '2')" @click="previewFile(scope.row.filesVoList, '2')">
{{ getFileName(scope.row.filesVoList, '2') }}
</div>
</template>
@ -341,7 +341,6 @@ export default {
},
fileView: false,
fileData:[],
kkFilePreview: {
filePreviewUrl: undefined,
fileName: undefined,
@ -537,20 +536,26 @@ export default {
return file ? file.filePath : '';
},
previewFile(filePath) {
var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken();
window.open(url_)
previewFile(filesVoList,type) {
var filePath = this.getFilePath(filesVoList, type);
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.fileData = filePath;
// this.kkFilePreview = {
// // filePreviewUrl: filePath.data[0].filePath,
// // fileName: filePath.data[0].fileName,
this.fileView= true;
this.kkFilePreview = {
filePreviewUrl: url_,
fileName: 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)
showDownloadButton: false
}
console.log(this.kkFilePreview)
},
}
};

View File

@ -163,7 +163,7 @@
>
<el-button size="small" type="primary">选择文件</el-button>
</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') }}
</div>
</template>
@ -221,7 +221,7 @@
>
<el-button size="small" type="primary">选择文件</el-button>
</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') }}
</div>
</template>
@ -865,20 +865,26 @@ export default {
}
},
previewFile(filePath) {
var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken();
window.open(url_)
previewFile(filesVoList,type) {
var filePath = this.getFilePath(filesVoList, type);
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.fileData = filePath;
// this.kkFilePreview = {
// // filePreviewUrl: filePath.data[0].filePath,
// // fileName: filePath.data[0].fileName,
this.fileView= true;
this.kkFilePreview = {
filePreviewUrl: url_,
fileName: 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)
showDownloadButton: false
}
console.log(this.kkFilePreview)
},
//

View File

@ -90,7 +90,7 @@
</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'))">
<div style="cursor:pointer;color: #29C9C9 " v-if="getFileName(scope.row.filesVoList, '1')" @click="previewFile(scope.row.filesVoList, '1')">
{{ getFileName(scope.row.filesVoList, '1') }}
</div>
</template>
@ -111,7 +111,7 @@
<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'))">
<div style="cursor:pointer;color: #29C9C9 " v-if="getFileName(scope.row.filesVoList, '2')" @click="previewFile(scope.row.filesVoList, '2')">
{{ getFileName(scope.row.filesVoList, '2') }}
</div>
</template>
@ -235,7 +235,6 @@ export default {
attStatus: undefined
},
fileView: false,
fileData:[],
kkFilePreview: {
filePreviewUrl: undefined,
fileName: undefined,
@ -430,20 +429,26 @@ export default {
return file ? file.filePath : '';
},
previewFile(filePath) {
var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken();
window.open(url_)
previewFile(filesVoList,type) {
var filePath = this.getFilePath(filesVoList, type);
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.fileData = filePath;
// this.kkFilePreview = {
// // filePreviewUrl: filePath.data[0].filePath,
// // fileName: filePath.data[0].fileName,
this.fileView= true;
this.kkFilePreview = {
filePreviewUrl: url_,
fileName: 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)
showDownloadButton: false
}
console.log(this.kkFilePreview)
},
}