Compare commits

..

No commits in common. "e1b128ff4ca322e7ee01c02c86b9d7536485c8ed" and "bdbf2f22fdb0abd337358ccb709363d5d8941d74" have entirely different histories.

4 changed files with 49 additions and 65 deletions

View File

@ -94,9 +94,3 @@ new Vue({
store,
render: h => h(App)
})
/**
* 文件路径
* @type {string}
*/
Vue.prototype.$baseUrl = 'http://192.168.0.14:8001/gzatt-api/system/statics'

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(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>
@ -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(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>
@ -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(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>
@ -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(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>
@ -341,6 +341,7 @@ export default {
},
fileView: false,
fileData:[],
kkFilePreview: {
filePreviewUrl: undefined,
fileName: undefined,
@ -536,23 +537,20 @@ export default {
return file ? file.filePath : '';
},
previewFile(filesVoList,type) {
var filePath = this.getFilePath(filesVoList, type);
var fileName = this.getFileName(filesVoList, type);
var url_=this.$baseUrl + filePath +"?token="+ getToken();
// var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken();
// window.open(url_)
previewFile(filePath) {
var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken();
window.open(url_)
//
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)
// 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

@ -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(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;color: #29C9C9" v-if="getFileName(scope.row.filesVoList, '2')" @click="previewFile(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>
@ -865,23 +865,20 @@ export default {
}
},
previewFile(filesVoList,type) {
var filePath = this.getFilePath(filesVoList, type);
var fileName = this.getFileName(filesVoList, type);
var url_=this.$baseUrl + filePath +"?token="+ getToken();
// var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken();
// window.open(url_)
previewFile(filePath) {
var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken();
window.open(url_)
//
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)
// 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

@ -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(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>
@ -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(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>
@ -235,6 +235,7 @@ export default {
attStatus: undefined
},
fileView: false,
fileData:[],
kkFilePreview: {
filePreviewUrl: undefined,
fileName: undefined,
@ -429,26 +430,20 @@ export default {
return file ? file.filePath : '';
},
previewFile(filesVoList,type) {
var filePath = this.getFilePath(filesVoList, type);
var fileName = this.getFileName(filesVoList, type);
var url_=this.$baseUrl + 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_)
previewFile(filePath) {
var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken();
window.open(url_)
//
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)
// 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)
},
}