yc-vep-ui 0.3.85 → 0.4.0
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,94 +2649,95 @@ 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",
|
|
2680
2677
|
"pageSize"
|
|
2681
2678
|
], r = {}, i = {};
|
|
2682
|
-
|
|
2679
|
+
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);
|
|
2682
|
+
let s = toValue(a) || {}, c = {};
|
|
2683
|
+
return o.forEach((e) => {
|
|
2684
|
+
s[e] !== void 0 && (c[e] = s[e]);
|
|
2685
|
+
}), Object.assign(c, s), Object.assign(c, e || {}), a.value = c, l.execute(r);
|
|
2685
2686
|
}
|
|
2686
|
-
function
|
|
2687
|
+
function d(e = {}) {
|
|
2687
2688
|
let { tableId: n } = toValue(a);
|
|
2688
2689
|
a.value = {
|
|
2689
2690
|
tableId: n,
|
|
2690
2691
|
page: 1,
|
|
2691
2692
|
pageSize: 10,
|
|
2692
|
-
|
|
2693
|
+
...c,
|
|
2693
2694
|
...e
|
|
2694
|
-
},
|
|
2695
|
+
}, l.reset();
|
|
2695
2696
|
}
|
|
2696
|
-
async function
|
|
2697
|
+
async function f(e) {
|
|
2697
2698
|
let n = toValue(a);
|
|
2698
2699
|
return request_default.post("/common/insert", {
|
|
2699
2700
|
params: { ...e },
|
|
2700
2701
|
tableId: n?.tableId
|
|
2701
2702
|
});
|
|
2702
2703
|
}
|
|
2703
|
-
async function
|
|
2704
|
+
async function p(e) {
|
|
2704
2705
|
let n = toValue(a);
|
|
2705
2706
|
return request_default.post("/common/update", {
|
|
2706
2707
|
params: { ...e },
|
|
2707
2708
|
tableId: n?.tableId
|
|
2708
2709
|
});
|
|
2709
2710
|
}
|
|
2710
|
-
async function
|
|
2711
|
+
async function m(e) {
|
|
2711
2712
|
let n = toValue(a);
|
|
2712
2713
|
return request_default.post("/common/delete", {
|
|
2713
2714
|
idList: e,
|
|
2714
2715
|
tableId: n?.tableId
|
|
2715
2716
|
});
|
|
2716
2717
|
}
|
|
2717
|
-
async function
|
|
2718
|
+
async function g(e) {
|
|
2718
2719
|
let { title: n = "export" } = e || {}, r = toValue(a), i = await request_default.blob(e?.url ?? "/common/exportExcel", {
|
|
2719
2720
|
tableId: r?.tableId,
|
|
2720
2721
|
type: e?.type || "all"
|
|
2721
2722
|
}), o = new Blob([i]), s = document.createElement("a");
|
|
2722
2723
|
s.href = window.URL.createObjectURL(o), s.download = `${n}.xlsx`, s.click(), VepMessage.success("导出成功"), window.URL.revokeObjectURL(s.href);
|
|
2723
2724
|
}
|
|
2724
|
-
let
|
|
2725
|
+
let _ = reactive({
|
|
2725
2726
|
loading: !1,
|
|
2726
2727
|
data: [],
|
|
2727
2728
|
selection: [],
|
|
2728
|
-
insert:
|
|
2729
|
-
update:
|
|
2730
|
-
remove:
|
|
2731
|
-
delete:
|
|
2732
|
-
exportData:
|
|
2729
|
+
insert: f,
|
|
2730
|
+
update: p,
|
|
2731
|
+
remove: m,
|
|
2732
|
+
delete: m,
|
|
2733
|
+
exportData: g
|
|
2733
2734
|
});
|
|
2734
2735
|
return watchEffect(() => {
|
|
2735
|
-
Object.assign(
|
|
2736
|
-
reset:
|
|
2737
|
-
execute:
|
|
2736
|
+
Object.assign(_, l, {
|
|
2737
|
+
reset: d,
|
|
2738
|
+
execute: u
|
|
2738
2739
|
});
|
|
2739
|
-
}, { flush: "sync" }),
|
|
2740
|
+
}, { flush: "sync" }), _;
|
|
2740
2741
|
}
|
|
2741
2742
|
//#endregion
|
|
2742
2743
|
//#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-BnGnLjQT.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-BnGnLjQT.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-BnGnLjQT.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 };
|