yc-vep-ui 0.4.4 → 0.4.5
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.
|
@@ -2646,13 +2646,14 @@ function useDefaultTable(e, n) {
|
|
|
2646
2646
|
//#endregion
|
|
2647
2647
|
//#region src/hooks/useTable/common.ts
|
|
2648
2648
|
function useComTable(e, n) {
|
|
2649
|
-
let { defaultParams: r, ...i } = n, a = isRef(r) ? r : isReactive(r) ? toRef(r) : ref(r || {}), o = ["sort", ...n?.ignoreAttrs || []], s = useDefaultTable(e, {
|
|
2649
|
+
let { defaultParams: r, ...i } = n, a = isRef(r) ? r : isReactive(r) ? toRef(r) : ref(r || {}), o = ["sort", ...n?.ignoreAttrs || []], s = ref(!1), c = useDefaultTable(e, {
|
|
2650
2650
|
...i,
|
|
2651
2651
|
ready: computed(() => {
|
|
2652
2652
|
let e = isRef(n.ready) ? n.ready.value : n.ready, r = !!a.value?.tableId;
|
|
2653
2653
|
return (e === void 0 || e) && r;
|
|
2654
2654
|
}),
|
|
2655
2655
|
defaultParams: computed(() => {
|
|
2656
|
+
if (s.value) return null;
|
|
2656
2657
|
let { tableId: e, page: n, pageSize: r, ...i } = toValue(a) || {};
|
|
2657
2658
|
return {
|
|
2658
2659
|
tableId: e,
|
|
@@ -2663,7 +2664,7 @@ function useComTable(e, n) {
|
|
|
2663
2664
|
}),
|
|
2664
2665
|
ignoreAttrs: o
|
|
2665
2666
|
});
|
|
2666
|
-
function
|
|
2667
|
+
function l(e = {}) {
|
|
2667
2668
|
let { tableId: n, ...r } = toValue(a), i = {};
|
|
2668
2669
|
o.forEach((e) => {
|
|
2669
2670
|
r[e] !== void 0 && (i[e] = r[e]);
|
|
@@ -2673,9 +2674,9 @@ function useComTable(e, n) {
|
|
|
2673
2674
|
pageSize: 10,
|
|
2674
2675
|
...i,
|
|
2675
2676
|
...e
|
|
2676
|
-
},
|
|
2677
|
+
}, c.reset();
|
|
2677
2678
|
}
|
|
2678
|
-
function
|
|
2679
|
+
function u(e) {
|
|
2679
2680
|
let n = [
|
|
2680
2681
|
"tableId",
|
|
2681
2682
|
"page",
|
|
@@ -2683,52 +2684,52 @@ function useComTable(e, n) {
|
|
|
2683
2684
|
], r = {}, i = {}, o = toValue(a) || {};
|
|
2684
2685
|
Object.keys(e || {}).forEach((a) => {
|
|
2685
2686
|
n.includes(a) ? r[a] = e[a] : i[a] = e[a];
|
|
2686
|
-
}), r.tableId ||= o.tableId, r.page ||= o.page || 1, r.pageSize ||= o.pageSize || 10, Object.keys(i).length > 0 && (r.params = i);
|
|
2687
|
-
let
|
|
2687
|
+
}), r.tableId ||= o.tableId, r.page ||= o.page || 1, r.pageSize ||= o.pageSize || 10, Object.keys(i).length > 0 && (r.params = i), s.value = !0;
|
|
2688
|
+
let l = c.execute(r);
|
|
2688
2689
|
return a.value = {
|
|
2689
2690
|
...o,
|
|
2690
2691
|
...e
|
|
2691
|
-
},
|
|
2692
|
+
}, s.value = !1, l;
|
|
2692
2693
|
}
|
|
2693
|
-
let
|
|
2694
|
-
async function
|
|
2694
|
+
let d = () => toValue(a)?.tableId;
|
|
2695
|
+
async function f(e) {
|
|
2695
2696
|
return request_default.post("/common/insert", {
|
|
2696
2697
|
params: { ...e },
|
|
2697
|
-
tableId:
|
|
2698
|
+
tableId: d()
|
|
2698
2699
|
});
|
|
2699
2700
|
}
|
|
2700
|
-
async function
|
|
2701
|
+
async function p(e) {
|
|
2701
2702
|
return request_default.post("/common/update", {
|
|
2702
2703
|
params: { ...e },
|
|
2703
|
-
tableId:
|
|
2704
|
+
tableId: d()
|
|
2704
2705
|
});
|
|
2705
2706
|
}
|
|
2706
|
-
async function
|
|
2707
|
+
async function m(e) {
|
|
2707
2708
|
return request_default.post("/common/delete", {
|
|
2708
2709
|
idList: e,
|
|
2709
|
-
tableId:
|
|
2710
|
+
tableId: d()
|
|
2710
2711
|
});
|
|
2711
2712
|
}
|
|
2712
|
-
async function
|
|
2713
|
+
async function g({ title: e = "export", url: n } = {}) {
|
|
2713
2714
|
let r = await request_default.blob(n ?? "/common/exportExcel", {
|
|
2714
|
-
tableId:
|
|
2715
|
+
tableId: d(),
|
|
2715
2716
|
type: "all"
|
|
2716
2717
|
}), i = new Blob([r]), a = document.createElement("a");
|
|
2717
2718
|
a.href = window.URL.createObjectURL(i), a.download = `${e}.xlsx`, a.click(), VepMessage.success("导出成功"), window.URL.revokeObjectURL(a.href);
|
|
2718
2719
|
}
|
|
2719
|
-
let
|
|
2720
|
-
insert:
|
|
2721
|
-
update:
|
|
2722
|
-
remove:
|
|
2723
|
-
delete:
|
|
2724
|
-
exportData:
|
|
2720
|
+
let _ = reactive({
|
|
2721
|
+
insert: f,
|
|
2722
|
+
update: p,
|
|
2723
|
+
remove: m,
|
|
2724
|
+
delete: m,
|
|
2725
|
+
exportData: g
|
|
2725
2726
|
});
|
|
2726
2727
|
return watchEffect(() => {
|
|
2727
|
-
Object.assign(
|
|
2728
|
-
reset:
|
|
2729
|
-
execute:
|
|
2728
|
+
Object.assign(_, c, {
|
|
2729
|
+
reset: l,
|
|
2730
|
+
execute: u
|
|
2730
2731
|
});
|
|
2731
|
-
}, { flush: "sync" }),
|
|
2732
|
+
}, { flush: "sync" }), _;
|
|
2732
2733
|
}
|
|
2733
2734
|
//#endregion
|
|
2734
2735
|
//#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-CzsmZrlW.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-CzsmZrlW.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-CzsmZrlW.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 };
|