-
- 上传人:{{ previewFile?.uploader_name }}
- 上传时间:{{ previewFile?.created_at }}
- {{ `版本:${previewFile?.version}(受控)` }}
-
-
-
-
-
-
+
+ 上传人:{{ previewFile?.uploader_name }}
+ 上传时间:{{ previewFile?.created_at }}
+ {{ `版本:${previewFile?.version}(受控)` }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/src/views/details/disposal/index.vue b/src/views/details/disposal/index.vue
index 9afb15a..7724b20 100644
--- a/src/views/details/disposal/index.vue
+++ b/src/views/details/disposal/index.vue
@@ -9,10 +9,7 @@ import { AiError, aiTypeJudge } from "@/service/api/ai";
import { systemConfigApi } from '@/service/api/system';
import { getChangeDetailApi } from '@/service/api/change';
import { myTasksDisposalSubmitApi, myTasksAddItemApi } from '@/service/api/myTasks';
-
-import PDF from 'pdf-vue3'
-import { VueOfficeDocx, VueOfficeExcel, VueOfficePptx } from 'vue3-office-preview'
-import 'vue3-office-preview/lib/style.css'
+import previewComponent from '@/components/previewFile/index.vue'
const themeStore = useThemeStore();
const { routerPushByKey } = useRouterPush();
@@ -226,31 +223,6 @@ const openPreview = (file:any) => {
previewFile.value = file;
previewModal.value = true;
}
-// 判断文件类型
-const handleFileType = (type:string) => {
- if(type){
- const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'svg']
- const wordExtensions = ['docx']
- const excelExtensions = ['xlsx']
- const pptExtensions = ['pptx']
- if(imageExtensions.includes(type)){
- return 'image'
- }
- if(wordExtensions.includes(type)){
- return 'word'
- }
- if(excelExtensions.includes(type)){
- return 'excel'
- }
- if(pptExtensions.includes(type)){
- return 'ppt'
- }
- if(type==='pdf'){
- return 'pdf'
- }
- }
- return ''
-}
// 催办
const handleReminder = (m: any) => {
@@ -1115,37 +1087,12 @@ onMounted(async () => {
-
- 上传人:{{ previewFile?.uploader_name }}
- 上传时间:{{ previewFile?.created_at }}
- {{ `版本:${previewFile?.version}(受控)` }}
-
-
-
-
-
-
+
+ 上传人:{{ previewFile?.uploader_name }}
+ 上传时间:{{ previewFile?.created_at }}
+ {{ `版本:${previewFile?.version}(受控)` }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/src/views/details/index/index.vue b/src/views/details/index/index.vue
index 2cef108..f8b98af 100644
--- a/src/views/details/index/index.vue
+++ b/src/views/details/index/index.vue
@@ -8,6 +8,7 @@ import { getColorWithOpacity, tagTextColor, tagBgColor, tagBorderColor } from '@
import { AiError, aiTypeJudge } from "@/service/api/ai";
import { systemConfigApi } from '@/service/api/system';
import { getChangeDetailApi } from '@/service/api/change';
+import previewComponent from '@/components/previewFile/index.vue'
const themeStore = useThemeStore();
const { routerPushByKey } = useRouterPush();
@@ -53,6 +54,10 @@ const pssrlist = ref<{ g: string; type:number; na_flag:number; items: any[] }[]>
]);
// 验收评价
const acceptList = ref
([]);
+// 当前预览文件
+const previewFile = ref(null);
+// 预览文件弹框
+const previewModal = ref(false);
// 等级判断问题
const questions = ref([
{
@@ -252,8 +257,9 @@ const downloadFile = (type: string) => {
}
};
// 变更附带资料预览
-const previewFile = () => {
- window.$message?.info('还没导入插件');
+const openPreview = (file:any) => {
+ previewFile.value = file;
+ previewModal.value = true;
}
// 催办
@@ -536,7 +542,7 @@ onMounted(async () => {
- 预览
+ 预览
下载
|
@@ -958,6 +964,30 @@ onMounted(async () => {
+
+
+
+
+ {{ previewFile?.file_name }}
+
+
+
+
+
+ 上传人:{{ previewFile?.uploader_name }}
+ 上传时间:{{ previewFile?.created_at }}
+ {{ `版本:${previewFile?.version}(受控)` }}
+
+
+
+
+
diff --git a/src/views/my/initiateChange/modules/changeApply.vue b/src/views/my/initiateChange/modules/changeApply.vue
index 331a190..cfe0637 100644
--- a/src/views/my/initiateChange/modules/changeApply.vue
+++ b/src/views/my/initiateChange/modules/changeApply.vue
@@ -9,10 +9,7 @@ import { useChangeStore } from '@/store/modules/change';
import { AiError, aiTypeJudge, aiLevelScore, aiApplication } from "@/service/api/ai";
import { uploadFileApi, deleteFileApi } from "@/service/api/file";
import Footer from './footer.vue'
-
-import PDF from 'pdf-vue3'
-import { VueOfficeDocx, VueOfficeExcel, VueOfficePptx } from 'vue3-office-preview'
-import 'vue3-office-preview/lib/style.css'
+import previewComponent from '@/components/previewFile/index.vue'
const themeStore = useThemeStore();
const changeStore = useChangeStore();
@@ -364,32 +361,6 @@ const renderSwitcherIcon = (node:any) => {
});
}
-// 判断文件类型
-const handleFileType = (type:string) => {
- if(type){
- const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'svg']
- const wordExtensions = ['docx']
- const excelExtensions = ['xlsx']
- const pptExtensions = ['pptx']
- if(imageExtensions.includes(type)){
- return 'image'
- }
- if(wordExtensions.includes(type)){
- return 'word'
- }
- if(excelExtensions.includes(type)){
- return 'excel'
- }
- if(pptExtensions.includes(type)){
- return 'ppt'
- }
- if(type==='pdf'){
- return 'pdf'
- }
- }
- return ''
-}
-
// 上传资料
const onUploadFile = async (e:any) => {
const file = e.target.files[0];
@@ -818,32 +789,7 @@ defineExpose({form, questions, applyAiResult, generateLevel: useAiLevel})
上传时间:{{ previewFile?.created_at }}
{{ `版本:${previewFile?.version}(受控)` }}
-