liyu-pc-base 1.0.983 → 1.0.987
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/{FieldRender-D3i6PJTs.js → FieldRender-0Qq9zXcd.js} +2 -2
- package/dist/{FieldRender2-DVdznD-F.js → FieldRender2-DsW_O7-a.js} +5 -5
- package/dist/{FormRender3-DEKzMot4.js → FormRender3-sJ27j-CK.js} +3 -3
- package/dist/{RemoteModal-Ca1pTaYZ.js → RemoteModal-DZkqi64T.js} +1 -1
- package/dist/{RemoteSelectPro-BB45o7ie.js → RemoteSelectPro-BH20NlAS.js} +3 -3
- package/dist/{SearchRender-ChqsjuUY.js → SearchRender-Dh8G6EPt.js} +1 -1
- package/dist/{TinymceEditor-RuTN5CLa.js → TinymceEditor-B6KX-4ep.js} +2 -2
- package/dist/components/index.js +10 -10
- package/dist/{components-CO8mky8R.js → components-BIWVmal0.js} +97 -97
- package/dist/{dbViewConfig-CcHJENa7.js → dbViewConfig-P5HeZ2Mc.js} +1047 -947
- package/dist/{detailTablePro-CPs1Mxjk.js → detailTablePro-9PjEyBBa.js} +1 -1
- package/dist/{function-DnoIHo24.js → function-CstOzCwb.js} +69 -66
- package/dist/index.js +1 -1
- package/dist/liyu-pc-base.css +1 -1
- package/dist/{tableModal-B_2QSE8m.js → tableModal-DBfAmrxI.js} +1 -1
- package/dist/{tablePageHost-9q2NumMy.js → tablePageHost-CXw4Whb1.js} +127 -127
- package/dist/{tablePro-BxL8FgEp.js → tablePro-DSaUt_pj.js} +4 -4
- package/dist/utils/function.js +1 -1
- package/dist/utils/hooks/useFetchData.js +1 -1
- package/package.json +1 -1
|
@@ -5,20 +5,20 @@ import "./RemoteSelect-bjsCKGfS.js";
|
|
|
5
5
|
import { t as f } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
6
6
|
import { t as p } from "./lodash-CMVwnWxD.js";
|
|
7
7
|
import { getApiData as m } from "./api/api-model.js";
|
|
8
|
-
import { L as h, O as g, P as _, X as v, f as y, r as b } from "./function-
|
|
9
|
-
import "./RemoteModal-
|
|
10
|
-
import "./RemoteSelectPro-
|
|
8
|
+
import { L as h, O as g, P as _, X as v, f as y, r as b } from "./function-CstOzCwb.js";
|
|
9
|
+
import "./RemoteModal-DZkqi64T.js";
|
|
10
|
+
import "./RemoteSelectPro-BH20NlAS.js";
|
|
11
11
|
import "./JsonStr-JwOPdAYW.js";
|
|
12
12
|
import "./JsonObj-CmylW4Or.js";
|
|
13
13
|
import { t as x } from "./modal-tools-CZkYEwEr.js";
|
|
14
|
-
import { t as S } from "./FieldRender-
|
|
15
|
-
import "./TinymceEditor-
|
|
16
|
-
import { t as ee } from "./FieldRender2-
|
|
17
|
-
import "./SearchRender-
|
|
18
|
-
import "./FormRender3-
|
|
19
|
-
import { C, S as w, _ as
|
|
14
|
+
import { t as S } from "./FieldRender-0Qq9zXcd.js";
|
|
15
|
+
import "./TinymceEditor-B6KX-4ep.js";
|
|
16
|
+
import { t as ee } from "./FieldRender2-DsW_O7-a.js";
|
|
17
|
+
import "./SearchRender-Dh8G6EPt.js";
|
|
18
|
+
import "./FormRender3-sJ27j-CK.js";
|
|
19
|
+
import { C, S as w, _ as te, b as T, t as ne, v as re, x as ie, y as ae } from "./tablePro-DSaUt_pj.js";
|
|
20
20
|
import { o as oe, r as E } from "./remotePages-CiB0soAy.js";
|
|
21
|
-
import { C as se, S as D, _ as O, a as k, b as ce, c as le, d as A, f as ue, g as de, h as fe, i as pe, l as me, m as j, n as he, o as ge, p as _e, r as ve, s as ye, t as M, u as be, v as xe, w as Se, x as Ce, y as we } from "./tablePageHost-
|
|
21
|
+
import { C as se, S as D, _ as O, a as k, b as ce, c as le, d as A, f as ue, g as de, h as fe, i as pe, l as me, m as j, n as he, o as ge, p as _e, r as ve, s as ye, t as M, u as be, v as xe, w as Se, x as Ce, y as we } from "./tablePageHost-CXw4Whb1.js";
|
|
22
22
|
import { gridPageStateSymbol as Te } from "./components/gridPage/utils.js";
|
|
23
23
|
import { Fragment as N, KeepAlive as Ee, Transition as De, computed as P, createBlock as F, createCommentVNode as I, createElementBlock as L, createElementVNode as R, createTextVNode as z, createVNode as B, defineComponent as V, getCurrentInstance as Oe, h as ke, inject as Ae, markRaw as je, mergeModels as H, mergeProps as Me, nextTick as Ne, normalizeClass as Pe, normalizeStyle as Fe, onActivated as Ie, onBeforeMount as Le, onBeforeUnmount as Re, onDeactivated as ze, onMounted as Be, onUnmounted as Ve, openBlock as U, provide as He, reactive as W, ref as G, renderList as K, renderSlot as Ue, resolveComponent as q, resolveDynamicComponent as We, shallowRef as Ge, toDisplayString as J, unref as Y, useModel as Ke, vShow as qe, watch as X, withCtx as Z, withDirectives as Je, withModifiers as Ye } from "vue";
|
|
24
24
|
import { Modal as Xe, message as Q } from "ant-design-vue";
|
|
@@ -485,7 +485,7 @@ var Ot = /*#__PURE__*/ f(St, [["render", Dt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
485
485
|
n.value = !1, console.log("condition_model_dict.value", o.value), t("search", { model: o.value });
|
|
486
486
|
}, w = (t = !1) => {
|
|
487
487
|
e.base_search_condition_config_list.length != 0 && e.default_search_condition_config_list?.forEach((n, r) => {
|
|
488
|
-
|
|
488
|
+
T[r] = {}, o.value[r] || (o.value[r] = {}), e.base_search_condition_config_list.forEach((e) => {
|
|
489
489
|
e.group?.forEach((e) => {
|
|
490
490
|
n.forEach((n) => {
|
|
491
491
|
e.field_name == n.field_name && ((o.value[r][n.field_name] == null || t) && (u[n.operator] == 1 ? n.value === void 0 ? o.value[r][n.field_name] = null : o.value[r][n.field_name] = n.value : u[n.operator] == 2 ? n.value === void 0 ? o.value[r][n.field_name] = [null, null] : o.value[r][n.field_name] = n.value : u[n.operator] == 0 && (n.value === void 0 ? o.value[r][n.field_name] = [] : o.value[r][n.field_name] = n.value)), Object.assign(n, {
|
|
@@ -496,12 +496,12 @@ var Ot = /*#__PURE__*/ f(St, [["render", Dt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
496
496
|
});
|
|
497
497
|
});
|
|
498
498
|
});
|
|
499
|
-
},
|
|
499
|
+
}, te = () => {
|
|
500
500
|
w(!0);
|
|
501
|
-
},
|
|
502
|
-
|
|
501
|
+
}, T = W({}), ne = (e, t) => {
|
|
502
|
+
T[e][t.field_name] = !0;
|
|
503
503
|
}, re = (e, t) => {
|
|
504
|
-
|
|
504
|
+
T[e][t.field_name] = !1;
|
|
505
505
|
}, ie = (n, r) => {
|
|
506
506
|
let i = [];
|
|
507
507
|
e.default_search_condition_config_list.forEach((e, t) => {
|
|
@@ -612,9 +612,9 @@ var Ot = /*#__PURE__*/ f(St, [["render", Dt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
612
612
|
}, { deep: !0 }), X(() => e.is_clear_model, () => {
|
|
613
613
|
e.is_clear_model && (o.value = {}, w(), t("update:is_clear_model", !1));
|
|
614
614
|
}), Be(() => {
|
|
615
|
-
w(), e.eventBus && e.eventBus.on("filterChange",
|
|
615
|
+
w(), e.eventBus && e.eventBus.on("filterChange", te);
|
|
616
616
|
}), Ve(() => {
|
|
617
|
-
e.eventBus && e.eventBus.off("filterChange",
|
|
617
|
+
e.eventBus && e.eventBus.off("filterChange", te);
|
|
618
618
|
}), {
|
|
619
619
|
props: e,
|
|
620
620
|
t: i,
|
|
@@ -633,7 +633,7 @@ var Ot = /*#__PURE__*/ f(St, [["render", Dt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
633
633
|
handleAddGroupConditionOK: S,
|
|
634
634
|
handleAddGroupConditionCancel: ee,
|
|
635
635
|
validateInfos: s,
|
|
636
|
-
deleteBtnDict:
|
|
636
|
+
deleteBtnDict: T,
|
|
637
637
|
handleMouseEnter: ne,
|
|
638
638
|
handleMouseLeave: re,
|
|
639
639
|
handleDeleteFormItem: ie,
|
|
@@ -1517,7 +1517,7 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1517
1517
|
t && t.length > 0 ? n("change", null, {
|
|
1518
1518
|
...t[0],
|
|
1519
1519
|
...t[0].data
|
|
1520
|
-
}, !0, !0) :
|
|
1520
|
+
}, !0, !0) : T({
|
|
1521
1521
|
org_id: f.id,
|
|
1522
1522
|
conditions: [[
|
|
1523
1523
|
{
|
|
@@ -1960,7 +1960,7 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1960
1960
|
data: e == "personal" ? y.value : S.value
|
|
1961
1961
|
},
|
|
1962
1962
|
ok: (e) => {
|
|
1963
|
-
e && e.length > 0 ?
|
|
1963
|
+
e && e.length > 0 ? te({
|
|
1964
1964
|
org_id: f.id,
|
|
1965
1965
|
view_settings_ids: e
|
|
1966
1966
|
}).then(() => {
|
|
@@ -2691,7 +2691,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
2691
2691
|
"moved"
|
|
2692
2692
|
],
|
|
2693
2693
|
setup(e, { expose: t, emit: n }) {
|
|
2694
|
-
let r = e, i = n, a = Ae("eventBus"), o = Ae("usePercentages", !1), s = Ae("layout"), c = G(null), l = G(null), u = G(1), d = G(100), f = G(100), p = G(10), m = G([10, 10]), h = G(Infinity), g = G(null), _ = G(null), v = G(!0), y = G(!1), b = G(null), x = G(!1), S = G(null), ee = G(NaN), C = G(NaN), w = G(NaN),
|
|
2694
|
+
let r = e, i = n, a = Ae("eventBus"), o = Ae("usePercentages", !1), s = Ae("layout"), c = G(null), l = G(null), u = G(1), d = G(100), f = G(100), p = G(10), m = G([10, 10]), h = G(Infinity), g = G(null), _ = G(null), v = G(!0), y = G(!1), b = G(null), x = G(!1), S = G(null), ee = G(NaN), C = G(NaN), w = G(NaN), te = G(NaN), T = G({}), ne = G(!1), re = G(!1), ie = G(!1), ae = G(null), oe = G(null), E = G(null), se = G(null), D = G(r.x), O = G(r.y), k = G(r.w), ce = G(r.h), le = G(null), A = (e) => typeof e == "number" ? e : parseFloat(e) || 0, ue = (e, t) => e == null ? "0%" : typeof e == "number" ? e + "%" : e.endsWith("%") || e.endsWith("px") || e.includes("calc") ? e : e === "grow" ? t === void 0 ? "100%" : `calc(100% - ${typeof t == "number" ? t + "%" : t})` : e.includes("%") || e.includes("px") || e.includes("calc") ? e : e + "%", de = P(() => r.usePercentages === null ? o : r.usePercentages), fe = P(() => _.value && !r.static), pe = P(() => (g.value || _.value) && !r.static), me = P(() => navigator.userAgent.toLowerCase().indexOf("android") !== -1), j = P(() => Oe()?.parent?.proxy?.isMirrored ? !ne.value : ne.value), he = P(() => ({
|
|
2695
2695
|
"vue-resizable": fe.value,
|
|
2696
2696
|
static: r.static,
|
|
2697
2697
|
resizing: x.value,
|
|
@@ -2768,11 +2768,11 @@ var Yn = /* @__PURE__ */ V({
|
|
|
2768
2768
|
"width",
|
|
2769
2769
|
"height"
|
|
2770
2770
|
]) t[e] !== void 0 && typeof t[e] == "number" && (t[e] += "px");
|
|
2771
|
-
|
|
2771
|
+
T.value = t;
|
|
2772
2772
|
}, be = () => {
|
|
2773
2773
|
let e = {};
|
|
2774
2774
|
for (let t of ["width", "height"]) {
|
|
2775
|
-
let n =
|
|
2775
|
+
let n = T.value[t];
|
|
2776
2776
|
if (typeof n == "string" && (n.includes("calc") || n.includes("%"))) if (c.value) n = t === "width" ? c.value.offsetWidth + "px" : c.value.offsetHeight + "px";
|
|
2777
2777
|
else return;
|
|
2778
2778
|
let r = String(n).match(/^(\d+(\.\d+)?)px$/);
|
|
@@ -2865,7 +2865,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
2865
2865
|
break;
|
|
2866
2866
|
}
|
|
2867
2867
|
case "resizemove": {
|
|
2868
|
-
let e = Jn(w.value,
|
|
2868
|
+
let e = Jn(w.value, te.value, n, o);
|
|
2869
2869
|
j.value ? s.width = S.value.width - e.deltaX : s.width = S.value.width + e.deltaX, s.height = S.value.height + e.deltaY, S.value = s;
|
|
2870
2870
|
break;
|
|
2871
2871
|
}
|
|
@@ -2877,7 +2877,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
2877
2877
|
}
|
|
2878
2878
|
}
|
|
2879
2879
|
let l = Se(s.height, s.width);
|
|
2880
|
-
de.value || (l.w < r.minW && (l.w = r.minW), l.w > r.maxW && (l.w = r.maxW), l.h < r.minH && (l.h = r.minH), l.h > r.maxH && (l.h = r.maxH), l.h < 1 && (l.h = 1), l.w < 1 && (l.w = 1)), w.value = n,
|
|
2880
|
+
de.value || (l.w < r.minW && (l.w = r.minW), l.w > r.maxW && (l.w = r.maxW), l.h < r.minH && (l.h = r.minH), l.h > r.maxH && (l.h = r.maxH), l.h < 1 && (l.h = 1), l.w < 1 && (l.w = 1)), w.value = n, te.value = o, (A(k.value) !== l.w || A(ce.value) !== l.h) && i("resize", r.i, l.h, l.w, s.height, s.width), e.type === "resizeend" && (A(ae.value) !== l.w || A(oe.value) !== l.h) && i("resized", r.i, l.h, l.w, s.height, s.width), a.emit("resizeEvent", {
|
|
2881
2881
|
eventType: e.type,
|
|
2882
2882
|
i: r.i,
|
|
2883
2883
|
x: A(D.value),
|
|
@@ -3017,7 +3017,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
3017
3017
|
ref_key: "item",
|
|
3018
3018
|
ref: c,
|
|
3019
3019
|
class: Pe(["vue-grid-item", he.value]),
|
|
3020
|
-
style: Fe(
|
|
3020
|
+
style: Fe(T.value)
|
|
3021
3021
|
}, [Ue(e.$slots, "default"), fe.value ? (U(), L("span", {
|
|
3022
3022
|
key: 0,
|
|
3023
3023
|
ref_key: "handle",
|
|
@@ -3163,7 +3163,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
3163
3163
|
}, w = (e, t) => {
|
|
3164
3164
|
let n = e.filter((e) => !t.some((t) => e.i === t.i)), r = t.filter((t) => !e.some((e) => t.i === e.i));
|
|
3165
3165
|
return n.concat(r);
|
|
3166
|
-
},
|
|
3166
|
+
}, te = () => {
|
|
3167
3167
|
if (r.layout !== void 0 && h.value !== null) {
|
|
3168
3168
|
if (r.layout.length !== h.value.length) {
|
|
3169
3169
|
let e = w(r.layout, h.value);
|
|
@@ -3171,7 +3171,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
3171
3171
|
}
|
|
3172
3172
|
r.usePercentages, En(r.layout, r.verticalCompact), a.emit("updateWidth", c.value), v(), i("layout-updated", r.layout);
|
|
3173
3173
|
}
|
|
3174
|
-
},
|
|
3174
|
+
}, T = ({ eventType: e, i: t, x: n, y: r, h: i, w: a }) => {
|
|
3175
3175
|
ee(e, t, n, r, i, a);
|
|
3176
3176
|
}, ne = ({ eventType: e, i: t, x: n, y: r, h: i, w: a }) => {
|
|
3177
3177
|
x(e, t, n, r, i, a);
|
|
@@ -3179,7 +3179,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
3179
3179
|
return Le(() => {
|
|
3180
3180
|
i("layout-before-mount", r.layout);
|
|
3181
3181
|
}), Be(() => {
|
|
3182
|
-
a.on("resizeEvent",
|
|
3182
|
+
a.on("resizeEvent", T), a.on("dragEvent", ne), i("layout-created", r.layout), i("layout-mounted", r.layout), Ne(() => {
|
|
3183
3183
|
Bn(r.layout), h.value = r.layout, r.usePercentages, Ne(() => {
|
|
3184
3184
|
y(), C(), yn("resize", y), En(r.layout, r.verticalCompact), i("layout-updated", r.layout), v(), Ne(() => {
|
|
3185
3185
|
g.value = ht({
|
|
@@ -3192,7 +3192,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
3192
3192
|
});
|
|
3193
3193
|
});
|
|
3194
3194
|
}), Re(() => {
|
|
3195
|
-
a.off("resizeEvent",
|
|
3195
|
+
a.off("resizeEvent", T), a.off("dragEvent", ne), bn("resize", y), g.value && o.value && g.value.uninstall(o.value);
|
|
3196
3196
|
}), X(c, (e, t) => {
|
|
3197
3197
|
Ne(() => {
|
|
3198
3198
|
a.emit("updateWidth", c.value), t === null && Ne(() => {
|
|
@@ -3200,9 +3200,9 @@ var Yn = /* @__PURE__ */ V({
|
|
|
3200
3200
|
}), v();
|
|
3201
3201
|
});
|
|
3202
3202
|
}), X(() => r.layout.length, () => {
|
|
3203
|
-
|
|
3203
|
+
te();
|
|
3204
3204
|
}), X(() => r.layout, () => {
|
|
3205
|
-
|
|
3205
|
+
te();
|
|
3206
3206
|
}), X(() => r.colNum, (e) => {
|
|
3207
3207
|
a.emit("setColNum", e);
|
|
3208
3208
|
}), X(() => r.rowHeight, () => {
|
|
@@ -3650,7 +3650,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
3650
3650
|
data: e == "personal" ? g.value : _.value
|
|
3651
3651
|
},
|
|
3652
3652
|
ok: (e) => {
|
|
3653
|
-
e && e.length > 0 ?
|
|
3653
|
+
e && e.length > 0 ? te({
|
|
3654
3654
|
org_id: a.id,
|
|
3655
3655
|
view_settings_ids: e
|
|
3656
3656
|
}).then(() => {
|
|
@@ -4045,18 +4045,18 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4045
4045
|
}),
|
|
4046
4046
|
emits: /*@__PURE__*/ H(["changeMode"], ["update:leftOpen"]),
|
|
4047
4047
|
setup(e, { expose: n, emit: r }) {
|
|
4048
|
-
let i = G(null), a = G(null), o = G(null), s = e, c = r, l = d(), { t: u } = pt(), f = ft(), p = G(null), g = G(null), _ = G(null), b = G(""), x = G([]), S = G(""), ee = G(!1),
|
|
4048
|
+
let i = G(null), a = G(null), o = G(null), s = e, c = r, l = d(), { t: u } = pt(), f = ft(), p = G(null), g = G(null), _ = G(null), b = G(""), x = G([]), S = G(""), ee = G(!1), te = P(() => s.tableMode === "pivot" ? g.value : s.tableMode === "pivot_charts" ? _.value : p.value), T = Ke(e, "leftOpen");
|
|
4049
4049
|
Be(() => {
|
|
4050
4050
|
i.value = lt("normal"), a.value = lt("pivot"), o.value = lt("pivot_charts"), je();
|
|
4051
4051
|
}), Ie(() => {
|
|
4052
4052
|
je();
|
|
4053
4053
|
}), ze(() => Ae()), Ve(() => Ae()), X(() => s.tableMode, async (e) => {
|
|
4054
4054
|
await Ne();
|
|
4055
|
-
let t = e === "pivot" ? "pivot:" : e === "pivot_charts" ? "pivotcharts:" : "", n =
|
|
4055
|
+
let t = e === "pivot" ? "pivot:" : e === "pivot_charts" ? "pivotcharts:" : "", n = te.value?.currentView?.uid || "";
|
|
4056
4056
|
window.location.hash = `${t}${n}`;
|
|
4057
4057
|
});
|
|
4058
4058
|
let oe = () => {
|
|
4059
|
-
|
|
4059
|
+
T.value = !T.value;
|
|
4060
4060
|
}, E = P(() => s.pageConfig?.isView && !["top_tag", "top_tag_flat"].includes(s.view_display_type)), he = (e) => e === "pivot" ? g : e === "pivot_charts" ? _ : p, M = (e) => `table_pro_${e === "pivot" ? "pivot-" : e === "pivot_charts" ? "pivotcharts-" : ""}sql_db_view-${s.modalType}`, Te = async (e) => {
|
|
4061
4061
|
try {
|
|
4062
4062
|
let n = t(), r = await m({
|
|
@@ -4707,11 +4707,11 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4707
4707
|
} catch (e) {
|
|
4708
4708
|
return H(`创建视图失败: ${e?.message || e || "未知错误"}`);
|
|
4709
4709
|
}
|
|
4710
|
-
let
|
|
4711
|
-
if (
|
|
4712
|
-
await
|
|
4710
|
+
let te = he(n).value;
|
|
4711
|
+
if (te?.fetchViews) try {
|
|
4712
|
+
await te.fetchViews();
|
|
4713
4713
|
} catch {}
|
|
4714
|
-
return e?.activate !== !1 && await V(xe(
|
|
4714
|
+
return e?.activate !== !1 && await V(xe(te?.viewDataList || [], w?.uid, S) || {
|
|
4715
4715
|
...w || {},
|
|
4716
4716
|
uid: w?.uid || "",
|
|
4717
4717
|
name: S,
|
|
@@ -4882,7 +4882,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4882
4882
|
tableProRef: p,
|
|
4883
4883
|
pivotTableRef: g,
|
|
4884
4884
|
pivotChartsRef: _,
|
|
4885
|
-
activeTableRef:
|
|
4885
|
+
activeTableRef: te,
|
|
4886
4886
|
getPageMeta: Fe,
|
|
4887
4887
|
fetchAllModeViews: De,
|
|
4888
4888
|
activateView: V
|
|
@@ -4912,7 +4912,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4912
4912
|
header_bar_before_title: Z(() => [E.value ? (U(), L("div", Rr, [R("div", {
|
|
4913
4913
|
class: "toggle-button",
|
|
4914
4914
|
onClick: oe
|
|
4915
|
-
}, [
|
|
4915
|
+
}, [T.value ? (U(), F(Y(at), { key: 0 })) : (U(), F(Y(ot), { key: 1 }))])])) : I("", !0)]),
|
|
4916
4916
|
_: 1
|
|
4917
4917
|
}, 8, ["config", "eventBus"])], 64)) : a.value && e.tableMode === "pivot" ? (U(), F(Se, {
|
|
4918
4918
|
key: 1,
|
|
@@ -4926,7 +4926,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4926
4926
|
header_bar_before_title: Z(() => [E.value ? (U(), L("div", zr, [R("div", {
|
|
4927
4927
|
class: "toggle-button",
|
|
4928
4928
|
onClick: oe
|
|
4929
|
-
}, [
|
|
4929
|
+
}, [T.value ? (U(), F(Y(at), { key: 0 })) : (U(), F(Y(ot), { key: 1 }))])])) : I("", !0)]),
|
|
4930
4930
|
_: 1
|
|
4931
4931
|
}, 8, ["config", "eventBus"])) : o.value && e.tableMode === "pivot_charts" ? (U(), F(se, {
|
|
4932
4932
|
key: 2,
|
|
@@ -4938,7 +4938,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4938
4938
|
header_bar_before_title: Z(() => [E.value ? (U(), L("div", Br, [R("div", {
|
|
4939
4939
|
class: "toggle-button",
|
|
4940
4940
|
onClick: oe
|
|
4941
|
-
}, [
|
|
4941
|
+
}, [T.value ? (U(), F(Y(at), { key: 0 })) : (U(), F(Y(ot), { key: 1 }))])])) : I("", !0)]),
|
|
4942
4942
|
_: 1
|
|
4943
4943
|
}, 8, ["config", "eventBus"])) : I("", !0)], 1024)), B(br, { visible: ee.value }, null, 8, ["visible"])]);
|
|
4944
4944
|
};
|
|
@@ -4973,7 +4973,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4973
4973
|
X(S, (e) => {
|
|
4974
4974
|
e && (ee.value = e);
|
|
4975
4975
|
});
|
|
4976
|
-
let C = P(() => S.value || ee.value), w = P(() => C.value?.settingOpen),
|
|
4976
|
+
let C = P(() => S.value || ee.value), w = P(() => C.value?.settingOpen), te = P(() => !!u.value?.isView && ["top_tag", "top_tag_flat"].includes(u.value?.view_display_type)), T = [
|
|
4977
4977
|
{
|
|
4978
4978
|
value: "normal",
|
|
4979
4979
|
label: "标准"
|
|
@@ -4988,7 +4988,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4988
4988
|
}
|
|
4989
4989
|
], ne = P(() => {
|
|
4990
4990
|
let e = u.value?.enable_view_types || [];
|
|
4991
|
-
return
|
|
4991
|
+
return T.filter((t) => e.includes(t.value));
|
|
4992
4992
|
}), re = P(() => s.value === "pivot" ? "pivot:" : s.value === "pivot_charts" ? "pivotcharts:" : "");
|
|
4993
4993
|
He("tableProStateProxy", C);
|
|
4994
4994
|
let ie = async () => {
|
|
@@ -5020,7 +5020,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5020
5020
|
}), (e, i) => {
|
|
5021
5021
|
let o = q("a-radio-button"), c = q("a-radio-group"), l = q("a-drawer");
|
|
5022
5022
|
return U(), L(N, null, [B(mn, null, {
|
|
5023
|
-
default: Z(() => [n.value ? (U(), L("div", Wr, [
|
|
5023
|
+
default: Z(() => [n.value ? (U(), L("div", Wr, [te.value && ne.value.length ? (U(), L("div", Gr, [u.value?.view_display_type === "top_tag" && ne.value.length > 1 ? (U(), F(c, {
|
|
5024
5024
|
key: 0,
|
|
5025
5025
|
value: s.value,
|
|
5026
5026
|
"onUpdate:value": i[0] ||= (e) => s.value = e,
|
|
@@ -5057,7 +5057,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5057
5057
|
"view_flag_name",
|
|
5058
5058
|
"hashPrefix"
|
|
5059
5059
|
])) : I("", !0)])) : I("", !0), R("div", Kr, [B(De, { name: "left-slide" }, {
|
|
5060
|
-
default: Z(() => [t.value && !
|
|
5060
|
+
default: Z(() => [t.value && !te.value ? (U(), L("div", qr, [R("div", Jr, [B(_r, {
|
|
5061
5061
|
pageConfig: u.value,
|
|
5062
5062
|
open: t.value,
|
|
5063
5063
|
"onUpdate:open": i[2] ||= (e) => t.value = e,
|
|
@@ -5160,45 +5160,45 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5160
5160
|
let t = d(), n = P(() => {
|
|
5161
5161
|
let e = t.person?.manage_type;
|
|
5162
5162
|
return e === 1 || e === 2;
|
|
5163
|
-
}), r = /* @__PURE__ */ new Set(/* @__PURE__ */ "md.markdown.txt.log.json.xml.yml.yaml.csv.tsv.html.htm.css.js.mjs.ts.tsx.jsx.vue.py.sql.sh.ini.conf.cfg.env.properties.java.go.rs.toml".split(".")), i = G(!1), a = G([]), o = G(!1), s = G(""), c = G([]), l = G([]), u = G(null), f = G(!1), p = G(null), m = G(
|
|
5163
|
+
}), r = /* @__PURE__ */ new Set(/* @__PURE__ */ "md.markdown.txt.log.json.xml.yml.yaml.csv.tsv.html.htm.css.js.mjs.ts.tsx.jsx.vue.py.sql.sh.ini.conf.cfg.env.properties.java.go.rs.toml".split(".")), i = G(!1), a = G([]), o = G(!1), s = G(""), c = G([]), l = G([]), u = G(null), f = G(!1), p = G(null), m = G(!1), h = G(null), g = G(""), _ = (e) => {
|
|
5164
5164
|
let t = e.lastIndexOf(".");
|
|
5165
5165
|
return t >= 0 ? e.slice(t + 1).toLowerCase() : "";
|
|
5166
|
-
},
|
|
5166
|
+
}, v = (e) => r.has(_(e)), y = (e) => e == null ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / 1024 / 1024).toFixed(1)} MB` : `${(e / 1024 / 1024 / 1024).toFixed(1)} GB`, b = (e, t) => `${mi}/file?path=${encodeURIComponent(e)}${t ? "&download=1" : ""}`, x = (e, t) => {
|
|
5167
5167
|
if (!t) return e;
|
|
5168
5168
|
let n = [];
|
|
5169
5169
|
for (let r of e) if (r.type === "dir") {
|
|
5170
|
-
let e =
|
|
5170
|
+
let e = x(r.children || [], t);
|
|
5171
5171
|
(e.length || r.name.toLowerCase().includes(t)) && n.push({
|
|
5172
5172
|
...r,
|
|
5173
5173
|
children: e.length ? e : r.children
|
|
5174
5174
|
});
|
|
5175
5175
|
} else r.name.toLowerCase().includes(t) && n.push(r);
|
|
5176
5176
|
return n;
|
|
5177
|
-
},
|
|
5177
|
+
}, S = P(() => x(ee.value, s.value.trim().toLowerCase())), ee = P(() => [{
|
|
5178
5178
|
name: "根目录",
|
|
5179
|
-
path:
|
|
5179
|
+
path: "",
|
|
5180
5180
|
type: "dir",
|
|
5181
5181
|
children: a.value
|
|
5182
|
-
}]
|
|
5183
|
-
c.value =
|
|
5184
|
-
},
|
|
5182
|
+
}]), C = (e) => {
|
|
5183
|
+
c.value = e.filter((e) => e.type === "dir").map((e) => e.path);
|
|
5184
|
+
}, w = async (e = !1) => {
|
|
5185
5185
|
i.value = !0;
|
|
5186
5186
|
let t = c.value, n = l.value;
|
|
5187
5187
|
try {
|
|
5188
5188
|
let r = await fetch(`${mi}/tree`);
|
|
5189
5189
|
if (!r.ok) throw Error(`HTTP ${r.status}`);
|
|
5190
5190
|
let i = await r.json();
|
|
5191
|
-
a.value = i.children || [], o.value = !!i.truncated,
|
|
5191
|
+
a.value = i.children || [], o.value = !!i.truncated, e ? (c.value = t, l.value = n) : C(a.value);
|
|
5192
5192
|
} catch (e) {
|
|
5193
5193
|
Q.error(`加载文件树失败: ${e instanceof Error ? e.message : String(e)}`);
|
|
5194
5194
|
} finally {
|
|
5195
5195
|
i.value = !1;
|
|
5196
5196
|
}
|
|
5197
|
-
}, te = () =>
|
|
5198
|
-
if (p.value = null, !(!
|
|
5197
|
+
}, te = () => w(!0), T = async (e) => {
|
|
5198
|
+
if (p.value = null, !(!v(e.name) || (e.size ?? 0) > hi)) {
|
|
5199
5199
|
f.value = !0;
|
|
5200
5200
|
try {
|
|
5201
|
-
let t = await fetch(
|
|
5201
|
+
let t = await fetch(b(e.path));
|
|
5202
5202
|
if (!t.ok) throw Error(`HTTP ${t.status}`);
|
|
5203
5203
|
p.value = await t.text();
|
|
5204
5204
|
} catch (e) {
|
|
@@ -5207,23 +5207,23 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5207
5207
|
f.value = !1;
|
|
5208
5208
|
}
|
|
5209
5209
|
}
|
|
5210
|
-
},
|
|
5211
|
-
u.value &&
|
|
5212
|
-
},
|
|
5210
|
+
}, ne = () => {
|
|
5211
|
+
u.value && T(u.value);
|
|
5212
|
+
}, re = (e) => {
|
|
5213
5213
|
if (!n.value) {
|
|
5214
5214
|
Q.warning("仅管理员可上传文件");
|
|
5215
5215
|
return;
|
|
5216
5216
|
}
|
|
5217
|
-
|
|
5218
|
-
},
|
|
5217
|
+
g.value = e.path, h.value?.click();
|
|
5218
|
+
}, ie = (e) => e ? e.split("/").filter(Boolean).pop() || e : "根目录", ae = async (e) => {
|
|
5219
5219
|
let t = e.target, n = Array.from(t.files ?? []);
|
|
5220
5220
|
if (t.value = "", !n.length) return;
|
|
5221
|
-
let r =
|
|
5221
|
+
let r = g.value;
|
|
5222
5222
|
if (!r) {
|
|
5223
5223
|
Q.error("未获取到根目录路径,无法上传");
|
|
5224
5224
|
return;
|
|
5225
5225
|
}
|
|
5226
|
-
|
|
5226
|
+
m.value = !0;
|
|
5227
5227
|
try {
|
|
5228
5228
|
for (let e of n) {
|
|
5229
5229
|
let t = `${r.replace(/\/+$/, "")}/${e.name}`, n = await fetch(`${mi}/upload?path=${encodeURIComponent(t)}`, {
|
|
@@ -5235,13 +5235,13 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5235
5235
|
throw Error(e?.error || `HTTP ${n.status}`);
|
|
5236
5236
|
}
|
|
5237
5237
|
}
|
|
5238
|
-
Q.success(`已上传 ${n.length} 个文件到 ${
|
|
5238
|
+
Q.success(`已上传 ${n.length} 个文件到 ${ie(r)}`), await w(!0);
|
|
5239
5239
|
} catch (e) {
|
|
5240
5240
|
Q.error(`上传失败: ${e instanceof Error ? e.message : String(e)}`);
|
|
5241
5241
|
} finally {
|
|
5242
|
-
|
|
5242
|
+
m.value = !1;
|
|
5243
5243
|
}
|
|
5244
|
-
},
|
|
5244
|
+
}, oe = async (e) => {
|
|
5245
5245
|
if (!n.value) {
|
|
5246
5246
|
Q.warning("仅管理员可删除文件");
|
|
5247
5247
|
return;
|
|
@@ -5254,20 +5254,20 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5254
5254
|
let e = await n.json().catch(() => null);
|
|
5255
5255
|
throw Error(e?.error || `HTTP ${n.status}`);
|
|
5256
5256
|
}
|
|
5257
|
-
Q.success(`已删除 ${e.name}`), u.value && u.value.path.startsWith(e.path) && (u.value = null, p.value = null, l.value = []), await
|
|
5257
|
+
Q.success(`已删除 ${e.name}`), u.value && u.value.path.startsWith(e.path) && (u.value = null, p.value = null, l.value = []), await w(!0);
|
|
5258
5258
|
} catch (e) {
|
|
5259
5259
|
Q.error(`删除失败: ${e instanceof Error ? e.message : String(e)}`);
|
|
5260
5260
|
}
|
|
5261
|
-
},
|
|
5261
|
+
}, E = (e, t) => {
|
|
5262
5262
|
let n = t?.node?.dataRef || t?.node;
|
|
5263
|
-
!n || n.type !== "file" || (u.value = n,
|
|
5264
|
-
},
|
|
5263
|
+
!n || n.type !== "file" || (u.value = n, T(n));
|
|
5264
|
+
}, se = (e) => {
|
|
5265
5265
|
c.value = e;
|
|
5266
5266
|
};
|
|
5267
5267
|
return Be(() => {
|
|
5268
|
-
|
|
5268
|
+
w();
|
|
5269
5269
|
}), (e, t) => {
|
|
5270
|
-
let r = q("a-input-search"), a = q("a-button"), d = q("a-tag"),
|
|
5270
|
+
let r = q("a-input-search"), a = q("a-button"), d = q("a-tag"), g = q("a-popconfirm"), _ = q("a-tree"), x = q("a-empty"), ee = q("a-spin");
|
|
5271
5271
|
return U(), F(mn, null, {
|
|
5272
5272
|
default: Z(() => [R("div", Xr, [R("div", Zr, [
|
|
5273
5273
|
B(r, {
|
|
@@ -5286,7 +5286,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5286
5286
|
default: Z(() => t[2] ||= [z("刷新")]),
|
|
5287
5287
|
_: 1
|
|
5288
5288
|
}),
|
|
5289
|
-
|
|
5289
|
+
m.value ? (U(), F(d, {
|
|
5290
5290
|
key: 0,
|
|
5291
5291
|
color: "processing",
|
|
5292
5292
|
class: "uploading-tag"
|
|
@@ -5296,11 +5296,11 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5296
5296
|
})) : I("", !0),
|
|
5297
5297
|
R("input", {
|
|
5298
5298
|
ref_key: "uploadInputRef",
|
|
5299
|
-
ref:
|
|
5299
|
+
ref: h,
|
|
5300
5300
|
type: "file",
|
|
5301
5301
|
multiple: "",
|
|
5302
5302
|
style: { display: "none" },
|
|
5303
|
-
onChange:
|
|
5303
|
+
onChange: ae
|
|
5304
5304
|
}, null, 544)
|
|
5305
5305
|
]),
|
|
5306
5306
|
o.value ? (U(), F(d, {
|
|
@@ -5311,10 +5311,10 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5311
5311
|
default: Z(() => t[4] ||= [z("文件数过多,目录树已截断")]),
|
|
5312
5312
|
_: 1
|
|
5313
5313
|
})) : I("", !0),
|
|
5314
|
-
B(
|
|
5315
|
-
default: Z(() => [
|
|
5314
|
+
B(ee, { spinning: i.value }, {
|
|
5315
|
+
default: Z(() => [S.value.length ? (U(), F(_, {
|
|
5316
5316
|
key: 0,
|
|
5317
|
-
"tree-data":
|
|
5317
|
+
"tree-data": S.value,
|
|
5318
5318
|
"field-names": {
|
|
5319
5319
|
title: "name",
|
|
5320
5320
|
key: "path",
|
|
@@ -5323,8 +5323,8 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5323
5323
|
"expanded-keys": c.value,
|
|
5324
5324
|
"selected-keys": l.value,
|
|
5325
5325
|
"block-node": "",
|
|
5326
|
-
onSelect:
|
|
5327
|
-
onExpand:
|
|
5326
|
+
onSelect: E,
|
|
5327
|
+
onExpand: se
|
|
5328
5328
|
}, {
|
|
5329
5329
|
title: Z(({ dataRef: e }) => [R("span", $r, [
|
|
5330
5330
|
R("span", ei, J(e.type === "dir" ? "📁" : "📄"), 1),
|
|
@@ -5332,13 +5332,13 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5332
5332
|
class: "node-name",
|
|
5333
5333
|
title: e.path
|
|
5334
5334
|
}, J(e.name), 9, ti),
|
|
5335
|
-
e.type === "file" &&
|
|
5336
|
-
e.type === "file" ? (U(), L("span", ri, J(
|
|
5335
|
+
e.type === "file" && v(e.name) ? (U(), L("span", ni, "可预览")) : I("", !0),
|
|
5336
|
+
e.type === "file" ? (U(), L("span", ri, J(y(e.size)), 1)) : I("", !0),
|
|
5337
5337
|
n.value && e.type === "dir" ? (U(), L("span", {
|
|
5338
5338
|
key: 2,
|
|
5339
5339
|
class: "node-upload",
|
|
5340
5340
|
title: "上传文件到此目录",
|
|
5341
|
-
onClick: Ye((t) =>
|
|
5341
|
+
onClick: Ye((t) => re(e), ["stop"])
|
|
5342
5342
|
}, t[5] ||= [R("svg", {
|
|
5343
5343
|
width: "11",
|
|
5344
5344
|
height: "11",
|
|
@@ -5358,13 +5358,13 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5358
5358
|
y2: "15"
|
|
5359
5359
|
})
|
|
5360
5360
|
], -1)], 8, ii)) : I("", !0),
|
|
5361
|
-
n.value && e.path !==
|
|
5361
|
+
n.value && e.path !== "" ? (U(), F(g, {
|
|
5362
5362
|
key: 3,
|
|
5363
5363
|
title: e.type === "dir" ? `删除目录 ${e.name} 及其全部内容?` : `确认删除文件 ${e.name}?`,
|
|
5364
5364
|
"ok-text": "删除",
|
|
5365
5365
|
"cancel-text": "取消",
|
|
5366
5366
|
"ok-button-props": { danger: !0 },
|
|
5367
|
-
onConfirm: (t) =>
|
|
5367
|
+
onConfirm: (t) => oe(e)
|
|
5368
5368
|
}, {
|
|
5369
5369
|
default: Z(() => [R("span", {
|
|
5370
5370
|
class: "node-delete",
|
|
@@ -5403,7 +5403,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5403
5403
|
"tree-data",
|
|
5404
5404
|
"expanded-keys",
|
|
5405
5405
|
"selected-keys"
|
|
5406
|
-
])) : i.value ? I("", !0) : (U(), F(
|
|
5406
|
+
])) : i.value ? I("", !0) : (U(), F(x, {
|
|
5407
5407
|
key: 1,
|
|
5408
5408
|
description: "暂无文件",
|
|
5409
5409
|
class: "tree-empty"
|
|
@@ -5415,31 +5415,31 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5415
5415
|
class: "file-name",
|
|
5416
5416
|
title: u.value.path
|
|
5417
5417
|
}, J(u.value.name), 9, si),
|
|
5418
|
-
R("span", ci, J(
|
|
5418
|
+
R("span", ci, J(y(u.value.size)), 1),
|
|
5419
5419
|
B(a, {
|
|
5420
5420
|
size: "small",
|
|
5421
|
-
onClick:
|
|
5421
|
+
onClick: ne
|
|
5422
5422
|
}, {
|
|
5423
5423
|
default: Z(() => t[7] ||= [z("刷新")]),
|
|
5424
5424
|
_: 1
|
|
5425
5425
|
}),
|
|
5426
|
-
R("a", { href:
|
|
5426
|
+
R("a", { href: b(u.value.path, !0) }, [B(a, {
|
|
5427
5427
|
size: "small",
|
|
5428
5428
|
type: "primary"
|
|
5429
5429
|
}, {
|
|
5430
5430
|
default: Z(() => t[8] ||= [z("下载")]),
|
|
5431
5431
|
_: 1
|
|
5432
5432
|
})], 8, li)
|
|
5433
|
-
]), B(
|
|
5433
|
+
]), B(ee, {
|
|
5434
5434
|
spinning: f.value,
|
|
5435
5435
|
"wrapper-class-name": "preview-spin"
|
|
5436
5436
|
}, {
|
|
5437
|
-
default: Z(() => [!f.value && p.value !== null ? (U(), L("pre", ui, J(p.value), 1)) : f.value ? (U(), L("div", pi)) : (U(), L("div", di, [t[10] ||= R("p", null, "二进制文件,不支持在线预览", -1), R("a", { href:
|
|
5437
|
+
default: Z(() => [!f.value && p.value !== null ? (U(), L("pre", ui, J(p.value), 1)) : f.value ? (U(), L("div", pi)) : (U(), L("div", di, [t[10] ||= R("p", null, "二进制文件,不支持在线预览", -1), R("a", { href: b(u.value.path, !0) }, [B(a, { type: "primary" }, {
|
|
5438
5438
|
default: Z(() => t[9] ||= [z("下载文件")]),
|
|
5439
5439
|
_: 1
|
|
5440
5440
|
})], 8, fi)]))]),
|
|
5441
5441
|
_: 1
|
|
5442
|
-
}, 8, ["spinning"])], 64)) : (U(), F(
|
|
5442
|
+
}, 8, ["spinning"])], 64)) : (U(), F(x, {
|
|
5443
5443
|
key: 1,
|
|
5444
5444
|
description: "选择左侧文件查看内容",
|
|
5445
5445
|
class: "preview-empty"
|
|
@@ -5448,6 +5448,6 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5448
5448
|
});
|
|
5449
5449
|
};
|
|
5450
5450
|
}
|
|
5451
|
-
}), [["__scopeId", "data-v-
|
|
5451
|
+
}), [["__scopeId", "data-v-e34e7cfc"]]);
|
|
5452
5452
|
//#endregion
|
|
5453
5453
|
export { mn as a, Wt as c, Ot as d, ar as i, Vt as l, Yr as n, fn as o, sr as r, ln as s, gi as t, Rt as u };
|