From f2fbb3b07155274408d68084e2d607760c765ad6 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期五, 14 三月 2025 11:09:51 +0800 Subject: [PATCH] 前端跳转路由修改 --- src/views/business/inspectionReview/index.vue | 63 ++++++++++++++++--------------- 1 files changed, 32 insertions(+), 31 deletions(-) diff --git a/src/views/business/inspectionReview/index.vue b/src/views/business/inspectionReview/index.vue index c724ca4..2f7df2a 100644 --- a/src/views/business/inspectionReview/index.vue +++ b/src/views/business/inspectionReview/index.vue @@ -47,7 +47,6 @@ <script> import { getYearAndMonthAndDays } from "@/utils/date"; -// import ShowInfo from "../do/b1-material-ins-order/showInfo.vue"; import onlyoffice from "@/components/Onlyoffice/onlyoffice.vue"; import limsTable from "@/components/Table/lims-table.vue"; import { selectInsOrderPlanList, selectUserCondition } from "@/api/business/inspectionTask"; @@ -56,11 +55,11 @@ import filePreview from "@/components/Preview/filePreview.vue"; export default { + name: 'InspectionReview', components: { filePreview, onlyoffice, limsTable, - // ShowInfo, }, dicts: ["urgency_level", "inspection_task_state"], computed: { @@ -343,14 +342,14 @@ }, }) }, - // 涓婁紶鎶ュ憡 - handleUpload(row) { - - }, // 涓嬭浇鎶ュ憡 download(row) { - let url = this.javaApi + '/word/' + (row.urlS === null || row.urlS === '') ? row.url : row.urlS - this.$download.saveAs(url, row.fileName); + let url = (row.urlS===null||row.urlS==='')?row.url:row.urlS + const link = document.createElement('a'); + link.href = this.javaApi + url; + link.target = '_blank'; + document.body.appendChild(link); + link.click(); }, // 杩樺師鎿嶄綔 handleRestore(row) { @@ -370,30 +369,32 @@ }, // 鏌ョ湅鎶ュ憡 handleIssued(row) { - if (!row.tempUrlPdf) return this.$message.warning('鏂囦欢鏈笂浼�') + // todo: 鏌ョ湅鎶ュ憡缁勪欢 +/* if (!row.tempUrlPdf) return this.$message.warning('鏂囦欢鏈笂浼�') this.currentInfo = row - this.lookDialogVisible = true - // this.currentInfo = row; - // let fileName = row.url - // let fileType = "docx" - // if (row.tempUrlPdf != null || row.tempUrlPdf === '') { - // fileName = row.tempUrlPdf - // fileType = "pdf" - // } - // fileName = fileName.replace('/word/','') - // const userName = this.nickName - // this.option = { - // url: this.javaApi + "/word/" + fileName, - // isEdit: false, - // fileType: fileType, - // title: fileName, - // lang: 'zh-CN', - // isPrint: false, - // user_id: 1, - // user_name: userName, - // editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName - // } - // this.issuedVisible = true; + this.lookDialogVisible = true*/ + console.log(this.javaApi) + this.currentInfo = row; + let fileName = row.url + let fileType = "docx" + if (row.tempUrlPdf != null || row.tempUrlPdf === '') { + fileName = row.tempUrlPdf + fileType = "pdf" + } + fileName = fileName.replace('/word/','') + const userName = this.nickName + this.option = { + url: this.javaApi + "/word/" + fileName, + isEdit: false, + fileType: fileType, + title: fileName, + lang: 'zh-CN', + isPrint: false, + user_id: 1, + user_name: userName, + editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName + } + this.issuedVisible = true; }, getAuthorizedPerson() { selectUserCondition({ type: 1 }).then((res) => { -- Gitblit v1.9.3