From 95b6a6388e4cc4e6ed0f54cc04212a86cd8cf829 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期五, 23 五月 2025 13:37:09 +0800
Subject: [PATCH] 1、用户管理新增和编辑用户时设置工单为必填项 2、新增终端登录、首页、设备点检、故障上报、上下班打卡、停机原因维护页面(未与后端联调且客户未确定页面设计)并调整全局路由守卫相关逻辑 3、调整设备结构树设备层级和车间层级区分的判断条件 4、调整电子样板检索与部件借用弹窗列表与搜索区域样式

---
 src/components/jeecg/LxFilePreview.vue |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/components/jeecg/LxFilePreview.vue b/src/components/jeecg/LxFilePreview.vue
index 6017a26..9d01b89 100644
--- a/src/components/jeecg/LxFilePreview.vue
+++ b/src/components/jeecg/LxFilePreview.vue
@@ -9,10 +9,10 @@
     :footer="null"
     cancelText="鍏抽棴">
     <a-spin :spinning="confirmLoading">
-      <img v-if="isImage" :src="fileUrl" width="100%" height="100%" alt="鍥剧墖棰勮" />
-      <iframe v-else-if="isPdf" :src="fileUrl" width="100%" height="600px"></iframe>
+      <img v-if="isImage" :src="localFileUrl" width="100%" height="100%" alt="鍥剧墖棰勮" />
+      <iframe v-else-if="isPdf" :src="localFileUrl" width="100%" height="600px"></iframe>
       <video v-else-if="isVideo" controls>
-        <source :src="fileUrl" type="video/mp4">
+        <source :src="localFileUrl" type="video/mp4">
         鎮ㄧ殑娴忚鍣ㄤ笉鏀寔 video 鏍囩銆�
       </video>
       <pre v-else-if="isText">{{ textContent }}</pre>
@@ -33,25 +33,26 @@
       title: '棰勮',
       textContent: '',
       confirmLoading: false,
-      visible: false
+      visible: false,
+      localFileUrl: this.fileUrl,
     }
   },
   computed: {
     isImage() {
-      return /\.(jpeg|jpg|png|gif|bmp|webp)$/i.test(this.fileUrl)
+      return /\.(jpeg|jpg|png|gif|bmp|webp)$/i.test(this.localFileUrl)
     },
     isPdf() {
-      return /\.pdf$/i.test(this.fileUrl)
+      return /\.pdf$/i.test(this.localFileUrl)
     },
     isVideo() {
-      return /\.(mp4|webm|ogg)$/i.test(this.fileUrl)
+      return /\.(mp4|webm|ogg)$/i.test(this.localFileUrl)
     },
     isText() {
-      return /\.(txt|md|json|xml|yaml|yml)$/i.test(this.fileUrl)
+      return /\.(txt|md|json|xml|yaml|yml)$/i.test(this.localFileUrl)
     }
   },
   watch: {
-    fileUrl: 'fetchTextContent'
+    localFileUrl: 'fetchTextContent'
   },
   mounted() {
     if (this.isText) {
@@ -77,7 +78,7 @@
     preview(fileUrl) {
       let url = getFileAccessHttpUrl(fileUrl)
       this.visible = true
-      this.fileUrl = url
+      this.localFileUrl = url
     },
     handleOk() {
       this.close()

--
Gitblit v1.9.3