diff --git a/package-lock.json b/package-lock.json index ed1880871..c672b1df7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3596,23 +3596,6 @@ "upath": "^1.1.1" } }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "optional": true - }, "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -13784,6 +13767,94 @@ "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.22.4.tgz", "integrity": "sha512-XLI5s0AdqMP2Lf4I4CmdmOq8kjb5DDFGR77wAuxCfpEuYSfhTRyyx6MetgZMiL6Lxa0DasjBOiOcciU3NkL3/Q==" }, + "vue-loader-v16": { + "version": "npm:vue-loader@16.8.3", + "resolved": "https://registry.npmmirror.com/vue-loader/download/vue-loader-16.8.3.tgz", + "integrity": "sha1-1D5nXe9bqTRdbH8FkUwT2GGZcIc=", + "dev": true, + "optional": true, + "requires": { + "chalk": "^4.1.0", + "hash-sum": "^2.0.0", + "loader-utils": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1618995651629&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", + "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", + "dev": true, + "optional": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.nlark.com/chalk/download/chalk-4.1.2.tgz?cache=0&sync_timestamp=1627646697260&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.2.tgz", + "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", + "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", + "dev": true, + "optional": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.nlark.com/color-name/download/color-name-1.1.4.tgz", + "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", + "dev": true, + "optional": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1626715907927&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz", + "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", + "dev": true, + "optional": true + }, + "hash-sum": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-2.0.0.tgz", + "integrity": "sha1-gdAbtd6OpKIUrV1urRtSNGCwtFo=", + "dev": true, + "optional": true + }, + "loader-utils": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/loader-utils/download/loader-utils-2.0.2.tgz?cache=0&sync_timestamp=1636687952028&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Floader-utils%2Fdownload%2Floader-utils-2.0.2.tgz", + "integrity": "sha1-1uO0+4GHByGuTghoqxHdY4NowSk=", + "dev": true, + "optional": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/download/supports-color-7.2.0.tgz", + "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "vue-router": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.0.tgz", diff --git a/public/static/onlyOffice/editor.html b/public/static/onlyOffice/editor.html index 3de05e8c2..4ff974662 100644 --- a/public/static/onlyOffice/editor.html +++ b/public/static/onlyOffice/editor.html @@ -1,6 +1,8 @@ + + @@ -8,7 +10,7 @@ 在线编辑 - + @@ -36,7 +38,7 @@ var filePath = GetQueryValue('filePath') var fileName = GetQueryValue('fileName') var fileUrl = GetQueryValue('fileUrl') - var standNo = GetQueryValue('standNo') + var oldFileName = GetQueryValue('oldFileName') var key = GetQueryValue('key') // var attId = GetQueryValue('attId') var fileSuffix = GetQueryValue('fileType') @@ -100,7 +102,7 @@ "download":true,//是否可以下载 "print":true //是否可以打印 }, - "fileType": 'pptx', + "fileType": fileSuffix, "key": key, "title": oldFileName, "url": fileUrl @@ -108,7 +110,7 @@ "documentType": documentType, // 文档类word-text、表格类excel-spreadsheet、ppt类-presentation "editorConfig": { // 此处配置回调地址 - "callbackUrl": `127.0.0.1:8080/api/att/attFile/recieveFile?fileNm=${fileName}&standNo=${filePath}`, + "callbackUrl": `http://10.100.5.116:4202/api/att/attFile/recieveFile?fileNm=${fileName}&standNo=${filePath}`, "mode":"edit", "lang":"zh-CN", // "customization": { diff --git a/public/static/onlyOffice/onlinePreview.html b/public/static/onlyOffice/onlinePreview.html index 619506812..013abf4a9 100644 --- a/public/static/onlyOffice/onlinePreview.html +++ b/public/static/onlyOffice/onlinePreview.html @@ -1,6 +1,7 @@ + @@ -8,7 +9,7 @@ 在线预览 - + @@ -34,7 +35,7 @@ var fileName = GetQueryValue('fileName') var filePath = GetQueryValue('filePath') var fileUrl = GetQueryValue('fileUrl') - var standNo = GetQueryValue('standNo') + var oldFileName = GetQueryValue('oldFileName') var key = GetQueryValue('key') // var attId = GetQueryValue('attId') var fileSuffix = GetQueryValue('fileType') @@ -100,13 +101,13 @@ }, "fileType": fileSuffix, "key": key, - "title": fileName, + "title": oldFileName, "url": fileUrl }, "documentType": documentType, "editorConfig": { // 此处配置回调地址 - "callbackUrl": `127.0.0.1:8080/api/att/attFile/recieveFile?fileNm=${fileName}&standNo=${filePath}`, + "callbackUrl": `http://10.100.5.116:4202/api/att/attFile/recieveFile?fileNm=${fileName}&standNo=${filePath}`, "mode":"edit", "lang":"zh-CN", // "customization": { diff --git a/src/components/CustomFormComponents/File.vue b/src/components/CustomFormComponents/File.vue index 1f76cfce2..bd1f90762 100644 --- a/src/components/CustomFormComponents/File.vue +++ b/src/components/CustomFormComponents/File.vue @@ -346,26 +346,26 @@ export default { handlePreview(file) { const attId = file.response.data.id if (this.preview) { - if (attId) { - window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId - } else { - this.$message.warning('文件不存在,下载失败') - } + if (attId) { + window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId + } else { + this.$message.warning('文件不存在,下载失败') + } } else { - this.getBusStandFileByAttId(attId) - .then(res => { + this.getBusStandFileByAttId(attId) + .then(res => { console.log(res) if(res){ - const editFileInfo = res - console.log(editFileInfo) - if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){ - window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl) - }else { - const nowTime = new Date().getTime() - // window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl))); - window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName) - } - // window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)) + const editFileInfo = res + console.log(editFileInfo) + if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){ + window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl) + }else { + const nowTime = new Date().getTime() + // window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl))); + window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName) + } + // window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)) } // switch (res.convertState) { // case 'ERROR': @@ -379,10 +379,10 @@ export default { // window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + convertFileInfo.id)) // break // } - }).catch(e => { - console.log(e) - this.$message.warning('文件不存在,预览失败') - }) + }).catch(e => { + console.log(e) + this.$message.warning('文件不存在,预览失败') + }) } }, diff --git a/src/components/navMenu/index.vue b/src/components/navMenu/index.vue index ff93290ba..09c1e0610 100644 --- a/src/components/navMenu/index.vue +++ b/src/components/navMenu/index.vue @@ -1,34 +1,34 @@