From fba601fa23966ac31f0396460584443a82af4754 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E8=AF=BA?= <1253070437@qq.com>
Date: Wed, 12 Jul 2023 01:56:34 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91=E5=89=8D?=
=?UTF-8?q?=E7=AB=AF=E6=96=B0=E5=A2=9E=E6=96=87=E4=BB=B6=E9=A2=84=E8=A7=88?=
=?UTF-8?q?=EF=BC=8C=E6=94=AF=E6=8C=81=E5=9B=BE=E7=89=87=E3=80=81word?=
=?UTF-8?q?=E3=80=81excel=E3=80=81pdf=EF=BC=8C=E5=A6=A5=E5=A6=A5=E7=9A=84?=
=?UTF-8?q?=E5=AE=89=E6=8E=92=EF=BC=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
snowy-admin-web/package.json | 4 +
.../src/components/XnFilePreview/README.md | 9 +
.../src/components/XnFilePreview/index.vue | 85 ++++++
snowy-admin-web/src/views/dev/file/detail.vue | 8 +-
snowy-admin-web/src/views/dev/file/index.vue | 261 ++++++++++--------
.../src/views/dev/file/preview.vue | 16 ++
6 files changed, 268 insertions(+), 115 deletions(-)
create mode 100644 snowy-admin-web/src/components/XnFilePreview/README.md
create mode 100644 snowy-admin-web/src/components/XnFilePreview/index.vue
create mode 100644 snowy-admin-web/src/views/dev/file/preview.vue
diff --git a/snowy-admin-web/package.json b/snowy-admin-web/package.json
index 73685c51..5b6d142a 100644
--- a/snowy-admin-web/package.json
+++ b/snowy-admin-web/package.json
@@ -23,6 +23,9 @@
"@chenfengyuan/vue-qrcode": "2.0.0",
"@highlightjs/vue-plugin": "2.1.0",
"@tinymce/tinymce-vue": "5.0.0",
+ "@vue-office/docx": "1.2.0",
+ "@vue-office/excel": "1.2.0",
+ "@vue-office/pdf": "1.2.0",
"ant-design-vue": "3.2.14",
"axios": "1.1.3",
"cropperjs": "1.5.12",
@@ -45,6 +48,7 @@
"tinymce": "6.2.0",
"vue": "3.2.44",
"vue-cropper": "1.0.5",
+ "vue-demi": "^0.13.11",
"vue-i18n": "9.2.2",
"vue-router": "4.1.6",
"vue3-colorpicker": "2.0.4",
diff --git a/snowy-admin-web/src/components/XnFilePreview/README.md b/snowy-admin-web/src/components/XnFilePreview/README.md
new file mode 100644
index 00000000..0e82169e
--- /dev/null
+++ b/snowy-admin-web/src/components/XnFilePreview/README.md
@@ -0,0 +1,9 @@
+# 小诺文件预览的组件
+
+## 说明
+
+该组件支持图片、PDF、OFFICE、WORD在线预览,其他类型的不支持
+
+## 使用
+
+使用的时候直接在界面引入即可,配置相关参数就能行
diff --git a/snowy-admin-web/src/components/XnFilePreview/index.vue b/snowy-admin-web/src/components/XnFilePreview/index.vue
new file mode 100644
index 00000000..9588ca3c
--- /dev/null
+++ b/snowy-admin-web/src/components/XnFilePreview/index.vue
@@ -0,0 +1,85 @@
+
+
+
+ 返回
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/snowy-admin-web/src/views/dev/file/detail.vue b/snowy-admin-web/src/views/dev/file/detail.vue
index 8a7e0b11..6ac0bfb2 100644
--- a/snowy-admin-web/src/views/dev/file/detail.vue
+++ b/snowy-admin-web/src/views/dev/file/detail.vue
@@ -1,11 +1,5 @@
-
+
{{ formData.name }}
{{
diff --git a/snowy-admin-web/src/views/dev/file/index.vue b/snowy-admin-web/src/views/dev/file/index.vue
index cd8957bc..a485dc87 100644
--- a/snowy-admin-web/src/views/dev/file/index.vue
+++ b/snowy-admin-web/src/views/dev/file/index.vue
@@ -1,159 +1,170 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 查询
-
-
-
- 重置
-
-
-
-
-
-
-
-
-
- uploadFormRef.openUpload()">
-
- 文件上传
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+ 重置
+
+
+
+
+
+
+
+
+
+ uploadFormRef.openUpload()">
+
+ 文件上传
+
+
+
-
- {{ $TOOL.dictTypeData('FILE_ENGINE', record.engine) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $TOOL.dictTypeData('FILE_ENGINE', record.engine) }}
+
+
+ 预览
+
+ 详情
+
+ 下载
+
+
+ 删除
+
+
-
- 详情
-
- 下载
-
-
- 删除
-
-
-
-
-
-
-
+
+
+
+
+
+