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