From 339bafe908099191ea1be4ba5a25184b6534866a Mon Sep 17 00:00:00 2001
From: lion <120344285@qq.com>
Date: Wed, 19 Mar 2025 10:49:30 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E8=A7=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.production | 4 ++--
.env.staging | 4 ++--
src/components/viewFile/viewDownload.vue | 10 ++++++++--
src/views/record/components/showRecord.vue | 18 ++++++++++++------
src/views/record/index.vue | 3 ++-
vue.config.js | 2 +-
6 files changed, 27 insertions(+), 14 deletions(-)
diff --git a/.env.production b/.env.production
index 34edf29..317d74b 100644
--- a/.env.production
+++ b/.env.production
@@ -2,6 +2,6 @@
ENV = 'production'
# base api
-VUE_APP_BASE_API = http://sstt-dangan.ali251.langye.net
-VUE_APP_UPLOAD_API =http://sstt-dangan.ali251.langye.net/api/admin/upload-file
+VUE_APP_BASE_API = ''
+VUE_APP_UPLOAD_API =/api/admin/upload-file
VUE_APP_PREVIEW_API=https://view.langye.net/preview/onlinePreview
diff --git a/.env.staging b/.env.staging
index e62d129..a1819cf 100644
--- a/.env.staging
+++ b/.env.staging
@@ -4,6 +4,6 @@ NODE_ENV = production
ENV = 'staging'
# base api
-VUE_APP_BASE_API=http://sstt-dangan.ali251.langye.net
-VUE_APP_UPLOAD_API=http://sstt-dangan.ali251.langye.net/api/admin/upload-file
+VUE_APP_BASE_API=''
+VUE_APP_UPLOAD_API=/api/admin/upload-file
VUE_APP_PREVIEW_API=https://view.langye.net/preview/onlinePreview
diff --git a/src/components/viewFile/viewDownload.vue b/src/components/viewFile/viewDownload.vue
index 919160c..7feca5e 100644
--- a/src/components/viewFile/viewDownload.vue
+++ b/src/components/viewFile/viewDownload.vue
@@ -187,8 +187,14 @@
this.$refs.viewFile.typeName = 'file'
if (item.extension == 'doc' || item.extension == 'DOC') {
this.$refs.viewFile.url = item.view_url
- } else {
- this.$refs.viewFile.url = item.url
+ } else {
+ if(item.extension == 'pdf' || item.extension == 'PDF'){
+ let mywindow = window.open(item.url,item.original_name)
+ mywindow.focus()
+ return
+ }else{
+ this.$refs.viewFile.url = item.url
+ }
}
}
this.$refs.viewFile.diaShow = true
diff --git a/src/views/record/components/showRecord.vue b/src/views/record/components/showRecord.vue
index f25a503..a81977a 100644
--- a/src/views/record/components/showRecord.vue
+++ b/src/views/record/components/showRecord.vue
@@ -13,8 +13,11 @@