From fc62e83f73b4b8ff4714f995da4eafbb7f525d1a Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期二, 18 八月 2026 23:30:10 +0800
Subject: [PATCH] feat(table): 统一表格日期字段展示格式为YYYY-MM-DD

---
 src/components/filePreview/index.vue |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/components/filePreview/index.vue b/src/components/filePreview/index.vue
index cda5b56..63fc5e4 100644
--- a/src/components/filePreview/index.vue
+++ b/src/components/filePreview/index.vue
@@ -54,7 +54,7 @@
 
 <script setup>
 import { ref, computed, getCurrentInstance, watch } from 'vue';
-import VueOfficeDocx from '@vue-office/docx';
+import { VueOfficeDocx } from '@vue-office/docx'
 import '@vue-office/docx/lib/index.css';
 import VueOfficeExcel from '@vue-office/excel';
 import '@vue-office/excel/lib/index.css';
@@ -78,9 +78,9 @@
   transformData: (workbookData) => workbookData,
 });
 
-// 璁$畻灞炴�� - 鍒ゆ柇鏂囦欢绫诲瀷
+// 璁$畻灞炴�� - 鍒ゆ柇鏂囦欢绫诲瀷锛堟敮鎸乁RL甯︽煡璇㈠弬鏁帮級
 const isImage = computed(() => {
-  const state = /\.(jpg|jpeg|png|gif)$/i.test(fileUrl.value);
+  const state = /\.(jpg|jpeg|png|gif)(\?.*)?$/i.test(fileUrl.value);
   if (state) {
     imgUrl.value = fileUrl.value.replaceAll('word', 'img');
   }
@@ -89,23 +89,23 @@
 
 const isPdf = computed(() => {
   console.log(fileUrl.value)
-  return /\.pdf$/i.test(fileUrl.value);
+  return /\.pdf(\?.*)?$/i.test(fileUrl.value);
 });
 
 const isDoc = computed(() => {
-  return /\.(doc|docx)$/i.test(fileUrl.value);
+  return /\.(doc|docx)(\?.*)?$/i.test(fileUrl.value);
 });
 
 const isXls = computed(() => {
-  const state = /\.(xls|xlsx)$/i.test(fileUrl.value);
+  const state = /\.(xls|xlsx)(\?.*)?$/i.test(fileUrl.value);
   if (state) {
-    options.value.xls = /\.(xls)$/i.test(fileUrl.value);
+    options.value.xls = /\.(xls)(\?.*)?$/i.test(fileUrl.value);
   }
   return state;
 });
 
 const isZipOrRar = computed(() => {
-  return /\.(zip|rar)$/i.test(fileUrl.value);
+  return /\.(zip|rar)(\?.*)?$/i.test(fileUrl.value);
 });
 
 const isSupported = computed(() => {
@@ -164,7 +164,7 @@
 };
 
 const open = (url) => {
-  fileUrl.value = window.location.protocol+'//'+window.location.host+ url;
+  fileUrl.value = url;
   dialogVisible.value = true;
 };
 const handleClose = () => {

--
Gitblit v1.9.3