diff --git a/src/api/file-api.js b/src/api/file-api.js index 70229eb..a0e1154 100644 --- a/src/api/file-api.js +++ b/src/api/file-api.js @@ -271,4 +271,18 @@ export default { params }) }, + // 根据id获取文件信息 + getFileInfoById: function(id) { + return request({ + url: `/file_info/${id}`, + method: 'get' + }) + }, + // 根据id获取文件信息 + getPublicFileInfoById: function(id) { + return request({ + url: `/public/file_info/${id}`, + method: 'get' + }) + }, } diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index 6527347..4d2b29f 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -378,7 +378,6 @@ - this.onmessage(msg)) }, beforeDestroy() { - console.log('beforeDestroy') window.removeEventListener('keydown', this.keydown, false) window.removeEventListener('keyup', this.keyup, false) window.removeEventListener('popstate', this.goBack, false) @@ -965,6 +963,7 @@ export default { if (index > -1) { this.fileList[index].size = fileDoc.size this.fileList[index].agoTime = 1 + this.fileList[index].updateDate = fileDoc.updateDate } } if ('deleteFile' === url) { @@ -3114,7 +3113,7 @@ export default { Bus.$emit('onAddAudio', row, this.audioCoverUrl) return } - if (row.contentType.indexOf('office') > -1) { + if (row.contentType.indexOf('office') > -1 || row.suffix === 'csv') { // office文件 this.officePreviewVisible = true this.officePreviewRow = row diff --git a/src/components/office/OnlyOfficeEditor.vue b/src/components/office/OnlyOfficeEditor.vue index 99bd5b7..43414ca 100644 --- a/src/components/office/OnlyOfficeEditor.vue +++ b/src/components/office/OnlyOfficeEditor.vue @@ -1,13 +1,12 @@