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