@qianxiang-ai/fu-report-vue 1.1.21 → 1.2.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/index.js +191 -259
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Fragment as e, KeepAlive as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, inject as u, mergeProps as d, nextTick as f, normalizeClass as p, normalizeStyle as m, onBeforeUnmount as h, onErrorCaptured as g, onMounted as _, openBlock as v, ref as y, renderList as b, renderSlot as x, resolveComponent as S, toDisplayString as C, unref as w, vModelCheckbox as T, vModelSelect as E, vModelText as D, watch as O, withDirectives as k, withKeys as A, withModifiers as j } from "vue";
|
|
2
|
-
|
|
2
|
+
// src/context.ts
|
|
3
3
|
var M = Symbol("FuReportContext"), N = { install(e, t) {
|
|
4
4
|
e.provide(M, { client: t.client });
|
|
5
5
|
} };
|
|
6
|
-
|
|
7
|
-
//#region src/report-categories.ts
|
|
6
|
+
// src/report-categories.ts
|
|
8
7
|
function P(e) {
|
|
9
8
|
let t = [], n = (e, r, i) => {
|
|
10
9
|
for (let a of e) {
|
|
@@ -24,8 +23,7 @@ function P(e) {
|
|
|
24
23
|
function F(e) {
|
|
25
24
|
return e.trim().replace(/\s+/g, " ").slice(0, 50);
|
|
26
25
|
}
|
|
27
|
-
|
|
28
|
-
//#region src/components/FuReportManager.vue?vue&type=script&setup=true&lang.ts
|
|
26
|
+
// src/components/FuReportManager.vue?vue&type=script&setup=true&lang.ts
|
|
29
27
|
var I = {
|
|
30
28
|
class: "fu-report-manager",
|
|
31
29
|
"aria-label": "报表管理"
|
|
@@ -173,19 +171,13 @@ var I = {
|
|
|
173
171
|
x.value = x.value.slice(0, e + 1), J.value = 1, S.value = /* @__PURE__ */ new Set(), Lt();
|
|
174
172
|
}
|
|
175
173
|
async function Vt(e, t) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
181
|
-
ut.value = {
|
|
182
|
-
action: e,
|
|
183
|
-
report: t
|
|
184
|
-
};
|
|
185
|
-
}
|
|
174
|
+
Y.value || (l.confirmAction ? await l.confirmAction(e, t) && await Ht(e, t) : ut.value = {
|
|
175
|
+
action: e,
|
|
176
|
+
report: t
|
|
177
|
+
});
|
|
186
178
|
}
|
|
187
179
|
async function Ht(e, t) {
|
|
188
|
-
if (
|
|
180
|
+
if (f && !Y.value) {
|
|
189
181
|
ut.value = void 0, O.value = t.id, A.value = "", N.value = "";
|
|
190
182
|
try {
|
|
191
183
|
e === "copy" ? await f.client.reports.copy(t.id) : await f.client.reports.remove(t.id), N.value = e === "copy" ? "报表复制成功" : "报表已移入回收站", await Lt();
|
|
@@ -198,7 +190,7 @@ var I = {
|
|
|
198
190
|
}
|
|
199
191
|
async function Ut() {
|
|
200
192
|
let e = [...Dt.value];
|
|
201
|
-
if (
|
|
193
|
+
if (f && !Y.value && e.length) {
|
|
202
194
|
dt.value = !1, O.value = "__batch__", A.value = "", N.value = "";
|
|
203
195
|
try {
|
|
204
196
|
await Gt(e, await Promise.allSettled(e.map(async (e) => f.client.reports.remove(e.id))), `已将 ${e.length} 个报表移入回收站`, "批量删除失败");
|
|
@@ -765,7 +757,7 @@ var I = {
|
|
|
765
757
|
function f(e) {
|
|
766
758
|
if (e.source !== s.value?.contentWindow || e.origin !== l.value) return;
|
|
767
759
|
let t = e.data;
|
|
768
|
-
|
|
760
|
+
t && t.source === "fu-report-classic" && t.version === 1 && t.mode === "design" && t.reportId === r.reportId && (t.type === "ready" ? i("ready") : t.type === "saved" ? i("saved", String(t.reportId)) : t.type === "preview" ? i("preview", r.reportId) : t.type === "dirty-change" ? i("dirtyChange", t.dirty === !0) : t.type === "back" ? i("home") : t.type === "navigate" ? p(String(t.url ?? "")) : t.type === "error" && i("error", /* @__PURE__ */ Error(`[${String(t.code ?? "CLASSIC_PAGE_ERROR")}] ${String(t.message ?? "经典设计器运行失败")}`)));
|
|
769
761
|
}
|
|
770
762
|
function p(e) {
|
|
771
763
|
try {
|
|
@@ -856,7 +848,7 @@ var I = {
|
|
|
856
848
|
if (!le.value.trim()) return !0;
|
|
857
849
|
try {
|
|
858
850
|
let e = JSON.parse(le.value);
|
|
859
|
-
return
|
|
851
|
+
return !(!e || typeof e != "object" || Array.isArray(e));
|
|
860
852
|
} catch {
|
|
861
853
|
return !1;
|
|
862
854
|
}
|
|
@@ -1857,13 +1849,7 @@ var I = {
|
|
|
1857
1849
|
}), t.search = n.toString(), t.toString();
|
|
1858
1850
|
}), d = n(() => new URL(l.value).origin);
|
|
1859
1851
|
function f(e, t, n) {
|
|
1860
|
-
|
|
1861
|
-
if (Array.isArray(n)) {
|
|
1862
|
-
n.forEach((n) => f(e, t, n));
|
|
1863
|
-
return;
|
|
1864
|
-
}
|
|
1865
|
-
(typeof n == "string" || typeof n == "number" || typeof n == "boolean") && e.append(t, String(n));
|
|
1866
|
-
}
|
|
1852
|
+
n != null && (Array.isArray(n) ? n.forEach((n) => f(e, t, n)) : (typeof n == "string" || typeof n == "number" || typeof n == "boolean") && e.append(t, String(n)));
|
|
1867
1853
|
}
|
|
1868
1854
|
function p() {
|
|
1869
1855
|
c.value?.contentWindow?.postMessage({
|
|
@@ -1879,7 +1865,7 @@ var I = {
|
|
|
1879
1865
|
function m(e) {
|
|
1880
1866
|
if (e.source !== c.value?.contentWindow || e.origin !== d.value) return;
|
|
1881
1867
|
let t = e.data;
|
|
1882
|
-
|
|
1868
|
+
t && t.source === "fu-report-classic" && t.version === 1 && t.mode === "view" && t.reportId === i.reportId && (t.type === "ready" ? o("ready") : t.type === "back" ? i.showBack ? o("back") : window.history.back() : t.type === "navigate" ? g(String(t.url ?? "")) : t.type === "error" && o("error", /* @__PURE__ */ Error(`[${String(t.code ?? "CLASSIC_PAGE_ERROR")}] ${String(t.message ?? "经典预览运行失败")}`)));
|
|
1883
1869
|
}
|
|
1884
1870
|
function g(e) {
|
|
1885
1871
|
try {
|
|
@@ -2118,8 +2104,7 @@ function wa(e, t) {
|
|
|
2118
2104
|
let n = new Map(e.map((e) => [X(e.value), e.label]));
|
|
2119
2105
|
return t.map((e) => n.get(X(e)) ?? String(e));
|
|
2120
2106
|
}
|
|
2121
|
-
|
|
2122
|
-
//#region src/components/FuReportSelectInput.vue?vue&type=script&setup=true&lang.ts
|
|
2107
|
+
// src/components/FuReportSelectInput.vue?vue&type=script&setup=true&lang.ts
|
|
2123
2108
|
var Ta = { class: "fu-report-select-input" }, Ea = ["value", "disabled"], Da = ["value", "disabled"], Oa = {
|
|
2124
2109
|
key: 1,
|
|
2125
2110
|
class: "fu-report-select-input__custom"
|
|
@@ -2526,8 +2511,7 @@ var Ta = { class: "fu-report-select-input" }, Ea = ["value", "disabled"], Da = [
|
|
|
2526
2511
|
}, [o("span", null, C(e.label), 1), o("span", qa, C(F.value.has(w(X)(e.value)) ? "✓" : ""), 1)], 8, Ka))), 128)), g.value ? (v(), a("p", Ja, "加载中…")) : j.value.length === 0 ? (v(), a("p", Ya, "暂无数据")) : s.loadOptions && !x.value ? (v(), a("p", Xa, "暂无更多数据")) : i("", !0)], 32)])) : i("", !0)], 512));
|
|
2527
2512
|
}
|
|
2528
2513
|
}), [["__scopeId", "data-v-fd232087"]]);
|
|
2529
|
-
|
|
2530
|
-
//#region src/tree-controls.ts
|
|
2514
|
+
// src/tree-controls.ts
|
|
2531
2515
|
function Qa(e, t = {}) {
|
|
2532
2516
|
if (!Array.isArray(e)) return [];
|
|
2533
2517
|
let n = Math.min(Math.max(t.limit ?? 1e3, 0), 1e3), r = Math.min(Math.max(t.maxDepth ?? 16, 1), 32), i = t.hiddenValue === null || t.hiddenValue === void 0 ? null : X(t.hiddenValue), a = /* @__PURE__ */ new Set(), o = 0;
|
|
@@ -2587,8 +2571,7 @@ function no(e, t, n = !1) {
|
|
|
2587
2571
|
let r = e.slice(0, 100);
|
|
2588
2572
|
return n ? r.join(",") : t ? r : r[0] ?? null;
|
|
2589
2573
|
}
|
|
2590
|
-
|
|
2591
|
-
//#region src/components/FuReportTreeSelect.vue?vue&type=script&setup=true&lang.ts
|
|
2574
|
+
// src/components/FuReportTreeSelect.vue?vue&type=script&setup=true&lang.ts
|
|
2592
2575
|
var ro = { class: "fu-report-tree-select__values" }, io = {
|
|
2593
2576
|
key: 0,
|
|
2594
2577
|
class: "is-placeholder"
|
|
@@ -2691,9 +2674,7 @@ var ro = { class: "fu-report-tree-select__values" }, io = {
|
|
|
2691
2674
|
if (x.value.has(t)) {
|
|
2692
2675
|
let e = new Set(x.value);
|
|
2693
2676
|
e.delete(t), x.value = e;
|
|
2694
|
-
|
|
2695
|
-
}
|
|
2696
|
-
if (x.value = /* @__PURE__ */ new Set([...x.value, t]), !e.children.length && c.loadNodes && !S.value.has(t)) {
|
|
2677
|
+
} else if (x.value = /* @__PURE__ */ new Set([...x.value, t]), !e.children.length && c.loadNodes && !S.value.has(t)) {
|
|
2697
2678
|
let n = E;
|
|
2698
2679
|
S.value = /* @__PURE__ */ new Set([...S.value, t]);
|
|
2699
2680
|
try {
|
|
@@ -2723,11 +2704,7 @@ var ro = { class: "fu-report-tree-select__values" }, io = {
|
|
|
2723
2704
|
function z(e) {
|
|
2724
2705
|
if (e.disabled) return;
|
|
2725
2706
|
let t = X(e.value);
|
|
2726
|
-
|
|
2727
|
-
R([e.value]), d.value = !1;
|
|
2728
|
-
return;
|
|
2729
|
-
}
|
|
2730
|
-
R(A.value.has(t) ? k.value.filter((e) => X(e) !== t) : [...k.value, e.value]);
|
|
2707
|
+
c.multiple ? R(A.value.has(t) ? k.value.filter((e) => X(e) !== t) : [...k.value, e.value]) : (R([e.value]), d.value = !1);
|
|
2731
2708
|
}
|
|
2732
2709
|
function B(e) {
|
|
2733
2710
|
c.disabled || R(k.value.filter((t, n) => n !== e));
|
|
@@ -2871,8 +2848,7 @@ var ro = { class: "fu-report-tree-select__values" }, io = {
|
|
|
2871
2848
|
]));
|
|
2872
2849
|
}
|
|
2873
2850
|
});
|
|
2874
|
-
|
|
2875
|
-
//#region src/dictionary-controls.ts
|
|
2851
|
+
// src/dictionary-controls.ts
|
|
2876
2852
|
function yo(e, t = 100) {
|
|
2877
2853
|
if (!Array.isArray(e)) return [];
|
|
2878
2854
|
let n = [], r = /* @__PURE__ */ new Set();
|
|
@@ -2894,8 +2870,7 @@ function bo(e, t, n) {
|
|
|
2894
2870
|
let r = t.trim().slice(0, 256).toLocaleLowerCase(), i = n.trim().slice(0, 256).toLocaleLowerCase();
|
|
2895
2871
|
return e.filter((e) => (!r || e.dictName.toLocaleLowerCase().includes(r)) && (!i || e.dictCode.toLocaleLowerCase().includes(i)));
|
|
2896
2872
|
}
|
|
2897
|
-
|
|
2898
|
-
//#region src/components/FuReportDictionaryPicker.vue?vue&type=script&setup=true&lang.ts
|
|
2873
|
+
// src/components/FuReportDictionaryPicker.vue?vue&type=script&setup=true&lang.ts
|
|
2899
2874
|
var xo = {
|
|
2900
2875
|
role: "dialog",
|
|
2901
2876
|
"aria-modal": "true",
|
|
@@ -3009,14 +2984,10 @@ var xo = {
|
|
|
3009
2984
|
return;
|
|
3010
2985
|
}
|
|
3011
2986
|
let t = yo([e], 1)[0];
|
|
3012
|
-
|
|
3013
|
-
S.value = "字典数据无效";
|
|
3014
|
-
return;
|
|
3015
|
-
}
|
|
3016
|
-
c("update:modelValue", t), c("select", {
|
|
2987
|
+
t ? (c("update:modelValue", t), c("select", {
|
|
3017
2988
|
dictName: t.dictName,
|
|
3018
2989
|
dictCode: t.dictCode
|
|
3019
|
-
}), z();
|
|
2990
|
+
}), z()) : S.value = "字典数据无效";
|
|
3020
2991
|
}
|
|
3021
2992
|
function z() {
|
|
3022
2993
|
w += 1, c("update:open", !1), c("close");
|
|
@@ -3161,11 +3132,7 @@ var xo = {
|
|
|
3161
3132
|
c.value = e.target.value.slice(0, n.maxLength);
|
|
3162
3133
|
}
|
|
3163
3134
|
function u() {
|
|
3164
|
-
|
|
3165
|
-
d(!1);
|
|
3166
|
-
return;
|
|
3167
|
-
}
|
|
3168
|
-
r("update:modelValue", c.value), r("confirm", c.value), r("update:open", !1);
|
|
3135
|
+
n.disabled ? d(!1) : (r("update:modelValue", c.value), r("confirm", c.value), r("update:open", !1));
|
|
3169
3136
|
}
|
|
3170
3137
|
function d(e = !0) {
|
|
3171
3138
|
r("update:open", !1), e && r("cancel");
|
|
@@ -3214,7 +3181,7 @@ function Ho(e, t = 500) {
|
|
|
3214
3181
|
for (let i of e) {
|
|
3215
3182
|
if (!i || typeof i != "object" || typeof i.name != "string" || typeof i.category != "string" || typeof i.description != "string" || !Array.isArray(i.examples)) continue;
|
|
3216
3183
|
let e = i.name.trim().slice(0, 128);
|
|
3217
|
-
if (
|
|
3184
|
+
if (e && !r.has(e) && (r.add(e), n.push({
|
|
3218
3185
|
name: e,
|
|
3219
3186
|
category: i.category.slice(0, 64),
|
|
3220
3187
|
description: i.description.slice(0, 4096),
|
|
@@ -3230,8 +3197,7 @@ function Uo(e, t = Vo) {
|
|
|
3230
3197
|
function Wo(e) {
|
|
3231
3198
|
return typeof e == "string" && e.length <= 4096 && (/^https:\/\//i.test(e) || /^\/(?!\/)/.test(e));
|
|
3232
3199
|
}
|
|
3233
|
-
|
|
3234
|
-
//#region src/components/FuReportFunctionHelp.vue?vue&type=script&setup=true&lang.ts
|
|
3200
|
+
// src/components/FuReportFunctionHelp.vue?vue&type=script&setup=true&lang.ts
|
|
3235
3201
|
var Go = {
|
|
3236
3202
|
class: "fu-report-function-help",
|
|
3237
3203
|
"aria-live": "polite"
|
|
@@ -3332,7 +3298,7 @@ var Go = {
|
|
|
3332
3298
|
for (let n of s.items) {
|
|
3333
3299
|
if (!n || typeof n.id != "string" || typeof n.label != "string") continue;
|
|
3334
3300
|
let r = n.id.slice(0, 64);
|
|
3335
|
-
if (
|
|
3301
|
+
if (/^[a-zA-Z0-9_-]+$/.test(r) && !t.has(r) && (t.add(r), e.push({
|
|
3336
3302
|
id: r,
|
|
3337
3303
|
label: n.label.slice(0, 128),
|
|
3338
3304
|
href: Wo(n.href) ? n.href : void 0
|
|
@@ -3509,8 +3475,7 @@ function bs(e) {
|
|
|
3509
3475
|
function xs(e) {
|
|
3510
3476
|
return vs(e).filter((e) => !e.paramValue.trim()).map((e) => e.paramName);
|
|
3511
3477
|
}
|
|
3512
|
-
|
|
3513
|
-
//#region src/components/FuReportBarSeriesSettings.vue?vue&type=script&setup=true&lang.ts
|
|
3478
|
+
// src/components/FuReportBarSeriesSettings.vue?vue&type=script&setup=true&lang.ts
|
|
3514
3479
|
var Ss = {
|
|
3515
3480
|
class: "fu-report-bar-series-settings",
|
|
3516
3481
|
"aria-labelledby": "fu-report-bar-series-title"
|
|
@@ -3987,7 +3952,7 @@ function pc(e) {
|
|
|
3987
3952
|
}
|
|
3988
3953
|
function mc(e) {
|
|
3989
3954
|
let t = dc(e.parameters);
|
|
3990
|
-
return e.linkName || t.unshift("请填写链接名称"), e.type === "report" && !e.targetReportId && t.unshift("请选择链接报表"), e.type === "chart" && !e.targetChartId && t.unshift("请选择链接图表"), e.type
|
|
3955
|
+
return e.linkName || t.unshift("请填写链接名称"), e.type === "report" && !e.targetReportId && t.unshift("请选择链接报表"), e.type === "chart" && !e.targetChartId && t.unshift("请选择链接图表"), e.type !== "url" || e.url && pc(e.url) || t.unshift("网络链接必须使用 HTTPS 或同源根路径"), t;
|
|
3991
3956
|
}
|
|
3992
3957
|
function hc(e) {
|
|
3993
3958
|
return {
|
|
@@ -4014,8 +3979,7 @@ function gc(e) {
|
|
|
4014
3979
|
parameter: JSON.stringify(ac(e.parameters))
|
|
4015
3980
|
};
|
|
4016
3981
|
}
|
|
4017
|
-
|
|
4018
|
-
//#region src/components/FuReportParameterMappings.vue?vue&type=script&setup=true&lang.ts
|
|
3982
|
+
// src/components/FuReportParameterMappings.vue?vue&type=script&setup=true&lang.ts
|
|
4019
3983
|
var _c = {
|
|
4020
3984
|
class: "fu-report-parameter-mappings",
|
|
4021
3985
|
"aria-label": "参数映射"
|
|
@@ -4059,7 +4023,7 @@ var _c = {
|
|
|
4059
4023
|
}]);
|
|
4060
4024
|
}
|
|
4061
4025
|
function d() {
|
|
4062
|
-
r.disabled
|
|
4026
|
+
!r.disabled && c.value.size && (l(r.modelValue.filter((e, t) => !c.value.has(t))), c.value = /* @__PURE__ */ new Set());
|
|
4063
4027
|
}
|
|
4064
4028
|
function f(e, t) {
|
|
4065
4029
|
let n = new Set(c.value);
|
|
@@ -4197,7 +4161,7 @@ var _c = {
|
|
|
4197
4161
|
function x() {
|
|
4198
4162
|
if (s.disabled || s.saving || f.value) return;
|
|
4199
4163
|
let e = cc(u.value);
|
|
4200
|
-
s.reportId && (e.reportId = s.reportId.slice(0, 256)), d.value = fc(e),
|
|
4164
|
+
s.reportId && (e.reportId = s.reportId.slice(0, 256)), d.value = fc(e), d.value.length || (l("update:modelValue", e), l("confirm", e, hc(e)));
|
|
4201
4165
|
}
|
|
4202
4166
|
function S() {
|
|
4203
4167
|
p += 1, l("update:open", !1), l("cancel");
|
|
@@ -4457,7 +4421,7 @@ var _c = {
|
|
|
4457
4421
|
function T() {
|
|
4458
4422
|
if (s.disabled || s.saving || f.value) return;
|
|
4459
4423
|
let e = uc(u.value);
|
|
4460
|
-
s.currentReportId && (e.currentReportId = s.currentReportId.slice(0, 256)), d.value = mc(e),
|
|
4424
|
+
s.currentReportId && (e.currentReportId = s.currentReportId.slice(0, 256)), d.value = mc(e), d.value.length || (l("update:modelValue", e), l("confirm", e, gc(e)));
|
|
4461
4425
|
}
|
|
4462
4426
|
function A() {
|
|
4463
4427
|
p += 1, l("update:open", !1), l("cancel");
|
|
@@ -4633,8 +4597,7 @@ function _l(e, t) {
|
|
|
4633
4597
|
let n = t.trim().toLocaleLowerCase().slice(0, 256), r = hl(e, 100);
|
|
4634
4598
|
return n ? r.filter((e) => e.name.toLocaleLowerCase().includes(n) || e.code.toLocaleLowerCase().includes(n)) : r;
|
|
4635
4599
|
}
|
|
4636
|
-
|
|
4637
|
-
//#region src/components/FuReportSharedSourceList.vue?vue&type=script&setup=true&lang.ts
|
|
4600
|
+
// src/components/FuReportSharedSourceList.vue?vue&type=script&setup=true&lang.ts
|
|
4638
4601
|
var vl = {
|
|
4639
4602
|
class: "fu-report-shared-source-list",
|
|
4640
4603
|
"aria-labelledby": "fu-report-shared-source-list-title"
|
|
@@ -4713,17 +4676,16 @@ var vl = {
|
|
|
4713
4676
|
}
|
|
4714
4677
|
async function L(e) {
|
|
4715
4678
|
if (!S.value) {
|
|
4716
|
-
if (!s.deleteSource)
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
S.value = !1;
|
|
4679
|
+
if (!s.deleteSource) c("delete-request", e), _.value = "";
|
|
4680
|
+
else {
|
|
4681
|
+
S.value = !0;
|
|
4682
|
+
try {
|
|
4683
|
+
await s.deleteSource(e), c("deleted", e), _.value = "", z(new Set([...m.value].filter((t) => t !== e.id))), await M();
|
|
4684
|
+
} catch (e) {
|
|
4685
|
+
c("delete-error", e);
|
|
4686
|
+
} finally {
|
|
4687
|
+
S.value = !1;
|
|
4688
|
+
}
|
|
4727
4689
|
}
|
|
4728
4690
|
}
|
|
4729
4691
|
}
|
|
@@ -5288,8 +5250,7 @@ function mu(e) {
|
|
|
5288
5250
|
pageSize: r
|
|
5289
5251
|
};
|
|
5290
5252
|
}
|
|
5291
|
-
|
|
5292
|
-
//#region src/components/FuReportExportJobList.vue?vue&type=script&setup=true&lang.ts
|
|
5253
|
+
// src/components/FuReportExportJobList.vue?vue&type=script&setup=true&lang.ts
|
|
5293
5254
|
var hu = {
|
|
5294
5255
|
class: "fu-report-export-job-list",
|
|
5295
5256
|
"aria-labelledby": "fu-report-export-job-list-title"
|
|
@@ -5357,17 +5318,16 @@ var hu = {
|
|
|
5357
5318
|
async function A(e, t) {
|
|
5358
5319
|
if (_.value) return;
|
|
5359
5320
|
let n = e === "run" || e === "delete" ? e === "run" ? s.runJob : s.deleteJob : s.updateStatus;
|
|
5360
|
-
if (!n)
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
_.value = "";
|
|
5321
|
+
if (!n) c("action-request", e, t), x.value = "";
|
|
5322
|
+
else {
|
|
5323
|
+
_.value = t.id ?? t.name;
|
|
5324
|
+
try {
|
|
5325
|
+
e === "start" || e === "stop" ? await s.updateStatus?.(t, e === "start" ? "running" : "stopped") : await n(t), c("action-complete", e, t), x.value = "", await T();
|
|
5326
|
+
} catch (e) {
|
|
5327
|
+
c("action-error", e);
|
|
5328
|
+
} finally {
|
|
5329
|
+
_.value = "";
|
|
5330
|
+
}
|
|
5371
5331
|
}
|
|
5372
5332
|
}
|
|
5373
5333
|
function M(e, t) {
|
|
@@ -5606,7 +5566,7 @@ var hu = {
|
|
|
5606
5566
|
}
|
|
5607
5567
|
async function re(e) {
|
|
5608
5568
|
let t = ++A;
|
|
5609
|
-
if (x.value = !1, _.value = tu(e?.sheets),
|
|
5569
|
+
if (x.value = !1, _.value = tu(e?.sheets), e && !_.value.length && c.loadSheets) {
|
|
5610
5570
|
x.value = !0;
|
|
5611
5571
|
try {
|
|
5612
5572
|
let n = tu(await c.loadSheets(e));
|
|
@@ -5641,7 +5601,7 @@ var hu = {
|
|
|
5641
5601
|
}
|
|
5642
5602
|
function ce(e) {
|
|
5643
5603
|
let t = [];
|
|
5644
|
-
|
|
5604
|
+
e.reportId && N.value.some((t) => t.id === e.reportId) || t.push("请选择有效的报表"), P.value?.multiSheet && _.value.length && !e.sheetId && t.push("请选择工作表");
|
|
5645
5605
|
let n = e.parameters.map((e) => e.name.trim());
|
|
5646
5606
|
return n.some((e) => !e) && t.push("参数名称不能为空"), new Set(n).size !== n.length && t.push("参数名称不能重复"), t;
|
|
5647
5607
|
}
|
|
@@ -6119,8 +6079,7 @@ var hu = {
|
|
|
6119
6079
|
])], 32)) : i("", !0);
|
|
6120
6080
|
}
|
|
6121
6081
|
}), [["__scopeId", "data-v-79bf4981"]]);
|
|
6122
|
-
|
|
6123
|
-
//#region src/report-composition.ts
|
|
6082
|
+
// src/report-composition.ts
|
|
6124
6083
|
function Ad(e) {
|
|
6125
6084
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
6126
6085
|
}
|
|
@@ -6316,8 +6275,7 @@ function qd(e) {
|
|
|
6316
6275
|
})
|
|
6317
6276
|
};
|
|
6318
6277
|
}
|
|
6319
|
-
|
|
6320
|
-
//#region src/components/FuReportGroupList.vue?vue&type=script&setup=true&lang.ts
|
|
6278
|
+
// src/components/FuReportGroupList.vue?vue&type=script&setup=true&lang.ts
|
|
6321
6279
|
var Jd = {
|
|
6322
6280
|
class: "fu-report-group-list",
|
|
6323
6281
|
"aria-labelledby": "fu-report-group-list-title"
|
|
@@ -6385,33 +6343,31 @@ var Jd = {
|
|
|
6385
6343
|
}
|
|
6386
6344
|
async function E(e) {
|
|
6387
6345
|
if (!g.value) {
|
|
6388
|
-
if (!s.previewGroup)
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
g.value = "";
|
|
6346
|
+
if (!s.previewGroup) c("preview-request", e);
|
|
6347
|
+
else {
|
|
6348
|
+
g.value = e.id;
|
|
6349
|
+
try {
|
|
6350
|
+
await s.previewGroup(e), c("previewed", e);
|
|
6351
|
+
} catch (e) {
|
|
6352
|
+
c("preview-error", e);
|
|
6353
|
+
} finally {
|
|
6354
|
+
g.value = "";
|
|
6355
|
+
}
|
|
6399
6356
|
}
|
|
6400
6357
|
}
|
|
6401
6358
|
}
|
|
6402
6359
|
async function A(e) {
|
|
6403
6360
|
if (!g.value) {
|
|
6404
|
-
if (!s.deleteGroup)
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
g.value = "";
|
|
6361
|
+
if (!s.deleteGroup) c("delete-request", e), _.value = "";
|
|
6362
|
+
else {
|
|
6363
|
+
g.value = e.id;
|
|
6364
|
+
try {
|
|
6365
|
+
await s.deleteGroup(e), c("deleted", e), _.value = "", await w();
|
|
6366
|
+
} catch (e) {
|
|
6367
|
+
c("delete-error", e);
|
|
6368
|
+
} finally {
|
|
6369
|
+
g.value = "";
|
|
6370
|
+
}
|
|
6415
6371
|
}
|
|
6416
6372
|
}
|
|
6417
6373
|
}
|
|
@@ -6642,7 +6598,7 @@ var Jd = {
|
|
|
6642
6598
|
}
|
|
6643
6599
|
function B(e) {
|
|
6644
6600
|
let t = [];
|
|
6645
|
-
|
|
6601
|
+
e.reportId && u.value.some((t) => t.id === e.reportId) || t.push("请选择有效的报表"), l.value.members.some((t, n) => n !== f.value && t.reportId === e.reportId) && t.push("同一报表不能重复添加");
|
|
6646
6602
|
let n = e.parameters.map((e) => e.name.trim());
|
|
6647
6603
|
return n.some((e) => !e) && t.push("参数名称不能为空"), new Set(n).size !== n.length && t.push("参数名称不能重复"), t;
|
|
6648
6604
|
}
|
|
@@ -7031,8 +6987,7 @@ var Jd = {
|
|
|
7031
6987
|
])], 32)) : i("", !0);
|
|
7032
6988
|
}
|
|
7033
6989
|
}), [["__scopeId", "data-v-30396495"]]);
|
|
7034
|
-
|
|
7035
|
-
//#region src/report-access.ts
|
|
6990
|
+
// src/report-access.ts
|
|
7036
6991
|
function Zf(e) {
|
|
7037
6992
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
7038
6993
|
}
|
|
@@ -7157,8 +7112,7 @@ function cp(e) {
|
|
|
7157
7112
|
type: e.position === "before" ? -1 : +(e.position === "after")
|
|
7158
7113
|
};
|
|
7159
7114
|
}
|
|
7160
|
-
|
|
7161
|
-
//#region src/components/FuReportFolderTree.vue?vue&type=script&setup=true&lang.ts
|
|
7115
|
+
// src/components/FuReportFolderTree.vue?vue&type=script&setup=true&lang.ts
|
|
7162
7116
|
var lp = {
|
|
7163
7117
|
class: "fu-report-folder-tree",
|
|
7164
7118
|
"aria-labelledby": "fu-report-folder-tree-title"
|
|
@@ -7254,11 +7208,8 @@ var lp = {
|
|
|
7254
7208
|
async function L(e) {
|
|
7255
7209
|
if (d.value.has("0") || e.id !== "0" && !e.hasChildren && !e.children.length) return;
|
|
7256
7210
|
let t = new Set(u.value);
|
|
7257
|
-
if (t.has(e.id))
|
|
7258
|
-
|
|
7259
|
-
return;
|
|
7260
|
-
}
|
|
7261
|
-
if (t.add(e.id), u.value = t, e.id !== "0" && !e.children.length && s.loadFolders && !d.value.has(e.id)) {
|
|
7211
|
+
if (t.has(e.id)) t.delete(e.id), u.value = t;
|
|
7212
|
+
else if (t.add(e.id), u.value = t, e.id !== "0" && !e.children.length && s.loadFolders && !d.value.has(e.id)) {
|
|
7262
7213
|
let t = A;
|
|
7263
7214
|
F(e.id, !0);
|
|
7264
7215
|
try {
|
|
@@ -7300,35 +7251,33 @@ var lp = {
|
|
|
7300
7251
|
name: w.value.name.trim(),
|
|
7301
7252
|
parentId: w.value.parentId || "0"
|
|
7302
7253
|
}, t = sp(e);
|
|
7303
|
-
if (!s.saveFolder)
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
}
|
|
7307
|
-
f.value = e.id ?? "create";
|
|
7308
|
-
try {
|
|
7309
|
-
await s.saveFolder(e, t), c("saved", S.value, e), x.value = !1, await I();
|
|
7310
|
-
} catch (e) {
|
|
7311
|
-
c("save-error", e);
|
|
7312
|
-
} finally {
|
|
7313
|
-
f.value = "";
|
|
7314
|
-
}
|
|
7315
|
-
}
|
|
7316
|
-
async function te(e) {
|
|
7317
|
-
if (!(s.disabled || f.value || e.id === "0")) {
|
|
7318
|
-
if (!s.deleteFolder) {
|
|
7319
|
-
c("delete-request", e), g.value = "";
|
|
7320
|
-
return;
|
|
7321
|
-
}
|
|
7322
|
-
f.value = e.id;
|
|
7254
|
+
if (!s.saveFolder) c("save-request", S.value, e, t), x.value = !1;
|
|
7255
|
+
else {
|
|
7256
|
+
f.value = e.id ?? "create";
|
|
7323
7257
|
try {
|
|
7324
|
-
await s.
|
|
7258
|
+
await s.saveFolder(e, t), c("saved", S.value, e), x.value = !1, await I();
|
|
7325
7259
|
} catch (e) {
|
|
7326
|
-
c("
|
|
7260
|
+
c("save-error", e);
|
|
7327
7261
|
} finally {
|
|
7328
7262
|
f.value = "";
|
|
7329
7263
|
}
|
|
7330
7264
|
}
|
|
7331
7265
|
}
|
|
7266
|
+
async function te(e) {
|
|
7267
|
+
if (!(s.disabled || f.value || e.id === "0")) {
|
|
7268
|
+
if (!s.deleteFolder) c("delete-request", e), g.value = "";
|
|
7269
|
+
else {
|
|
7270
|
+
f.value = e.id;
|
|
7271
|
+
try {
|
|
7272
|
+
await s.deleteFolder(e), c("deleted", e), g.value = "", s.modelValue === e.id && R(M.value), await I();
|
|
7273
|
+
} catch (e) {
|
|
7274
|
+
c("delete-error", e);
|
|
7275
|
+
} finally {
|
|
7276
|
+
f.value = "";
|
|
7277
|
+
}
|
|
7278
|
+
}
|
|
7279
|
+
}
|
|
7280
|
+
}
|
|
7332
7281
|
function ne(e, t) {
|
|
7333
7282
|
s.disabled || e.id === "0" || (_.value = e.id, t.dataTransfer && (t.dataTransfer.effectAllowed = "move"));
|
|
7334
7283
|
}
|
|
@@ -7342,17 +7291,16 @@ var lp = {
|
|
|
7342
7291
|
let n = ap(l.value, _.value, e.id, re(e, t));
|
|
7343
7292
|
if (_.value = "", !n || s.disabled || f.value) return;
|
|
7344
7293
|
let r = cp(n);
|
|
7345
|
-
if (!s.moveFolder)
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
f.value = "";
|
|
7294
|
+
if (!s.moveFolder) c("move-request", n, r);
|
|
7295
|
+
else {
|
|
7296
|
+
f.value = n.folderId;
|
|
7297
|
+
try {
|
|
7298
|
+
await s.moveFolder(n, r), c("moved", n), await I();
|
|
7299
|
+
} catch (e) {
|
|
7300
|
+
c("move-error", e);
|
|
7301
|
+
} finally {
|
|
7302
|
+
f.value = "";
|
|
7303
|
+
}
|
|
7356
7304
|
}
|
|
7357
7305
|
}
|
|
7358
7306
|
return (n, r) => (v(), a("section", lp, [
|
|
@@ -7525,11 +7473,8 @@ var lp = {
|
|
|
7525
7473
|
async function w(e) {
|
|
7526
7474
|
if (d.value.has("0") || e.id !== "0" && !e.hasChildren && !e.children.length) return;
|
|
7527
7475
|
let t = new Set(u.value);
|
|
7528
|
-
if (t.has(e.id))
|
|
7529
|
-
|
|
7530
|
-
return;
|
|
7531
|
-
}
|
|
7532
|
-
if (t.add(e.id), u.value = t, e.id !== "0" && !e.children.length && s.loadFolders && !d.value.has(e.id)) {
|
|
7476
|
+
if (t.has(e.id)) t.delete(e.id), u.value = t;
|
|
7477
|
+
else if (t.add(e.id), u.value = t, e.id !== "0" && !e.children.length && s.loadFolders && !d.value.has(e.id)) {
|
|
7533
7478
|
let t = f;
|
|
7534
7479
|
x(e.id, !0);
|
|
7535
7480
|
try {
|
|
@@ -7571,8 +7516,7 @@ var lp = {
|
|
|
7571
7516
|
}, "📁 " + C(e.node.name), 9, Mp)], 14, Ap))), 128)), _.value.length ? i("", !0) : (v(), a("p", Np, "暂无可选文件夹"))]));
|
|
7572
7517
|
}
|
|
7573
7518
|
}), [["__scopeId", "data-v-0a2f57f5"]]);
|
|
7574
|
-
|
|
7575
|
-
//#region src/data-settings.ts
|
|
7519
|
+
// src/data-settings.ts
|
|
7576
7520
|
function Fp(e) {
|
|
7577
7521
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
7578
7522
|
}
|
|
@@ -7746,7 +7690,7 @@ function tm(e, t) {
|
|
|
7746
7690
|
}
|
|
7747
7691
|
function nm(e) {
|
|
7748
7692
|
let t = [];
|
|
7749
|
-
if (e.code.trim() || t.push("请输入数据集编码"), /^[A-Za-z0-9_.:-]+$/.test(e.code.trim()) || t.push("数据集编码格式不正确"), e.name.trim() || t.push("请输入数据集名称"),
|
|
7693
|
+
if (e.code.trim() || t.push("请输入数据集编码"), /^[A-Za-z0-9_.:-]+$/.test(e.code.trim()) || t.push("数据集编码格式不正确"), e.name.trim() || t.push("请输入数据集名称"), e.type !== "sql" && e.type !== "shared-sql" || e.sql.trim() || t.push("请输入报表 SQL"), e.type === "sql" && !e.sourceId.trim() && t.push("请选择数据源"), e.type === "shared-sql" && !e.sourceId.trim() && t.push("请选择共享数据源"), e.type === "api" && !em(e.apiUrl) && t.push("API 地址必须为 HTTPS 或站内相对地址"), e.type === "json") try {
|
|
7750
7694
|
JSON.parse(e.jsonData);
|
|
7751
7695
|
} catch {
|
|
7752
7696
|
t.push("JSON 数据格式不正确");
|
|
@@ -7884,8 +7828,7 @@ function pm(e) {
|
|
|
7884
7828
|
paramList: t.parameters.map(im)
|
|
7885
7829
|
};
|
|
7886
7830
|
}
|
|
7887
|
-
|
|
7888
|
-
//#region src/components/FuReportDataDictionary.vue?vue&type=script&setup=true&lang.ts
|
|
7831
|
+
// src/components/FuReportDataDictionary.vue?vue&type=script&setup=true&lang.ts
|
|
7889
7832
|
var mm = {
|
|
7890
7833
|
class: "fu-dict",
|
|
7891
7834
|
"aria-labelledby": "fu-dict-title"
|
|
@@ -7994,7 +7937,7 @@ var mm = {
|
|
|
7994
7937
|
}
|
|
7995
7938
|
}
|
|
7996
7939
|
async function se(e) {
|
|
7997
|
-
if (
|
|
7940
|
+
if (c.deleteDictionary && !x.value) {
|
|
7998
7941
|
x.value = !0;
|
|
7999
7942
|
try {
|
|
8000
7943
|
await c.deleteDictionary(e), l("changed"), await V();
|
|
@@ -8027,11 +7970,8 @@ var mm = {
|
|
|
8027
7970
|
A.value = e, M.value = 1, I.value = null, await de();
|
|
8028
7971
|
}
|
|
8029
7972
|
async function de() {
|
|
8030
|
-
if (!A.value || !c.loadItems)
|
|
8031
|
-
|
|
8032
|
-
return;
|
|
8033
|
-
}
|
|
8034
|
-
try {
|
|
7973
|
+
if (!A.value || !c.loadItems) F.value = [], P.value = 0;
|
|
7974
|
+
else try {
|
|
8035
7975
|
let e = Up(await c.loadItems(A.value.id, M.value, N.value), A.value.id);
|
|
8036
7976
|
F.value = e.items, P.value = e.total, M.value = e.page, N.value = e.pageSize;
|
|
8037
7977
|
} catch (e) {
|
|
@@ -8039,7 +7979,7 @@ var mm = {
|
|
|
8039
7979
|
}
|
|
8040
7980
|
}
|
|
8041
7981
|
async function fe() {
|
|
8042
|
-
if (
|
|
7982
|
+
if (I.value && c.saveItem && !x.value && (T.value = Gp(I.value), !T.value.length)) {
|
|
8043
7983
|
x.value = !0;
|
|
8044
7984
|
try {
|
|
8045
7985
|
await c.saveItem(I.value, qp(I.value)), I.value = null, l("changed"), await de();
|
|
@@ -8051,7 +7991,7 @@ var mm = {
|
|
|
8051
7991
|
}
|
|
8052
7992
|
}
|
|
8053
7993
|
async function pe(e) {
|
|
8054
|
-
if (
|
|
7994
|
+
if (c.deleteItem && !x.value) {
|
|
8055
7995
|
x.value = !0;
|
|
8056
7996
|
try {
|
|
8057
7997
|
await c.deleteItem(e), l("changed"), await de();
|
|
@@ -8063,7 +8003,7 @@ var mm = {
|
|
|
8063
8003
|
}
|
|
8064
8004
|
}
|
|
8065
8005
|
async function me() {
|
|
8066
|
-
if (
|
|
8006
|
+
if (c.refreshCache && !x.value) {
|
|
8067
8007
|
x.value = !0;
|
|
8068
8008
|
try {
|
|
8069
8009
|
await c.refreshCache(), l("changed");
|
|
@@ -8085,7 +8025,7 @@ var mm = {
|
|
|
8085
8025
|
}
|
|
8086
8026
|
}
|
|
8087
8027
|
async function ge(e, t) {
|
|
8088
|
-
if (
|
|
8028
|
+
if (e && t.length && !x.value) {
|
|
8089
8029
|
x.value = !0;
|
|
8090
8030
|
try {
|
|
8091
8031
|
await e(t, Jp(t)), z.value = /* @__PURE__ */ new Set(), l("changed"), await he(), await V();
|
|
@@ -8439,7 +8379,7 @@ var mm = {
|
|
|
8439
8379
|
}
|
|
8440
8380
|
}
|
|
8441
8381
|
async function N() {
|
|
8442
|
-
if (
|
|
8382
|
+
if (c.previewDataset && !h.value && (m.value = nm(u.value), !m.value.length)) {
|
|
8443
8383
|
h.value = !0;
|
|
8444
8384
|
try {
|
|
8445
8385
|
f.value = sm(await c.previewDataset(u.value, am(u.value))), d.value = "preview";
|
|
@@ -8453,17 +8393,16 @@ var mm = {
|
|
|
8453
8393
|
async function P() {
|
|
8454
8394
|
if (m.value = nm(u.value), m.value.length || h.value || c.readonly) return;
|
|
8455
8395
|
let e = $p(u.value), t = am(e);
|
|
8456
|
-
if (l("save", e, t), !c.saveDataset)
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
h.value = !1;
|
|
8396
|
+
if (l("save", e, t), !c.saveDataset) l("update:modelValue", e);
|
|
8397
|
+
else {
|
|
8398
|
+
h.value = !0;
|
|
8399
|
+
try {
|
|
8400
|
+
await c.saveDataset(e, t), l("update:modelValue", e), l("saved", e);
|
|
8401
|
+
} catch (e) {
|
|
8402
|
+
l("error", e);
|
|
8403
|
+
} finally {
|
|
8404
|
+
h.value = !1;
|
|
8405
|
+
}
|
|
8467
8406
|
}
|
|
8468
8407
|
}
|
|
8469
8408
|
function F() {
|
|
@@ -8735,17 +8674,16 @@ var mm = {
|
|
|
8735
8674
|
async function m() {
|
|
8736
8675
|
if (u.value = lm(l.value), u.value.length || d.value || r.readonly) return;
|
|
8737
8676
|
let e = cm(l.value), t = um(e);
|
|
8738
|
-
if (c("save", e, t), !r.saveSource)
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
-
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
d.value = !1;
|
|
8677
|
+
if (c("save", e, t), !r.saveSource) c("update:modelValue", e);
|
|
8678
|
+
else {
|
|
8679
|
+
d.value = !0;
|
|
8680
|
+
try {
|
|
8681
|
+
await r.saveSource(e, t), c("update:modelValue", e), c("saved", e);
|
|
8682
|
+
} catch (e) {
|
|
8683
|
+
c("error", e);
|
|
8684
|
+
} finally {
|
|
8685
|
+
d.value = !1;
|
|
8686
|
+
}
|
|
8749
8687
|
}
|
|
8750
8688
|
}
|
|
8751
8689
|
return (n, r) => (v(), a("section", Bh, [
|
|
@@ -8860,7 +8798,7 @@ var mm = {
|
|
|
8860
8798
|
}
|
|
8861
8799
|
}
|
|
8862
8800
|
async function A() {
|
|
8863
|
-
if (
|
|
8801
|
+
if (r.previewJavaBean && !m.value && (f.value = fm(l.value), !f.value.length)) {
|
|
8864
8802
|
m.value = !0;
|
|
8865
8803
|
try {
|
|
8866
8804
|
d.value = sm(await r.previewJavaBean(l.value, pm(l.value))), u.value = "preview";
|
|
@@ -8874,17 +8812,16 @@ var mm = {
|
|
|
8874
8812
|
async function j() {
|
|
8875
8813
|
if (f.value = fm(l.value), f.value.length || m.value || r.readonly) return;
|
|
8876
8814
|
let e = dm(l.value), t = pm(e);
|
|
8877
|
-
if (c("save", e, t), !r.saveJavaBean)
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
|
|
8883
|
-
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
m.value = !1;
|
|
8815
|
+
if (c("save", e, t), !r.saveJavaBean) c("update:modelValue", e);
|
|
8816
|
+
else {
|
|
8817
|
+
m.value = !0;
|
|
8818
|
+
try {
|
|
8819
|
+
await r.saveJavaBean(e, t), c("update:modelValue", e), c("saved", e);
|
|
8820
|
+
} catch (e) {
|
|
8821
|
+
c("error", e);
|
|
8822
|
+
} finally {
|
|
8823
|
+
m.value = !1;
|
|
8824
|
+
}
|
|
8888
8825
|
}
|
|
8889
8826
|
}
|
|
8890
8827
|
return (n, r) => (v(), a("section", Xh, [
|
|
@@ -9064,8 +9001,7 @@ var mm = {
|
|
|
9064
9001
|
]));
|
|
9065
9002
|
}
|
|
9066
9003
|
}), [["__scopeId", "data-v-6747e639"]]);
|
|
9067
|
-
|
|
9068
|
-
//#region src/designer-output-settings.ts
|
|
9004
|
+
// src/designer-output-settings.ts
|
|
9069
9005
|
function Og(e) {
|
|
9070
9006
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
9071
9007
|
}
|
|
@@ -9161,7 +9097,7 @@ function zg(e) {
|
|
|
9161
9097
|
if (e.label.trim() || t.push("请输入地图名称"), e.name.trim() || t.push("请输入地图编码"), !e.data.trim()) t.push("请输入 GeoJSON 数据");
|
|
9162
9098
|
else try {
|
|
9163
9099
|
let n = JSON.parse(e.data);
|
|
9164
|
-
|
|
9100
|
+
Og(n) && ["FeatureCollection", "Feature"].includes($(n.type, 64)) || t.push("地图数据必须是有效 GeoJSON");
|
|
9165
9101
|
} catch {
|
|
9166
9102
|
t.push("地图数据必须是有效 JSON");
|
|
9167
9103
|
}
|
|
@@ -9402,8 +9338,7 @@ function c_(e, t = "") {
|
|
|
9402
9338
|
remark: $(n.remark, 1e3).trim() || "-"
|
|
9403
9339
|
};
|
|
9404
9340
|
}
|
|
9405
|
-
|
|
9406
|
-
//#region src/components/FuReportLicenseInfo.vue?vue&type=script&setup=true&lang.ts
|
|
9341
|
+
// src/components/FuReportLicenseInfo.vue?vue&type=script&setup=true&lang.ts
|
|
9407
9342
|
var l_ = {
|
|
9408
9343
|
class: "fu-license",
|
|
9409
9344
|
"aria-labelledby": "fu-license-title"
|
|
@@ -9499,30 +9434,29 @@ var l_ = {
|
|
|
9499
9434
|
f.value = !0, _.value = 1, await I();
|
|
9500
9435
|
}
|
|
9501
9436
|
async function I() {
|
|
9502
|
-
if (!c.loadSources)
|
|
9503
|
-
|
|
9504
|
-
|
|
9505
|
-
|
|
9506
|
-
|
|
9507
|
-
|
|
9508
|
-
|
|
9509
|
-
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
|
|
9513
|
-
})
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
w.value = !1;
|
|
9437
|
+
if (!c.loadSources) p.value = [], S.value = 0;
|
|
9438
|
+
else {
|
|
9439
|
+
w.value = !0;
|
|
9440
|
+
try {
|
|
9441
|
+
let e = Rg(await c.loadSources({
|
|
9442
|
+
label: h.value.trim(),
|
|
9443
|
+
name: g.value.trim(),
|
|
9444
|
+
page: _.value,
|
|
9445
|
+
pageSize: x.value
|
|
9446
|
+
}));
|
|
9447
|
+
p.value = e.items, S.value = e.total, _.value = e.page, x.value = e.pageSize;
|
|
9448
|
+
} catch (e) {
|
|
9449
|
+
l("error", e);
|
|
9450
|
+
} finally {
|
|
9451
|
+
w.value = !1;
|
|
9452
|
+
}
|
|
9519
9453
|
}
|
|
9520
9454
|
}
|
|
9521
9455
|
function L(e) {
|
|
9522
9456
|
A.value = [], m.value = e ? { ...e } : Lg({});
|
|
9523
9457
|
}
|
|
9524
9458
|
async function R() {
|
|
9525
|
-
if (
|
|
9459
|
+
if (m.value && c.saveSource && !w.value && (A.value = zg(m.value), !A.value.length)) {
|
|
9526
9460
|
w.value = !0;
|
|
9527
9461
|
try {
|
|
9528
9462
|
await c.saveSource(m.value, Bg(m.value)), m.value = null, await I();
|
|
@@ -9534,7 +9468,7 @@ var l_ = {
|
|
|
9534
9468
|
}
|
|
9535
9469
|
}
|
|
9536
9470
|
async function z(e) {
|
|
9537
|
-
if (
|
|
9471
|
+
if (c.deleteSource && !w.value) {
|
|
9538
9472
|
w.value = !0;
|
|
9539
9473
|
try {
|
|
9540
9474
|
await c.deleteSource(e), await I();
|
|
@@ -10214,7 +10148,7 @@ var l_ = {
|
|
|
10214
10148
|
u.value.dbTable = "", u.value.idField = "", u.value.fkField = "", p.value = [], m.value = [], _(), await j();
|
|
10215
10149
|
}
|
|
10216
10150
|
async function j() {
|
|
10217
|
-
if (
|
|
10151
|
+
if (u.value.dbSource && r.loadTables) {
|
|
10218
10152
|
g.value = !0;
|
|
10219
10153
|
try {
|
|
10220
10154
|
p.value = a_(await r.loadTables(u.value.dbSource, f.value.trim()));
|
|
@@ -10226,7 +10160,7 @@ var l_ = {
|
|
|
10226
10160
|
}
|
|
10227
10161
|
}
|
|
10228
10162
|
async function M() {
|
|
10229
|
-
if (u.value.idField = "", u.value.fkField = "", m.value = [], _(),
|
|
10163
|
+
if (u.value.idField = "", u.value.fkField = "", m.value = [], _(), u.value.dbSource && u.value.dbTable && r.loadFields) {
|
|
10230
10164
|
g.value = !0;
|
|
10231
10165
|
try {
|
|
10232
10166
|
m.value = o_(await r.loadFields(u.value.dbSource, u.value.dbTable));
|
|
@@ -10238,7 +10172,7 @@ var l_ = {
|
|
|
10238
10172
|
}
|
|
10239
10173
|
}
|
|
10240
10174
|
async function N() {
|
|
10241
|
-
if (
|
|
10175
|
+
if (r.validateJava && u.value.type === "java" && !g.value && (h.value = t_(u.value, r.hadMain && !$g(r.modelValue).isMain), !h.value.length)) {
|
|
10242
10176
|
g.value = !0;
|
|
10243
10177
|
try {
|
|
10244
10178
|
await r.validateJava(u.value.javaType, u.value.javaValue);
|
|
@@ -10266,17 +10200,16 @@ var l_ = {
|
|
|
10266
10200
|
sourceId: t.dbSource,
|
|
10267
10201
|
tableName: t.dbTable
|
|
10268
10202
|
};
|
|
10269
|
-
if (t.type === "sql" && (d.value.sourceId !== i.sourceId || d.value.tableName !== i.tableName) && c("source-changed", d.value, i), c("save", t, n), !r.saveHandler)
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
|
|
10279
|
-
g.value = !1;
|
|
10203
|
+
if (t.type === "sql" && (d.value.sourceId !== i.sourceId || d.value.tableName !== i.tableName) && c("source-changed", d.value, i), c("save", t, n), !r.saveHandler) c("update:modelValue", t);
|
|
10204
|
+
else {
|
|
10205
|
+
g.value = !0;
|
|
10206
|
+
try {
|
|
10207
|
+
await r.saveHandler(t, n), d.value = i, c("update:modelValue", t), c("saved", t);
|
|
10208
|
+
} catch (e) {
|
|
10209
|
+
c("error", e);
|
|
10210
|
+
} finally {
|
|
10211
|
+
g.value = !1;
|
|
10212
|
+
}
|
|
10280
10213
|
}
|
|
10281
10214
|
}
|
|
10282
10215
|
return (n, r) => (v(), a("section", Wv, [
|
|
@@ -10397,5 +10330,4 @@ var l_ = {
|
|
|
10397
10330
|
]));
|
|
10398
10331
|
}
|
|
10399
10332
|
}), [["__scopeId", "data-v-b50dba12"]]);
|
|
10400
|
-
//#endregion
|
|
10401
10333
|
export { Jl as FU_REPORT_CRON_PRESETS, Vo as FU_REPORT_FUNCTION_HELP, Ug as FU_REPORT_PAPERS, Os as FuReportBarSeriesSettings, Vc as FuReportCellLinkageSettings, Hc as FuReportChartLinkageSettings, $i as FuReportChartSettings, $_ as FuReportColorMatchSettings, M as FuReportContextKey, Xm as FuReportDataDictionary, zh as FuReportDataSourceSettings, dt as FuReportDesigner, Fo as FuReportDictionaryPicker, ga as FuReportErrorBoundary, hd as FuReportExportJobEditor, ju as FuReportExportJobList, kd as FuReportExportJobLogs, Vs as FuReportExtendedFieldSettings, Yh as FuReportFileDatasetUrl, Pp as FuReportFolderPicker, Op as FuReportFolderTree, Bo as FuReportFullscreenEditor, Xo as FuReportFunctionHelp, Nf as FuReportGroupEditor, cf as FuReportGroupList, fa as FuReportGroupViewer, rs as FuReportHelpMenu, sl as FuReportHyperlinkSettings, Dg as FuReportJavaBeanSettings, f_ as FuReportLicenseInfo, ct as FuReportManager, B_ as FuReportMapSettings, N as FuReportPlugin, Xf as FuReportPrimarySubReport, Uv as FuReportPrintSettings, ma as FuReportPrintView, ia as FuReportRichText, Za as FuReportScrollMultiple, Va as FuReportScrollRadio, Na as FuReportSelectInput, Ml as FuReportSharedSourceList, ql as FuReportSharedSourcePicker, Xs as FuReportSqlParameterReplacement, by as FuReportSubmitSettings, vo as FuReportTreeRadio, _o as FuReportTreeSelect, na as FuReportViewer, ap as buildFolderMoveRequest, Qg as createSubmitCode, ys as extractSqlParameterValues, bo as filterDictionaryRecords, su as filterExportJobs, Bd as filterReportGroups, xa as filterSelectOptions, _l as filterSharedSources, tp as findFolderNode, Uo as findFunctionHelp, ep as flattenFolderNodes, $a as flattenTreeNodes, np as folderDescendantIds, no as formatTreeSelection, Gg as isSafeCallbackUrl, hs as isSafeDataEndpoint, em as isSafeDatasetUrl, Wo as isSafeHelpUrl, pc as isSafeReportLink, e_ as isSafeSubmitUrl, cu as isValidCronExpression, Sa as mergeSelectOptions, xs as missingSqlParameterValues, us as normalizeBarSeries, Vg as normalizeColorMatches, om as normalizeDatasetAnalysis, $p as normalizeDatasetConfig, Xp as normalizeDatasetField, Zp as normalizeDatasetParameter, sm as normalizeDatasetPreview, Vp as normalizeDictionaryItem, Up as normalizeDictionaryItemPage, Hp as normalizeDictionaryPage, Bp as normalizeDictionaryRecord, yo as normalizeDictionaryRecords, iu as normalizeExportJob, ou as normalizeExportJobPage, au as normalizeExportJobs, mu as normalizeExportLogPage, pu as normalizeExportLogs, nu as normalizeExportReportOptions, tu as normalizeExportSheets, cm as normalizeFileDatasetConfig, $f as normalizeFolderNodes, Ho as normalizeFunctionHelpEntries, uc as normalizeHyperlinkConfig, dm as normalizeJavaBeanConfig, c_ as normalizeLicenseInfo, ac as normalizeLinkParameterMappings, ic as normalizeLinkSourceOptions, rc as normalizeLinkTargets, cc as normalizeLinkageConfig, Pg as normalizeMapConfig, Ig as normalizeMapOptions, Lg as normalizeMapSource, Rg as normalizeMapSourcePage, Gd as normalizePrimarySubReport, Kg as normalizePrintConfig, Wd as normalizeReportDataSources, Ld as normalizeReportGroup, Id as normalizeReportGroupMembers, Fd as normalizeReportGroupOptions, zd as normalizeReportGroupPage, Pd as normalizeReportGroupParameters, Rd as normalizeReportGroups, ba as normalizeSelectOptions, gl as normalizeSharedSourcePage, hl as normalizeSharedSources, vs as normalizeSqlParameterValues, $g as normalizeSubmitConfig, i_ as normalizeSubmitDataSources, o_ as normalizeSubmitFields, a_ as normalizeSubmitTables, Qa as normalizeTreeNodes, oc as parameterMappingsFromNames, ms as parseExtendedFieldSettings, to as parseTreeSelection, qg as printContentPixels, Hg as reorderColorMatches, Ca as selectInputMode, X as selectValueKey, wa as selectedOptionLabels, _s as serializeExtendedFieldSettings, rp as setFolderChildren, ml as sharedSourceTypeLabel, bs as sqlTemplateAllowsEmptyParameters, am as toLegacyDatasetPayload, Jp as toLegacyDictionaryIds, qp as toLegacyDictionaryItemPayload, Kp as toLegacyDictionaryPayload, du as toLegacyExportJobPayload, um as toLegacyFileDatasetPayload, sp as toLegacyFolderPayload, cp as toLegacyFolderSortPayload, gc as toLegacyHyperlinkPayload, pm as toLegacyJavaBeanPayload, hc as toLegacyLinkagePayload, Fg as toLegacyMapPayload, Bg as toLegacyMapSourcePayload, qd as toLegacyPrimarySubReportPayload, Yg as toLegacyPrintPayload, Hd as toLegacyReportGroupPayload, n_ as toLegacySubmitPayload, ds as updateBarSeriesType, nm as validateDatasetConfig, Wp as validateDictionary, Gp as validateDictionaryItem, lu as validateExportJob, gs as validateExtendedFieldSettings, lm as validateFileDatasetConfig, op as validateFolder, mc as validateHyperlinkConfig, fm as validateJavaBeanConfig, fc as validateLinkageConfig, zg as validateMapSource, dc as validateParameterMappings, Kd as validatePrimarySubReport, Jg as validatePrintConfig, Vd as validateReportGroup, t_ as validateSubmitConfig, eo as walkTreeNodes };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qianxiang-ai/fu-report-vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"author": "位志国 <ijunfu@aliyun.com>",
|
|
6
6
|
"type": "module",
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"jsbarcode": "^3.12.3",
|
|
28
28
|
"qrcode": "^1.5.4",
|
|
29
|
-
"@qianxiang-ai/fu-report-
|
|
30
|
-
"@qianxiang-ai/fu-report-
|
|
31
|
-
"@qianxiang-ai/fu-report-
|
|
32
|
-
"@qianxiang-ai/fu-report-
|
|
33
|
-
"@qianxiang-ai/fu-report-
|
|
34
|
-
"@qianxiang-ai/fu-report-
|
|
29
|
+
"@qianxiang-ai/fu-report-contracts": "1.2.0",
|
|
30
|
+
"@qianxiang-ai/fu-report-theme": "1.2.0",
|
|
31
|
+
"@qianxiang-ai/fu-report-image-export-engine": "1.2.0",
|
|
32
|
+
"@qianxiang-ai/fu-report-sdk": "1.2.0",
|
|
33
|
+
"@qianxiang-ai/fu-report-viewer-engine": "1.2.0",
|
|
34
|
+
"@qianxiang-ai/fu-report-designer-engine": "1.2.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/jsbarcode": "^3.11.4",
|
|
38
38
|
"@types/qrcode": "^1.5.6",
|
|
39
|
-
"vue": "3.5.
|
|
39
|
+
"vue": "3.5.42"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "node ../../scripts/clean-dist.mjs && vite build && vue-tsc -p tsconfig.json --emitDeclarationOnly",
|