yc-vep-ui 0.3.83 → 0.3.84
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.
|
@@ -2590,60 +2590,60 @@ function useDefaultTable(e, n) {
|
|
|
2590
2590
|
}), o = ref([]), s = reactive({
|
|
2591
2591
|
page: 1,
|
|
2592
2592
|
pageSize: 10
|
|
2593
|
-
}), c =
|
|
2594
|
-
if (
|
|
2593
|
+
}), { defaultParams: c, immediate: l = !0, ...u } = n;
|
|
2594
|
+
if (u?.onBefore?.(s) === !1) return {
|
|
2595
2595
|
loading: ref(!1),
|
|
2596
2596
|
data: i,
|
|
2597
2597
|
pagination: a
|
|
2598
2598
|
};
|
|
2599
|
-
let
|
|
2600
|
-
...
|
|
2601
|
-
defaultParams: s,
|
|
2599
|
+
let d = useFetch(e, {
|
|
2600
|
+
...u,
|
|
2602
2601
|
immediate: !1,
|
|
2603
2602
|
onSuccess: (e) => {
|
|
2604
|
-
|
|
2605
|
-
}
|
|
2606
|
-
});
|
|
2607
|
-
watchEffect(() => {
|
|
2608
|
-
let e = toValue(n.ready) ?? !0, r = toValue(n.defaultParams || {});
|
|
2609
|
-
if (console.log("=== watchEffect triggered ==="), console.log("ready ->>", e), console.log("tempParams ->>", JSON.parse(JSON.stringify(r))), console.log("requestParams ->>", JSON.parse(JSON.stringify(s))), a.page = 1, a.pageSize = 10, !e) {
|
|
2610
|
-
console.log("ready is false, caching pendingParams"), c = { ...r }, console.log("pendingParams ->>", JSON.parse(JSON.stringify(c)));
|
|
2611
|
-
return;
|
|
2612
|
-
}
|
|
2613
|
-
if (c) {
|
|
2614
|
-
console.log("applying pendingParams ->>", JSON.parse(JSON.stringify(c)));
|
|
2615
|
-
for (let e in c) e !== "page" && e !== "pageSize" && (s[e] = c[e]);
|
|
2616
|
-
c = null;
|
|
2603
|
+
u?.onSuccess?.(e), a.total = e[r?.replaceAttrs?.total] || 0, i.value = e[r?.replaceAttrs?.table] || [];
|
|
2617
2604
|
}
|
|
2618
|
-
|
|
2619
|
-
|
|
2605
|
+
}), f = !1;
|
|
2606
|
+
l && watchEffect(() => {
|
|
2607
|
+
(toValue(n.ready) ?? !0) && !f && (f = !0, p());
|
|
2620
2608
|
});
|
|
2621
|
-
function
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2609
|
+
function p(e) {
|
|
2610
|
+
if (!(toValue(n.ready) ?? !0)) return;
|
|
2611
|
+
let r = {
|
|
2612
|
+
...toValue(n.defaultParams) || {},
|
|
2613
|
+
...s,
|
|
2614
|
+
...e
|
|
2615
|
+
};
|
|
2616
|
+
return Object.keys(r).forEach((e) => {
|
|
2617
|
+
e !== "page" && e !== "pageSize" && (s[e] = r[e]);
|
|
2618
|
+
}), d.execute(r);
|
|
2619
|
+
}
|
|
2620
|
+
function m(e = {}) {
|
|
2621
|
+
a.page = 1, a.pageSize = 10, e && (Object.keys(s).forEach((n) => {
|
|
2622
|
+
r.ignoreAttrs?.includes(n) || Object.keys(e).includes(n) || delete s[n];
|
|
2623
|
+
}), Object.assign(s, {
|
|
2625
2624
|
...e,
|
|
2626
2625
|
page: 1,
|
|
2627
2626
|
pageSize: 10
|
|
2628
|
-
})
|
|
2627
|
+
})), p();
|
|
2629
2628
|
}
|
|
2630
|
-
function
|
|
2631
|
-
a.page = e, a.pageSize = n,
|
|
2629
|
+
function g({ page: e, pageSize: n }) {
|
|
2630
|
+
a.page = e, a.pageSize = n, p({
|
|
2632
2631
|
page: e,
|
|
2633
2632
|
pageSize: n
|
|
2634
2633
|
});
|
|
2635
2634
|
}
|
|
2636
|
-
function
|
|
2635
|
+
function _(e) {
|
|
2637
2636
|
o.value = e;
|
|
2638
2637
|
}
|
|
2639
2638
|
return reactive({
|
|
2640
|
-
...
|
|
2639
|
+
...d,
|
|
2641
2640
|
data: i,
|
|
2642
2641
|
pagination: a,
|
|
2643
2642
|
selection: o,
|
|
2644
|
-
reset:
|
|
2645
|
-
updatePagination:
|
|
2646
|
-
selectionChange:
|
|
2643
|
+
reset: m,
|
|
2644
|
+
updatePagination: g,
|
|
2645
|
+
selectionChange: _,
|
|
2646
|
+
execute: p
|
|
2647
2647
|
});
|
|
2648
2648
|
}
|
|
2649
2649
|
//#endregion
|
|
@@ -2673,62 +2673,69 @@ function useComTable(e, n) {
|
|
|
2673
2673
|
...n?.ignoreAttrs || []
|
|
2674
2674
|
]
|
|
2675
2675
|
});
|
|
2676
|
-
function s(e
|
|
2677
|
-
console.log("=== useComTable reset called ==="), console.log("paramsRef.value before ->>", JSON.parse(JSON.stringify(a.value))), console.log("data input ->>", JSON.parse(JSON.stringify(e)));
|
|
2676
|
+
function s(e) {
|
|
2678
2677
|
let n = [
|
|
2679
2678
|
"tableId",
|
|
2680
2679
|
"page",
|
|
2681
|
-
"pageSize"
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2680
|
+
"pageSize"
|
|
2681
|
+
], r = {}, i = {};
|
|
2682
|
+
return Object.keys(e || {}).forEach((a) => {
|
|
2683
|
+
n.includes(a) ? r[a] = e[a] : i[a] = e[a];
|
|
2684
|
+
}), Object.keys(i).length > 0 && (r.params = i), o.execute(r);
|
|
2685
|
+
}
|
|
2686
|
+
function c(e = {}) {
|
|
2687
|
+
let { tableId: n } = toValue(a);
|
|
2688
|
+
a.value = {
|
|
2689
|
+
tableId: n,
|
|
2687
2690
|
page: 1,
|
|
2688
|
-
pageSize: 10
|
|
2689
|
-
|
|
2691
|
+
pageSize: 10,
|
|
2692
|
+
...e
|
|
2693
|
+
}, o.reset();
|
|
2690
2694
|
}
|
|
2691
|
-
async function
|
|
2695
|
+
async function l(e) {
|
|
2692
2696
|
let n = toValue(a);
|
|
2693
2697
|
return request_default.post("/common/insert", {
|
|
2694
2698
|
params: { ...e },
|
|
2695
2699
|
tableId: n?.tableId
|
|
2696
2700
|
});
|
|
2697
2701
|
}
|
|
2698
|
-
async function
|
|
2702
|
+
async function u(e) {
|
|
2699
2703
|
let n = toValue(a);
|
|
2700
2704
|
return request_default.post("/common/update", {
|
|
2701
2705
|
params: { ...e },
|
|
2702
2706
|
tableId: n?.tableId
|
|
2703
2707
|
});
|
|
2704
2708
|
}
|
|
2705
|
-
async function
|
|
2709
|
+
async function d(e) {
|
|
2706
2710
|
let n = toValue(a);
|
|
2707
2711
|
return request_default.post("/common/delete", {
|
|
2708
2712
|
idList: e,
|
|
2709
2713
|
tableId: n?.tableId
|
|
2710
2714
|
});
|
|
2711
2715
|
}
|
|
2712
|
-
async function
|
|
2716
|
+
async function f(e) {
|
|
2713
2717
|
let { title: n = "export" } = e || {}, r = toValue(a), i = await request_default.blob(e?.url ?? "/common/exportExcel", {
|
|
2714
2718
|
tableId: r?.tableId,
|
|
2715
2719
|
type: e?.type || "all"
|
|
2716
2720
|
}), o = new Blob([i]), s = document.createElement("a");
|
|
2717
2721
|
s.href = window.URL.createObjectURL(o), s.download = `${n}.xlsx`, s.click(), VepMessage.success("导出成功"), window.URL.revokeObjectURL(s.href);
|
|
2718
2722
|
}
|
|
2719
|
-
let
|
|
2723
|
+
let p = reactive({
|
|
2720
2724
|
loading: !1,
|
|
2721
2725
|
data: [],
|
|
2722
2726
|
selection: [],
|
|
2723
|
-
insert:
|
|
2724
|
-
update:
|
|
2725
|
-
remove:
|
|
2726
|
-
delete:
|
|
2727
|
-
exportData:
|
|
2727
|
+
insert: l,
|
|
2728
|
+
update: u,
|
|
2729
|
+
remove: d,
|
|
2730
|
+
delete: d,
|
|
2731
|
+
exportData: f
|
|
2728
2732
|
});
|
|
2729
2733
|
return watchEffect(() => {
|
|
2730
|
-
Object.assign(
|
|
2731
|
-
|
|
2734
|
+
Object.assign(p, o, {
|
|
2735
|
+
reset: c,
|
|
2736
|
+
execute: s
|
|
2737
|
+
});
|
|
2738
|
+
}, { flush: "sync" }), p;
|
|
2732
2739
|
}
|
|
2733
2740
|
//#endregion
|
|
2734
2741
|
//#region src/hooks/useTable/index.ts
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as e, d as t, f as n, l as r, s as i, u as a } from "../entry-
|
|
1
|
+
import { c as e, d as t, f as n, l as r, s as i, u as a } from "../entry-jocUh0jK.js";
|
|
2
2
|
export { e as useDictionary, n as useFetch, r as useRoute, a as useRouter, t as useTable, i as useUser };
|
package/dist/utils/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { O as e, _ as t, b as n, v as r, y as i } from "../entry-
|
|
1
|
+
import { O as e, _ as t, b as n, v as r, y as i } from "../entry-jocUh0jK.js";
|
|
2
2
|
export { t as baseUrl, n as request, e as tempToRender, r as uniq, i as uniqBy };
|
package/dist/vep-ui.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r, S as i, T as a, a as o, g as s, h as c, i as l, k as u, m as d, n as f, o as p, p as m, r as h, t as g, w as _, x as v } from "./entry-
|
|
1
|
+
import { A as e, C as t, D as n, E as r, S as i, T as a, a as o, g as s, h as c, i as l, k as u, m as d, n as f, o as p, p as m, r as h, t as g, w as _, x as v } from "./entry-jocUh0jK.js";
|
|
2
2
|
export { e as UiCard, i as UiDescriptions, v as UiDialog, a as UiEditor, n as UiFilter, r as UiForm, t as UiInfiniteScroll, d as UiStaffSelect, u as UiTable, _ as UiTree, m as UiUpload, s as WcUtils, o as YcApproval, c as YcMessage, l as YcPageAgent, h as default, h as ycPlugin, g as getHostVue, p as hooks, f as setHostVue };
|