adtec-hnyzfc-core-package 1.5.1 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/api/DocumentApi.d.ts +5 -2
- package/dist/src/api/DocumentApi.js +1 -1
- package/dist/src/components/upload/AttachmentPreview.vue.d.ts +78 -0
- package/dist/src/components/upload/AttachmentPreview.vue.js +1 -0
- package/dist/src/components/upload/FileView.vue.d.ts +2 -2
- package/dist/src/components/upload/FileView.vue.js +1 -1
- package/dist/src/components/upload/FileViewComponents.vue.js +1 -1
- package/dist/src/components/upload/OfficePreview.vue.d.ts +6 -2
- package/dist/src/components/upload/OfficePreview.vue.js +2 -2
- package/dist/src/components/upload/OfficePreviewHeaderBar.vue.d.ts +5 -2
- package/dist/src/components/upload/OfficePreviewHeaderBar.vue.js +1 -1
- package/dist/src/hooks/useFileOpen.d.ts +14 -0
- package/dist/src/hooks/useFileOpen.js +1 -0
- package/dist/src/mixin/globalMixin.js +1 -1
- package/dist/src/packages/index.d.ts +2 -0
- package/dist/src/packages/index.js +1 -1
- package/dist/src/plugins/plugins.js +1 -1
- package/dist/src/plugins/renderDialog.js +1 -1
- package/dist/src/utils/fileDownload.d.ts +9 -0
- package/dist/src/utils/fileDownload.js +1 -0
- package/dist/src/utils/modules.js +2 -2
- package/dist/src/utils/officePreviewUtil.d.ts +7 -0
- package/dist/src/utils/officePreviewUtil.js +1 -1
- package/dist/styles/element-ui.css +1 -1
- package/package.json +1 -1
|
@@ -22,7 +22,10 @@ declare const _default: {
|
|
|
22
22
|
createPreviewSession(id: string): Promise<{
|
|
23
23
|
url: string;
|
|
24
24
|
}>;
|
|
25
|
-
/**
|
|
26
|
-
|
|
25
|
+
/**
|
|
26
|
+
* 通过鉴权接口下载附件,不向前端暴露存储地址。
|
|
27
|
+
* format:original(默认,原始附件)/ pdf(Office 文档导出 PDF,后端转换后同样叠加水印)。
|
|
28
|
+
*/
|
|
29
|
+
downloadFile(id: string, format?: string): Promise<Blob>;
|
|
27
30
|
};
|
|
28
31
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"../utils/request.js";import i from"../utils/AxiosConfig.js";import"axios";import"../utils/uuid.js";import"uuid";import"../utils/encrypt.js";import"jsencrypt";import"../utils/behaviorTrack.js";import"crypto-js/enc-base64";import"crypto-js/enc-utf8";import"../utils/behaviorContext.js";import"../utils/dateTime.js";import"element-plus";import"../utils/frontendBus.js";import"../utils/globalLoading.js";import"vue";import"../utils/workflowTaskContext.js";import"../config/GlobalLoadingConfig.js";const t="/api/doc/",I={getUpLoadFilesVoById(e){return r.get(t+"getUpLoadFilesVoById/"+e)},getFileAccessAddress(e){return r.get(t+"getFileAccessAddress",{id:e})},async createRichTextImageUrl(e){const{url:s}=await this.createPreviewSession(e),o=/\/preview\/fileView\/([^/]+)\//.exec(s||"");if(!o?.[1])throw new Error("预览会话创建失败");return`${t}preview/fileView/${encodeURIComponent(o[1])}/image`},getUpLoadFilesByBussinessIds(e,s){const o=s===void 0?t+"getUpLoadFilesByBussinessIds":t+"getUpLoadFilesByBussinessIds/"+s;return r.post(o,e)},delSysUploadFile(e){return r.get(t+"delSysUploadFile/"+e)},getBusinessDocuments(e,s){return r.get(t+"getBusinessDocuments/"+e+"/"+s)},fileStatusConfirmation(e){return r.post(t+"fileStatusConfirmation",e)},delSysUploadFiles(e){return r.post(t+"delSysUploadFiles",e)},updateFilesCreateBy(e,s){return r.post(t+"updateFilesCreateBy",{ids:e,createBy:s})},createPreviewSession(e){return r.post(t+"preview/session/"+e)},downloadFile(e){return i({url:t+"preview/download/"+e,method:"get",responseType:"blob"}).then(
|
|
1
|
+
import r from"../utils/request.js";import i from"../utils/AxiosConfig.js";import"axios";import"../utils/uuid.js";import"uuid";import"../utils/encrypt.js";import"jsencrypt";import"../utils/behaviorTrack.js";import"crypto-js/enc-base64";import"crypto-js/enc-utf8";import"../utils/behaviorContext.js";import"../utils/dateTime.js";import"element-plus";import"../utils/frontendBus.js";import"../utils/globalLoading.js";import"vue";import"../utils/workflowTaskContext.js";import"../config/GlobalLoadingConfig.js";const t="/api/doc/",I={getUpLoadFilesVoById(e){return r.get(t+"getUpLoadFilesVoById/"+e)},getFileAccessAddress(e){return r.get(t+"getFileAccessAddress",{id:e})},async createRichTextImageUrl(e){const{url:s}=await this.createPreviewSession(e),o=/\/preview\/fileView\/([^/]+)\//.exec(s||"");if(!o?.[1])throw new Error("预览会话创建失败");return`${t}preview/fileView/${encodeURIComponent(o[1])}/image`},getUpLoadFilesByBussinessIds(e,s){const o=s===void 0?t+"getUpLoadFilesByBussinessIds":t+"getUpLoadFilesByBussinessIds/"+s;return r.post(o,e)},delSysUploadFile(e){return r.get(t+"delSysUploadFile/"+e)},getBusinessDocuments(e,s){return r.get(t+"getBusinessDocuments/"+e+"/"+s)},fileStatusConfirmation(e){return r.post(t+"fileStatusConfirmation",e)},delSysUploadFiles(e){return r.post(t+"delSysUploadFiles",e)},updateFilesCreateBy(e,s){return r.post(t+"updateFilesCreateBy",{ids:e,createBy:s})},createPreviewSession(e){return r.post(t+"preview/session/"+e)},downloadFile(e,s){return i({url:t+"preview/download/"+e+(s?"?format="+s:""),method:"get",responseType:"blob"}).then(o=>o.data)}};export{I as default};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/** 附件信息(刷新附件方法返回它来切换预览目标) */
|
|
2
|
+
type PreviewAttachment = {
|
|
3
|
+
id: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
fileId?: string;
|
|
9
|
+
fileName?: string;
|
|
10
|
+
fileType?: string;
|
|
11
|
+
/** 预览标题;不传时用文件名。下载文件名始终取 fileName */
|
|
12
|
+
title?: string;
|
|
13
|
+
showHeader?: boolean;
|
|
14
|
+
showSearch?: boolean;
|
|
15
|
+
showZoom?: boolean;
|
|
16
|
+
showDownload?: boolean;
|
|
17
|
+
showRefresh?: boolean;
|
|
18
|
+
showFullscreen?: boolean;
|
|
19
|
+
/** 附件已丢失:不做预览,直接给出丢失提示(仍可下载) */
|
|
20
|
+
attachmentLost?: boolean;
|
|
21
|
+
emptyDescription?: string;
|
|
22
|
+
lostDescription?: string;
|
|
23
|
+
/** 刷新附件方法:重新取附件(可重新生成),返回新附件则切换预览目标 */
|
|
24
|
+
refreshAttachment?: () => Promise<PreviewAttachment | void>;
|
|
25
|
+
};
|
|
26
|
+
declare var __VLS_18: {};
|
|
27
|
+
type __VLS_Slots = {} & {
|
|
28
|
+
empty?: (props: typeof __VLS_18) => any;
|
|
29
|
+
};
|
|
30
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
31
|
+
/** 重载预览(不重新取附件) */
|
|
32
|
+
reload: () => void | undefined;
|
|
33
|
+
/** 下载当前附件(format 省略时下载原始附件) */
|
|
34
|
+
download: (format?: string) => Promise<void> | undefined;
|
|
35
|
+
/** 刷新附件(等价于点击工具栏刷新) */
|
|
36
|
+
refreshAttachment: () => Promise<void>;
|
|
37
|
+
isFullscreen: globalThis.Ref<boolean, boolean>;
|
|
38
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
|
+
change: (attachment: PreviewAttachment) => any;
|
|
40
|
+
error: (err?: unknown) => any;
|
|
41
|
+
loaded: () => any;
|
|
42
|
+
download: (format?: string | undefined) => any;
|
|
43
|
+
refresh: () => any;
|
|
44
|
+
"update:fileId": (id: string) => any;
|
|
45
|
+
"update:fileName": (name: string) => any;
|
|
46
|
+
"update:fileType": (type: string) => any;
|
|
47
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
48
|
+
onChange?: ((attachment: PreviewAttachment) => any) | undefined;
|
|
49
|
+
onError?: ((err?: unknown) => any) | undefined;
|
|
50
|
+
onLoaded?: (() => any) | undefined;
|
|
51
|
+
onDownload?: ((format?: string | undefined) => any) | undefined;
|
|
52
|
+
onRefresh?: (() => any) | undefined;
|
|
53
|
+
"onUpdate:fileId"?: ((id: string) => any) | undefined;
|
|
54
|
+
"onUpdate:fileName"?: ((name: string) => any) | undefined;
|
|
55
|
+
"onUpdate:fileType"?: ((type: string) => any) | undefined;
|
|
56
|
+
}>, {
|
|
57
|
+
title: string;
|
|
58
|
+
emptyDescription: string;
|
|
59
|
+
showSearch: boolean;
|
|
60
|
+
showZoom: boolean;
|
|
61
|
+
showDownload: boolean;
|
|
62
|
+
showRefresh: boolean;
|
|
63
|
+
showFullscreen: boolean;
|
|
64
|
+
fileId: string;
|
|
65
|
+
fileName: string;
|
|
66
|
+
fileType: string;
|
|
67
|
+
showHeader: boolean;
|
|
68
|
+
lostDescription: string;
|
|
69
|
+
attachmentLost: boolean;
|
|
70
|
+
refreshAttachment: () => Promise<PreviewAttachment | void>;
|
|
71
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
72
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
73
|
+
export default _default;
|
|
74
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
75
|
+
new (): {
|
|
76
|
+
$slots: S;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as F,ref as s,watch as P,openBlock as c,createElementBlock as R,normalizeClass as T,unref as f,createBlock as w,withCtx as D,renderSlot as I}from"vue";import{ElEmpty as A}from"element-plus";import N from"../../utils/FrameworkUtils.js";import x from"../../hooks/usePreviewFullscreen.js";import C from"./OfficePreview.vue.js";import{_ as E}from"../../../chunks/_plugin-vue_export-helper-DlAUqK2U.js";import"xlsx-js-style";import"crypto-js/enc-base64";import"crypto-js/enc-utf8";import"../../api/DocumentApi.js";import"../../utils/request.js";import"../../utils/AxiosConfig.js";import"axios";import"../../utils/uuid.js";import"uuid";import"../../utils/encrypt.js";import"jsencrypt";import"../../utils/behaviorTrack.js";import"../../utils/behaviorContext.js";import"../../utils/dateTime.js";import"../../utils/frontendBus.js";import"../../utils/globalLoading.js";import"../../utils/workflowTaskContext.js";import"../../config/GlobalLoadingConfig.js";import"../../utils/fileDownload.js";import"../../utils/officePreviewUtil.js";import"./OfficePreviewHeaderBar.vue.js";import"@element-plus/icons-vue";const L=F({__name:"AttachmentPreview",props:{fileId:{default:""},fileName:{default:""},fileType:{default:""},title:{default:""},showHeader:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!0},showZoom:{type:Boolean,default:!0},showDownload:{type:Boolean,default:!1},showRefresh:{type:Boolean,default:!1},showFullscreen:{type:Boolean,default:!1},attachmentLost:{type:Boolean,default:!1},emptyDescription:{default:"暂无附件"},lostDescription:{default:"附件已丢失或无权访问"},refreshAttachment:{type:Function,default:void 0}},emits:["loaded","error","download","refresh","change","update:fileId","update:fileName","update:fileType"],setup(t,{expose:v,emit:y}){const r=t,l=y,a=s(r.fileId||""),d=s(r.fileName||""),u=s(r.fileType||""),m=s(!1),n=s(null);P(()=>[r.fileId,r.fileName,r.fileType],([e,o,i])=>{a.value=e||"",d.value=o||"",u.value=i||""});const{previewContainerRef:g,isPreviewFullscreen:p,togglePreviewFullscreen:B}=x(),k=e=>{const o=e.id!==a.value;return a.value=e.id,d.value=e.name||"",u.value=e.type||"",l("update:fileId",e.id),l("update:fileName",e.name||""),l("update:fileType",e.type||""),l("change",e),o},h=async()=>{l("refresh");const e=r.refreshAttachment;if(e){m.value=!0;try{const o=await e();if(o?.id&&k(o))return;n.value?.reloadPreview()}catch(o){N.messageError(o)}finally{m.value=!1}}};return v({reload:()=>n.value?.reloadPreview(),download:e=>n.value?.download(e),refreshAttachment:h,isFullscreen:p}),(e,o)=>(c(),R("div",{ref_key:"previewContainerRef",ref:g,class:T(["attachment-preview",{"preview-fullscreen-fallback":f(p)}])},[a.value?(c(),w(C,{key:0,ref_key:"previewRef",ref:n,"file-id":a.value,"file-name":d.value,"file-type":u.value,title:t.title,"show-header":t.showHeader,"show-search":t.showSearch,"show-zoom":t.showZoom,"show-download":t.showDownload,"show-refresh":t.showRefresh,"show-fullscreen":t.showFullscreen,fullscreen:f(p),"refresh-loading":m.value,"attachment-lost":t.attachmentLost,"lost-description":t.lostDescription,onLoaded:o[0]||(o[0]=i=>l("loaded")),onError:o[1]||(o[1]=i=>l("error",i)),onRefresh:h,onDownload:o[2]||(o[2]=i=>l("download",i)),onToggleFullscreen:f(B)},null,8,["file-id","file-name","file-type","title","show-header","show-search","show-zoom","show-download","show-refresh","show-fullscreen","fullscreen","refresh-loading","attachment-lost","lost-description","onToggleFullscreen"])):(c(),w(f(A),{key:1,description:t.emptyDescription},{default:D(()=>[I(e.$slots,"empty",{},void 0,!0)]),_:3},8,["description"]))],2))}}),ne=E(L,[["__scopeId","data-v-8d6329ed"]]);export{ne as default};
|
|
@@ -19,9 +19,9 @@ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropType
|
|
|
19
19
|
type: globalThis.PropType<any>;
|
|
20
20
|
};
|
|
21
21
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
|
+
"update:fileId": (...args: any[]) => void;
|
|
22
23
|
"update:title": (...args: any[]) => void;
|
|
23
24
|
"update:url": (...args: any[]) => void;
|
|
24
|
-
"update:fileId": (...args: any[]) => void;
|
|
25
25
|
"update:edit": (...args: any[]) => void;
|
|
26
26
|
"update:modelValue": (value: any) => void;
|
|
27
27
|
}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
@@ -46,9 +46,9 @@ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropType
|
|
|
46
46
|
};
|
|
47
47
|
}>> & Readonly<{
|
|
48
48
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
49
|
+
"onUpdate:fileId"?: ((...args: any[]) => any) | undefined;
|
|
49
50
|
"onUpdate:title"?: ((...args: any[]) => any) | undefined;
|
|
50
51
|
"onUpdate:url"?: ((...args: any[]) => any) | undefined;
|
|
51
|
-
"onUpdate:fileId"?: ((...args: any[]) => any) | undefined;
|
|
52
52
|
"onUpdate:edit"?: ((...args: any[]) => any) | undefined;
|
|
53
53
|
}>, {
|
|
54
54
|
title: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as
|
|
1
|
+
import{defineComponent as F,useModel as _,openBlock as y,createBlock as V,Teleport as h,createElementVNode as m,normalizeClass as n,unref as e,createVNode as C,createCommentVNode as P,mergeModels as p}from"vue";import{useVModel as i}from"@vueuse/core";import x from"../../hooks/usePreviewFullscreen.js";import I from"./OfficePreview.vue.js";import{_ as k}from"../../../chunks/_plugin-vue_export-helper-DlAUqK2U.js";import"element-plus";import"../../api/DocumentApi.js";import"../../utils/request.js";import"../../utils/AxiosConfig.js";import"axios";import"../../utils/uuid.js";import"uuid";import"../../utils/encrypt.js";import"jsencrypt";import"../../utils/behaviorTrack.js";import"crypto-js/enc-base64";import"crypto-js/enc-utf8";import"../../utils/behaviorContext.js";import"../../utils/dateTime.js";import"../../utils/frontendBus.js";import"../../utils/globalLoading.js";import"../../utils/workflowTaskContext.js";import"../../config/GlobalLoadingConfig.js";import"../../utils/FrameworkUtils.js";import"xlsx-js-style";import"../../utils/fileDownload.js";import"../../utils/officePreviewUtil.js";import"./OfficePreviewHeaderBar.vue.js";import"@element-plus/icons-vue";const M=F({__name:"FileView",props:p({title:{type:String,default:""},url:{type:String,default:""},fileId:{type:String,default:""},edit:{type:String,default:"view"}},{modelValue:{},modelModifiers:{}}),emits:p(["update:title","update:url","update:fileId","update:edit"],["update:modelValue"]),setup(l,{emit:c}){const s=_(l,"modelValue"),t=l,o=c,u=i(t,"title",o),a=i(t,"fileId",o),d=i(t,"url",o),{previewContainerRef:f,isPreviewFullscreen:r,togglePreviewFullscreen:w,exitPreviewFullscreen:v}=x(),g=async()=>{await v(),s.value=!1};return(S,N)=>s.value?(y(),V(h,{key:0,to:"body"},[m("div",{class:n(["file-view-overlay",{"is-preview-fullscreen":e(r)}])},[m("div",{ref_key:"previewContainerRef",ref:f,class:n(["office-preview",{"fullscreen-mode":e(r)}])},[C(I,{url:e(d),"file-id":e(a),"file-name":e(u),"show-header":"","show-download":"","show-fullscreen":"","show-close":"",fullscreen:e(r),onToggleFullscreen:e(w),onClose:g},null,8,["url","file-id","file-name","fullscreen","onToggleFullscreen"])],2)],2)])):P("v-if",!0)}}),se=k(M,[["__scopeId","data-v-ecb4067a"]]);export{se as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as
|
|
1
|
+
import{defineComponent as s,ref as m,openBlock as f,createBlock as v,createCommentVNode as d}from"vue";import c from"../../api/DocumentApi.js";import w from"../../utils/FrameworkUtils.js";import V from"../../utils/fileDownload.js";import F from"./FileView.vue.js";import{getFileSuffix as x,isPreviewableSuffix as _}from"../../utils/uploadAccept.js";import"../../utils/request.js";import"../../utils/AxiosConfig.js";import"axios";import"../../utils/uuid.js";import"uuid";import"../../utils/encrypt.js";import"jsencrypt";import"../../utils/behaviorTrack.js";import"crypto-js/enc-base64";import"crypto-js/enc-utf8";import"../../utils/behaviorContext.js";import"../../utils/dateTime.js";import"element-plus";import"../../utils/frontendBus.js";import"../../utils/globalLoading.js";import"../../utils/workflowTaskContext.js";import"../../config/GlobalLoadingConfig.js";import"xlsx-js-style";import"@vueuse/core";import"../../hooks/usePreviewFullscreen.js";import"./OfficePreview.vue.js";import"../../utils/officePreviewUtil.js";import"./OfficePreviewHeaderBar.vue.js";import"@element-plus/icons-vue";import"../../../chunks/_plugin-vue_export-helper-DlAUqK2U.js";const ee=s({__name:"FileViewComponents",setup(y,{expose:p}){const e=m(!1),l=m(""),r=m(""),u=m("view");let a=0;return p({viewFile:async i=>{const o=++a;l.value="文件预览",r.value=i,e.value=!0;try{const t=await c.getUpLoadFilesVoById(i);if(o!==a||!e.value||r.value!==i)return;const n=x(t);if(!_(n)){e.value=!1,await V(t.id,t.name);return}l.value=t.name}catch(t){if(o!==a||!e.value||r.value!==i)return;e.value=!1,w.messageError(t)}}}),(i,o)=>e.value?(f(),v(F,{key:0,modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=t=>e.value=t),title:l.value,"file-id":r.value,edit:u.value},null,8,["modelValue","title","file-id","edit"])):d("v-if",!0)}});export{ee as default};
|
|
@@ -3,6 +3,8 @@ type __VLS_Props = {
|
|
|
3
3
|
fileId?: string;
|
|
4
4
|
fileName?: string;
|
|
5
5
|
fileType?: string;
|
|
6
|
+
/** 预览标题:不传时用文件名(文件名仍用于下载命名) */
|
|
7
|
+
title?: string;
|
|
6
8
|
showHeader?: boolean;
|
|
7
9
|
showSearch?: boolean;
|
|
8
10
|
showPageNav?: boolean;
|
|
@@ -25,11 +27,12 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
25
27
|
zoomIn: () => void;
|
|
26
28
|
zoomOut: () => void;
|
|
27
29
|
resetZoom: () => void;
|
|
30
|
+
download: (format?: string) => Promise<void>;
|
|
28
31
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
32
|
close: () => any;
|
|
30
33
|
error: (err?: unknown) => any;
|
|
31
34
|
loaded: () => any;
|
|
32
|
-
download: () => any;
|
|
35
|
+
download: (format?: string | undefined) => any;
|
|
33
36
|
refresh: () => any;
|
|
34
37
|
"toggle-fullscreen": () => any;
|
|
35
38
|
"update:scale": (value: number) => any;
|
|
@@ -37,11 +40,12 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
37
40
|
onClose?: (() => any) | undefined;
|
|
38
41
|
onError?: ((err?: unknown) => any) | undefined;
|
|
39
42
|
onLoaded?: (() => any) | undefined;
|
|
40
|
-
onDownload?: (() => any) | undefined;
|
|
43
|
+
onDownload?: ((format?: string | undefined) => any) | undefined;
|
|
41
44
|
onRefresh?: (() => any) | undefined;
|
|
42
45
|
"onToggle-fullscreen"?: (() => any) | undefined;
|
|
43
46
|
"onUpdate:scale"?: ((value: number) => any) | undefined;
|
|
44
47
|
}>, {
|
|
48
|
+
title: string;
|
|
45
49
|
url: string;
|
|
46
50
|
showClose: boolean;
|
|
47
51
|
fullscreen: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as
|
|
2
|
-
切换时淡出过渡,避免 spinner 相位/进度条状态差异造成的跳动 `),
|
|
1
|
+
import{defineComponent as te,useModel as se,ref as t,computed as i,watch as ne,onMounted as ie,onBeforeUnmount as ue,openBlock as m,createElementBlock as M,normalizeClass as V,createBlock as N,unref as B,createCommentVNode as p,createElementVNode as y,createVNode as de,Transition as ce,withCtx as O,normalizeStyle as fe,createTextVNode as me,mergeModels as $}from"vue";import{ElEmpty as ve,ElButton as we,ElMessage as A}from"element-plus";import he from"../../api/DocumentApi.js";import pe from"../../utils/FrameworkUtils.js";import ye from"../../utils/fileDownload.js";import{resolveOfficeFileExt as ge,canExportPdf as xe,MAX_RICH_PREVIEW_ZOOM as Ee,MIN_OFFICE_ZOOM as Be,clampRichPreviewZoom as W,OFFICE_ZOOM_STEP as U}from"../../utils/officePreviewUtil.js";import Ie from"./OfficePreviewHeaderBar.vue.js";import{_ as Se}from"../../../chunks/_plugin-vue_export-helper-DlAUqK2U.js";import"../../utils/request.js";import"../../utils/AxiosConfig.js";import"axios";import"../../utils/uuid.js";import"uuid";import"../../utils/encrypt.js";import"jsencrypt";import"../../utils/behaviorTrack.js";import"crypto-js/enc-base64";import"crypto-js/enc-utf8";import"../../utils/behaviorContext.js";import"../../utils/dateTime.js";import"../../utils/frontendBus.js";import"../../utils/globalLoading.js";import"../../utils/workflowTaskContext.js";import"../../config/GlobalLoadingConfig.js";import"xlsx-js-style";import"@element-plus/icons-vue";const ze={key:0,class:"preview-loading-overlay"},Me=["src","title"],Ne=te({__name:"OfficePreview",props:$({url:{default:""},fileId:{default:""},fileName:{default:""},fileType:{default:""},title:{default:""},showHeader:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!0},showPageNav:{type:Boolean,default:!1},showZoom:{type:Boolean,default:!0},showDownload:{type:Boolean,default:!1},showRefresh:{type:Boolean,default:!1},showFullscreen:{type:Boolean,default:!1},showClose:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},downloadLoading:{type:Boolean,default:!1},refreshLoading:{type:Boolean,default:!1},lostDescription:{default:"附件已丢失或无权访问"},attachmentLost:{type:Boolean,default:!1}},{scale:{default:1},scaleModifiers:{}}),emits:$(["loaded","error","download","refresh","toggle-fullscreen","close"],["update:scale"]),setup(r,{expose:Q,emit:X}){const a=r,l=se(r,"scale"),u=X,c=t(""),I=t(null),f=t(!1),d=t(!1),g=t(""),s=t(""),v=t(-1),w=t(0),x=t(!1),h=t(!1),S=t(!1);let E=0;const j=new Set(["pdf","doc","docx","xls","xlsx","ppt","pptx","txt","csv","html","htm","xml","json","md"]),G=i(()=>g.value||a.lostDescription),P=i(()=>a.title||a.fileName),C=i(()=>ge(a.fileType,a.fileName,a.url)),F=i(()=>a.showSearch&&!d.value&&j.has(C.value)),J=i(()=>a.showZoom&&!d.value),K=i(()=>a.showDownload&&xe(C.value)),Y=i(()=>a.downloadLoading||S.value),L=i(()=>h.value&&l.value!==1),_=i(()=>{if(!L.value)return;const o=l.value;return{width:`${100/o}%`,height:`${100/o}%`,transform:`scale(${o})`,transformOrigin:"top left"}}),n=o=>{I.value?.contentWindow?.postMessage({source:"adtec-office-preview",type:"command",...o},"*")},k=()=>{l.value=W(l.value+U),n({command:"zoom",scale:l.value})},D=()=>{l.value=W(l.value-U),n({command:"zoom",scale:l.value})},Z=()=>{l.value=1,n({command:"zoom",scale:l.value})},ee=o=>{const e=o.trim();if(s.value=e,v.value=-1,w.value=0,!e){R();return}if(h.value){A.warning("当前预览服务不支持内容搜索,请下载后查看");return}n({command:"search",query:e,direction:"first"})},R=()=>{s.value="",v.value=-1,w.value=0,n({command:"clear-search"})},oe=()=>{s.value&&n({command:"search",query:s.value,direction:"prev"})},ae=()=>{s.value&&n({command:"search",query:s.value,direction:"next"})},T=o=>{if(!(o.source!==I.value?.contentWindow||o.data?.source!=="adtec-fileview")){if(o.data.type==="ready"){x.value=!0,h.value=!1,n({command:"zoom",scale:l.value});return}if(o.data.type==="search-result"){const e=Number(o.data.total||0);w.value=e,v.value=e>0?Number(o.data.index||0):-1,e===0&&s.value&&A.warning("未找到匹配内容")}}},b=async()=>{const o=++E;if(c.value="",f.value=!1,d.value=!1,g.value="",l.value=1,s.value="",v.value=-1,w.value=0,x.value=!1,h.value=!1,a.attachmentLost){d.value=!0,u("error");return}f.value=!0;try{if(a.fileId){const e=await he.createPreviewSession(a.fileId);if(o!==E)return;c.value=e.url;return}if(a.url.startsWith("/api/doc/preview/fileView/")){c.value=a.url;return}throw new Error("为保护附件地址,旧版文件直链已停止预览,请使用附件 ID 打开")}catch(e){if(o!==E)return;f.value=!1,d.value=!0,g.value=e?.msg||e?.message||"文件预览失败,请下载后查看",u("error",e)}},q=()=>{u("refresh"),b()},z=async(o="original")=>{if(u("download",o),!!a.fileId){S.value=!0;try{await ye(a.fileId,a.fileName,o)}catch(e){pe.messageError(e)}finally{S.value=!1}}},le=()=>{f.value=!1,x.value||window.setTimeout(()=>{x.value||(h.value=!0)},1500),n({command:"zoom",scale:l.value}),u("loaded")},re=o=>{f.value=!1,d.value=!0,g.value="文件预览服务暂不可用,请稍后重试或下载后查看",u("error",o)};return ne(()=>[a.fileId,a.url,a.attachmentLost],()=>void b(),{immediate:!0}),ie(()=>window.addEventListener("message",T)),ue(()=>{E++,window.removeEventListener("message",T)}),Q({reloadPreview:q,zoomIn:k,zoomOut:D,resetZoom:Z,download:z}),(o,e)=>(m(),M("div",{class:V(["office-preview-root",{"is-fullscreen":r.fullscreen}])},[r.showHeader?(m(),N(Ie,{key:0,title:P.value,"title-only":!F.value,zoom:l.value,"search-query":s.value,"search-index":v.value,"search-total":w.value,"show-search":F.value,"show-page-nav":!1,"show-zoom":J.value,"show-download":r.showDownload,"pdf-export":K.value,"show-refresh":r.showRefresh,"show-fullscreen":r.showFullscreen,"show-close":r.showClose,fullscreen:r.fullscreen,"download-loading":Y.value,"refresh-loading":r.refreshLoading,"min-zoom":B(Be),"max-zoom":B(Ee),onZoomIn:k,onZoomOut:D,onZoomReset:Z,onSearch:ee,onSearchClear:R,onSearchPrev:oe,onSearchNext:ae,onDownload:z,onRefresh:q,onToggleFullscreen:e[0]||(e[0]=H=>u("toggle-fullscreen")),onClose:e[1]||(e[1]=H=>u("close"))},null,8,["title","title-only","zoom","search-query","search-index","search-total","show-search","show-zoom","show-download","pdf-export","show-refresh","show-fullscreen","show-close","fullscreen","download-loading","refresh-loading","min-zoom","max-zoom"])):p("v-if",!0),p(` 外层加载层与预览页内层样式完全一致(spinner + 正在加载文件... + 进度条),
|
|
2
|
+
切换时淡出过渡,避免 spinner 相位/进度条状态差异造成的跳动 `),y("div",{class:V(["fileview-frame-wrap",{"is-fallback-zoom":L.value}])},[de(ce,{name:"preview-loading-fade"},{default:O(()=>[f.value?(m(),M("div",ze,[...e[3]||(e[3]=[y("div",{class:"preview-loading-spinner"},null,-1),y("div",{class:"preview-loading-text"},"正在加载文件...",-1),y("div",{class:"preview-loading-progress"},[y("div",{class:"preview-loading-bar is-indeterminate"})],-1)])])):p("v-if",!0)]),_:1}),c.value&&!d.value?(m(),M("iframe",{key:c.value,ref_key:"previewFrameRef",ref:I,class:"fileview-frame",style:fe(_.value),src:c.value,title:P.value||"文件预览",referrerpolicy:"same-origin",onLoad:le,onError:re},null,44,Me)):d.value?(m(),N(B(ve),{key:1,description:G.value},{default:O(()=>[r.showDownload?(m(),N(B(we),{key:0,type:"primary",onClick:e[2]||(e[2]=H=>z())},{default:O(()=>[...e[4]||(e[4]=[me(" 下载文件 ",-1)])]),_:1})):p("v-if",!0)]),_:1},8,["description"])):p("v-if",!0)],2)],2))}}),eo=Se(Ne,[["__scopeId","data-v-705a8cef"]]);export{eo as default};
|
|
@@ -11,6 +11,8 @@ type __VLS_Props = {
|
|
|
11
11
|
showPageNav?: boolean;
|
|
12
12
|
showZoom?: boolean;
|
|
13
13
|
showDownload?: boolean;
|
|
14
|
+
/** 是否提供“下载原始文件 / 下载 PDF”的下载菜单(Office 类附件) */
|
|
15
|
+
pdfExport?: boolean;
|
|
14
16
|
showRefresh?: boolean;
|
|
15
17
|
showFullscreen?: boolean;
|
|
16
18
|
showClose?: boolean;
|
|
@@ -26,7 +28,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
26
28
|
"zoom-in": () => any;
|
|
27
29
|
"zoom-out": () => any;
|
|
28
30
|
"zoom-reset": () => any;
|
|
29
|
-
download: () => any;
|
|
31
|
+
download: (format: string) => any;
|
|
30
32
|
refresh: () => any;
|
|
31
33
|
"toggle-fullscreen": () => any;
|
|
32
34
|
"page-prev": () => any;
|
|
@@ -40,7 +42,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
40
42
|
"onZoom-in"?: (() => any) | undefined;
|
|
41
43
|
"onZoom-out"?: (() => any) | undefined;
|
|
42
44
|
"onZoom-reset"?: (() => any) | undefined;
|
|
43
|
-
onDownload?: (() => any) | undefined;
|
|
45
|
+
onDownload?: ((format: string) => any) | undefined;
|
|
44
46
|
onRefresh?: (() => any) | undefined;
|
|
45
47
|
"onToggle-fullscreen"?: (() => any) | undefined;
|
|
46
48
|
"onPage-prev"?: (() => any) | undefined;
|
|
@@ -63,6 +65,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
63
65
|
showPageNav: boolean;
|
|
64
66
|
showZoom: boolean;
|
|
65
67
|
showDownload: boolean;
|
|
68
|
+
pdfExport: boolean;
|
|
66
69
|
showRefresh: boolean;
|
|
67
70
|
showFullscreen: boolean;
|
|
68
71
|
downloadLoading: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as
|
|
1
|
+
import{defineComponent as D,ref as F,computed as p,watch as I,resolveComponent as y,openBlock as a,createElementBlock as r,normalizeClass as N,toDisplayString as c,createCommentVNode as u,createVNode as l,unref as o,withCtx as n,createElementVNode as f,Fragment as C,createBlock as b,createTextVNode as B}from"vue";import{ArrowUp as T,ArrowDown as V,ArrowLeft as E,ArrowRight as R,ZoomOut as S,ZoomIn as A,RefreshRight as M,Loading as w,Download as x,Refresh as Q,Close as P,FullScreen as H}from"@element-plus/icons-vue";import{ElIcon as s}from"element-plus";import{MAX_PDF_ZOOM as U,MIN_OFFICE_ZOOM as X}from"../../utils/officePreviewUtil.js";import{_ as j}from"../../../chunks/_plugin-vue_export-helper-DlAUqK2U.js";const q=["title"],G={key:1,class:"header-search"},J={key:0,class:"search-count"},K={class:"header-actions"},W=["disabled"],Y={class:"page-label"},_=["disabled"],ee=["disabled"],te={class:"zoom-label"},oe=["disabled"],le=["disabled"],ae=["disabled"],ne=["disabled"],de=["title"],se=D({__name:"OfficePreviewHeaderBar",props:{title:{default:""},titleOnly:{type:Boolean,default:!1},zoom:{default:1},currentPage:{default:1},totalPages:{default:0},searchQuery:{default:""},searchIndex:{default:-1},searchTotal:{default:0},showSearch:{type:Boolean,default:!0},showPageNav:{type:Boolean,default:!0},showZoom:{type:Boolean,default:!0},showDownload:{type:Boolean,default:!1},pdfExport:{type:Boolean,default:!1},showRefresh:{type:Boolean,default:!1},showFullscreen:{type:Boolean,default:!1},showClose:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},downloadLoading:{type:Boolean,default:!1},refreshLoading:{type:Boolean,default:!1},minZoom:{default:X},maxZoom:{default:U}},emits:["zoom-in","zoom-out","zoom-reset","download","refresh","toggle-fullscreen","close","page-prev","page-next","search","search-clear","search-prev","search-next"],setup(e,{emit:z}){const v=e,i=z,m=F(v.searchQuery),$=p(()=>Math.round(v.zoom*100));I(()=>v.searchQuery,g=>{m.value=g});const h=()=>{i("search",m.value.trim())};return(g,t)=>{const L=y("el-search-input"),k=y("el-dropdown-item"),O=y("el-dropdown-menu"),Z=y("el-dropdown");return a(),r("div",{class:N(["office-preview-header",{"is-title-only":e.titleOnly}])},[e.title?(a(),r("div",{key:0,class:"header-title",title:e.title},c(e.title),9,q)):u("v-if",!0),e.showSearch?(a(),r("div",G,[l(L,{modelValue:m.value,"onUpdate:modelValue":t[0]||(t[0]=d=>m.value=d),class:"search-input",clearable:"",placeholder:"搜索文档内容",panel:!1,"action-tip":"查找",onSearch:h,onChange:h,onClear:t[1]||(t[1]=d=>i("search-clear"))},null,8,["modelValue"]),e.searchTotal>0?(a(),r("span",J,c(e.searchIndex+1)+"/"+c(e.searchTotal),1)):u("v-if",!0),e.searchTotal>0?(a(),r("button",{key:1,class:"toolbar-btn",type:"button",title:"上一处",onClick:t[2]||(t[2]=d=>i("search-prev"))},[l(o(s),null,{default:n(()=>[l(o(T))]),_:1})])):u("v-if",!0),e.searchTotal>0?(a(),r("button",{key:2,class:"toolbar-btn",type:"button",title:"下一处",onClick:t[3]||(t[3]=d=>i("search-next"))},[l(o(s),null,{default:n(()=>[l(o(V))]),_:1})])):u("v-if",!0)])):u("v-if",!0),f("div",K,[e.showPageNav&&e.totalPages>0?(a(),r(C,{key:0},[f("button",{class:"toolbar-btn",type:"button",title:"上一页",disabled:e.currentPage<=1,onClick:t[4]||(t[4]=d=>i("page-prev"))},[l(o(s),null,{default:n(()=>[l(o(E))]),_:1})],8,W),f("span",Y,c(e.currentPage)+" / "+c(e.totalPages),1),f("button",{class:"toolbar-btn",type:"button",title:"下一页",disabled:e.currentPage>=e.totalPages,onClick:t[5]||(t[5]=d=>i("page-next"))},[l(o(s),null,{default:n(()=>[l(o(R))]),_:1})],8,_),t[14]||(t[14]=f("span",{class:"toolbar-divider"},null,-1))],64)):u("v-if",!0),e.showZoom?(a(),r(C,{key:1},[f("button",{class:"toolbar-btn",type:"button",title:"缩小",disabled:e.zoom<=e.minZoom,onClick:t[6]||(t[6]=d=>i("zoom-out"))},[l(o(s),null,{default:n(()=>[l(o(S))]),_:1})],8,ee),f("span",te,c($.value)+"%",1),f("button",{class:"toolbar-btn",type:"button",title:"放大",disabled:e.zoom>=e.maxZoom,onClick:t[7]||(t[7]=d=>i("zoom-in"))},[l(o(s),null,{default:n(()=>[l(o(A))]),_:1})],8,oe),f("button",{class:"toolbar-btn",type:"button",title:"重置缩放",onClick:t[8]||(t[8]=d=>i("zoom-reset"))},[l(o(s),null,{default:n(()=>[l(o(M))]),_:1})]),t[15]||(t[15]=f("span",{class:"toolbar-divider"},null,-1))],64)):u("v-if",!0),e.showDownload&&e.pdfExport?(a(),b(Z,{key:2,trigger:"click",disabled:e.downloadLoading,onCommand:t[9]||(t[9]=d=>i("download",d))},{dropdown:n(()=>[l(O,null,{default:n(()=>[l(k,{command:"original"},{default:n(()=>[...t[16]||(t[16]=[B("下载原始文件",-1)])]),_:1}),l(k,{command:"pdf"},{default:n(()=>[...t[17]||(t[17]=[B("下载 PDF",-1)])]),_:1})]),_:1})]),default:n(()=>[f("button",{class:"toolbar-btn",type:"button",title:"下载",disabled:e.downloadLoading},[e.downloadLoading?(a(),b(o(s),{key:0,class:"is-loading"},{default:n(()=>[l(o(w))]),_:1})):(a(),b(o(s),{key:1},{default:n(()=>[l(o(x))]),_:1}))],8,le)]),_:1},8,["disabled"])):e.showDownload?(a(),r("button",{key:3,class:"toolbar-btn",type:"button",title:"下载",disabled:e.downloadLoading,onClick:t[10]||(t[10]=d=>i("download","original"))},[e.downloadLoading?(a(),b(o(s),{key:0,class:"is-loading"},{default:n(()=>[l(o(w))]),_:1})):(a(),b(o(s),{key:1},{default:n(()=>[l(o(x))]),_:1}))],8,ae)):u("v-if",!0),e.showRefresh?(a(),r("button",{key:4,class:"toolbar-btn",type:"button",title:"刷新附件",disabled:e.refreshLoading,onClick:t[11]||(t[11]=d=>i("refresh"))},[e.refreshLoading?(a(),b(o(s),{key:0,class:"is-loading"},{default:n(()=>[l(o(w))]),_:1})):(a(),b(o(s),{key:1},{default:n(()=>[l(o(Q))]),_:1}))],8,ne)):u("v-if",!0),e.showFullscreen?(a(),r("button",{key:5,class:"toolbar-btn",type:"button",title:e.fullscreen?"退出全屏":"全屏",onClick:t[12]||(t[12]=d=>i("toggle-fullscreen"))},[l(o(s),null,{default:n(()=>[e.fullscreen?(a(),b(o(P),{key:0})):(a(),b(o(H),{key:1}))]),_:1})],8,de)):u("v-if",!0),e.showClose?(a(),r("button",{key:6,class:"toolbar-btn toolbar-btn--close",type:"button",title:"关闭",onClick:t[13]||(t[13]=d=>i("close"))},[l(o(s),null,{default:n(()=>[l(o(P))]),_:1})])):u("v-if",!0)])],2)}}}),ce=j(se,[["__scopeId","data-v-befd4ab6"]]);export{ce as default};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** 附件最小信息:id 必填,name/type 用于判断可预览性与下载命名 */
|
|
2
|
+
export interface FileOpenTarget {
|
|
3
|
+
id?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
}
|
|
7
|
+
/** 取后缀:优先文件名,其次附件类型(忽略 MIME 形式) */
|
|
8
|
+
export declare const resolveFileSuffix: (file?: FileOpenTarget) => string;
|
|
9
|
+
export default function useFileOpen(): {
|
|
10
|
+
openFile: (file?: FileOpenTarget) => Promise<void>;
|
|
11
|
+
downloadFile: (file?: FileOpenTarget) => Promise<void>;
|
|
12
|
+
isPreviewable: (file?: FileOpenTarget) => boolean;
|
|
13
|
+
resolveFileSuffix: (file?: FileOpenTarget) => string;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import p from"./useFileView.js";import n from"../utils/FrameworkUtils.js";import s from"../utils/fileDownload.js";import{isPreviewableSuffix as a}from"../utils/uploadAccept.js";import"../utils/frontendBus.js";import"element-plus";import"xlsx-js-style";import"crypto-js/enc-base64";import"crypto-js/enc-utf8";import"../api/DocumentApi.js";import"../utils/request.js";import"../utils/AxiosConfig.js";import"axios";import"../utils/uuid.js";import"uuid";import"../utils/encrypt.js";import"jsencrypt";import"../utils/behaviorTrack.js";import"../utils/behaviorContext.js";import"../utils/dateTime.js";import"../utils/globalLoading.js";import"vue";import"../utils/workflowTaskContext.js";import"../config/GlobalLoadingConfig.js";const m=t=>{const o=(t?.name||"").split(".").pop()||"";if(o&&o!==t?.name)return o.toLowerCase();const i=(t?.type||"").replace(/^\./,"").toLowerCase();return i.includes("/")?"":i};function U(){const{fileView:t}=p(),o=r=>{const e=m(r);return!e||a(e)},i=async r=>{if(r?.id)try{await s(r.id,r.name)}catch(e){n.messageError(e)}};return{openFile:async r=>{if(r?.id){if(o(r)){t(r.id);return}await i(r)}},downloadFile:i,isPreviewable:o,resolveFileSuffix:m}}export{U as default,m as resolveFileSuffix};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as p}from"../../chunks/operationAuth.vue_vue_type_script_lang-BgqMGXbQ.js";import{_ as e}from"../../chunks/ElFlex.vue_vue_type_script_setup_true_lang-DYk3SQcE.js";import{_ as a}from"../../chunks/ElDescForm.vue_vue_type_style_index_0_lang-BU3FMUMx.js";import s from"../components/ElContentPanel/ElContentPanel.vue.js";import n from"../components/ElSplitPanel/ElSplitPanel.vue.js";import _ from"../components/ElCardSection/ElCardSection.vue.js";import f from"../components/ElDialogBody/ElDialogBody.vue.js";import
|
|
1
|
+
import{_ as p}from"../../chunks/operationAuth.vue_vue_type_script_lang-BgqMGXbQ.js";import{_ as e}from"../../chunks/ElFlex.vue_vue_type_script_setup_true_lang-DYk3SQcE.js";import{_ as a}from"../../chunks/ElDescForm.vue_vue_type_style_index_0_lang-BU3FMUMx.js";import s from"../components/ElContentPanel/ElContentPanel.vue.js";import n from"../components/ElSplitPanel/ElSplitPanel.vue.js";import _ from"../components/ElCardSection/ElCardSection.vue.js";import f from"../components/upload/AttachmentPreview.vue.js";import l from"../components/ElDialogBody/ElDialogBody.vue.js";import c from"../components/ElGrid/ElGrid.vue.js";import h from"../components/Search/ElSearch.vue.js";import u from"../components/Title/ElTitle.vue.js";import d from"../components/icon/ElIcons.vue.js";import E from"../components/icon/ElIconBtn.vue.js";import $ from"../components/Search/ElIconSearch.vue.js";import v from"../components/Search/ElSearchInput.vue.js";import{_ as I}from"../../chunks/ElCopyTooltip.vue_vue_type_script_setup_true_lang-Qg1P3If6.js";/* empty css */import{reportPageLeave as i,setCurrentMenu as m,reportPageActivate as b,reportFeatureOpen as g}from"../utils/behaviorTrack.js";import{_ as P}from"../../chunks/userSelect.vue_vue_type_script_setup_true_lang-DlEso2ua.js";import{_ as A}from"../../chunks/comp.selectUser.vue_vue_type_script_setup_true_lang-BQDO393q.js";import{_ as M}from"../../chunks/DictDisplay.vue_vue_type_script_setup_true_lang-DiFlFWi1.js";import{_ as D}from"../../chunks/ElScrollbars.vue_vue_type_script_setup_true_lang-0Vhrxdyr.js";import{_ as L}from"../../chunks/ElTotalTools.vue_vue_type_script_setup_true_lang-BqRnIFkw.js";import T from"../components/ElCardList.vue.js";import C from"../components/kFrame/KFrame.vue.js";import{_ as S}from"../../chunks/ElPagePagination.vue_vue_type_style_index_0_lang-CGjSyYgn.js";import{_ as y}from"../../chunks/ElCellLink.vue_vue_type_script_setup_true_lang-DXGj9pCT.js";import{_ as O}from"../../chunks/ElTagDisplay.vue_vue_type_script_setup_true_lang-DQXuYsW_.js";import{_ as F}from"../../chunks/DragHandleIcon.vue_vue_type_script_setup_true_lang-DnMWn5jY.js";import N from"../components/ElCircleBadge/ElCircleBadge.vue.js";import U from"../components/AsideCardList/AsideCardList.vue.js";import{_ as x}from"../../chunks/ElNumericInput.vue_vue_type_script_setup_true_lang-C6KlCE6f.js";import B from"../components/ElIndicatorInput/ElIndicatorInput.vue.js";import K from"../components/ElTabsPanel/ElTabsPanel.vue.js";import"vue";import"../hooks/useBehaviorAction.js";import"../utils/behaviorContext.js";import"../utils/uuid.js";import"uuid";import"axios";import"crypto-js/enc-base64";import"crypto-js/enc-utf8";import"../utils/encrypt.js";import"jsencrypt";import"../utils/dateTime.js";import"../hooks/useOperationAuth.js";import"vue-router";import"../stores/permissionStore.js";import"pinia";import"../utils/frontendBus.js";import"../utils/operationAuth.js";import"../stores/userInfoStore.js";import"../utils/userSessionStorage.js";import"../interface/enum/FlexEnum.js";import"@vueuse/core";import"../../chunks/_plugin-vue_export-helper-DlAUqK2U.js";import"element-plus";import"../utils/FrameworkUtils.js";import"xlsx-js-style";import"../hooks/usePreviewFullscreen.js";import"../components/upload/OfficePreview.vue.js";import"../api/DocumentApi.js";import"../utils/request.js";import"../utils/AxiosConfig.js";import"../utils/globalLoading.js";import"../utils/workflowTaskContext.js";import"../config/GlobalLoadingConfig.js";import"../utils/fileDownload.js";import"../utils/officePreviewUtil.js";import"../components/upload/OfficePreviewHeaderBar.vue.js";import"@element-plus/icons-vue";import"../components/ElGrid/ElGridColumnSetting.vue.js";import"../utils/columnSettingStorage.js";import"../components/business/userSelectContent.vue.js";import"../api/BasicApi.js";import"../api/SysUserApi.js";import"../api/EmployeeInfoApi.js";import"../components/business/comp.userForm.vue.js";import"../api/DeptInfoApi.js";import"../hooks/useResetRefHooks.js";import"../config/vxeSelectColumn.js";import"../hooks/useDictHooks.js";import"../api/SysDictCacheApi.js";import"../stores/dictStore.js";import"@vueuse/components";import"../components/kFrame/IframeOptions.js";import"../components/RichTextEditor/RichTextEditor.vue.js";import"../../chunks/preload-helper-BlTxHScW.js";import"../components/RichTextEditor/richTextHtmlUtils.js";import"../components/RichTextEditor/installUmoEditorApp.js";import"tdesign-vue-next";import"../components/RichTextEditor/richTextImageUpload.js";import"../utils/buildUploadHeaders.js";import"../components/ElIndicatorInput/interface.js";const Mr={mounted(){const t=this.$route,r=t?.meta?.sysMenuData;r?.id&&m(r);const o=this.$options?.__name||this.$options?.name;this.$options?.__isPageWrapper||this.$parent?.$options?.__isPageWrapper&&r?.id&&o&&o===t?.name&&(g(r,t.fullPath),this.__behaviorMenuId=r.id,this.__behaviorActivatedOnce=!1,this.__behaviorLeft=!1)},activated(){const t=this.$route?.meta?.sysMenuData;t?.id&&m(t);const r=this.__behaviorMenuId;if(r){if(!this.__behaviorActivatedOnce){this.__behaviorActivatedOnce=!0;return}b(r),this.__behaviorLeft=!1}},deactivated(){const t=this.__behaviorMenuId;t&&(i(t,"KEEP_ALIVE_DEACTIVATE"),this.__behaviorLeft=!0)},beforeUnmount(){const t=this.__behaviorMenuId;t&&i(t,"UNMOUNT",!0,!this.__behaviorLeft)},components:{operationAuth:p,ElFlex:e,ElDescForm:a,ElContentPanel:s,ElSplitPanel:n,ElCardSection:_,AttachmentPreview:f,ElDialogBody:l,ElGrid:c,ElSearch:h,ElTitle:u,ElIcons:d,ElIconBtn:E,ElIconSearch:$,ElSearchInput:v,ElTooltip:I,userSelect:P,mdmUserSelect:A,ElScrollbars:D,ElTotalTools:L,ElCardList:T,KFrame:C,ElPagePagination:S,ElCellLink:y,ElTagDisplay:O,DictDisplay:M,DragHandleIcon:F,ElCircleBadge:N,AsideCardList:U,ElNumericInput:x,ElIndicatorInput:B,ElTabsPanel:K}};export{Mr as globalMixin};
|
|
@@ -781,6 +781,8 @@ export { INDICATOR_RANGE_TYPE } from '../components/ElIndicatorInput/interface';
|
|
|
781
781
|
export { evaluateComputedIndicators, evaluateIndicatorFormula, formatIndicatorFormulaResult, formatIndicatorRangeValue, isComputedIndicator, isIndicatorReadonly, parseIndicatorTags, parseIndicatorRangeValue, validateIndicatorValue, } from '../components/ElIndicatorInput/interface';
|
|
782
782
|
export { useDescForm } from '../hooks/useDescForm';
|
|
783
783
|
export { default as useOperationAuth } from '../hooks/useOperationAuth';
|
|
784
|
+
export { default as useFileOpen } from '../hooks/useFileOpen';
|
|
785
|
+
export type { FileOpenTarget } from '../hooks/useFileOpen';
|
|
784
786
|
export { matchOperation, resolveOperationList, resolveOperationMenu, } from '../utils/operationAuth';
|
|
785
787
|
export type { IOperationAuthContext } from '../utils/operationAuth';
|
|
786
788
|
export { DATE_FORMAT, DATE_TIME_FORMAT, DATE_TIME_MILLISECONDS_FORMAT, formatDateTime, } from '../utils/dateTime';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../config/ElementPlusConfig.js";import{_ as o}from"../../chunks/ElFlex.vue_vue_type_script_setup_true_lang-DYk3SQcE.js";import{_ as r}from"../../chunks/ElDescForm.vue_vue_type_style_index_0_lang-BU3FMUMx.js";import t from"../components/icon/ElIcons.vue.js";import m from"../components/icon/ElIconBtn.vue.js";import{_ as i}from"../../chunks/operationAuth.vue_vue_type_script_lang-BgqMGXbQ.js";import p from"../components/Search/ElSearch.vue.js";import a from"../components/Search/ElIconSearch.vue.js";import e from"../components/Search/ElSearchInput.vue.js";import{_ as l}from"../../chunks/ElCellLink.vue_vue_type_script_setup_true_lang-DXGj9pCT.js";import{_ as n}from"../../chunks/ElTagDisplay.vue_vue_type_script_setup_true_lang-DQXuYsW_.js";import s from"../components/ElCircleBadge/ElCircleBadge.vue.js";import{_ as f}from"../../chunks/ElNumericInput.vue_vue_type_script_setup_true_lang-C6KlCE6f.js";import c from"../components/ElIndicatorInput/ElIndicatorInput.vue.js";import
|
|
1
|
+
import"../config/ElementPlusConfig.js";import{_ as o}from"../../chunks/ElFlex.vue_vue_type_script_setup_true_lang-DYk3SQcE.js";import{_ as r}from"../../chunks/ElDescForm.vue_vue_type_style_index_0_lang-BU3FMUMx.js";import t from"../components/icon/ElIcons.vue.js";import m from"../components/icon/ElIconBtn.vue.js";import{_ as i}from"../../chunks/operationAuth.vue_vue_type_script_lang-BgqMGXbQ.js";import p from"../components/Search/ElSearch.vue.js";import a from"../components/Search/ElIconSearch.vue.js";import e from"../components/Search/ElSearchInput.vue.js";import{_ as l}from"../../chunks/ElCellLink.vue_vue_type_script_setup_true_lang-DXGj9pCT.js";import{_ as n}from"../../chunks/ElTagDisplay.vue_vue_type_script_setup_true_lang-DQXuYsW_.js";import s from"../components/ElCircleBadge/ElCircleBadge.vue.js";import{_ as f}from"../../chunks/ElNumericInput.vue_vue_type_script_setup_true_lang-C6KlCE6f.js";import c from"../components/ElIndicatorInput/ElIndicatorInput.vue.js";import u from"../components/ElTabsPanel/ElTabsPanel.vue.js";import{INDICATOR_RANGE_TYPE as Ao,evaluateComputedIndicators as Fo,evaluateIndicatorFormula as xo,formatIndicatorFormulaResult as Ro,formatIndicatorRangeValue as go,isComputedIndicator as Co,isIndicatorReadonly as Mo,parseIndicatorRangeValue as ho,parseIndicatorTags as vo,validateIndicatorValue as No}from"../components/ElIndicatorInput/interface.js";import{useDescForm as $o}from"../hooks/useDescForm.js";import{default as Po}from"../hooks/useOperationAuth.js";import{default as Vo}from"../hooks/useFileOpen.js";import{matchOperation as bo,resolveOperationList as ko,resolveOperationMenu as Go}from"../utils/operationAuth.js";import{DATE_FORMAT as jo,DATE_TIME_FORMAT as qo,DATE_TIME_MILLISECONDS_FORMAT as wo,formatDateTime as zo}from"../utils/dateTime.js";import _ from"element-plus";import"../utils/patchWujiePopperCoordinates.js";import"vue";import"../interface/enum/FlexEnum.js";import"@vueuse/core";import"../../chunks/_plugin-vue_export-helper-DlAUqK2U.js";import"../hooks/useBehaviorAction.js";import"../utils/behaviorTrack.js";import"axios";import"crypto-js/enc-base64";import"crypto-js/enc-utf8";import"../utils/uuid.js";import"uuid";import"../utils/behaviorContext.js";import"../utils/encrypt.js";import"jsencrypt";import"vue-router";import"@element-plus/icons-vue";import"../utils/frontendBus.js";import"../components/RichTextEditor/RichTextEditor.vue.js";import"../../chunks/preload-helper-BlTxHScW.js";import"../components/RichTextEditor/richTextHtmlUtils.js";import"../components/RichTextEditor/installUmoEditorApp.js";import"tdesign-vue-next";import"../components/RichTextEditor/richTextImageUpload.js";import"../api/DocumentApi.js";import"../utils/request.js";import"../utils/AxiosConfig.js";import"../utils/globalLoading.js";import"../utils/workflowTaskContext.js";import"../config/GlobalLoadingConfig.js";import"../utils/buildUploadHeaders.js";import"../stores/permissionStore.js";import"pinia";import"../stores/userInfoStore.js";import"../utils/userSessionStorage.js";import"../hooks/useFileView.js";import"../utils/FrameworkUtils.js";import"xlsx-js-style";import"../utils/fileDownload.js";import"../utils/uploadAccept.js";const To={ElFlex:o,ElDescForm:r,ElIcons:t,ElIconBtn:m,OperationAuth:i,ElSearch:p,ElIconSearch:a,ElSearchInput:e,ElCellLink:l,ElTagDisplay:n,ElCircleBadge:s,ElNumericInput:f,ElIndicatorInput:c,ElTabsPanel:u,elementPlusConfig:_};export{jo as DATE_FORMAT,qo as DATE_TIME_FORMAT,wo as DATE_TIME_MILLISECONDS_FORMAT,s as ElCircleBadge,r as ElDescForm,c as ElIndicatorInput,f as ElNumericInput,e as ElSearchInput,u as ElTabsPanel,n as ElTagDisplay,Ao as INDICATOR_RANGE_TYPE,To as default,Fo as evaluateComputedIndicators,xo as evaluateIndicatorFormula,zo as formatDateTime,Ro as formatIndicatorFormulaResult,go as formatIndicatorRangeValue,Co as isComputedIndicator,Mo as isIndicatorReadonly,bo as matchOperation,ho as parseIndicatorRangeValue,vo as parseIndicatorTags,ko as resolveOperationList,Go as resolveOperationMenu,$o as useDescForm,Vo as useFileOpen,Po as useOperationAuth,No as validateIndicatorValue};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{globalMixin as o}from"../mixin/globalMixin.js";import"../../chunks/operationAuth.vue_vue_type_script_lang-BgqMGXbQ.js";import"vue";import"../hooks/useBehaviorAction.js";import"../utils/behaviorTrack.js";import"axios";import"crypto-js/enc-base64";import"crypto-js/enc-utf8";import"../utils/uuid.js";import"uuid";import"../utils/behaviorContext.js";import"../utils/encrypt.js";import"jsencrypt";import"../utils/dateTime.js";import"../hooks/useOperationAuth.js";import"vue-router";import"../stores/permissionStore.js";import"pinia";import"../utils/frontendBus.js";import"../utils/operationAuth.js";import"../stores/userInfoStore.js";import"../utils/userSessionStorage.js";import"../../chunks/ElFlex.vue_vue_type_script_setup_true_lang-DYk3SQcE.js";import"../interface/enum/FlexEnum.js";import"@vueuse/core";import"../components/icon/ElIcons.vue.js";import"../../chunks/_plugin-vue_export-helper-DlAUqK2U.js";import"../../chunks/ElDescForm.vue_vue_type_style_index_0_lang-BU3FMUMx.js";import"../components/ElContentPanel/ElContentPanel.vue.js";import"../components/ElSplitPanel/ElSplitPanel.vue.js";import"../components/ElCardSection/ElCardSection.vue.js";import"../components/
|
|
1
|
+
import{globalMixin as o}from"../mixin/globalMixin.js";import"../../chunks/operationAuth.vue_vue_type_script_lang-BgqMGXbQ.js";import"vue";import"../hooks/useBehaviorAction.js";import"../utils/behaviorTrack.js";import"axios";import"crypto-js/enc-base64";import"crypto-js/enc-utf8";import"../utils/uuid.js";import"uuid";import"../utils/behaviorContext.js";import"../utils/encrypt.js";import"jsencrypt";import"../utils/dateTime.js";import"../hooks/useOperationAuth.js";import"vue-router";import"../stores/permissionStore.js";import"pinia";import"../utils/frontendBus.js";import"../utils/operationAuth.js";import"../stores/userInfoStore.js";import"../utils/userSessionStorage.js";import"../../chunks/ElFlex.vue_vue_type_script_setup_true_lang-DYk3SQcE.js";import"../interface/enum/FlexEnum.js";import"@vueuse/core";import"../components/icon/ElIcons.vue.js";import"../../chunks/_plugin-vue_export-helper-DlAUqK2U.js";import"../../chunks/ElDescForm.vue_vue_type_style_index_0_lang-BU3FMUMx.js";import"../components/ElContentPanel/ElContentPanel.vue.js";import"../components/ElSplitPanel/ElSplitPanel.vue.js";import"../components/ElCardSection/ElCardSection.vue.js";import"../components/upload/AttachmentPreview.vue.js";import"element-plus";import"../utils/FrameworkUtils.js";import"xlsx-js-style";import"../hooks/usePreviewFullscreen.js";import"../components/upload/OfficePreview.vue.js";import"../api/DocumentApi.js";import"../utils/request.js";import"../utils/AxiosConfig.js";import"../utils/globalLoading.js";import"../utils/workflowTaskContext.js";import"../config/GlobalLoadingConfig.js";import"../utils/fileDownload.js";import"../utils/officePreviewUtil.js";import"../components/upload/OfficePreviewHeaderBar.vue.js";import"@element-plus/icons-vue";import"../components/ElDialogBody/ElDialogBody.vue.js";import"../components/ElGrid/ElGrid.vue.js";import"../components/ElGrid/ElGridColumnSetting.vue.js";import"../../chunks/DragHandleIcon.vue_vue_type_script_setup_true_lang-DnMWn5jY.js";import"../utils/columnSettingStorage.js";import"../../chunks/ElTotalTools.vue_vue_type_script_setup_true_lang-BqRnIFkw.js";import"../../chunks/ElPagePagination.vue_vue_type_style_index_0_lang-CGjSyYgn.js";import"../components/Search/ElSearch.vue.js";import"../components/Title/ElTitle.vue.js";import"../components/icon/ElIconBtn.vue.js";import"../components/Search/ElIconSearch.vue.js";import"../components/Search/ElSearchInput.vue.js";import"../../chunks/ElCopyTooltip.vue_vue_type_script_setup_true_lang-Qg1P3If6.js";/* empty css */import"../../chunks/userSelect.vue_vue_type_script_setup_true_lang-DlEso2ua.js";import"../components/business/userSelectContent.vue.js";import"../api/BasicApi.js";import"../api/SysUserApi.js";import"../../chunks/comp.selectUser.vue_vue_type_script_setup_true_lang-BQDO393q.js";import"../api/EmployeeInfoApi.js";import"../components/business/comp.userForm.vue.js";import"../api/DeptInfoApi.js";import"../hooks/useResetRefHooks.js";import"../config/vxeSelectColumn.js";import"../../chunks/ElTagDisplay.vue_vue_type_script_setup_true_lang-DQXuYsW_.js";import"../../chunks/DictDisplay.vue_vue_type_script_setup_true_lang-DiFlFWi1.js";import"../hooks/useDictHooks.js";import"../api/SysDictCacheApi.js";import"../stores/dictStore.js";import"../../chunks/ElScrollbars.vue_vue_type_script_setup_true_lang-0Vhrxdyr.js";import"@vueuse/components";import"../components/ElCardList.vue.js";import"../components/kFrame/KFrame.vue.js";import"../components/kFrame/IframeOptions.js";import"../../chunks/ElCellLink.vue_vue_type_script_setup_true_lang-DXGj9pCT.js";import"../components/ElCircleBadge/ElCircleBadge.vue.js";import"../components/AsideCardList/AsideCardList.vue.js";import"../../chunks/ElNumericInput.vue_vue_type_script_setup_true_lang-C6KlCE6f.js";import"../components/ElIndicatorInput/ElIndicatorInput.vue.js";import"../components/RichTextEditor/RichTextEditor.vue.js";import"../../chunks/preload-helper-BlTxHScW.js";import"../components/RichTextEditor/richTextHtmlUtils.js";import"../components/RichTextEditor/installUmoEditorApp.js";import"tdesign-vue-next";import"../components/RichTextEditor/richTextImageUpload.js";import"../utils/buildUploadHeaders.js";import"../components/ElIndicatorInput/interface.js";import"../components/ElTabsPanel/ElTabsPanel.vue.js";const Ri={install(i){i.mixin(o)}};export{Ri as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ref as m,createApp as g,h as t}from"vue";import v,{ElDialog as y,ElDrawer as C,ElButton as n}from"element-plus";import E from"./plugins.js";import h from"../stores/storeConfig.js";/* empty css */import"../config/ElementPlusConfig.js";import b from"element-plus/es/locale/lang/zh-cn";import"../mixin/globalMixin.js";import"../../chunks/operationAuth.vue_vue_type_script_lang-BgqMGXbQ.js";import"../hooks/useBehaviorAction.js";import"../utils/behaviorTrack.js";import"axios";import"crypto-js/enc-base64";import"crypto-js/enc-utf8";import"../utils/uuid.js";import"uuid";import"../utils/behaviorContext.js";import"../utils/encrypt.js";import"jsencrypt";import"../utils/dateTime.js";import"../hooks/useOperationAuth.js";import"vue-router";import"../stores/permissionStore.js";import"pinia";import"../utils/frontendBus.js";import"../utils/operationAuth.js";import"../stores/userInfoStore.js";import"../utils/userSessionStorage.js";import"../../chunks/ElFlex.vue_vue_type_script_setup_true_lang-DYk3SQcE.js";import"../interface/enum/FlexEnum.js";import"@vueuse/core";import"../components/icon/ElIcons.vue.js";import"../../chunks/_plugin-vue_export-helper-DlAUqK2U.js";import"../../chunks/ElDescForm.vue_vue_type_style_index_0_lang-BU3FMUMx.js";import"../components/ElContentPanel/ElContentPanel.vue.js";import"../components/ElSplitPanel/ElSplitPanel.vue.js";import"../components/ElCardSection/ElCardSection.vue.js";import"../components/
|
|
1
|
+
import{ref as m,createApp as g,h as t}from"vue";import v,{ElDialog as y,ElDrawer as C,ElButton as n}from"element-plus";import E from"./plugins.js";import h from"../stores/storeConfig.js";/* empty css */import"../config/ElementPlusConfig.js";import b from"element-plus/es/locale/lang/zh-cn";import"../mixin/globalMixin.js";import"../../chunks/operationAuth.vue_vue_type_script_lang-BgqMGXbQ.js";import"../hooks/useBehaviorAction.js";import"../utils/behaviorTrack.js";import"axios";import"crypto-js/enc-base64";import"crypto-js/enc-utf8";import"../utils/uuid.js";import"uuid";import"../utils/behaviorContext.js";import"../utils/encrypt.js";import"jsencrypt";import"../utils/dateTime.js";import"../hooks/useOperationAuth.js";import"vue-router";import"../stores/permissionStore.js";import"pinia";import"../utils/frontendBus.js";import"../utils/operationAuth.js";import"../stores/userInfoStore.js";import"../utils/userSessionStorage.js";import"../../chunks/ElFlex.vue_vue_type_script_setup_true_lang-DYk3SQcE.js";import"../interface/enum/FlexEnum.js";import"@vueuse/core";import"../components/icon/ElIcons.vue.js";import"../../chunks/_plugin-vue_export-helper-DlAUqK2U.js";import"../../chunks/ElDescForm.vue_vue_type_style_index_0_lang-BU3FMUMx.js";import"../components/ElContentPanel/ElContentPanel.vue.js";import"../components/ElSplitPanel/ElSplitPanel.vue.js";import"../components/ElCardSection/ElCardSection.vue.js";import"../components/upload/AttachmentPreview.vue.js";import"../utils/FrameworkUtils.js";import"xlsx-js-style";import"../hooks/usePreviewFullscreen.js";import"../components/upload/OfficePreview.vue.js";import"../api/DocumentApi.js";import"../utils/request.js";import"../utils/AxiosConfig.js";import"../utils/globalLoading.js";import"../utils/workflowTaskContext.js";import"../config/GlobalLoadingConfig.js";import"../utils/fileDownload.js";import"../utils/officePreviewUtil.js";import"../components/upload/OfficePreviewHeaderBar.vue.js";import"@element-plus/icons-vue";import"../components/ElDialogBody/ElDialogBody.vue.js";import"../components/ElGrid/ElGrid.vue.js";import"../components/ElGrid/ElGridColumnSetting.vue.js";import"../../chunks/DragHandleIcon.vue_vue_type_script_setup_true_lang-DnMWn5jY.js";import"../utils/columnSettingStorage.js";import"../../chunks/ElTotalTools.vue_vue_type_script_setup_true_lang-BqRnIFkw.js";import"../../chunks/ElPagePagination.vue_vue_type_style_index_0_lang-CGjSyYgn.js";import"../components/Search/ElSearch.vue.js";import"../components/Title/ElTitle.vue.js";import"../components/icon/ElIconBtn.vue.js";import"../components/Search/ElIconSearch.vue.js";import"../components/Search/ElSearchInput.vue.js";import"../../chunks/ElCopyTooltip.vue_vue_type_script_setup_true_lang-Qg1P3If6.js";/* empty css */import"../../chunks/userSelect.vue_vue_type_script_setup_true_lang-DlEso2ua.js";import"../components/business/userSelectContent.vue.js";import"../api/BasicApi.js";import"../api/SysUserApi.js";import"../../chunks/comp.selectUser.vue_vue_type_script_setup_true_lang-BQDO393q.js";import"../api/EmployeeInfoApi.js";import"../components/business/comp.userForm.vue.js";import"../api/DeptInfoApi.js";import"../hooks/useResetRefHooks.js";import"../config/vxeSelectColumn.js";import"../../chunks/ElTagDisplay.vue_vue_type_script_setup_true_lang-DQXuYsW_.js";import"../../chunks/DictDisplay.vue_vue_type_script_setup_true_lang-DiFlFWi1.js";import"../hooks/useDictHooks.js";import"../api/SysDictCacheApi.js";import"../stores/dictStore.js";import"../../chunks/ElScrollbars.vue_vue_type_script_setup_true_lang-0Vhrxdyr.js";import"@vueuse/components";import"../components/ElCardList.vue.js";import"../components/kFrame/KFrame.vue.js";import"../components/kFrame/IframeOptions.js";import"../../chunks/ElCellLink.vue_vue_type_script_setup_true_lang-DXGj9pCT.js";import"../components/ElCircleBadge/ElCircleBadge.vue.js";import"../components/AsideCardList/AsideCardList.vue.js";import"../../chunks/ElNumericInput.vue_vue_type_script_setup_true_lang-C6KlCE6f.js";import"../components/ElIndicatorInput/ElIndicatorInput.vue.js";import"../components/RichTextEditor/RichTextEditor.vue.js";import"../../chunks/preload-helper-BlTxHScW.js";import"../components/RichTextEditor/richTextHtmlUtils.js";import"../components/RichTextEditor/installUmoEditorApp.js";import"tdesign-vue-next";import"../components/RichTextEditor/richTextImageUpload.js";import"../utils/buildUploadHeaders.js";import"../components/ElIndicatorInput/interface.js";import"../components/ElTabsPanel/ElTabsPanel.vue.js";import"pinia-plugin-store";import"../utils/patchWujiePopperCoordinates.js";function Ct(a,u,c,s,d="dialog"){const p=m(!0),i=m(!1),e=m(),o=g(()=>t(d==="dialog"?y:C,{...c,modelValue:p.value,onClosed(){o.unmount(),document.body.removeChild(r)},onClose(){l()}},{default:()=>t(a,{...u,ref:e}),footer:()=>t("div",{className:"dialog-footer"},[t(n,{onClick:l},()=>"取 消"),t(n,{type:"primary",onClick:f,loading:i.value},()=>"确 认")])}));o.use(E),o.use(v,{locale:b}),o.use(h),o.use(s);const r=document.createElement("div");document.body.appendChild(r),o.mount(r);async function f(){i.value=!0;try{await e.value?.confirm?.()}finally{i.value=!1}}function l(){p.value=!1}}export{Ct as renderDialog};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 按附件 ID 下载文件(统一的产物下载实现)。
|
|
3
|
+
*
|
|
4
|
+
* 预览组件的下载按钮、文件查看弹层、不可预览附件的自动下载都走这里,
|
|
5
|
+
* 避免各页面各写一份 Blob + a[download] 逻辑。
|
|
6
|
+
* 只负责取流并触发浏览器下载:loading 与错误提示由调用方处理。
|
|
7
|
+
*/
|
|
8
|
+
export declare const downloadFileById: (id: string, fileName?: string, format?: string) => Promise<void>;
|
|
9
|
+
export default downloadFileById;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../api/DocumentApi.js";import"./request.js";import"./AxiosConfig.js";import"axios";import"./uuid.js";import"uuid";import"./encrypt.js";import"jsencrypt";import"./behaviorTrack.js";import"crypto-js/enc-base64";import"crypto-js/enc-utf8";import"./behaviorContext.js";import"./dateTime.js";import"element-plus";import"./frontendBus.js";import"./globalLoading.js";import"vue";import"./workflowTaskContext.js";import"../config/GlobalLoadingConfig.js";const v=async(o,i,m)=>{if(!o)return;const p=await e.downloadFile(o,m),r=URL.createObjectURL(p),t=document.createElement("a");t.href=r,t.download=i||o,t.click(),URL.revokeObjectURL(r)};export{v as default,v as downloadFileById};
|