@agile-team/mach-report 0.6.0 → 0.7.0
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/ReportPreview-CrVeTKu1.cjs +6 -0
- package/dist/ReportPreview-DgsOdO4y.js +559 -0
- package/dist/index.cjs +5 -5
- package/dist/index.js +531 -510
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.js +4 -4
- package/dist/plugin-Cl-IqCqx.cjs +1 -0
- package/dist/plugin-Dp3kKWiQ.js +92 -0
- package/dist/style.css +1 -1
- package/dist/vue/ReportPreview.d.ts +27 -3
- package/dist/vue/adapters.d.ts +3 -0
- package/dist/vue/async.d.cts +193 -64
- package/dist/vue/async.d.ts +193 -64
- package/dist/vue/controller.d.ts +24 -0
- package/dist/vue/errors.d.ts +16 -0
- package/dist/vue/index.d.cts +2 -0
- package/dist/vue/index.d.ts +2 -0
- package/dist/vue/injection-keys.d.ts +2 -0
- package/dist/vue/plugin.d.ts +262 -2
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +41 -32
- package/package.json +1 -1
- package/dist/ReportPreview-DWLjYi_p.js +0 -527
- package/dist/ReportPreview-rBtmbu3W.cjs +0 -6
- package/dist/plugin-BIJxGHZX.cjs +0 -1
- package/dist/plugin-DrV67_VW.js +0 -89
package/dist/pdf.js
CHANGED
|
@@ -36131,10 +36131,10 @@ async function OE(t) {
|
|
|
36131
36131
|
if (i)
|
|
36132
36132
|
return bf.set(t, i), i;
|
|
36133
36133
|
try {
|
|
36134
|
-
const a = await fetch(t);
|
|
36135
|
-
if (!
|
|
36136
|
-
const
|
|
36137
|
-
return bf.set(t,
|
|
36134
|
+
const a = typeof AbortSignal < "u" && "timeout" in AbortSignal ? AbortSignal.timeout(15e3) : void 0, o = await fetch(t, a ? { signal: a } : void 0);
|
|
36135
|
+
if (!o.ok) return null;
|
|
36136
|
+
const s = new Uint8Array(await o.arrayBuffer());
|
|
36137
|
+
return bf.set(t, s), CE(t, s), s;
|
|
36138
36138
|
} catch {
|
|
36139
36139
|
return null;
|
|
36140
36140
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var O=Object.create;var E=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty;var U=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of b(e))!F.call(r,n)&&n!==t&&E(r,n,{get:()=>e[n],enumerable:!(o=A(e,n))||o.enumerable});return r};var M=(r,e,t)=>(t=r!=null?O(y(r)):{},U(e||!r||!r.__esModule?E(t,"default",{value:r,enumerable:!0}):t,r));const R=require("vue");function m(r){return r==null?[]:Array.isArray(r)?r.map(String).filter(e=>e!==""):String(r).split(",").map(e=>e.trim()).filter(e=>e!=="")}function j(r){return m(r).join(",")}class s extends Error{constructor(e){super(e),this.name="PlanLoadError"}}function P(r={}){const{baseUrl:e="",headers:t,credentials:o,timeoutMs:n=3e4}=r;return async({url:c,method:i,params:a})=>{const h=a&&Object.keys(a).length>0?`?${new URLSearchParams(a)}`:"",l=new AbortController,f=setTimeout(()=>l.abort(),n);let d;try{d=await fetch(`${e}${c}${h}`,{method:i.toUpperCase(),headers:{Accept:"application/json",...t},credentials:o,signal:l.signal})}catch(u){throw u instanceof DOMException&&u.name==="AbortError"?new s(`请求超时(${n}ms): ${c}`):new s(`请求失败(${c}): ${u instanceof Error?u.message:String(u)}`)}finally{clearTimeout(f)}if(!d.ok)throw new s(`HTTP ${d.status} ${c}`);return d.json()}}function p(r){const{request:e,baseUrl:t=""}=r;return async({tempIds:o,furnitureTempId:n,params:c})=>{if(o.length===0)throw new s("缺少报表模板 ID");const i={tempId:o.join(",")};n&&(i.furnitureTempId=n);for(const[l,f]of Object.entries(c||{}))l&&f!=null&&f!==""&&(i[l]=String(f));const a=await e({url:`${t}/report/codePrintReport/gridPlan`,method:"get",params:i});if(a&&a.code!=null&&a.code!==200)throw new s(String(a.message||"预览加载失败"));const h=a?.data?.pages;return{schemaVersion:"jh4j-compatible",pages:Array.isArray(h)?h:[]}}}function _(r={fontUrl:"/simhei.ttf"}){let e=null;return async t=>{e||(e=await import("@agile-team/mach-report/pdf"));const o=r.fontUrl?await e.loadFontWithCache(r.fontUrl):null,{bytes:n}=await e.renderPlanToPdf(t,o?{customFontBytes:o}:{});return n}}const T="mach-report/fetcher",g="mach-report/pdf-exporter",w="mach-report/config",$="mach-report/controller",C=R.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./ReportPreview-CrVeTKu1.cjs")).then(r=>r.ReportPreview$1)),H={install(r,e={}){const t=e.fetcher??p({request:e.request??P({baseUrl:e.baseUrl}),baseUrl:e.baseUrl});r.provide(T,t);const o=e.pdfFontUrl??e.config?.defaults?.pdfFontUrl??"/simhei.ttf";r.provide(g,e.pdfExporter??_({fontUrl:o})),r.provide(w,R.computed(()=>e.config??null)),e.globalComponent!==!1&&r.component("MachReportPreview",C)}};exports.MACH_REPORT_CONFIG_KEY=w;exports.MACH_REPORT_CONTROLLER_KEY=$;exports.MACH_REPORT_FETCHER_KEY=T;exports.MACH_REPORT_PDF_EXPORTER_KEY=g;exports.MachReportPreview=C;exports.PlanLoadError=s;exports.createDefaultPdfExporter=_;exports.createFetchRequest=P;exports.createJh4jGridPlanFetcher=p;exports.joinTempIds=j;exports.machReportPlugin=H;exports.normalizeTempIds=m;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { defineAsyncComponent as d, computed as p } from "vue";
|
|
2
|
+
function g(r) {
|
|
3
|
+
return r == null ? [] : Array.isArray(r) ? r.map(String).filter((e) => e !== "") : String(r).split(",").map((e) => e.trim()).filter((e) => e !== "");
|
|
4
|
+
}
|
|
5
|
+
function _(r) {
|
|
6
|
+
return g(r).join(",");
|
|
7
|
+
}
|
|
8
|
+
class u extends Error {
|
|
9
|
+
constructor(e) {
|
|
10
|
+
super(e), this.name = "PlanLoadError";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function E(r = {}) {
|
|
14
|
+
const { baseUrl: e = "", headers: o, credentials: t, timeoutMs: a = 3e4 } = r;
|
|
15
|
+
return async ({ url: s, method: c, params: n }) => {
|
|
16
|
+
const h = n && Object.keys(n).length > 0 ? `?${new URLSearchParams(n)}` : "", i = new AbortController(), l = setTimeout(() => i.abort(), a);
|
|
17
|
+
let m;
|
|
18
|
+
try {
|
|
19
|
+
m = await fetch(`${e}${s}${h}`, {
|
|
20
|
+
method: c.toUpperCase(),
|
|
21
|
+
headers: { Accept: "application/json", ...o },
|
|
22
|
+
credentials: t,
|
|
23
|
+
signal: i.signal
|
|
24
|
+
});
|
|
25
|
+
} catch (f) {
|
|
26
|
+
throw f instanceof DOMException && f.name === "AbortError" ? new u(`请求超时(${a}ms): ${s}`) : new u(`请求失败(${s}): ${f instanceof Error ? f.message : String(f)}`);
|
|
27
|
+
} finally {
|
|
28
|
+
clearTimeout(l);
|
|
29
|
+
}
|
|
30
|
+
if (!m.ok)
|
|
31
|
+
throw new u(`HTTP ${m.status} ${s}`);
|
|
32
|
+
return m.json();
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function P(r) {
|
|
36
|
+
const { request: e, baseUrl: o = "" } = r;
|
|
37
|
+
return async ({ tempIds: t, furnitureTempId: a, params: s }) => {
|
|
38
|
+
if (t.length === 0) throw new u("缺少报表模板 ID");
|
|
39
|
+
const c = { tempId: t.join(",") };
|
|
40
|
+
a && (c.furnitureTempId = a);
|
|
41
|
+
for (const [i, l] of Object.entries(s || {}))
|
|
42
|
+
i && l != null && l !== "" && (c[i] = String(l));
|
|
43
|
+
const n = await e({
|
|
44
|
+
url: `${o}/report/codePrintReport/gridPlan`,
|
|
45
|
+
method: "get",
|
|
46
|
+
params: c
|
|
47
|
+
});
|
|
48
|
+
if (n && n.code != null && n.code !== 200)
|
|
49
|
+
throw new u(String(n.message || "预览加载失败"));
|
|
50
|
+
const h = n?.data?.pages;
|
|
51
|
+
return {
|
|
52
|
+
schemaVersion: "jh4j-compatible",
|
|
53
|
+
pages: Array.isArray(h) ? h : []
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function w(r = { fontUrl: "/simhei.ttf" }) {
|
|
58
|
+
let e = null;
|
|
59
|
+
return async (o) => {
|
|
60
|
+
e || (e = await import("@agile-team/mach-report/pdf"));
|
|
61
|
+
const t = r.fontUrl ? await e.loadFontWithCache(r.fontUrl) : null, { bytes: a } = await e.renderPlanToPdf(o, t ? { customFontBytes: t } : {});
|
|
62
|
+
return a;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
const R = "mach-report/fetcher", b = "mach-report/pdf-exporter", y = "mach-report/config", j = "mach-report/controller", U = d(() => import("./ReportPreview-DgsOdO4y.js").then((r) => r.j)), A = {
|
|
66
|
+
install(r, e = {}) {
|
|
67
|
+
const o = e.fetcher ?? P({
|
|
68
|
+
request: e.request ?? E({ baseUrl: e.baseUrl }),
|
|
69
|
+
baseUrl: e.baseUrl
|
|
70
|
+
});
|
|
71
|
+
r.provide(R, o);
|
|
72
|
+
const t = e.pdfFontUrl ?? e.config?.defaults?.pdfFontUrl ?? "/simhei.ttf";
|
|
73
|
+
r.provide(
|
|
74
|
+
b,
|
|
75
|
+
e.pdfExporter ?? w({ fontUrl: t })
|
|
76
|
+
), r.provide(y, p(() => e.config ?? null)), e.globalComponent !== !1 && r.component("MachReportPreview", U);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
export {
|
|
80
|
+
j as M,
|
|
81
|
+
u as P,
|
|
82
|
+
y as a,
|
|
83
|
+
R as b,
|
|
84
|
+
b as c,
|
|
85
|
+
U as d,
|
|
86
|
+
w as e,
|
|
87
|
+
E as f,
|
|
88
|
+
P as g,
|
|
89
|
+
_ as j,
|
|
90
|
+
A as m,
|
|
91
|
+
g as n
|
|
92
|
+
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.mrp-toolbar[data-v-2bfb2c61]{display:flex;align-items:center;gap:8px;padding:6px 12px;background:var(--mrp-toolbar-bg, #323639);border-bottom:1px solid var(--mrp-toolbar-border, #22252a);flex:none}.mrp-title[data-v-2bfb2c61]{font-size:13px;font-weight:600;margin-right:8px;color:var(--mrp-toolbar-fg, #e8e8e8)}.mrp-nav[data-v-2bfb2c61]{background:transparent;color:var(--mrp-btn-fg, #cfcfcf);border:1px solid var(--mrp-btn-border, #4a4d52);border-radius:4px;padding:2px 8px;font-size:12px;cursor:pointer;white-space:nowrap}.mrp-nav[data-v-2bfb2c61]:hover:not(:disabled){background:var(--mrp-btn-hover-bg, #414549);color:var(--mrp-btn-hover-fg, #fff)}.mrp-nav[data-v-2bfb2c61]:disabled{opacity:.4;cursor:not-allowed}.mrp-active[data-v-2bfb2c61]{background:var(--mrp-btn-active-bg, #2d5fb8);border-color:var(--mrp-btn-active-bg, #2d5fb8);color:#fff}.mrp-pageinfo[data-v-2bfb2c61]{font-size:12px;min-width:56px;text-align:center;color:var(--mrp-toolbar-fg, #e8e8e8)}.mrp-spacer[data-v-2bfb2c61]{flex:1}.mach-report-preview[data-v-
|
|
1
|
+
.mrp-toolbar[data-v-2bfb2c61]{display:flex;align-items:center;gap:8px;padding:6px 12px;background:var(--mrp-toolbar-bg, #323639);border-bottom:1px solid var(--mrp-toolbar-border, #22252a);flex:none}.mrp-title[data-v-2bfb2c61]{font-size:13px;font-weight:600;margin-right:8px;color:var(--mrp-toolbar-fg, #e8e8e8)}.mrp-nav[data-v-2bfb2c61]{background:transparent;color:var(--mrp-btn-fg, #cfcfcf);border:1px solid var(--mrp-btn-border, #4a4d52);border-radius:4px;padding:2px 8px;font-size:12px;cursor:pointer;white-space:nowrap}.mrp-nav[data-v-2bfb2c61]:hover:not(:disabled){background:var(--mrp-btn-hover-bg, #414549);color:var(--mrp-btn-hover-fg, #fff)}.mrp-nav[data-v-2bfb2c61]:disabled{opacity:.4;cursor:not-allowed}.mrp-active[data-v-2bfb2c61]{background:var(--mrp-btn-active-bg, #2d5fb8);border-color:var(--mrp-btn-active-bg, #2d5fb8);color:#fff}.mrp-pageinfo[data-v-2bfb2c61]{font-size:12px;min-width:56px;text-align:center;color:var(--mrp-toolbar-fg, #e8e8e8)}.mrp-spacer[data-v-2bfb2c61]{flex:1}.mach-report-preview[data-v-6e07f84a]{--mrp-shell-bg: #525659;--mrp-shell-fg: #e8e8e8;position:relative;--mrp-toolbar-bg: #323639;--mrp-toolbar-border: #22252a;--mrp-toolbar-fg: #e8e8e8;--mrp-btn-fg: #cfcfcf;--mrp-btn-border: #4a4d52;--mrp-btn-hover-bg: #414549;--mrp-btn-hover-fg: #ffffff;--mrp-btn-active-bg: #2d5fb8;display:flex;flex-direction:column;background:var(--mrp-shell-bg);color:var(--mrp-shell-fg);overflow:hidden}.mrp-body[data-v-6e07f84a]{flex:1;overflow:auto;padding:24px}.mrp-scale[data-v-6e07f84a]{margin:0 auto}.mrp-scale-inner[data-v-6e07f84a]{display:flex;flex-direction:column;align-items:center}.mrp-page-holder[data-v-6e07f84a]{background:#fff;box-shadow:0 2px 8px #00000059;margin-bottom:var(--v8289d092);flex:none}.mrp-state[data-v-6e07f84a]{padding:40px;text-align:center;color:#bfbfbf;font-size:13px}.mrp-overlay[data-v-6e07f84a]{position:absolute;inset:0;pointer-events:none}.mrp-error[data-v-6e07f84a]{color:#ff9d9d}.mrp-retry[data-v-6e07f84a]{margin-left:12px;background:transparent;color:#8fb7ff;border:1px solid #5a7fbf;border-radius:4px;padding:1px 10px;cursor:pointer}
|
|
@@ -3,7 +3,19 @@ import { PlanFetcher } from './adapters';
|
|
|
3
3
|
import { MachReportMessages } from './config';
|
|
4
4
|
declare function reload(): Promise<void>;
|
|
5
5
|
declare function gotoPage(n: number): void;
|
|
6
|
-
declare
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {
|
|
12
|
+
viewportRef: HTMLDivElement;
|
|
13
|
+
containerRef: HTMLDivElement;
|
|
14
|
+
};
|
|
15
|
+
rootEl: HTMLDivElement;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
7
19
|
tempId: {
|
|
8
20
|
type: PropType<string | string[] | null>;
|
|
9
21
|
default: null;
|
|
@@ -63,7 +75,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
63
75
|
openPdfWindow: () => void;
|
|
64
76
|
gotoPage: typeof gotoPage;
|
|
65
77
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
66
|
-
error: (message: string
|
|
78
|
+
error: (message: string, detail?: {
|
|
79
|
+
code: string;
|
|
80
|
+
cause?: unknown;
|
|
81
|
+
} | undefined) => any;
|
|
67
82
|
loaded: (pageCount: number) => any;
|
|
68
83
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
69
84
|
tempId: {
|
|
@@ -119,7 +134,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
119
134
|
default: null;
|
|
120
135
|
};
|
|
121
136
|
}>> & Readonly<{
|
|
122
|
-
onError?: ((message: string
|
|
137
|
+
onError?: ((message: string, detail?: {
|
|
138
|
+
code: string;
|
|
139
|
+
cause?: unknown;
|
|
140
|
+
} | undefined) => any) | undefined;
|
|
123
141
|
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
124
142
|
}>, {
|
|
125
143
|
height: string;
|
|
@@ -138,4 +156,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
138
156
|
viewportRef: HTMLDivElement;
|
|
139
157
|
containerRef: HTMLDivElement;
|
|
140
158
|
}, HTMLDivElement>;
|
|
159
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
141
160
|
export default _default;
|
|
161
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
162
|
+
new (): {
|
|
163
|
+
$slots: S;
|
|
164
|
+
};
|
|
165
|
+
};
|
package/dist/vue/adapters.d.ts
CHANGED
|
@@ -24,10 +24,13 @@ export interface FetchRequestOptions {
|
|
|
24
24
|
/** 附加请求头(如鉴权 token) */
|
|
25
25
|
headers?: Record<string, string>;
|
|
26
26
|
credentials?: RequestCredentials;
|
|
27
|
+
/** 超时毫秒(默认 30000;超时抛 PlanLoadError) */
|
|
28
|
+
timeoutMs?: number;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
31
|
* 零依赖请求适配器:用全局 fetch 实现 HostRequest 签名,
|
|
30
32
|
* 让宿主无需引入 axios 或手写胶水代码即可接上 jh4j 数据面。
|
|
33
|
+
* 内置超时(AbortController)与网络/HTTP 错误语义。
|
|
31
34
|
*/
|
|
32
35
|
export declare function createFetchRequest(options?: FetchRequestOptions): HostRequest;
|
|
33
36
|
export declare function createJh4jGridPlanFetcher(options: {
|
package/dist/vue/async.d.cts
CHANGED
|
@@ -1,19 +1,188 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MachReportPluginOptions } from './plugin';
|
|
2
2
|
/**
|
|
3
|
-
* 异步插件入口(@agile-team/mach-report
|
|
3
|
+
* 异步插件入口(@agile-team/mach-report/vue/async):
|
|
4
4
|
*
|
|
5
5
|
* 首屏敏感页面用异步全局组件代替静态 import——组件与其引擎依赖
|
|
6
6
|
* 拆为独立 chunk,路由级按需加载:
|
|
7
7
|
*
|
|
8
8
|
* ```ts
|
|
9
|
-
* import AsyncMachReportPlugin, { preloadMachReport } from "@agile-team/mach-report
|
|
9
|
+
* import AsyncMachReportPlugin, { preloadMachReport } from "@agile-team/mach-report/vue/async";
|
|
10
10
|
* app.use(AsyncMachReportPlugin, { baseUrl: "/sub/mach-report" });
|
|
11
11
|
* void preloadMachReport(); // 可选:路由 hover 时预取
|
|
12
12
|
* // 模板:<MachReportPreview temp-id="X" />
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
-
/** 全局异步组件(懒加载 ReportPreview
|
|
16
|
-
export declare const MachReportPreview:
|
|
15
|
+
/** 全局异步组件(懒加载 ReportPreview 及其引擎分片;与主插件同源共享) */
|
|
16
|
+
export declare const MachReportPreview: {
|
|
17
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
18
|
+
tempId: {
|
|
19
|
+
type: import('vue').PropType<string | string[] | null>;
|
|
20
|
+
default: null;
|
|
21
|
+
};
|
|
22
|
+
furnitureTempId: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
params: {
|
|
27
|
+
type: import('vue').PropType<Record<string, string>>;
|
|
28
|
+
default: () => {};
|
|
29
|
+
};
|
|
30
|
+
height: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
autoLoad: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
showExport: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: undefined;
|
|
41
|
+
};
|
|
42
|
+
showPrint: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
46
|
+
showPdfWindow: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: undefined;
|
|
49
|
+
};
|
|
50
|
+
gapPx: {
|
|
51
|
+
type: NumberConstructor;
|
|
52
|
+
default: undefined;
|
|
53
|
+
};
|
|
54
|
+
messages: {
|
|
55
|
+
type: import('vue').PropType<Partial<import('./config').MachReportMessages>>;
|
|
56
|
+
default: undefined;
|
|
57
|
+
};
|
|
58
|
+
preset: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
default: undefined;
|
|
61
|
+
};
|
|
62
|
+
fetcher: {
|
|
63
|
+
type: import('vue').PropType<import('./adapters').PlanFetcher | null>;
|
|
64
|
+
default: null;
|
|
65
|
+
};
|
|
66
|
+
}>> & Readonly<{
|
|
67
|
+
onError?: ((message: string, detail?: {
|
|
68
|
+
code: string;
|
|
69
|
+
cause?: unknown;
|
|
70
|
+
} | undefined) => any) | undefined;
|
|
71
|
+
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
72
|
+
}>, {
|
|
73
|
+
reload: () => Promise<void>;
|
|
74
|
+
print: () => Promise<void>;
|
|
75
|
+
exportAs: (format: string) => void;
|
|
76
|
+
openPdfWindow: () => void;
|
|
77
|
+
gotoPage: (n: number) => void;
|
|
78
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
79
|
+
error: (message: string, detail?: {
|
|
80
|
+
code: string;
|
|
81
|
+
cause?: unknown;
|
|
82
|
+
} | undefined) => any;
|
|
83
|
+
loaded: (pageCount: number) => any;
|
|
84
|
+
}, import('vue').PublicProps, {
|
|
85
|
+
height: string;
|
|
86
|
+
gapPx: number;
|
|
87
|
+
params: Record<string, string>;
|
|
88
|
+
furnitureTempId: string;
|
|
89
|
+
tempId: string | string[] | null;
|
|
90
|
+
showExport: boolean;
|
|
91
|
+
showPrint: boolean;
|
|
92
|
+
showPdfWindow: boolean;
|
|
93
|
+
messages: Partial<import('./config').MachReportMessages>;
|
|
94
|
+
autoLoad: boolean;
|
|
95
|
+
preset: string;
|
|
96
|
+
fetcher: import('./adapters').PlanFetcher | null;
|
|
97
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
98
|
+
viewportRef: HTMLDivElement;
|
|
99
|
+
containerRef: HTMLDivElement;
|
|
100
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
101
|
+
P: {};
|
|
102
|
+
B: {};
|
|
103
|
+
D: {};
|
|
104
|
+
C: {};
|
|
105
|
+
M: {};
|
|
106
|
+
Defaults: {};
|
|
107
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
108
|
+
tempId: {
|
|
109
|
+
type: import('vue').PropType<string | string[] | null>;
|
|
110
|
+
default: null;
|
|
111
|
+
};
|
|
112
|
+
furnitureTempId: {
|
|
113
|
+
type: StringConstructor;
|
|
114
|
+
default: string;
|
|
115
|
+
};
|
|
116
|
+
params: {
|
|
117
|
+
type: import('vue').PropType<Record<string, string>>;
|
|
118
|
+
default: () => {};
|
|
119
|
+
};
|
|
120
|
+
height: {
|
|
121
|
+
type: StringConstructor;
|
|
122
|
+
default: string;
|
|
123
|
+
};
|
|
124
|
+
autoLoad: {
|
|
125
|
+
type: BooleanConstructor;
|
|
126
|
+
default: boolean;
|
|
127
|
+
};
|
|
128
|
+
showExport: {
|
|
129
|
+
type: BooleanConstructor;
|
|
130
|
+
default: undefined;
|
|
131
|
+
};
|
|
132
|
+
showPrint: {
|
|
133
|
+
type: BooleanConstructor;
|
|
134
|
+
default: undefined;
|
|
135
|
+
};
|
|
136
|
+
showPdfWindow: {
|
|
137
|
+
type: BooleanConstructor;
|
|
138
|
+
default: undefined;
|
|
139
|
+
};
|
|
140
|
+
gapPx: {
|
|
141
|
+
type: NumberConstructor;
|
|
142
|
+
default: undefined;
|
|
143
|
+
};
|
|
144
|
+
messages: {
|
|
145
|
+
type: import('vue').PropType<Partial<import('./config').MachReportMessages>>;
|
|
146
|
+
default: undefined;
|
|
147
|
+
};
|
|
148
|
+
preset: {
|
|
149
|
+
type: StringConstructor;
|
|
150
|
+
default: undefined;
|
|
151
|
+
};
|
|
152
|
+
fetcher: {
|
|
153
|
+
type: import('vue').PropType<import('./adapters').PlanFetcher | null>;
|
|
154
|
+
default: null;
|
|
155
|
+
};
|
|
156
|
+
}>> & Readonly<{
|
|
157
|
+
onError?: ((message: string, detail?: {
|
|
158
|
+
code: string;
|
|
159
|
+
cause?: unknown;
|
|
160
|
+
} | undefined) => any) | undefined;
|
|
161
|
+
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
162
|
+
}>, {
|
|
163
|
+
reload: () => Promise<void>;
|
|
164
|
+
print: () => Promise<void>;
|
|
165
|
+
exportAs: (format: string) => void;
|
|
166
|
+
openPdfWindow: () => void;
|
|
167
|
+
gotoPage: (n: number) => void;
|
|
168
|
+
}, {}, {}, {}, {
|
|
169
|
+
height: string;
|
|
170
|
+
gapPx: number;
|
|
171
|
+
params: Record<string, string>;
|
|
172
|
+
furnitureTempId: string;
|
|
173
|
+
tempId: string | string[] | null;
|
|
174
|
+
showExport: boolean;
|
|
175
|
+
showPrint: boolean;
|
|
176
|
+
showPdfWindow: boolean;
|
|
177
|
+
messages: Partial<import('./config').MachReportMessages>;
|
|
178
|
+
autoLoad: boolean;
|
|
179
|
+
preset: string;
|
|
180
|
+
fetcher: import('./adapters').PlanFetcher | null;
|
|
181
|
+
}>;
|
|
182
|
+
__isFragment?: never;
|
|
183
|
+
__isTeleport?: never;
|
|
184
|
+
__isSuspense?: never;
|
|
185
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
17
186
|
tempId: {
|
|
18
187
|
type: import('vue').PropType<string | string[] | null>;
|
|
19
188
|
default: null;
|
|
@@ -62,6 +231,12 @@ export declare const MachReportPreview: import('vue').DefineComponent<import('vu
|
|
|
62
231
|
type: import('vue').PropType<import('./adapters').PlanFetcher | null>;
|
|
63
232
|
default: null;
|
|
64
233
|
};
|
|
234
|
+
}>> & Readonly<{
|
|
235
|
+
onError?: ((message: string, detail?: {
|
|
236
|
+
code: string;
|
|
237
|
+
cause?: unknown;
|
|
238
|
+
} | undefined) => any) | undefined;
|
|
239
|
+
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
65
240
|
}>, {
|
|
66
241
|
reload: () => Promise<void>;
|
|
67
242
|
print: () => Promise<void>;
|
|
@@ -69,61 +244,12 @@ export declare const MachReportPreview: import('vue').DefineComponent<import('vu
|
|
|
69
244
|
openPdfWindow: () => void;
|
|
70
245
|
gotoPage: (n: number) => void;
|
|
71
246
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
72
|
-
error: (message: string
|
|
247
|
+
error: (message: string, detail?: {
|
|
248
|
+
code: string;
|
|
249
|
+
cause?: unknown;
|
|
250
|
+
} | undefined) => any;
|
|
73
251
|
loaded: (pageCount: number) => any;
|
|
74
|
-
}, string,
|
|
75
|
-
tempId: {
|
|
76
|
-
type: import('vue').PropType<string | string[] | null>;
|
|
77
|
-
default: null;
|
|
78
|
-
};
|
|
79
|
-
furnitureTempId: {
|
|
80
|
-
type: StringConstructor;
|
|
81
|
-
default: string;
|
|
82
|
-
};
|
|
83
|
-
params: {
|
|
84
|
-
type: import('vue').PropType<Record<string, string>>;
|
|
85
|
-
default: () => {};
|
|
86
|
-
};
|
|
87
|
-
height: {
|
|
88
|
-
type: StringConstructor;
|
|
89
|
-
default: string;
|
|
90
|
-
};
|
|
91
|
-
autoLoad: {
|
|
92
|
-
type: BooleanConstructor;
|
|
93
|
-
default: boolean;
|
|
94
|
-
};
|
|
95
|
-
showExport: {
|
|
96
|
-
type: BooleanConstructor;
|
|
97
|
-
default: undefined;
|
|
98
|
-
};
|
|
99
|
-
showPrint: {
|
|
100
|
-
type: BooleanConstructor;
|
|
101
|
-
default: undefined;
|
|
102
|
-
};
|
|
103
|
-
showPdfWindow: {
|
|
104
|
-
type: BooleanConstructor;
|
|
105
|
-
default: undefined;
|
|
106
|
-
};
|
|
107
|
-
gapPx: {
|
|
108
|
-
type: NumberConstructor;
|
|
109
|
-
default: undefined;
|
|
110
|
-
};
|
|
111
|
-
messages: {
|
|
112
|
-
type: import('vue').PropType<Partial<import('./config').MachReportMessages>>;
|
|
113
|
-
default: undefined;
|
|
114
|
-
};
|
|
115
|
-
preset: {
|
|
116
|
-
type: StringConstructor;
|
|
117
|
-
default: undefined;
|
|
118
|
-
};
|
|
119
|
-
fetcher: {
|
|
120
|
-
type: import('vue').PropType<import('./adapters').PlanFetcher | null>;
|
|
121
|
-
default: null;
|
|
122
|
-
};
|
|
123
|
-
}>> & Readonly<{
|
|
124
|
-
onError?: ((message: string) => any) | undefined;
|
|
125
|
-
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
126
|
-
}>, {
|
|
252
|
+
}, string, {
|
|
127
253
|
height: string;
|
|
128
254
|
gapPx: number;
|
|
129
255
|
params: Record<string, string>;
|
|
@@ -136,11 +262,14 @@ export declare const MachReportPreview: import('vue').DefineComponent<import('vu
|
|
|
136
262
|
autoLoad: boolean;
|
|
137
263
|
preset: string;
|
|
138
264
|
fetcher: import('./adapters').PlanFetcher | null;
|
|
139
|
-
}, {},
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
265
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
266
|
+
$slots: {
|
|
267
|
+
default?(_: {}): any;
|
|
268
|
+
};
|
|
269
|
+
});
|
|
143
270
|
/** 预取组件分片(路由 hover / 空闲时调用,正式渲染零等待) */
|
|
144
271
|
export declare function preloadMachReport(): Promise<unknown>;
|
|
145
|
-
export declare const machReportAsyncPlugin:
|
|
272
|
+
export declare const machReportAsyncPlugin: {
|
|
273
|
+
install(app: import('vue').App, options?: MachReportPluginOptions): void;
|
|
274
|
+
};
|
|
146
275
|
export default machReportAsyncPlugin;
|