liyu-pc-base 1.0.968 → 1.0.972
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.
|
@@ -16,9 +16,9 @@ import "./TinymceEditor-RuTN5CLa.js";
|
|
|
16
16
|
import { t as ee } from "./FieldRender2-DRLebQrC.js";
|
|
17
17
|
import "./SearchRender-DoTo-LB-.js";
|
|
18
18
|
import "./FormRender3-C9K5aHGs.js";
|
|
19
|
-
import { C, S as w, _ as
|
|
20
|
-
import { o as
|
|
21
|
-
import { C as
|
|
19
|
+
import { C, S as w, _ as T, b as te, t as ne, v as re, x as ie, y as ae } from "./tablePro-BxL8FgEp.js";
|
|
20
|
+
import { o as oe, r as E } from "./remotePages-3KQLpn_9.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-i531IwdK.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";
|
|
@@ -408,7 +408,7 @@ var Ot = /*#__PURE__*/ f(St, [["render", Dt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
408
408
|
return Array.isArray(t) && e.every((e) => Array.isArray(e));
|
|
409
409
|
}, f = null, p = (e, n, r) => {
|
|
410
410
|
let i = o.value[n][r.field_name];
|
|
411
|
-
if (
|
|
411
|
+
if (k(r).includes("_eq")) {
|
|
412
412
|
if (e == "_eq") {
|
|
413
413
|
o.value[n][r.field_name] = null, f = e, t("onChangeValue", { model: o.value });
|
|
414
414
|
return;
|
|
@@ -417,7 +417,7 @@ var Ot = /*#__PURE__*/ f(St, [["render", Dt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
417
417
|
return;
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
|
-
if (
|
|
420
|
+
if (k(r).includes("not_blank_not_null")) {
|
|
421
421
|
if (e == "not_blank_not_null") {
|
|
422
422
|
o.value[n][r.field_name] = "是", f = e, t("onChangeValue", { model: o.value });
|
|
423
423
|
return;
|
|
@@ -426,7 +426,7 @@ var Ot = /*#__PURE__*/ f(St, [["render", Dt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
426
426
|
return;
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
if (
|
|
429
|
+
if (k(r).includes("is_or_not_blank_or_null") || k(r).includes("is_or_not_null")) {
|
|
430
430
|
if (e == "is_or_not_blank_or_null" || e == "is_or_not_null") {
|
|
431
431
|
o.value[n][r.field_name] = null, f = e, t("onChangeValue", { model: o.value });
|
|
432
432
|
return;
|
|
@@ -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
|
+
te[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,13 +496,13 @@ var Ot = /*#__PURE__*/ f(St, [["render", Dt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
496
496
|
});
|
|
497
497
|
});
|
|
498
498
|
});
|
|
499
|
-
},
|
|
499
|
+
}, T = () => {
|
|
500
500
|
w(!0);
|
|
501
|
-
},
|
|
502
|
-
|
|
503
|
-
},
|
|
504
|
-
|
|
505
|
-
},
|
|
501
|
+
}, te = W({}), ne = (e, t) => {
|
|
502
|
+
te[e][t.field_name] = !0;
|
|
503
|
+
}, re = (e, t) => {
|
|
504
|
+
te[e][t.field_name] = !1;
|
|
505
|
+
}, ie = (n, r) => {
|
|
506
506
|
let i = [];
|
|
507
507
|
e.default_search_condition_config_list.forEach((e, t) => {
|
|
508
508
|
if (t !== n) i.push(e);
|
|
@@ -513,17 +513,17 @@ var Ot = /*#__PURE__*/ f(St, [["render", Dt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
513
513
|
}), t.length > 0 && i.push(t);
|
|
514
514
|
}
|
|
515
515
|
}), t("update_default_search_condition_config_list", { new_list: i });
|
|
516
|
-
},
|
|
516
|
+
}, ae = (e, n) => {
|
|
517
517
|
o.value[e][n] instanceof Array ? o.value[e][n].length = 0 : o.value[e][n] = null, t("onChangeValue", { model: o.value }), t("delSearch", { model: JSON.parse(JSON.stringify(o.value)) });
|
|
518
|
-
},
|
|
518
|
+
}, oe = (n, r, i, a) => {
|
|
519
519
|
if (n instanceof Array && n.length > 0) {
|
|
520
520
|
let s = n[n.length - 1], c = null;
|
|
521
521
|
if (e.base_search_condition_config_list.forEach((e) => {
|
|
522
522
|
e.group.forEach((e) => {
|
|
523
523
|
if (e.field_name === s) {
|
|
524
524
|
if (c = JSON.parse(JSON.stringify(e)), c.default_operator) c.operator = c.default_operator;
|
|
525
|
-
else if (
|
|
526
|
-
let [e] =
|
|
525
|
+
else if (k(c).length > 0) {
|
|
526
|
+
let [e] = k(c);
|
|
527
527
|
c.operator = e;
|
|
528
528
|
}
|
|
529
529
|
}
|
|
@@ -538,7 +538,7 @@ var Ot = /*#__PURE__*/ f(St, [["render", Dt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
538
538
|
}
|
|
539
539
|
w();
|
|
540
540
|
}
|
|
541
|
-
},
|
|
541
|
+
}, E = P(() => {
|
|
542
542
|
let t = {};
|
|
543
543
|
return e.default_search_condition_config_list.forEach((n, r) => {
|
|
544
544
|
t[r] = [];
|
|
@@ -555,14 +555,14 @@ var Ot = /*#__PURE__*/ f(St, [["render", Dt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
555
555
|
t[r].push(a);
|
|
556
556
|
});
|
|
557
557
|
}), t;
|
|
558
|
-
}),
|
|
558
|
+
}), se = (e, t) => {
|
|
559
559
|
let n = o.value[e]?.[t.field_name];
|
|
560
560
|
if (n instanceof Array) {
|
|
561
561
|
let [e] = n;
|
|
562
562
|
if (_(e)) return !0;
|
|
563
563
|
} else if (_(n)) return !0;
|
|
564
564
|
return !1;
|
|
565
|
-
},
|
|
565
|
+
}, D = (e, t) => {
|
|
566
566
|
let n = [], a = o.value[e]?.[t.field_name];
|
|
567
567
|
if (t.operator === "is_or_not_blank_or_null" || t.operator === "is_or_not_null") return i(a === "yes" ? "is_or_not_blank_or_null.yes" : "is_or_not_blank_or_null.no");
|
|
568
568
|
if (t.operator === "_eq") {
|
|
@@ -596,9 +596,9 @@ var Ot = /*#__PURE__*/ f(St, [["render", Dt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
596
596
|
else e = a;
|
|
597
597
|
return `${g(t.format, t.operator)} ${e}`;
|
|
598
598
|
}
|
|
599
|
-
},
|
|
599
|
+
}, O = () => {
|
|
600
600
|
t("onShowSearchRender");
|
|
601
|
-
},
|
|
601
|
+
}, k = (e) => e.operator_list_selected ? e.operator_list_selected : e.operator_list ? e.operator_list : [];
|
|
602
602
|
return X(() => o.value, () => {
|
|
603
603
|
t("onChangeValue", { model: o.value });
|
|
604
604
|
}, { deep: !0 }), X(() => e.default_search_condition_config_list, () => {
|
|
@@ -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", T);
|
|
616
616
|
}), Ve(() => {
|
|
617
|
-
e.eventBus && e.eventBus.off("filterChange",
|
|
617
|
+
e.eventBus && e.eventBus.off("filterChange", T);
|
|
618
618
|
}), {
|
|
619
619
|
props: e,
|
|
620
620
|
t: i,
|
|
@@ -633,18 +633,18 @@ 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:
|
|
637
|
-
handleMouseEnter:
|
|
638
|
-
handleMouseLeave:
|
|
639
|
-
handleDeleteFormItem:
|
|
640
|
-
handleDelSearch:
|
|
641
|
-
searchItemOptionsDict:
|
|
642
|
-
onChangeSearchItem:
|
|
643
|
-
transferValueFunc:
|
|
644
|
-
isShowSearchTag:
|
|
645
|
-
handleShowSearchRender:
|
|
636
|
+
deleteBtnDict: te,
|
|
637
|
+
handleMouseEnter: ne,
|
|
638
|
+
handleMouseLeave: re,
|
|
639
|
+
handleDeleteFormItem: ie,
|
|
640
|
+
handleDelSearch: ae,
|
|
641
|
+
searchItemOptionsDict: E,
|
|
642
|
+
onChangeSearchItem: oe,
|
|
643
|
+
transferValueFunc: D,
|
|
644
|
+
isShowSearchTag: se,
|
|
645
|
+
handleShowSearchRender: O,
|
|
646
646
|
options_eq: a,
|
|
647
|
-
get_operator_list_selected:
|
|
647
|
+
get_operator_list_selected: k,
|
|
648
648
|
is_or_not_blank_or_null_options: l
|
|
649
649
|
};
|
|
650
650
|
}
|
|
@@ -1430,7 +1430,7 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1430
1430
|
}), S = P(() => {
|
|
1431
1431
|
let e = g.value.filter((e) => !e.user_id && e.is_system).map((e) => e).sort((e, t) => e.sort == t.sort ? e.id - t.id : e.sort - t.sort), t = g.value.filter((e) => !e.user_id && !e.is_system).map((e) => e).sort((e, t) => e.sort == t.sort ? e.id - t.id : e.sort - t.sort);
|
|
1432
1432
|
return e.concat(t);
|
|
1433
|
-
}), ee = P(() => g.value.map((e) => e.name)),
|
|
1433
|
+
}), ee = P(() => g.value.map((e) => e.name)), ne = (t) => {
|
|
1434
1434
|
let n = [];
|
|
1435
1435
|
for (let r of t) {
|
|
1436
1436
|
let t = [];
|
|
@@ -1438,22 +1438,22 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1438
1438
|
t.length > 0 && n.push(t);
|
|
1439
1439
|
}
|
|
1440
1440
|
return n;
|
|
1441
|
-
},
|
|
1441
|
+
}, oe = (t) => {
|
|
1442
1442
|
let n = {}, r = {};
|
|
1443
1443
|
if (!t) return n;
|
|
1444
1444
|
if (e.searchConfigFields?.length) for (let t of e.searchConfigFields) r[t.name] = t;
|
|
1445
1445
|
for (let e of Object.keys(t)) r[e] && (n[e] = t[e]);
|
|
1446
1446
|
return n;
|
|
1447
|
-
},
|
|
1447
|
+
}, se = async ({ id: t, search_model: n, filter_map: r, sort_fields: i, group_condition: a, conditions: o, isShowGeneralFilter: s }) => new Promise((c) => {
|
|
1448
1448
|
!e.countData && !v?.countData && (console.error("无count接口"), c(null));
|
|
1449
1449
|
let l = {
|
|
1450
1450
|
org_id: f.id,
|
|
1451
|
-
...
|
|
1451
|
+
...oe(n || {}),
|
|
1452
1452
|
...r,
|
|
1453
1453
|
sort_fields: i
|
|
1454
1454
|
};
|
|
1455
|
-
s && (l.group_condition = a, l.conditions =
|
|
1456
|
-
let u = null, d =
|
|
1455
|
+
s && (l.group_condition = a, l.conditions = ne(o)), l.required_condition = ge();
|
|
1456
|
+
let u = null, d = E(e.app_flag, e.modalType, null, _, {
|
|
1457
1457
|
use_store: !0,
|
|
1458
1458
|
to_i18n: !0,
|
|
1459
1459
|
enable_btn: !1
|
|
@@ -1465,13 +1465,13 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1465
1465
|
}).catch((e) => {
|
|
1466
1466
|
console.log("error", e), Q.error(_("获取数据失败, 请刷新页面"));
|
|
1467
1467
|
});
|
|
1468
|
-
}),
|
|
1468
|
+
}), D = async (e) => {
|
|
1469
1469
|
for (let t of e) try {
|
|
1470
|
-
await
|
|
1470
|
+
await se(t);
|
|
1471
1471
|
} catch (e) {
|
|
1472
1472
|
console.log("error", e), Q.error(_("获取数据失败, 请刷新页面"));
|
|
1473
1473
|
}
|
|
1474
|
-
},
|
|
1474
|
+
}, O = async () => {
|
|
1475
1475
|
let t = await m({
|
|
1476
1476
|
org_id: f.id,
|
|
1477
1477
|
user_id: p,
|
|
@@ -1481,7 +1481,7 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1481
1481
|
sort_fields: ["sort", "create_time"],
|
|
1482
1482
|
is_cache: !1
|
|
1483
1483
|
}, "/view/get_view_settings_for_user");
|
|
1484
|
-
if (v =
|
|
1484
|
+
if (v = E(e.app_flag, e.modalType, null, _, {
|
|
1485
1485
|
use_store: !0,
|
|
1486
1486
|
to_i18n: !0,
|
|
1487
1487
|
enable_btn: !1
|
|
@@ -1509,15 +1509,15 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1509
1509
|
group_condition: r,
|
|
1510
1510
|
conditions: i
|
|
1511
1511
|
});
|
|
1512
|
-
}), o.length > 0 &&
|
|
1513
|
-
},
|
|
1512
|
+
}), o.length > 0 && D(o), k(null);
|
|
1513
|
+
}, k = (t) => {
|
|
1514
1514
|
let r = null;
|
|
1515
1515
|
if (t ? r = t : window.location.hash && (r = window.location.hash.substring(1)), r) {
|
|
1516
1516
|
let t = g.value.filter((e) => e.uid == r);
|
|
1517
1517
|
t && t.length > 0 ? n("change", null, {
|
|
1518
1518
|
...t[0],
|
|
1519
1519
|
...t[0].data
|
|
1520
|
-
}, !0, !0) :
|
|
1520
|
+
}, !0, !0) : te({
|
|
1521
1521
|
org_id: f.id,
|
|
1522
1522
|
conditions: [[
|
|
1523
1523
|
{
|
|
@@ -1577,7 +1577,7 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1577
1577
|
});
|
|
1578
1578
|
} else {
|
|
1579
1579
|
let t = "";
|
|
1580
|
-
if (c().get("customviewdatauser") && (t = c().get(Gt)?.[e.menu_flag]), t) window.location.hash = t,
|
|
1580
|
+
if (c().get("customviewdatauser") && (t = c().get(Gt)?.[e.menu_flag]), t) window.location.hash = t, k(t);
|
|
1581
1581
|
else {
|
|
1582
1582
|
let t = g.value.filter((e) => !e.user_id && e.is_default && !e.is_system);
|
|
1583
1583
|
if (t && t.length > 0) {
|
|
@@ -1614,8 +1614,8 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1614
1614
|
}, !0, !1)));
|
|
1615
1615
|
}
|
|
1616
1616
|
}
|
|
1617
|
-
},
|
|
1618
|
-
window.location.hash = e.uid,
|
|
1617
|
+
}, ce = G(["1", "2"]), le = (t) => e.currentViewObj && t && t.id === e.currentViewObj.id ? { style: { backgroundColor: "#ddf1ff" } } : { style: {} }, A = (e) => {
|
|
1618
|
+
window.location.hash = e.uid, k(e.uid), _e([e]);
|
|
1619
1619
|
}, ue = (e) => {
|
|
1620
1620
|
let t = [];
|
|
1621
1621
|
for (let n of e) {
|
|
@@ -1666,7 +1666,7 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1666
1666
|
org_id: f.id,
|
|
1667
1667
|
view_settings_id: i?.id
|
|
1668
1668
|
}).then(() => {
|
|
1669
|
-
|
|
1669
|
+
ie({
|
|
1670
1670
|
org_id: f.id,
|
|
1671
1671
|
view_settings_id: i?.id
|
|
1672
1672
|
}).then(() => {
|
|
@@ -1678,9 +1678,9 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1678
1678
|
...r,
|
|
1679
1679
|
...r.data
|
|
1680
1680
|
});
|
|
1681
|
-
}),
|
|
1681
|
+
}), O();
|
|
1682
1682
|
});
|
|
1683
|
-
}) :
|
|
1683
|
+
}) : ie({
|
|
1684
1684
|
org_id: f.id,
|
|
1685
1685
|
view_settings_id: i?.id
|
|
1686
1686
|
}).then(() => {
|
|
@@ -1692,7 +1692,7 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1692
1692
|
...r,
|
|
1693
1693
|
...r.data
|
|
1694
1694
|
});
|
|
1695
|
-
}),
|
|
1695
|
+
}), O();
|
|
1696
1696
|
});
|
|
1697
1697
|
});
|
|
1698
1698
|
} else C({
|
|
@@ -1705,7 +1705,7 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1705
1705
|
org_id: f.id,
|
|
1706
1706
|
view_settings_id: i?.id
|
|
1707
1707
|
}).then(() => {
|
|
1708
|
-
|
|
1708
|
+
ie({
|
|
1709
1709
|
org_id: f.id,
|
|
1710
1710
|
view_settings_id: i?.id
|
|
1711
1711
|
}).then(() => {
|
|
@@ -1717,9 +1717,9 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1717
1717
|
...r,
|
|
1718
1718
|
...r.data
|
|
1719
1719
|
});
|
|
1720
|
-
}),
|
|
1720
|
+
}), O();
|
|
1721
1721
|
});
|
|
1722
|
-
}) :
|
|
1722
|
+
}) : ie({
|
|
1723
1723
|
org_id: f.id,
|
|
1724
1724
|
view_settings_id: i?.id
|
|
1725
1725
|
}).then(() => {
|
|
@@ -1731,7 +1731,7 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1731
1731
|
...r,
|
|
1732
1732
|
...r.data
|
|
1733
1733
|
});
|
|
1734
|
-
}),
|
|
1734
|
+
}), O();
|
|
1735
1735
|
});
|
|
1736
1736
|
});
|
|
1737
1737
|
} else {
|
|
@@ -1762,7 +1762,7 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1762
1762
|
conditions: [],
|
|
1763
1763
|
group_condition: {},
|
|
1764
1764
|
group_record: {}
|
|
1765
|
-
},
|
|
1765
|
+
}, re({
|
|
1766
1766
|
org_id: f.id,
|
|
1767
1767
|
user_id: t.view_type == "personal" ? p : null,
|
|
1768
1768
|
name: t.name,
|
|
@@ -1775,7 +1775,7 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1775
1775
|
n("change", null, {
|
|
1776
1776
|
...e,
|
|
1777
1777
|
...e.data
|
|
1778
|
-
}, !0, !0), e.id && (g.value = g.value.concat([{ ...e }]),
|
|
1778
|
+
}, !0, !0), e.id && (g.value = g.value.concat([{ ...e }]), D([{
|
|
1779
1779
|
id: e.id,
|
|
1780
1780
|
search_model: i.search_model,
|
|
1781
1781
|
filter_map: i.filter_map,
|
|
@@ -1783,7 +1783,7 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1783
1783
|
group_condition: i.group_condition,
|
|
1784
1784
|
conditions: i.conditions,
|
|
1785
1785
|
isShowGeneralFilter: i.isShowGeneralFilter
|
|
1786
|
-
}]), window.location.hash = e.uid,
|
|
1786
|
+
}]), window.location.hash = e.uid, k(e.uid));
|
|
1787
1787
|
});
|
|
1788
1788
|
}
|
|
1789
1789
|
}, fe = (t, n) => {
|
|
@@ -1960,15 +1960,15 @@ 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 ? T({
|
|
1964
1964
|
org_id: f.id,
|
|
1965
1965
|
view_settings_ids: e
|
|
1966
1966
|
}).then(() => {
|
|
1967
|
-
Q.success(_("保存成功")),
|
|
1968
|
-
}) : (Q.success(_("保存成功")),
|
|
1967
|
+
Q.success(_("保存成功")), O();
|
|
1968
|
+
}) : (Q.success(_("保存成功")), O());
|
|
1969
1969
|
},
|
|
1970
1970
|
cancel: (e) => {
|
|
1971
|
-
e &&
|
|
1971
|
+
e && O();
|
|
1972
1972
|
}
|
|
1973
1973
|
}));
|
|
1974
1974
|
}, j = (e) => {
|
|
@@ -1985,11 +1985,11 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1985
1985
|
okText: _("确定"),
|
|
1986
1986
|
onOk() {
|
|
1987
1987
|
return new Promise((t) => {
|
|
1988
|
-
|
|
1988
|
+
ae({
|
|
1989
1989
|
org_id: f.id,
|
|
1990
1990
|
view_settings_id: e?.id
|
|
1991
1991
|
}).then(() => {
|
|
1992
|
-
g.value = g.value.filter((t) => t.id != e.id),
|
|
1992
|
+
g.value = g.value.filter((t) => t.id != e.id), k(null), Q.success(_("删除成功"));
|
|
1993
1993
|
}).finally(() => {
|
|
1994
1994
|
t(null);
|
|
1995
1995
|
});
|
|
@@ -1998,7 +1998,7 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
1998
1998
|
onCancel() {}
|
|
1999
1999
|
});
|
|
2000
2000
|
}, ge = () => {
|
|
2001
|
-
let t =
|
|
2001
|
+
let t = E(e.app_flag, e.modalType, null, _, {
|
|
2002
2002
|
use_store: !0,
|
|
2003
2003
|
to_i18n: !0,
|
|
2004
2004
|
enable_btn: !1
|
|
@@ -2020,7 +2020,7 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
2020
2020
|
conditions: a,
|
|
2021
2021
|
isShowGeneralFilter: e.data.isShowGeneralFilter
|
|
2022
2022
|
});
|
|
2023
|
-
}),
|
|
2023
|
+
}), D(t);
|
|
2024
2024
|
};
|
|
2025
2025
|
X(() => e.current_num, () => {
|
|
2026
2026
|
Xe.confirm({
|
|
@@ -2111,22 +2111,22 @@ var Wt = /*#__PURE__*/ f(Ht, [["render", Ut]]), Gt = "customviewdatauser", Kt =
|
|
|
2111
2111
|
_e(g.value);
|
|
2112
2112
|
});
|
|
2113
2113
|
let ve = (t) => {
|
|
2114
|
-
let n =
|
|
2114
|
+
let n = E(e.currentViewObj.app_flag, e.modalType, null, _, {
|
|
2115
2115
|
use_store: !0,
|
|
2116
2116
|
to_i18n: !0,
|
|
2117
2117
|
enable_btn: !1
|
|
2118
2118
|
});
|
|
2119
|
-
n.required_condition && n.required_condition.find((e) => e.key === t) &&
|
|
2119
|
+
n.required_condition && n.required_condition.find((e) => e.key === t) && O();
|
|
2120
2120
|
};
|
|
2121
2121
|
return Be(() => {
|
|
2122
|
-
|
|
2122
|
+
O(), u().on("change", ve);
|
|
2123
2123
|
}), Ve(() => {
|
|
2124
2124
|
u().off("change", ve);
|
|
2125
2125
|
}), Ie(() => {
|
|
2126
2126
|
_e(g.value);
|
|
2127
2127
|
}), {
|
|
2128
2128
|
props: e,
|
|
2129
|
-
viewKey:
|
|
2129
|
+
viewKey: ce,
|
|
2130
2130
|
customStyle: "background: #ffffff;border-radius: 4px;margin-bottom: 2px;border: 0;overflow: hidden;",
|
|
2131
2131
|
columns: qt,
|
|
2132
2132
|
personData: y,
|
|
@@ -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), T = G(NaN), te = 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,
|
|
@@ -2739,12 +2739,12 @@ var Yn = /* @__PURE__ */ V({
|
|
|
2739
2739
|
return n.x ?? 0;
|
|
2740
2740
|
}
|
|
2741
2741
|
}, M = () => {
|
|
2742
|
-
if (de.value)
|
|
2742
|
+
if (de.value) D.value = r.x, k.value = r.w;
|
|
2743
2743
|
else {
|
|
2744
2744
|
let e = A(r.x), t = A(r.w);
|
|
2745
|
-
e + t > u.value ? (
|
|
2745
|
+
e + t > u.value ? (D.value = 0, k.value = t > u.value ? u.value : t) : (D.value = r.x, k.value = r.w);
|
|
2746
2746
|
}
|
|
2747
|
-
let e = ve(ye(String(r.i), "x"), ye(String(r.i), "y"),
|
|
2747
|
+
let e = ve(ye(String(r.i), "x"), ye(String(r.i), "y"), k.value, ce.value);
|
|
2748
2748
|
y.value && (e.top = b.value.top, typeof e.top == "number" && (e.top += "px"), j.value ? (e.right = b.value.left, typeof e.right == "number" && (e.right += "px")) : (e.left = b.value.left, typeof e.left == "number" && (e.left += "px"))), x.value && (e.width = S.value.width, typeof e.width == "number" && (e.width += "px"), e.height = S.value.height, typeof e.height == "number" && (e.height += "px"));
|
|
2749
2749
|
let t = null;
|
|
2750
2750
|
if (v.value && (y.value || 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
|
+
te.value = t;
|
|
2772
2772
|
}, be = () => {
|
|
2773
2773
|
let e = {};
|
|
2774
2774
|
for (let t of ["width", "height"]) {
|
|
2775
|
-
let n =
|
|
2775
|
+
let n = te.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$/);
|
|
@@ -2783,26 +2783,26 @@ var Yn = /* @__PURE__ */ V({
|
|
|
2783
2783
|
}, xe = (e, t) => {
|
|
2784
2784
|
if (de.value) {
|
|
2785
2785
|
let n = t / d.value * 100, r = e / f.value * 100;
|
|
2786
|
-
return n = Math.max(Math.min(n, 100 - A(
|
|
2786
|
+
return n = Math.max(Math.min(n, 100 - A(k.value)), 0), r = Math.max(Math.min(r, 100 - A(ce.value)), 0), {
|
|
2787
2787
|
x: n,
|
|
2788
2788
|
y: r
|
|
2789
2789
|
};
|
|
2790
2790
|
}
|
|
2791
2791
|
let n = _e(), r = Math.round((t - m.value[0]) / (n + m.value[0])), i = Math.round((e - m.value[1]) / (p.value + m.value[1]));
|
|
2792
|
-
return r = Math.max(Math.min(r, u.value - A(
|
|
2792
|
+
return r = Math.max(Math.min(r, u.value - A(k.value)), 0), i = Math.max(Math.min(i, h.value - A(ce.value)), 0), {
|
|
2793
2793
|
x: r,
|
|
2794
2794
|
y: i
|
|
2795
2795
|
};
|
|
2796
2796
|
}, Se = (e, t, n = !1) => {
|
|
2797
2797
|
if (de.value) {
|
|
2798
2798
|
let n = t / d.value * 100, r = e / f.value * 100;
|
|
2799
|
-
return n = Math.max(Math.min(n, 100 - A(
|
|
2799
|
+
return n = Math.max(Math.min(n, 100 - A(D.value)), 0), r = Math.max(Math.min(r, 100 - A(O.value)), 0), {
|
|
2800
2800
|
w: n,
|
|
2801
2801
|
h: r
|
|
2802
2802
|
};
|
|
2803
2803
|
}
|
|
2804
2804
|
let r = _e(), i = Math.round((t + m.value[0]) / (r + m.value[0])), a = 0;
|
|
2805
|
-
return a = n ? Math.ceil((e + m.value[1]) / (p.value + m.value[1])) : Math.round((e + m.value[1]) / (p.value + m.value[1])), i = Math.max(Math.min(i, u.value - A(
|
|
2805
|
+
return a = n ? Math.ceil((e + m.value[1]) / (p.value + m.value[1])) : Math.round((e + m.value[1]) / (p.value + m.value[1])), i = Math.max(Math.min(i, u.value - A(D.value)), 0), a = Math.max(Math.min(a, h.value - A(O.value)), 0), {
|
|
2806
2806
|
w: i,
|
|
2807
2807
|
h: a
|
|
2808
2808
|
};
|
|
@@ -2816,7 +2816,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
2816
2816
|
};
|
|
2817
2817
|
switch (e.type) {
|
|
2818
2818
|
case "dragstart": {
|
|
2819
|
-
|
|
2819
|
+
E.value = D.value, se.value = O.value;
|
|
2820
2820
|
let t = e.target.offsetParent.getBoundingClientRect(), n = e.target.getBoundingClientRect();
|
|
2821
2821
|
j.value ? s.left = (n.right - t.right) * -1 : s.left = n.left - t.left, s.top = n.top - t.top, b.value = s, y.value = !0;
|
|
2822
2822
|
break;
|
|
@@ -2834,20 +2834,20 @@ var Yn = /* @__PURE__ */ V({
|
|
|
2834
2834
|
}
|
|
2835
2835
|
}
|
|
2836
2836
|
let c = xe(s.top, s.left);
|
|
2837
|
-
ee.value = n, C.value = o, (A(
|
|
2837
|
+
ee.value = n, C.value = o, (A(D.value) !== c.x || A(O.value) !== c.y) && i("move", r.i, c.x, c.y), e.type === "dragend" && (A(E.value) !== c.x || A(se.value) !== c.y) && i("moved", r.i, c.x, c.y), de.value ? a.emit("dragEvent", {
|
|
2838
2838
|
eventType: e.type,
|
|
2839
2839
|
i: r.i,
|
|
2840
2840
|
x: c.x,
|
|
2841
2841
|
y: c.y,
|
|
2842
|
-
h:
|
|
2843
|
-
w:
|
|
2842
|
+
h: ce.value,
|
|
2843
|
+
w: k.value
|
|
2844
2844
|
}) : a.emit("dragEvent", {
|
|
2845
2845
|
eventType: e.type,
|
|
2846
2846
|
i: r.i,
|
|
2847
2847
|
x: c.x,
|
|
2848
2848
|
y: c.y,
|
|
2849
|
-
h: A(
|
|
2850
|
-
w: A(
|
|
2849
|
+
h: A(ce.value),
|
|
2850
|
+
w: A(k.value)
|
|
2851
2851
|
});
|
|
2852
2852
|
}, we = (e) => {
|
|
2853
2853
|
if (r.static) return;
|
|
@@ -2859,29 +2859,29 @@ var Yn = /* @__PURE__ */ V({
|
|
|
2859
2859
|
}, c = null;
|
|
2860
2860
|
switch (e.type) {
|
|
2861
2861
|
case "resizestart": {
|
|
2862
|
-
|
|
2862
|
+
ae.value = k.value, oe.value = ce.value, c = ve(D.value, O.value, k.value, ce.value);
|
|
2863
2863
|
let e = (e, t) => typeof e == "number" ? e : typeof e == "string" ? e.endsWith("%") ? parseFloat(e) / 100 * t : e.endsWith("px") ? parseFloat(e) : parseFloat(e) || 0 : 0;
|
|
2864
2864
|
s.width = e(c.width, d.value), s.height = e(c.height, f.value), S.value = s, x.value = !0;
|
|
2865
2865
|
break;
|
|
2866
2866
|
}
|
|
2867
2867
|
case "resizemove": {
|
|
2868
|
-
let e = Jn(w.value,
|
|
2868
|
+
let e = Jn(w.value, T.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
|
}
|
|
2872
2872
|
case "resizeend": {
|
|
2873
|
-
c = ve(
|
|
2873
|
+
c = ve(D.value, O.value, k.value, ce.value);
|
|
2874
2874
|
let e = (e, t) => typeof e == "number" ? e : typeof e == "string" ? e.endsWith("%") ? parseFloat(e) / 100 * t : e.endsWith("px") ? parseFloat(e) : parseFloat(e) || 0 : 0;
|
|
2875
2875
|
s.width = e(c.width, d.value), s.height = e(c.height, f.value), S.value = null, x.value = !1;
|
|
2876
2876
|
break;
|
|
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, T.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
|
-
x: A(
|
|
2884
|
-
y: A(
|
|
2883
|
+
x: A(D.value),
|
|
2884
|
+
y: A(O.value),
|
|
2885
2885
|
h: l.h,
|
|
2886
2886
|
w: l.w
|
|
2887
2887
|
});
|
|
@@ -2891,7 +2891,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
2891
2891
|
ignoreFrom: r.dragIgnoreFrom,
|
|
2892
2892
|
allowFrom: r.dragAllowFrom
|
|
2893
2893
|
};
|
|
2894
|
-
le.value.draggable(e),
|
|
2894
|
+
le.value.draggable(e), re.value || (re.value = !0, le.value.on("dragstart dragmove dragend", (e) => {
|
|
2895
2895
|
Ce(e);
|
|
2896
2896
|
}));
|
|
2897
2897
|
} else le.value.draggable({ enabled: !1 });
|
|
@@ -2929,7 +2929,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
2929
2929
|
max: e
|
|
2930
2930
|
}
|
|
2931
2931
|
};
|
|
2932
|
-
le.value.resizable(n),
|
|
2932
|
+
le.value.resizable(n), ie.value || (ie.value = !0, le.value.on("resizestart resizemove resizeend", (e) => {
|
|
2933
2933
|
we(e);
|
|
2934
2934
|
}));
|
|
2935
2935
|
} else le.value.resizable({ enabled: !1 });
|
|
@@ -2938,13 +2938,13 @@ var Yn = /* @__PURE__ */ V({
|
|
|
2938
2938
|
}, De = () => {
|
|
2939
2939
|
M();
|
|
2940
2940
|
}, F = () => {
|
|
2941
|
-
if (
|
|
2941
|
+
if (ae.value = k.value, oe.value = ce.value, c.value && c.value.firstElementChild) {
|
|
2942
2942
|
let e = c.value.firstElementChild.getBoundingClientRect(), t = Se(e.height, e.width, !0);
|
|
2943
|
-
de.value || (t.w < r.minW && (t.w = r.minW), t.w > r.maxW && (t.w = r.maxW), t.h < r.minH && (t.h = r.minH), t.h > r.maxH && (t.h = r.maxH), t.h < 1 && (t.h = 1), t.w < 1 && (t.w = 1)), (A(
|
|
2943
|
+
de.value || (t.w < r.minW && (t.w = r.minW), t.w > r.maxW && (t.w = r.maxW), t.h < r.minH && (t.h = r.minH), t.h > r.maxH && (t.h = r.maxH), t.h < 1 && (t.h = 1), t.w < 1 && (t.w = 1)), (A(k.value) !== t.w || A(ce.value) !== t.h) && i("resize", r.i, t.h, t.w, e.height, e.width), (A(ae.value) !== t.w || A(oe.value) !== t.h) && (i("resized", r.i, t.h, t.w, e.height, e.width), a.emit("resizeEvent", {
|
|
2944
2944
|
eventType: "resizeend",
|
|
2945
2945
|
i: r.i,
|
|
2946
|
-
x: A(
|
|
2947
|
-
y: A(
|
|
2946
|
+
x: A(D.value),
|
|
2947
|
+
y: A(O.value),
|
|
2948
2948
|
h: t.h,
|
|
2949
2949
|
w: t.w
|
|
2950
2950
|
}));
|
|
@@ -2962,13 +2962,13 @@ var Yn = /* @__PURE__ */ V({
|
|
|
2962
2962
|
}, je = (e) => {
|
|
2963
2963
|
h.value = e;
|
|
2964
2964
|
}, H = () => {
|
|
2965
|
-
|
|
2965
|
+
ne.value = vn() === "rtl", De();
|
|
2966
2966
|
}, Me = (e) => {
|
|
2967
2967
|
u.value = parseInt(e, 10);
|
|
2968
2968
|
};
|
|
2969
2969
|
return Be(() => {
|
|
2970
2970
|
let e = Oe()?.parent?.proxy;
|
|
2971
|
-
u.value = e.colNum, p.value = e.rowHeight, d.value = e.width !== null && e.width !== 0 ? e.width : 100, m.value = e.margin === void 0 ? [10, 10] : e.margin, h.value = e.maxRows, c.value && c.value.parentElement && (f.value = c.value.parentElement.offsetHeight || 100, d.value === 100 && (d.value = c.value.parentElement.offsetWidth || 100)), r.isDraggable === null ? g.value = e.isDraggable : g.value = r.isDraggable, r.isResizable === null ? _.value = e.isResizable : _.value = r.isResizable, v.value = e.useCssTransforms, a.on("updateWidth", R), a.on("compact", z), a.on("setDraggable", B), a.on("setResizable", V), a.on("setRowHeight", ke), a.on("setMaxRows", je), a.on("directionchange", H), a.on("setColNum", Me),
|
|
2971
|
+
u.value = e.colNum, p.value = e.rowHeight, d.value = e.width !== null && e.width !== 0 ? e.width : 100, m.value = e.margin === void 0 ? [10, 10] : e.margin, h.value = e.maxRows, c.value && c.value.parentElement && (f.value = c.value.parentElement.offsetHeight || 100, d.value === 100 && (d.value = c.value.parentElement.offsetWidth || 100)), r.isDraggable === null ? g.value = e.isDraggable : g.value = r.isDraggable, r.isResizable === null ? _.value = e.isResizable : _.value = r.isResizable, v.value = e.useCssTransforms, a.on("updateWidth", R), a.on("compact", z), a.on("setDraggable", B), a.on("setResizable", V), a.on("setRowHeight", ke), a.on("setMaxRows", je), a.on("directionchange", H), a.on("setColNum", Me), ne.value = vn() === "rtl", M();
|
|
2972
2972
|
}), Re(() => {
|
|
2973
2973
|
a.off("updateWidth", R), a.off("compact", z), a.off("setDraggable", B), a.off("setResizable", V), a.off("setRowHeight", ke), a.off("setMaxRows", je), a.off("directionchange", H), a.off("setColNum", Me), le.value && le.value.unset();
|
|
2974
2974
|
}), X(() => r.isDraggable, () => {
|
|
@@ -2990,13 +2990,13 @@ var Yn = /* @__PURE__ */ V({
|
|
|
2990
2990
|
}), X(f, () => {
|
|
2991
2991
|
N(), M(), be();
|
|
2992
2992
|
}), X(() => r.x, (e) => {
|
|
2993
|
-
E.value = e, M();
|
|
2994
|
-
}), X(() => r.y, (e) => {
|
|
2995
2993
|
D.value = e, M();
|
|
2994
|
+
}), X(() => r.y, (e) => {
|
|
2995
|
+
O.value = e, M();
|
|
2996
2996
|
}), X(() => r.h, (e) => {
|
|
2997
|
-
|
|
2997
|
+
ce.value = e, M();
|
|
2998
2998
|
}), X(() => r.w, (e) => {
|
|
2999
|
-
|
|
2999
|
+
k.value = e, M();
|
|
3000
3000
|
}), X(j, () => {
|
|
3001
3001
|
N(), M();
|
|
3002
3002
|
}), X(() => r.minH, () => {
|
|
@@ -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(te.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
|
+
}, T = () => {
|
|
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,15 +3171,15 @@ 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
|
+
}, te = ({ 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);
|
|
3178
3178
|
};
|
|
3179
3179
|
return Le(() => {
|
|
3180
3180
|
i("layout-before-mount", r.layout);
|
|
3181
3181
|
}), Be(() => {
|
|
3182
|
-
a.on("resizeEvent",
|
|
3182
|
+
a.on("resizeEvent", te), 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", te), 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
|
+
T();
|
|
3204
3204
|
}), X(() => r.layout, () => {
|
|
3205
|
-
|
|
3205
|
+
T();
|
|
3206
3206
|
}), X(() => r.colNum, (e) => {
|
|
3207
3207
|
a.emit("setColNum", e);
|
|
3208
3208
|
}), X(() => r.rowHeight, () => {
|
|
@@ -3392,7 +3392,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
3392
3392
|
await w({
|
|
3393
3393
|
org_id: r.id,
|
|
3394
3394
|
view_settings_id: e.id
|
|
3395
|
-
}), await
|
|
3395
|
+
}), await ie({
|
|
3396
3396
|
org_id: r.id,
|
|
3397
3397
|
view_settings_id: e.id
|
|
3398
3398
|
}), Q.success(t("设置默认成功")), n.fetchViews();
|
|
@@ -3458,7 +3458,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
3458
3458
|
content: t("视图删除后不可恢复,是否确认删除?"),
|
|
3459
3459
|
icon: B(rt),
|
|
3460
3460
|
onOk: async () => {
|
|
3461
|
-
await
|
|
3461
|
+
await ae({
|
|
3462
3462
|
org_id: r.id,
|
|
3463
3463
|
view_settings_id: e.id
|
|
3464
3464
|
}), Q.success(t("删除成功")), n.fetchViews();
|
|
@@ -3608,7 +3608,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
3608
3608
|
}]
|
|
3609
3609
|
},
|
|
3610
3610
|
ok: async (n) => {
|
|
3611
|
-
let i = e || n.view_type || "personal", s = await
|
|
3611
|
+
let i = e || n.view_type || "personal", s = await re({
|
|
3612
3612
|
org_id: a.id,
|
|
3613
3613
|
user_id: i === "personal" ? o : null,
|
|
3614
3614
|
name: n.name,
|
|
@@ -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 ? T({
|
|
3654
3654
|
org_id: a.id,
|
|
3655
3655
|
view_settings_ids: e
|
|
3656
3656
|
}).then(() => {
|
|
@@ -4029,7 +4029,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4029
4029
|
let d = (0, Cr.cloneDeep)(u), f = Dr[o] || Dr[e];
|
|
4030
4030
|
f && jr(d, Er((0, Cr.cloneDeep)(f(r, { model_app: wr })))), Nr(d);
|
|
4031
4031
|
let p = d;
|
|
4032
|
-
return a && s.VITE_APP_ENABLE_ZH_EN && (p =
|
|
4032
|
+
return a && s.VITE_APP_ENABLE_ZH_EN && (p = oe(d, r, e)), p;
|
|
4033
4033
|
}, Ir = { class: "table-wrapper" }, Lr = { class: "filter-message" }, Rr = { key: 0 }, zr = { key: 0 }, Br = { key: 0 }, Vr = "写操作,执行前应先与用户确认意图", Hr = "no-view", Ur = /*#__PURE__*/ f(/* @__PURE__ */ V({
|
|
4034
4034
|
__name: "rightTable",
|
|
4035
4035
|
props: /*@__PURE__*/ H({
|
|
@@ -4045,19 +4045,19 @@ 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), T = P(() => s.tableMode === "pivot" ? g.value : s.tableMode === "pivot_charts" ? _.value : p.value), te = 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 = T.value?.currentView?.uid || "";
|
|
4056
4056
|
window.location.hash = `${t}${n}`;
|
|
4057
4057
|
});
|
|
4058
|
-
let
|
|
4059
|
-
|
|
4060
|
-
},
|
|
4058
|
+
let oe = () => {
|
|
4059
|
+
te.value = !te.value;
|
|
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({
|
|
4063
4063
|
user_id: l.userid,
|
|
@@ -4152,7 +4152,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4152
4152
|
label: "更新视图配置",
|
|
4153
4153
|
description: "覆盖更新某个已有视图的完整配置数据。宿主会先校验格式,再弹窗请用户确认。",
|
|
4154
4154
|
promptGuidelines: ["uid 或 name 至少提供一个(uid 优先)", `覆盖不可撤销。${Vr}`],
|
|
4155
|
-
parameters:
|
|
4155
|
+
parameters: O,
|
|
4156
4156
|
timeoutMs: 6e4,
|
|
4157
4157
|
write: !0,
|
|
4158
4158
|
execute: et
|
|
@@ -4257,7 +4257,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4257
4257
|
}
|
|
4258
4258
|
return null;
|
|
4259
4259
|
}, Re = async (e, t) => {
|
|
4260
|
-
let n =
|
|
4260
|
+
let n = ce(t, e), r = he(e).value;
|
|
4261
4261
|
if (e !== s.tableMode && (c("changeMode", e), r = await Le(e)), !r) return H("目标表格实例未就绪,请稍后重试");
|
|
4262
4262
|
r.currentView = {
|
|
4263
4263
|
id: Hr,
|
|
@@ -4374,9 +4374,9 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4374
4374
|
});
|
|
4375
4375
|
if (!u.valid) return H(u.error);
|
|
4376
4376
|
if (c === "temporary") return Re(n, i);
|
|
4377
|
-
let d = e?.visibility === "public" ? "public" : "personal", f =
|
|
4377
|
+
let d = e?.visibility === "public" ? "public" : "personal", f = ce(i, n), p = t(), m;
|
|
4378
4378
|
try {
|
|
4379
|
-
m = await
|
|
4379
|
+
m = await re({
|
|
4380
4380
|
org_id: l.currentOrg?.id,
|
|
4381
4381
|
user_id: a || d === "public" ? null : l.userid,
|
|
4382
4382
|
name: String(r).trim(),
|
|
@@ -4452,7 +4452,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4452
4452
|
let i = await W(t, n, r);
|
|
4453
4453
|
if (i.error) return H(i.error);
|
|
4454
4454
|
try {
|
|
4455
|
-
await
|
|
4455
|
+
await ae({
|
|
4456
4456
|
org_id: l.currentOrg?.id,
|
|
4457
4457
|
view_settings_id: i.view.id
|
|
4458
4458
|
});
|
|
@@ -4480,7 +4480,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4480
4480
|
await w({
|
|
4481
4481
|
org_id: l.currentOrg?.id,
|
|
4482
4482
|
view_settings_id: i.view.id
|
|
4483
|
-
}), await
|
|
4483
|
+
}), await ie({
|
|
4484
4484
|
org_id: l.currentOrg?.id,
|
|
4485
4485
|
view_settings_id: i.view.id
|
|
4486
4486
|
});
|
|
@@ -4513,7 +4513,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4513
4513
|
if (!we(t)) return H("view_type 必填: normal | pivot | pivot_charts");
|
|
4514
4514
|
let o = await W(t, i, a);
|
|
4515
4515
|
if (o.error) return H(o.error);
|
|
4516
|
-
let c =
|
|
4516
|
+
let c = D(t, n, {
|
|
4517
4517
|
columns: s.pageConfig.baseColumns || [],
|
|
4518
4518
|
search_config: st()
|
|
4519
4519
|
});
|
|
@@ -4523,7 +4523,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4523
4523
|
ok: !1,
|
|
4524
4524
|
error: "用户取消了更新视图"
|
|
4525
4525
|
};
|
|
4526
|
-
let u =
|
|
4526
|
+
let u = ce(n, t);
|
|
4527
4527
|
try {
|
|
4528
4528
|
await C({
|
|
4529
4529
|
org_id: l.currentOrg?.id,
|
|
@@ -4609,7 +4609,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4609
4609
|
validColumnKeys: f,
|
|
4610
4610
|
validSearchFieldNames: st().map((e) => e.field_name).filter(Boolean),
|
|
4611
4611
|
pruneInvalid: e?.prune_invalid_fields !== !1
|
|
4612
|
-
}), v =
|
|
4612
|
+
}), v = ce(_.viewData, n), y = D(n, v, {
|
|
4613
4613
|
columns: d,
|
|
4614
4614
|
search_config: st()
|
|
4615
4615
|
}, { allowEmptyColumns: !0 });
|
|
@@ -4618,7 +4618,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4618
4618
|
n === "normal" && tt(v.columns) && (v.columns = be(d, v.columns));
|
|
4619
4619
|
let b = {
|
|
4620
4620
|
changed_keys: ge(h, v),
|
|
4621
|
-
...
|
|
4621
|
+
...k(v, d, { changedColumnKeys: Object.keys(o.columns || {}) }),
|
|
4622
4622
|
column_order_stamped: !0,
|
|
4623
4623
|
notes: _.notes,
|
|
4624
4624
|
pruned_fields: _.prunedFields,
|
|
@@ -4694,7 +4694,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4694
4694
|
}
|
|
4695
4695
|
let x = e?.visibility === "public" ? "public" : "personal", S = String(e?.name).trim(), ee = t(), w;
|
|
4696
4696
|
try {
|
|
4697
|
-
w = await
|
|
4697
|
+
w = await re({
|
|
4698
4698
|
org_id: l.currentOrg?.id,
|
|
4699
4699
|
user_id: e?.is_system || x === "public" ? null : l.userid,
|
|
4700
4700
|
name: S,
|
|
@@ -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 T = he(n).value;
|
|
4711
|
+
if (T?.fetchViews) try {
|
|
4712
|
+
await T.fetchViews();
|
|
4713
4713
|
} catch {}
|
|
4714
|
-
return e?.activate !== !1 && await V(xe(
|
|
4714
|
+
return e?.activate !== !1 && await V(xe(T?.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: T,
|
|
4886
4886
|
getPageMeta: Fe,
|
|
4887
4887
|
fetchAllModeViews: De,
|
|
4888
4888
|
activateView: V
|
|
@@ -4903,16 +4903,16 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4903
4903
|
_: 1
|
|
4904
4904
|
})])]), t[1] ||= R("div", null, " 当前数据已通过透视表定位,此功能为临时过滤,不会被视图记录。关闭可恢复原始数据。 ", -1)]),
|
|
4905
4905
|
_: 1
|
|
4906
|
-
})) : I("", !0), B(
|
|
4906
|
+
})) : I("", !0), B(ne, {
|
|
4907
4907
|
config: i.value,
|
|
4908
4908
|
ref_key: "tableProRef",
|
|
4909
4909
|
ref: p,
|
|
4910
4910
|
eventBus: e.eventBus
|
|
4911
4911
|
}, {
|
|
4912
|
-
header_bar_before_title: Z(() => [
|
|
4912
|
+
header_bar_before_title: Z(() => [E.value ? (U(), L("div", Rr, [R("div", {
|
|
4913
4913
|
class: "toggle-button",
|
|
4914
|
-
onClick:
|
|
4915
|
-
}, [
|
|
4914
|
+
onClick: oe
|
|
4915
|
+
}, [te.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,
|
|
@@ -4923,22 +4923,22 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4923
4923
|
onFilterForIdKeyStart: ut,
|
|
4924
4924
|
onFilterForIdKey: dt
|
|
4925
4925
|
}, {
|
|
4926
|
-
header_bar_before_title: Z(() => [
|
|
4926
|
+
header_bar_before_title: Z(() => [E.value ? (U(), L("div", zr, [R("div", {
|
|
4927
4927
|
class: "toggle-button",
|
|
4928
|
-
onClick:
|
|
4929
|
-
}, [
|
|
4928
|
+
onClick: oe
|
|
4929
|
+
}, [te.value ? (U(), F(Y(at), { key: 0 })) : (U(), F(Y(ot), { key: 1 }))])])) : I("", !0)]),
|
|
4930
4930
|
_: 1
|
|
4931
|
-
}, 8, ["config", "eventBus"])) : o.value && e.tableMode === "pivot_charts" ? (U(), F(
|
|
4931
|
+
}, 8, ["config", "eventBus"])) : o.value && e.tableMode === "pivot_charts" ? (U(), F(se, {
|
|
4932
4932
|
key: 2,
|
|
4933
4933
|
config: o.value,
|
|
4934
4934
|
ref_key: "pivotChartsRef",
|
|
4935
4935
|
ref: _,
|
|
4936
4936
|
eventBus: e.eventBus
|
|
4937
4937
|
}, {
|
|
4938
|
-
header_bar_before_title: Z(() => [
|
|
4938
|
+
header_bar_before_title: Z(() => [E.value ? (U(), L("div", Br, [R("div", {
|
|
4939
4939
|
class: "toggle-button",
|
|
4940
|
-
onClick:
|
|
4941
|
-
}, [
|
|
4940
|
+
onClick: oe
|
|
4941
|
+
}, [te.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), T = P(() => !!u.value?.isView && ["top_tag", "top_tag_flat"].includes(u.value?.view_display_type)), te = [
|
|
4977
4977
|
{
|
|
4978
4978
|
value: "normal",
|
|
4979
4979
|
label: "标准"
|
|
@@ -4986,41 +4986,41 @@ var Yn = /* @__PURE__ */ V({
|
|
|
4986
4986
|
value: "pivot_charts",
|
|
4987
4987
|
label: "透视图"
|
|
4988
4988
|
}
|
|
4989
|
-
],
|
|
4989
|
+
], ne = P(() => {
|
|
4990
4990
|
let e = u.value?.enable_view_types || [];
|
|
4991
|
-
return
|
|
4992
|
-
}),
|
|
4991
|
+
return te.filter((t) => e.includes(t.value));
|
|
4992
|
+
}), re = P(() => s.value === "pivot" ? "pivot:" : s.value === "pivot_charts" ? "pivotcharts:" : "");
|
|
4993
4993
|
He("tableProStateProxy", C);
|
|
4994
|
-
let
|
|
4994
|
+
let ie = async () => {
|
|
4995
4995
|
u.value = await Fr(x.modalType, c.currentOrg.id, f, { to_i18n: !0 }), u.value?.isView ? u.value?.default_hide_view ? t.value = !1 : t.value = !0 : t.value = !1, u.value?.required_condition && b.set_required_condition(x.modalType, u.value.required_condition);
|
|
4996
4996
|
let e = window.location.hash.substring(1), n;
|
|
4997
4997
|
e && (n = e.startsWith("pivotcharts:") ? "pivot_charts" : e.startsWith("pivot:") ? "pivot" : "normal"), u.value?.enable_view_types?.length ? (n = n || u.value?.default_view_type || "normal", u.value?.enable_view_types?.includes(n) || (n = u.value?.enable_view_types[0])) : n = void 0, s.value = n;
|
|
4998
|
+
}, ae = () => {
|
|
4999
|
+
ie(), C.value?.init();
|
|
4998
5000
|
}, oe = () => {
|
|
4999
|
-
ae(), C.value?.init();
|
|
5000
|
-
}, se = () => {
|
|
5001
5001
|
C.value?.refresh();
|
|
5002
|
-
},
|
|
5002
|
+
}, E = ({ key: e, cmpObj: n }) => {
|
|
5003
5003
|
let r = u?.value?.detailConfigs?.[e];
|
|
5004
5004
|
r ? (_.component = r.component, _.width = r.width || 500, _.title = r.title || "详情", _.cmpObj = n, _.extra = r.extra ?? null, _.open || (_.open = !0, _.lastLeftOpen = t.value, _.lastMenuCollapsed = g.value, t.value = !1, g.value = !0)) : console.warn(`detailConfigItem not found, key: ${e}`);
|
|
5005
|
-
},
|
|
5005
|
+
}, se = () => {
|
|
5006
5006
|
a.emit("local_refresh");
|
|
5007
5007
|
};
|
|
5008
5008
|
return Be(async () => {
|
|
5009
|
-
l()?.on("refresh",
|
|
5009
|
+
l()?.on("refresh", oe), l()?.on("reset_and_reload", ae), l()?.on("local_refresh", se), a.on("show_detail", E), l()?.on("show_detail", E), await ie(), n.value = !0, Ne(() => {
|
|
5010
5010
|
v();
|
|
5011
5011
|
});
|
|
5012
5012
|
}), Ve(() => {
|
|
5013
|
-
l()?.off("refresh",
|
|
5013
|
+
l()?.off("refresh", oe), l()?.off("reset_and_reload", ae), l()?.off("local_refresh", se), a.off("show_detail", E), l()?.off("show_detail", E);
|
|
5014
5014
|
}), Ie(() => {
|
|
5015
|
-
u.value?.required_condition && b.set_required_condition(x.modalType, u.value.required_condition), l()?.off("refresh",
|
|
5015
|
+
u.value?.required_condition && b.set_required_condition(x.modalType, u.value.required_condition), l()?.off("refresh", oe), l()?.off("reset_and_reload", ae), l()?.off("local_refresh", se), a.off("show_detail", E), l()?.off("show_detail", E), l()?.on("refresh", oe), l()?.on("reset_and_reload", ae), l()?.on("local_refresh", se), a.on("show_detail", E), l()?.on("show_detail", E);
|
|
5016
5016
|
}), ze(() => {
|
|
5017
|
-
l()?.off("refresh",
|
|
5017
|
+
l()?.off("refresh", oe), l()?.off("reset_and_reload", ae), l()?.off("local_refresh", se), a.off("show_detail", E), l()?.off("show_detail", E);
|
|
5018
5018
|
}), X(() => _.open, (e, n) => {
|
|
5019
5019
|
e != n && !e && (t.value = _.lastLeftOpen, g.value = _.lastMenuCollapsed);
|
|
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, [T.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,
|
|
@@ -5028,7 +5028,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5028
5028
|
"button-style": "solid",
|
|
5029
5029
|
class: "view-type-group"
|
|
5030
5030
|
}, {
|
|
5031
|
-
default: Z(() => [(U(!0), L(N, null, K(
|
|
5031
|
+
default: Z(() => [(U(!0), L(N, null, K(ne.value, (t) => (U(), F(o, {
|
|
5032
5032
|
key: t.value,
|
|
5033
5033
|
value: t.value
|
|
5034
5034
|
}, {
|
|
@@ -5045,7 +5045,7 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5045
5045
|
right_table_ref: r.value,
|
|
5046
5046
|
view_key: `table_pro_${C.value?.config?.key}`,
|
|
5047
5047
|
view_flag_name: C.value?.config?.title,
|
|
5048
|
-
hashPrefix:
|
|
5048
|
+
hashPrefix: re.value,
|
|
5049
5049
|
onSwitch_mode: i[1] ||= (e) => s.value = e
|
|
5050
5050
|
}, null, 8, [
|
|
5051
5051
|
"tableProState",
|
|
@@ -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 && !T.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,
|
|
@@ -5132,19 +5132,22 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5132
5132
|
])) : I("", !0)], 64);
|
|
5133
5133
|
};
|
|
5134
5134
|
}
|
|
5135
|
-
}), [["__scopeId", "data-v-896f8d6e"]]), Xr = { class: "ai-agent-files" }, Zr = { class: "files-tree-panel" }, Qr = { class: "tree-node-title" },
|
|
5135
|
+
}), [["__scopeId", "data-v-896f8d6e"]]), Xr = { class: "ai-agent-files" }, Zr = { class: "files-tree-panel" }, Qr = { class: "tree-toolbar" }, $r = { class: "tree-node-title" }, ei = { class: "node-icon" }, ti = ["title"], ni = {
|
|
5136
5136
|
key: 0,
|
|
5137
5137
|
class: "node-badge"
|
|
5138
|
-
},
|
|
5138
|
+
}, ri = {
|
|
5139
5139
|
key: 1,
|
|
5140
5140
|
class: "node-size"
|
|
5141
|
-
},
|
|
5141
|
+
}, ii = ["onClick"], ai = { class: "files-preview-panel" }, oi = { class: "preview-header" }, si = ["title"], ci = { class: "file-size" }, li = ["href"], ui = {
|
|
5142
5142
|
key: 0,
|
|
5143
5143
|
class: "text-preview"
|
|
5144
|
-
},
|
|
5144
|
+
}, di = {
|
|
5145
5145
|
key: 1,
|
|
5146
5146
|
class: "binary-tip"
|
|
5147
|
-
},
|
|
5147
|
+
}, fi = ["href"], pi = {
|
|
5148
|
+
key: 2,
|
|
5149
|
+
class: "preview-placeholder"
|
|
5150
|
+
}, mi = "/ai_agent_files", hi = 2 * 1024 * 1024, gi = /*#__PURE__*/ f(/* @__PURE__ */ V({
|
|
5148
5151
|
__name: "index",
|
|
5149
5152
|
props: {
|
|
5150
5153
|
record: { default: () => ({}) },
|
|
@@ -5154,134 +5157,289 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5154
5157
|
eventBus: { default: () => ({}) }
|
|
5155
5158
|
},
|
|
5156
5159
|
setup(e) {
|
|
5157
|
-
let t =
|
|
5160
|
+
let t = d(), n = P(() => {
|
|
5161
|
+
let e = t.person?.manage_type;
|
|
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(""), h = G(!1), g = G(null), _ = G(""), v = (e) => {
|
|
5158
5164
|
let t = e.lastIndexOf(".");
|
|
5159
5165
|
return t >= 0 ? e.slice(t + 1).toLowerCase() : "";
|
|
5160
|
-
},
|
|
5166
|
+
}, y = (e) => r.has(v(e)), b = (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`, x = (e, t) => `${mi}/file?path=${encodeURIComponent(e)}${t ? "&download=1" : ""}`, S = (e, t) => {
|
|
5161
5167
|
if (!t) return e;
|
|
5162
5168
|
let n = [];
|
|
5163
5169
|
for (let r of e) if (r.type === "dir") {
|
|
5164
|
-
let e =
|
|
5170
|
+
let e = S(r.children || [], t);
|
|
5165
5171
|
(e.length || r.name.toLowerCase().includes(t)) && n.push({
|
|
5166
5172
|
...r,
|
|
5167
5173
|
children: e.length ? e : r.children
|
|
5168
5174
|
});
|
|
5169
5175
|
} else r.name.toLowerCase().includes(t) && n.push(r);
|
|
5170
5176
|
return n;
|
|
5171
|
-
},
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5177
|
+
}, ee = P(() => S(C.value, s.value.trim().toLowerCase())), C = P(() => m.value ? [{
|
|
5178
|
+
name: "根目录",
|
|
5179
|
+
path: m.value,
|
|
5180
|
+
type: "dir",
|
|
5181
|
+
children: a.value
|
|
5182
|
+
}] : a.value), w = (e) => {
|
|
5183
|
+
c.value = [...m.value ? [m.value] : [], ...e.filter((e) => e.type === "dir").map((e) => e.path)];
|
|
5184
|
+
}, T = async (e = !1) => {
|
|
5185
|
+
i.value = !0;
|
|
5186
|
+
let t = c.value, n = l.value;
|
|
5175
5187
|
try {
|
|
5176
|
-
let
|
|
5177
|
-
if (!
|
|
5178
|
-
let
|
|
5179
|
-
|
|
5188
|
+
let r = await fetch(`${mi}/tree`);
|
|
5189
|
+
if (!r.ok) throw Error(`HTTP ${r.status}`);
|
|
5190
|
+
let i = await r.json();
|
|
5191
|
+
a.value = i.children || [], o.value = !!i.truncated, m.value = i.path || "", e ? (c.value = t, l.value = n) : w(a.value);
|
|
5180
5192
|
} catch (e) {
|
|
5181
5193
|
Q.error(`加载文件树失败: ${e instanceof Error ? e.message : String(e)}`);
|
|
5182
5194
|
} finally {
|
|
5183
|
-
|
|
5195
|
+
i.value = !1;
|
|
5184
5196
|
}
|
|
5185
|
-
},
|
|
5186
|
-
if (
|
|
5187
|
-
|
|
5197
|
+
}, te = () => T(!0), ne = async (e) => {
|
|
5198
|
+
if (p.value = null, !(!y(e.name) || (e.size ?? 0) > hi)) {
|
|
5199
|
+
f.value = !0;
|
|
5188
5200
|
try {
|
|
5189
|
-
let t = await fetch(
|
|
5201
|
+
let t = await fetch(x(e.path));
|
|
5190
5202
|
if (!t.ok) throw Error(`HTTP ${t.status}`);
|
|
5191
|
-
|
|
5203
|
+
p.value = await t.text();
|
|
5192
5204
|
} catch (e) {
|
|
5193
5205
|
Q.error(`加载文件内容失败: ${e instanceof Error ? e.message : String(e)}`);
|
|
5194
5206
|
} finally {
|
|
5195
|
-
|
|
5207
|
+
f.value = !1;
|
|
5208
|
+
}
|
|
5209
|
+
}
|
|
5210
|
+
}, re = () => {
|
|
5211
|
+
u.value && ne(u.value);
|
|
5212
|
+
}, ie = (e) => {
|
|
5213
|
+
if (!n.value) {
|
|
5214
|
+
Q.warning("仅管理员可上传文件");
|
|
5215
|
+
return;
|
|
5216
|
+
}
|
|
5217
|
+
_.value = e.path, g.value?.click();
|
|
5218
|
+
}, ae = (e) => !e || e === m.value ? "根目录" : e.split("/").filter(Boolean).pop() || e, oe = async (e) => {
|
|
5219
|
+
let t = e.target, n = Array.from(t.files ?? []);
|
|
5220
|
+
if (t.value = "", !n.length) return;
|
|
5221
|
+
let r = _.value || m.value;
|
|
5222
|
+
if (!r) {
|
|
5223
|
+
Q.error("未获取到根目录路径,无法上传");
|
|
5224
|
+
return;
|
|
5225
|
+
}
|
|
5226
|
+
h.value = !0;
|
|
5227
|
+
try {
|
|
5228
|
+
for (let e of n) {
|
|
5229
|
+
let t = `${r.replace(/\/+$/, "")}/${e.name}`, n = await fetch(`${mi}/upload?path=${encodeURIComponent(t)}`, {
|
|
5230
|
+
method: "POST",
|
|
5231
|
+
body: e
|
|
5232
|
+
});
|
|
5233
|
+
if (!n.ok) {
|
|
5234
|
+
let e = await n.json().catch(() => null);
|
|
5235
|
+
throw Error(e?.error || `HTTP ${n.status}`);
|
|
5236
|
+
}
|
|
5196
5237
|
}
|
|
5238
|
+
Q.success(`已上传 ${n.length} 个文件到 ${ae(r)}`), await T(!0);
|
|
5239
|
+
} catch (e) {
|
|
5240
|
+
Q.error(`上传失败: ${e instanceof Error ? e.message : String(e)}`);
|
|
5241
|
+
} finally {
|
|
5242
|
+
h.value = !1;
|
|
5197
5243
|
}
|
|
5198
|
-
},
|
|
5244
|
+
}, E = async (e) => {
|
|
5245
|
+
if (!n.value) {
|
|
5246
|
+
Q.warning("仅管理员可删除文件");
|
|
5247
|
+
return;
|
|
5248
|
+
}
|
|
5249
|
+
let t = new URLSearchParams({ path: e.path });
|
|
5250
|
+
e.type === "dir" && t.set("recursive", "1");
|
|
5251
|
+
try {
|
|
5252
|
+
let n = await fetch(`${mi}/file?${t.toString()}`, { method: "DELETE" });
|
|
5253
|
+
if (!n.ok) {
|
|
5254
|
+
let e = await n.json().catch(() => null);
|
|
5255
|
+
throw Error(e?.error || `HTTP ${n.status}`);
|
|
5256
|
+
}
|
|
5257
|
+
Q.success(`已删除 ${e.name}`), u.value && u.value.path.startsWith(e.path) && (u.value = null, p.value = null, l.value = []), await T(!0);
|
|
5258
|
+
} catch (e) {
|
|
5259
|
+
Q.error(`删除失败: ${e instanceof Error ? e.message : String(e)}`);
|
|
5260
|
+
}
|
|
5261
|
+
}, se = (e, t) => {
|
|
5199
5262
|
let n = t?.node?.dataRef || t?.node;
|
|
5200
|
-
!n || n.type !== "file" || (
|
|
5201
|
-
},
|
|
5202
|
-
|
|
5263
|
+
!n || n.type !== "file" || (u.value = n, ne(n));
|
|
5264
|
+
}, D = (e) => {
|
|
5265
|
+
c.value = e;
|
|
5203
5266
|
};
|
|
5204
5267
|
return Be(() => {
|
|
5205
|
-
|
|
5268
|
+
T();
|
|
5206
5269
|
}), (e, t) => {
|
|
5207
|
-
let r = q("a-input-search"),
|
|
5270
|
+
let r = q("a-input-search"), a = q("a-button"), d = q("a-tag"), _ = q("a-popconfirm"), v = q("a-tree"), S = q("a-empty"), C = q("a-spin");
|
|
5208
5271
|
return U(), F(mn, null, {
|
|
5209
5272
|
default: Z(() => [R("div", Xr, [R("div", Zr, [
|
|
5210
5273
|
B(r, {
|
|
5211
|
-
value:
|
|
5212
|
-
"onUpdate:value": t[0] ||= (e) =>
|
|
5274
|
+
value: s.value,
|
|
5275
|
+
"onUpdate:value": t[0] ||= (e) => s.value = e,
|
|
5213
5276
|
placeholder: "搜索文件名",
|
|
5214
5277
|
"allow-clear": "",
|
|
5215
5278
|
size: "small",
|
|
5216
5279
|
class: "tree-search"
|
|
5217
5280
|
}, null, 8, ["value"]),
|
|
5218
|
-
|
|
5281
|
+
R("div", Qr, [
|
|
5282
|
+
B(a, {
|
|
5283
|
+
size: "small",
|
|
5284
|
+
onClick: te
|
|
5285
|
+
}, {
|
|
5286
|
+
default: Z(() => t[2] ||= [z("刷新")]),
|
|
5287
|
+
_: 1
|
|
5288
|
+
}),
|
|
5289
|
+
h.value ? (U(), F(d, {
|
|
5290
|
+
key: 0,
|
|
5291
|
+
color: "processing",
|
|
5292
|
+
class: "uploading-tag"
|
|
5293
|
+
}, {
|
|
5294
|
+
default: Z(() => t[3] ||= [z("上传中…")]),
|
|
5295
|
+
_: 1
|
|
5296
|
+
})) : I("", !0),
|
|
5297
|
+
R("input", {
|
|
5298
|
+
ref_key: "uploadInputRef",
|
|
5299
|
+
ref: g,
|
|
5300
|
+
type: "file",
|
|
5301
|
+
multiple: "",
|
|
5302
|
+
style: { display: "none" },
|
|
5303
|
+
onChange: oe
|
|
5304
|
+
}, null, 544)
|
|
5305
|
+
]),
|
|
5306
|
+
o.value ? (U(), F(d, {
|
|
5219
5307
|
key: 0,
|
|
5220
5308
|
color: "warning",
|
|
5221
5309
|
class: "truncated-tag"
|
|
5222
5310
|
}, {
|
|
5223
|
-
default: Z(() => t[
|
|
5311
|
+
default: Z(() => t[4] ||= [z("文件数过多,目录树已截断")]),
|
|
5224
5312
|
_: 1
|
|
5225
5313
|
})) : I("", !0),
|
|
5226
|
-
B(
|
|
5227
|
-
default: Z(() => [
|
|
5314
|
+
B(C, { spinning: i.value }, {
|
|
5315
|
+
default: Z(() => [ee.value.length ? (U(), F(v, {
|
|
5228
5316
|
key: 0,
|
|
5229
|
-
"tree-data":
|
|
5317
|
+
"tree-data": ee.value,
|
|
5230
5318
|
"field-names": {
|
|
5231
5319
|
title: "name",
|
|
5232
5320
|
key: "path",
|
|
5233
5321
|
children: "children"
|
|
5234
5322
|
},
|
|
5235
|
-
"expanded-keys":
|
|
5236
|
-
"selected-keys":
|
|
5323
|
+
"expanded-keys": c.value,
|
|
5324
|
+
"selected-keys": l.value,
|
|
5237
5325
|
"block-node": "",
|
|
5238
|
-
onSelect:
|
|
5239
|
-
onExpand:
|
|
5326
|
+
onSelect: se,
|
|
5327
|
+
onExpand: D
|
|
5240
5328
|
}, {
|
|
5241
|
-
title: Z(({ dataRef: e }) => [R("span",
|
|
5242
|
-
R("span",
|
|
5329
|
+
title: Z(({ dataRef: e }) => [R("span", $r, [
|
|
5330
|
+
R("span", ei, J(e.type === "dir" ? "📁" : "📄"), 1),
|
|
5243
5331
|
R("span", {
|
|
5244
5332
|
class: "node-name",
|
|
5245
|
-
title: e.
|
|
5246
|
-
}, J(e.name), 9,
|
|
5247
|
-
e.type === "file" &&
|
|
5248
|
-
e.type === "file" ? (U(), L("span",
|
|
5333
|
+
title: e.path
|
|
5334
|
+
}, J(e.name), 9, ti),
|
|
5335
|
+
e.type === "file" && y(e.name) ? (U(), L("span", ni, "可预览")) : I("", !0),
|
|
5336
|
+
e.type === "file" ? (U(), L("span", ri, J(b(e.size)), 1)) : I("", !0),
|
|
5337
|
+
n.value && e.type === "dir" ? (U(), L("span", {
|
|
5338
|
+
key: 2,
|
|
5339
|
+
class: "node-upload",
|
|
5340
|
+
title: "上传文件到此目录",
|
|
5341
|
+
onClick: Ye((t) => ie(e), ["stop"])
|
|
5342
|
+
}, t[5] ||= [R("svg", {
|
|
5343
|
+
width: "11",
|
|
5344
|
+
height: "11",
|
|
5345
|
+
viewBox: "0 0 24 24",
|
|
5346
|
+
fill: "none",
|
|
5347
|
+
stroke: "currentColor",
|
|
5348
|
+
"stroke-width": "2",
|
|
5349
|
+
"stroke-linecap": "round",
|
|
5350
|
+
"stroke-linejoin": "round"
|
|
5351
|
+
}, [
|
|
5352
|
+
R("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
5353
|
+
R("polyline", { points: "17 8 12 3 7 8" }),
|
|
5354
|
+
R("line", {
|
|
5355
|
+
x1: "12",
|
|
5356
|
+
y1: "3",
|
|
5357
|
+
x2: "12",
|
|
5358
|
+
y2: "15"
|
|
5359
|
+
})
|
|
5360
|
+
], -1)], 8, ii)) : I("", !0),
|
|
5361
|
+
n.value && e.path !== m.value ? (U(), F(_, {
|
|
5362
|
+
key: 3,
|
|
5363
|
+
title: e.type === "dir" ? `删除目录 ${e.name} 及其全部内容?` : `确认删除文件 ${e.name}?`,
|
|
5364
|
+
"ok-text": "删除",
|
|
5365
|
+
"cancel-text": "取消",
|
|
5366
|
+
"ok-button-props": { danger: !0 },
|
|
5367
|
+
onConfirm: (t) => E(e)
|
|
5368
|
+
}, {
|
|
5369
|
+
default: Z(() => [R("span", {
|
|
5370
|
+
class: "node-delete",
|
|
5371
|
+
title: "删除",
|
|
5372
|
+
onClick: t[1] ||= Ye(() => {}, ["stop"])
|
|
5373
|
+
}, t[6] ||= [R("svg", {
|
|
5374
|
+
width: "11",
|
|
5375
|
+
height: "11",
|
|
5376
|
+
viewBox: "0 0 24 24",
|
|
5377
|
+
fill: "none",
|
|
5378
|
+
stroke: "currentColor",
|
|
5379
|
+
"stroke-width": "2",
|
|
5380
|
+
"stroke-linecap": "round",
|
|
5381
|
+
"stroke-linejoin": "round"
|
|
5382
|
+
}, [
|
|
5383
|
+
R("polyline", { points: "3 6 5 6 21 6" }),
|
|
5384
|
+
R("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }),
|
|
5385
|
+
R("line", {
|
|
5386
|
+
x1: "10",
|
|
5387
|
+
y1: "11",
|
|
5388
|
+
x2: "10",
|
|
5389
|
+
y2: "17"
|
|
5390
|
+
}),
|
|
5391
|
+
R("line", {
|
|
5392
|
+
x1: "14",
|
|
5393
|
+
y1: "11",
|
|
5394
|
+
x2: "14",
|
|
5395
|
+
y2: "17"
|
|
5396
|
+
})
|
|
5397
|
+
], -1)])]),
|
|
5398
|
+
_: 2
|
|
5399
|
+
}, 1032, ["title", "onConfirm"])) : I("", !0)
|
|
5249
5400
|
])]),
|
|
5250
5401
|
_: 1
|
|
5251
5402
|
}, 8, [
|
|
5252
5403
|
"tree-data",
|
|
5253
5404
|
"expanded-keys",
|
|
5254
5405
|
"selected-keys"
|
|
5255
|
-
])) :
|
|
5406
|
+
])) : i.value ? I("", !0) : (U(), F(S, {
|
|
5256
5407
|
key: 1,
|
|
5257
5408
|
description: "暂无文件",
|
|
5258
5409
|
class: "tree-empty"
|
|
5259
5410
|
}))]),
|
|
5260
5411
|
_: 1
|
|
5261
5412
|
}, 8, ["spinning"])
|
|
5262
|
-
]), R("div",
|
|
5413
|
+
]), R("div", ai, [u.value ? (U(), L(N, { key: 0 }, [R("div", oi, [
|
|
5263
5414
|
R("span", {
|
|
5264
5415
|
class: "file-name",
|
|
5265
|
-
title:
|
|
5266
|
-
}, J(
|
|
5267
|
-
R("span",
|
|
5268
|
-
|
|
5416
|
+
title: u.value.path
|
|
5417
|
+
}, J(u.value.name), 9, si),
|
|
5418
|
+
R("span", ci, J(b(u.value.size)), 1),
|
|
5419
|
+
B(a, {
|
|
5420
|
+
size: "small",
|
|
5421
|
+
onClick: re
|
|
5422
|
+
}, {
|
|
5423
|
+
default: Z(() => t[7] ||= [z("刷新")]),
|
|
5424
|
+
_: 1
|
|
5425
|
+
}),
|
|
5426
|
+
R("a", { href: x(u.value.path, !0) }, [B(a, {
|
|
5269
5427
|
size: "small",
|
|
5270
5428
|
type: "primary"
|
|
5271
5429
|
}, {
|
|
5272
|
-
default: Z(() => t[
|
|
5430
|
+
default: Z(() => t[8] ||= [z("下载")]),
|
|
5273
5431
|
_: 1
|
|
5274
|
-
})], 8,
|
|
5275
|
-
]), B(
|
|
5276
|
-
spinning:
|
|
5432
|
+
})], 8, li)
|
|
5433
|
+
]), B(C, {
|
|
5434
|
+
spinning: f.value,
|
|
5277
5435
|
"wrapper-class-name": "preview-spin"
|
|
5278
5436
|
}, {
|
|
5279
|
-
default: Z(() => [
|
|
5280
|
-
default: Z(() => t[
|
|
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: x(u.value.path, !0) }, [B(a, { type: "primary" }, {
|
|
5438
|
+
default: Z(() => t[9] ||= [z("下载文件")]),
|
|
5281
5439
|
_: 1
|
|
5282
|
-
})], 8,
|
|
5440
|
+
})], 8, fi)]))]),
|
|
5283
5441
|
_: 1
|
|
5284
|
-
}, 8, ["spinning"])], 64)) : (U(), F(
|
|
5442
|
+
}, 8, ["spinning"])], 64)) : (U(), F(S, {
|
|
5285
5443
|
key: 1,
|
|
5286
5444
|
description: "选择左侧文件查看内容",
|
|
5287
5445
|
class: "preview-empty"
|
|
@@ -5290,6 +5448,6 @@ var Yn = /* @__PURE__ */ V({
|
|
|
5290
5448
|
});
|
|
5291
5449
|
};
|
|
5292
5450
|
}
|
|
5293
|
-
}), [["__scopeId", "data-v-
|
|
5451
|
+
}), [["__scopeId", "data-v-e7f481bf"]]);
|
|
5294
5452
|
//#endregion
|
|
5295
|
-
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,
|
|
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 };
|