dlzn-ui 1.90.0 → 1.91.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.
- package/assets/Index-CCwQ_Mhh.css +2 -0
- package/assets/Index-Co01AdLU.css +2 -0
- package/assets/IndexItem-5VrD3wb-.css +1 -0
- package/assets/custom-page-list-Dem3-TSH.css +1 -0
- package/assets/form-BEBdn52r.css +2 -0
- package/chunks/{Common-JCpJRcIQ.mjs → Common-B_fOVewz.mjs} +7 -7
- package/chunks/{Day-B2-VMp6b.mjs → Day-J83Okbcs.mjs} +12 -12
- package/chunks/{Hour-C5dH6HGj.mjs → Hour-zpP7cab8.mjs} +1 -1
- package/chunks/Index-C26IC9j5.mjs +33 -0
- package/chunks/Index-ZW1zDBUE.mjs +38 -0
- package/chunks/IndexItem-rd9PLxFu.mjs +70 -0
- package/chunks/{Minute-CJB2X5dZ.mjs → Minute-D5hHwQbr.mjs} +1 -1
- package/chunks/{Month-gLxaWshK.mjs → Month-DKBThQCT.mjs} +1 -1
- package/chunks/{Second-BIIpAoTx.mjs → Second-CpyxAPSW.mjs} +1 -1
- package/chunks/custom-page-table-BDReG7BA.mjs +46 -0
- package/chunks/{form-DjDtnVwq.mjs → form-iyDxFJGm.mjs} +84 -78
- package/chunks/overview-BB7h4V3u.mjs +22 -0
- package/chunks/overview-BvLGalk-.mjs +7 -0
- package/chunks/page-list-6ZKGfu67.mjs +212 -0
- package/chunks/{page-query-BAO5cEK6.mjs → page-query-Cd_ULbqY.mjs} +1 -1
- package/chunks/page-table-BMN86ain.mjs +246 -0
- package/chunks/select-sys-user-Bj08BwIs.mjs +109 -0
- package/components/cron/src/Common.mjs +1 -1
- package/components/cron/src/Day.mjs +1 -1
- package/components/cron/src/Hour.mjs +1 -1
- package/components/cron/src/Minute.mjs +1 -1
- package/components/cron/src/Month.mjs +1 -1
- package/components/cron/src/Picker.mjs +6 -6
- package/components/cron/src/Second.mjs +1 -1
- package/components/custom-page-list/index.d.ts +1 -0
- package/components/custom-page-list/index.mjs +0 -0
- package/components/custom-page-list/src/custom-page-list.d.ts +3 -0
- package/components/custom-page-list/src/custom-page-list.mjs +74 -0
- package/components/custom-page-list/src/custom-page-list.vue.d.ts +26 -0
- package/components/custom-page-table/index.d.ts +2 -0
- package/components/custom-page-table/index.mjs +2 -0
- package/components/custom-page-table/src/custom-page-table.d.ts +3 -0
- package/components/custom-page-table/src/custom-page-table.mjs +2 -0
- package/components/custom-page-table/src/custom-page-table.vue.d.ts +33 -0
- package/components/date-picker/src/date-picker.vue.d.ts +1 -1
- package/components/form/index.mjs +1 -1
- package/components/form/src/form.d.ts +6 -0
- package/components/form/src/form.mjs +1 -1
- package/components/form/src/form.vue.d.ts +3 -3
- package/components/image-viewer/src/image-viewer.vue.d.ts +1 -1
- package/components/index.d.ts +8 -0
- package/components/index.mjs +40 -32
- package/components/overview/index.d.ts +2 -0
- package/components/overview/index.mjs +3 -0
- package/components/overview/src/DicLabel/Index.mjs +2 -0
- package/components/overview/src/DicLabel/Index.vue.d.ts +11 -0
- package/components/overview/src/DicLabel/index.d.ts +27 -0
- package/components/overview/src/DicLabel/index2.mjs +0 -0
- package/components/overview/src/IndexItem.mjs +2 -0
- package/components/overview/src/IndexItem.vue.d.ts +8 -0
- package/components/overview/src/OptionLabel/Index.mjs +2 -0
- package/components/overview/src/OptionLabel/Index.vue.d.ts +13 -0
- package/components/overview/src/OptionLabel/index.d.ts +33 -0
- package/components/overview/src/OptionLabel/index2.mjs +0 -0
- package/components/overview/src/overview.d.ts +27 -0
- package/components/overview/src/overview.mjs +2 -0
- package/components/overview/src/overview.vue.d.ts +11 -0
- package/components/page-list/index.d.ts +2 -0
- package/components/page-list/index.mjs +2 -0
- package/components/page-list/src/page-list.d.ts +1426 -0
- package/components/page-list/src/page-list.mjs +2 -0
- package/components/page-list/src/page-list.vue.d.ts +31 -0
- package/components/page-query/index.mjs +1 -1
- package/components/page-query/src/page-query.mjs +1 -1
- package/components/page-query/src/page-query.vue.d.ts +3 -3
- package/components/page-table/index.d.ts +2 -0
- package/components/page-table/index.mjs +2 -0
- package/components/page-table/src/page-table.d.ts +41 -0
- package/components/page-table/src/page-table.mjs +2 -0
- package/components/page-table/src/page-table.vue.d.ts +56 -0
- package/components/select-sys-user/index.d.ts +2 -0
- package/components/select-sys-user/index.mjs +2 -0
- package/components/select-sys-user/src/Picker.mjs +88 -0
- package/components/select-sys-user/src/Picker.vue.d.ts +11 -0
- package/components/select-sys-user/src/select-sys-user.d.ts +4 -0
- package/components/select-sys-user/src/select-sys-user.mjs +2 -0
- package/components/select-sys-user/src/select-sys-user.vue.d.ts +12 -0
- package/components/table/src/table.vue.d.ts +2 -2
- package/components/tree/src/tree.vue.d.ts +1 -1
- package/index.mjs +40 -32
- package/package.json +1 -1
- package/plugins/tableRenders/cell/ImageViewer/Index.vue.d.ts +1 -1
- package/assets/form-BoTdcg8R.css +0 -2
|
@@ -5,26 +5,29 @@ import { t as r } from "./plugin-vue_export-helper-B3ysoDQm.mjs";
|
|
|
5
5
|
import { t as i } from "./checkbox-CLlUEbkk.mjs";
|
|
6
6
|
import { t as a } from "./checkbox-group-D7jGdbHp.mjs";
|
|
7
7
|
import { t as o } from "./input-B8jjJrK5.mjs";
|
|
8
|
-
import { t as s } from "./
|
|
9
|
-
import { t as c } from "./
|
|
10
|
-
import { t as l } from "./
|
|
11
|
-
import { t as u } from "./
|
|
12
|
-
import { t as d } from "./
|
|
13
|
-
import { t as f } from "./
|
|
14
|
-
import { t as
|
|
8
|
+
import { t as s } from "./cron-C0hsPMmz.mjs";
|
|
9
|
+
import { t as c } from "./input-number-Bt1mbd1D.mjs";
|
|
10
|
+
import { t as l } from "./select-DbGBggUm.mjs";
|
|
11
|
+
import { t as u } from "./switch-CqV3-avv.mjs";
|
|
12
|
+
import { t as d } from "./date-picker-CTGIcHXL.mjs";
|
|
13
|
+
import { t as f } from "./radio-group-D29D9RMN.mjs";
|
|
14
|
+
import { t as ee } from "./range-input-8ddDrOBB.mjs";
|
|
15
|
+
import { t as te } from "./tag-input-iNXrRXk2.mjs";
|
|
16
|
+
import { t as ne } from "./select-sys-user-Bj08BwIs.mjs";
|
|
17
|
+
import { t as p } from "./slider-C63Gzbld.mjs";
|
|
15
18
|
import { t as m } from "./textarea-xkwOhNut.mjs";
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import { Fragment as
|
|
20
|
-
import { useMutationObserver as
|
|
21
|
-
import { Form as
|
|
22
|
-
import
|
|
23
|
-
import '../assets/form-
|
|
24
|
-
var
|
|
19
|
+
import { t as h } from "./tree-szMrY26E.mjs";
|
|
20
|
+
import { t as g } from "./tree-select-C-HywxXx.mjs";
|
|
21
|
+
import { t as _ } from "./upload-CvqlmOVo.mjs";
|
|
22
|
+
import { Fragment as v, computed as y, createBlock as b, createCommentVNode as x, createElementBlock as S, defineAsyncComponent as C, defineComponent as w, getCurrentInstance as re, mergeDefaults as T, mergeProps as E, nextTick as D, onMounted as O, openBlock as k, provide as A, reactive as j, ref as M, renderList as N, renderSlot as P, resolveDynamicComponent as F, shallowRef as I, unref as L, watch as R, withCtx as z } from "vue";
|
|
23
|
+
import { useMutationObserver as B, useResizeObserver as V } from "@vueuse/core";
|
|
24
|
+
import { Form as H, FormItem as U } from "tdesign-vue-next";
|
|
25
|
+
import ie from "virtual:dlzn-ui/app-params";
|
|
26
|
+
import '../assets/form-BEBdn52r.css';//#region ../../packages/dlzn-ui/components/form/src/form.ts
|
|
27
|
+
var W = {
|
|
25
28
|
autoLabelWidth: !0,
|
|
26
29
|
colon: !0,
|
|
27
|
-
data: () =>
|
|
30
|
+
data: () => j({}),
|
|
28
31
|
disabled: !1,
|
|
29
32
|
labelAlign: "top",
|
|
30
33
|
layout: "inline",
|
|
@@ -34,11 +37,11 @@ var H = {
|
|
|
34
37
|
requiredMark: void 0,
|
|
35
38
|
resetType: "initial",
|
|
36
39
|
showErrorMessage: !0
|
|
37
|
-
},
|
|
40
|
+
}, G = /*#__PURE__*/ r(/* @__PURE__ */ w({
|
|
38
41
|
inheritAttrs: !1,
|
|
39
42
|
name: "TForm",
|
|
40
43
|
__name: "form",
|
|
41
|
-
props: /*@__PURE__*/
|
|
44
|
+
props: /*@__PURE__*/ T({
|
|
42
45
|
autoLabelWidth: { type: Boolean },
|
|
43
46
|
data: {},
|
|
44
47
|
items: {},
|
|
@@ -62,27 +65,27 @@ var H = {
|
|
|
62
65
|
onReset: { type: Function },
|
|
63
66
|
onSubmit: { type: Function },
|
|
64
67
|
onValidate: { type: Function }
|
|
65
|
-
},
|
|
66
|
-
setup(r, { expose:
|
|
67
|
-
let
|
|
68
|
+
}, W),
|
|
69
|
+
setup(r, { expose: w }) {
|
|
70
|
+
let T = r, { customerFormItemComponentInitialValueMap: j, customerFormItemComponentMap: W } = ie, G = re(), K = M(null), q = y(() => T.items.map((e) => {
|
|
68
71
|
if (typeof e.__others == "function") {
|
|
69
72
|
let t = {
|
|
70
73
|
...e,
|
|
71
74
|
...e.__others({
|
|
72
|
-
exposed:
|
|
73
|
-
formData:
|
|
75
|
+
exposed: K,
|
|
76
|
+
formData: T.data
|
|
74
77
|
})
|
|
75
78
|
};
|
|
76
79
|
return delete t.__others, t;
|
|
77
80
|
}
|
|
78
81
|
return e;
|
|
79
82
|
}));
|
|
80
|
-
function
|
|
81
|
-
|
|
82
|
-
if (e.model !== void 0 && !Object.hasOwn(
|
|
83
|
-
if (
|
|
84
|
-
let t =
|
|
85
|
-
|
|
83
|
+
function J() {
|
|
84
|
+
q.value.forEach((e) => {
|
|
85
|
+
if (e.model !== void 0 && !Object.hasOwn(T.data, e.model)) {
|
|
86
|
+
if (j.has(e.component)) {
|
|
87
|
+
let t = j.get(e.component);
|
|
88
|
+
T.data[e.model] = t(e);
|
|
86
89
|
return;
|
|
87
90
|
}
|
|
88
91
|
let t = [
|
|
@@ -100,36 +103,39 @@ var H = {
|
|
|
100
103
|
"yearrange",
|
|
101
104
|
"years"
|
|
102
105
|
].includes(e.type) || e.component === "TSlider" && e.range === !0;
|
|
103
|
-
|
|
106
|
+
T.data[e.model] = t ? [] : e.component === "TCheckbox" ? !1 : e.component === "TSwitch" ? Array.isArray(e.customValue) ? e.customValue[1] : !1 : "";
|
|
104
107
|
}
|
|
105
108
|
});
|
|
106
109
|
}
|
|
107
|
-
|
|
110
|
+
R(q, J, {
|
|
108
111
|
deep: 2,
|
|
109
112
|
immediate: !0
|
|
110
|
-
}),
|
|
113
|
+
}), R(() => T.data, () => {
|
|
111
114
|
e.error("TForm: data is changed");
|
|
112
115
|
});
|
|
113
|
-
let
|
|
116
|
+
let Y = /* @__PURE__ */ new Map(), ae = {
|
|
114
117
|
TCheckbox: i,
|
|
115
118
|
TCheckboxGroup: a,
|
|
119
|
+
TCron: s,
|
|
120
|
+
TDatePicker: d,
|
|
116
121
|
TInput: o,
|
|
117
|
-
TInputNumber:
|
|
118
|
-
TRadioGroup:
|
|
119
|
-
TRangeInput:
|
|
120
|
-
TSelect:
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
TInputNumber: c,
|
|
123
|
+
TRadioGroup: f,
|
|
124
|
+
TRangeInput: ee,
|
|
125
|
+
TSelect: l,
|
|
126
|
+
TSelectSysUser: ne,
|
|
127
|
+
TSlider: p,
|
|
128
|
+
TSwitch: u,
|
|
129
|
+
TTagInput: te,
|
|
124
130
|
TTextarea: m,
|
|
125
|
-
TTree:
|
|
126
|
-
TTreeSelect:
|
|
127
|
-
TUpload:
|
|
131
|
+
TTree: h,
|
|
132
|
+
TTreeSelect: g,
|
|
133
|
+
TUpload: _
|
|
128
134
|
};
|
|
129
|
-
function
|
|
130
|
-
return typeof e == "string" ?
|
|
135
|
+
function oe(e) {
|
|
136
|
+
return typeof e == "string" ? W.has(e) ? (Y.has(e) || Y.set(e, C(W.get(e))), Y.get(e)) : ae[e] : o;
|
|
131
137
|
}
|
|
132
|
-
function
|
|
138
|
+
function se(e) {
|
|
133
139
|
let t = {};
|
|
134
140
|
for (let n in e) !n.startsWith("_") && ![
|
|
135
141
|
"component",
|
|
@@ -138,7 +144,7 @@ var H = {
|
|
|
138
144
|
].includes(n) && (t[n] = e[n]);
|
|
139
145
|
return t;
|
|
140
146
|
}
|
|
141
|
-
function
|
|
147
|
+
function ce(e) {
|
|
142
148
|
let t = {};
|
|
143
149
|
for (let n in e) n.startsWith("_") && (t[n.slice(1)] = e[n]);
|
|
144
150
|
let n = [
|
|
@@ -146,7 +152,7 @@ var H = {
|
|
|
146
152
|
"TCheckboxGroup",
|
|
147
153
|
"TRadioGroup"
|
|
148
154
|
].includes(e.component), r = e.component === "TUpload" ? "请上传文件" : typeof t.label == "string" ? n ? `请选择${t.label}` : `请填写${t.label}` : "必填";
|
|
149
|
-
return t.required === !0 && (t.rules === void 0 && (t.rules = []), !t.rules.some((e) => e.required === !0) &&
|
|
155
|
+
return t.required === !0 && (t.rules === void 0 && (t.rules = []), !t.rules.some((e) => e.required === !0) && T.rules?.[e.model ?? ""] === void 0 && t.rules.unshift({
|
|
150
156
|
message: r,
|
|
151
157
|
required: !0
|
|
152
158
|
}, {
|
|
@@ -157,8 +163,8 @@ var H = {
|
|
|
157
163
|
whitespace: !0
|
|
158
164
|
}), t;
|
|
159
165
|
}
|
|
160
|
-
let
|
|
161
|
-
let e = { ...
|
|
166
|
+
let le = y(() => {
|
|
167
|
+
let e = { ...T };
|
|
162
168
|
if (e.rules !== void 0) {
|
|
163
169
|
let t = {};
|
|
164
170
|
Object.keys(e.rules).forEach((n) => {
|
|
@@ -175,20 +181,20 @@ var H = {
|
|
|
175
181
|
return delete e.items, delete e.msgErrorWhenValidate, delete e.autoLabelWidth, Object.keys(e).forEach((t) => {
|
|
176
182
|
e[t] === void 0 && delete e[t];
|
|
177
183
|
}), e;
|
|
178
|
-
}),
|
|
179
|
-
let e = { ...
|
|
180
|
-
return
|
|
184
|
+
}), X = H, Z = () => {
|
|
185
|
+
let e = { ...T.data };
|
|
186
|
+
return q.value.forEach((t) => {
|
|
181
187
|
t.show === !1 && delete e[t.model];
|
|
182
188
|
}), e;
|
|
183
189
|
};
|
|
184
|
-
function
|
|
190
|
+
function ue(e) {
|
|
185
191
|
if (e !== null) {
|
|
186
192
|
let r = e;
|
|
187
193
|
if (!r.validate._alreadyReplace) {
|
|
188
194
|
let e = r.validate;
|
|
189
195
|
r.validate = (...n) => new Promise((r, i) => {
|
|
190
196
|
e(...n).then((e) => {
|
|
191
|
-
e === !0 ? r(Z()) : (
|
|
197
|
+
e === !0 ? r(Z()) : (T.msgErrorWhenValidate && Object.keys(e).forEach((n) => {
|
|
192
198
|
e[n].forEach((e) => {
|
|
193
199
|
e.result === !1 && t.error(e.message);
|
|
194
200
|
});
|
|
@@ -207,11 +213,11 @@ var H = {
|
|
|
207
213
|
if (!r.clearValidate._alreadyReplace) {
|
|
208
214
|
let e = r.clearValidate;
|
|
209
215
|
r.clearValidate = (...t) => {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
216
|
+
D(() => {
|
|
217
|
+
D(() => {
|
|
218
|
+
D(() => {
|
|
219
|
+
D(() => {
|
|
220
|
+
D(() => {
|
|
215
221
|
e(...t);
|
|
216
222
|
});
|
|
217
223
|
});
|
|
@@ -222,24 +228,24 @@ var H = {
|
|
|
222
228
|
}
|
|
223
229
|
r.getFormData = Z, r.setFormData = (e, t) => {
|
|
224
230
|
let { ignoreKeys: r = [], isNotFalsy: i = !0, numberToStringKeys: a = [], override: o = {}, splitToArrKeys: s = [] } = t ?? {};
|
|
225
|
-
Object.keys(
|
|
226
|
-
r.includes(t) || (s.includes(t) ?
|
|
227
|
-
}), Object.assign(
|
|
231
|
+
Object.keys(T.data).forEach((t) => {
|
|
232
|
+
r.includes(t) || (s.includes(t) ? T.data[t] = typeof e[t] == "string" ? e[t].split(",").filter(Boolean) : [] : i && n(e[t]) || (T.data[t] = e[t]), a.includes(t) && typeof T.data[t] == "number" && (T.data[t] = String(T.data[t])));
|
|
233
|
+
}), Object.assign(T.data, o);
|
|
228
234
|
};
|
|
229
235
|
}
|
|
230
236
|
let r = e ?? {};
|
|
231
|
-
|
|
237
|
+
K.value = r, G.exposed = r;
|
|
232
238
|
}
|
|
233
|
-
let Q =
|
|
234
|
-
|
|
235
|
-
Q.value =
|
|
239
|
+
let Q = I();
|
|
240
|
+
O(() => {
|
|
241
|
+
Q.value = G.exposed.$el.getElementsByClassName("t-form__label"), $(), B(G.exposed.$el, () => {
|
|
236
242
|
$();
|
|
237
243
|
}, {
|
|
238
244
|
attributeFilter: ["class"],
|
|
239
245
|
characterData: !0,
|
|
240
246
|
childList: !0,
|
|
241
247
|
subtree: !0
|
|
242
|
-
}),
|
|
248
|
+
}), V(G.exposed.$el, () => {
|
|
243
249
|
$();
|
|
244
250
|
});
|
|
245
251
|
});
|
|
@@ -247,7 +253,7 @@ var H = {
|
|
|
247
253
|
let e = [...Q.value];
|
|
248
254
|
if (e.forEach((e) => {
|
|
249
255
|
e.style.minWidth = "auto";
|
|
250
|
-
}),
|
|
256
|
+
}), T.labelAlign === "top" || !T.autoLabelWidth) return;
|
|
251
257
|
let t = 0;
|
|
252
258
|
e.forEach((e) => {
|
|
253
259
|
t = Math.max(t, e.offsetWidth);
|
|
@@ -255,21 +261,21 @@ var H = {
|
|
|
255
261
|
e.style.minWidth = `${t}px`;
|
|
256
262
|
});
|
|
257
263
|
}
|
|
258
|
-
return
|
|
259
|
-
...
|
|
260
|
-
ref:
|
|
264
|
+
return A("formData", T.data), A("formExposed", K), A("isFormDisabled", y(() => T.disabled)), A("isFormReadonly", y(() => T.readonly)), w({}), (e, t) => (k(), S(v, null, [x(" eslint-disable vue/no-mutating-props "), (k(), b(F(L(X)), E(E(e.$attrs, {
|
|
265
|
+
...le.value,
|
|
266
|
+
ref: ue
|
|
261
267
|
}), { "label-width": "fit-content" }), {
|
|
262
|
-
default:
|
|
263
|
-
default:
|
|
268
|
+
default: z(() => [(k(!0), S(v, null, N(q.value.filter((e) => e.show !== !1), (t) => (k(), b(L(U), E({ key: t.model ?? t.slot }, { ref_for: !0 }, E({ ...ce(t) }, { class: { no_label_item: L(n)(t._label) } }), { name: t.model }), {
|
|
269
|
+
default: z(() => [t.slot ? P(e.$slots, t.slot, {}, void 0, !0, 0) : (k(), b(F(oe(t.component)), E({
|
|
264
270
|
key: 1,
|
|
265
271
|
modelValue: r.data[t.model],
|
|
266
272
|
"onUpdate:modelValue": (e) => r.data[t.model] = e
|
|
267
|
-
}, { ref_for: !0 },
|
|
273
|
+
}, { ref_for: !0 }, se(t)), null, 16, ["modelValue", "onUpdate:modelValue"]))]),
|
|
268
274
|
_: 2
|
|
269
275
|
}, 1040, ["name"]))), 128))]),
|
|
270
276
|
_: 3
|
|
271
277
|
}, 16))], 2112));
|
|
272
278
|
}
|
|
273
|
-
}), [["__scopeId", "data-v-
|
|
279
|
+
}), [["__scopeId", "data-v-289eb605"]]);
|
|
274
280
|
//#endregion
|
|
275
|
-
export {
|
|
281
|
+
export { W as n, G as t };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { t as e } from "./IndexItem-rd9PLxFu.mjs";
|
|
2
|
+
import { Fragment as t, createBlock as n, createElementBlock as r, defineComponent as i, normalizeStyle as a, openBlock as o, renderList as s } from "vue";
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region ../../packages/dlzn-ui/components/overview/src/overview.vue
|
|
5
|
+
var c = /* @__PURE__ */ i({
|
|
6
|
+
__name: "overview",
|
|
7
|
+
props: {
|
|
8
|
+
itemMinWidth: { default: 250 },
|
|
9
|
+
items: {}
|
|
10
|
+
},
|
|
11
|
+
setup(i) {
|
|
12
|
+
return (c, l) => (o(), r("div", {
|
|
13
|
+
class: "grid grid-cols-[repeat(auto-fill,minmax(var(--item-width),auto))] gap-3",
|
|
14
|
+
style: a([{ "line-height": "24px" }, { "--item-width": `${i.itemMinWidth}px` }])
|
|
15
|
+
}, [(o(!0), r(t, null, s(i.items, (t) => (o(), n(e, {
|
|
16
|
+
key: t.label,
|
|
17
|
+
item: t
|
|
18
|
+
}, null, 8, ["item"]))), 128))], 4));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
//#endregion
|
|
22
|
+
export { c as t };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region ../../packages/dlzn-ui/components/overview/src/overview.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
let t = e.value;
|
|
4
|
+
return typeof t == "number" && (t = String(t)), typeof t == "string" ? e.multiple ? t.split(e.splitSymbol).filter(Boolean) : [t] : [];
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { e as t };
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { t as e } from "./button-Cb2lySJu.mjs";
|
|
2
|
+
import { n as t } from "./useAppContext-D47amIp5.mjs";
|
|
3
|
+
import n from "../plugins/autoImport/$msg/index.mjs";
|
|
4
|
+
import { i as r } from "./user-DsSzsUIW.mjs";
|
|
5
|
+
import { t as i } from "./card-BfHb58zl.mjs";
|
|
6
|
+
import { t as a } from "./page-table-BMN86ain.mjs";
|
|
7
|
+
import o from "../plugins/autoImport/dayjs/index.mjs";
|
|
8
|
+
import { t as s } from "./page-query-Cd_ULbqY.mjs";
|
|
9
|
+
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createSlots as p, createVNode as m, defineComponent as h, guardReactiveProps as g, mergeDefaults as _, mergeProps as v, nextTick as y, normalizeProps as b, openBlock as x, ref as S, renderList as C, renderSlot as w, unref as T, useTemplateRef as E, withCtx as D } from "vue";
|
|
10
|
+
import { cloneDeep as O } from "lodash-es";
|
|
11
|
+
import { useRoute as k } from "vue-router";
|
|
12
|
+
//#region ../../packages/dlzn-ui/components/page-list/src/page-list.ts
|
|
13
|
+
var A = { isFirstQueryByParent: !1 };
|
|
14
|
+
function j({ pageQueryRef: e, pageTableRef: t, props: n, route: i }) {
|
|
15
|
+
let a = S({});
|
|
16
|
+
function s() {
|
|
17
|
+
e.value === null ? (a.value = {}, t.value.query(!0)) : e.value.query();
|
|
18
|
+
}
|
|
19
|
+
function c() {
|
|
20
|
+
e.value === null ? (a.value = {}, t.value.reset()) : e.value.reset();
|
|
21
|
+
}
|
|
22
|
+
function u(e) {
|
|
23
|
+
a.value = O(e), t.value.query(!0);
|
|
24
|
+
}
|
|
25
|
+
function d(e) {
|
|
26
|
+
a.value = O(e), t.value.reset();
|
|
27
|
+
}
|
|
28
|
+
n.isFirstQueryByParent || y(() => {
|
|
29
|
+
s();
|
|
30
|
+
});
|
|
31
|
+
let f = l(() => t.value?.finallyQueryParams), p = l(() => e.value?.formData);
|
|
32
|
+
function m() {
|
|
33
|
+
e.value.resetFormData();
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
currentQueryParams: p,
|
|
37
|
+
doQuery: s,
|
|
38
|
+
doReset: c,
|
|
39
|
+
exportProps: l(() => {
|
|
40
|
+
let e = n.apis.export;
|
|
41
|
+
if (e === void 0) return {};
|
|
42
|
+
let t = { meta: {
|
|
43
|
+
useDownload: `${e.exportFileName ?? i.meta.title}_${o().format("YYYY-MM-DD_HH:mm:ss")}.xlsx`,
|
|
44
|
+
useFormData: !0,
|
|
45
|
+
useResponseBlob: !0
|
|
46
|
+
} };
|
|
47
|
+
return {
|
|
48
|
+
default: "导出",
|
|
49
|
+
disabled: f.value === void 0,
|
|
50
|
+
permission: e.permission,
|
|
51
|
+
popconfirm: {
|
|
52
|
+
content: "确定导出吗?",
|
|
53
|
+
onConfirm: async () => {
|
|
54
|
+
await (typeof e.method == "string" ? r.Post(e.method, f.value, t) : e.method(f.value));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}),
|
|
59
|
+
finallyFormItems: l(() => n.formItems?.map((e) => {
|
|
60
|
+
let t = { ...e };
|
|
61
|
+
return delete t._required, delete t._rules, delete t.__others, t;
|
|
62
|
+
}) ?? []),
|
|
63
|
+
finallyQueryParams: f,
|
|
64
|
+
onQuery: u,
|
|
65
|
+
onReset: d,
|
|
66
|
+
queryParams: a,
|
|
67
|
+
resetCurrentQueryParams: m
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region ../../packages/dlzn-ui/components/page-list/src/page-list.vue
|
|
72
|
+
var M = /* @__PURE__ */ h({
|
|
73
|
+
inheritAttrs: !1,
|
|
74
|
+
__name: "page-list",
|
|
75
|
+
props: /*@__PURE__*/ _({
|
|
76
|
+
apis: {},
|
|
77
|
+
columns: {},
|
|
78
|
+
tableOtherProps: {},
|
|
79
|
+
cardProps: {},
|
|
80
|
+
formItems: {},
|
|
81
|
+
formOtherProps: {},
|
|
82
|
+
initialFormData: {},
|
|
83
|
+
isFirstQueryByParent: { type: Boolean },
|
|
84
|
+
operations: {}
|
|
85
|
+
}, { ...A }),
|
|
86
|
+
setup(o, { expose: h }) {
|
|
87
|
+
let _ = o, y = k(), S = E("pageQueryRef"), O = E("pageTableRef"), { currentQueryParams: A, doQuery: M, doReset: N, exportProps: P, finallyFormItems: F, finallyQueryParams: I, onQuery: L, onReset: R, queryParams: z, resetCurrentQueryParams: B } = j({
|
|
88
|
+
pageQueryRef: S,
|
|
89
|
+
pageTableRef: O,
|
|
90
|
+
props: _,
|
|
91
|
+
route: y
|
|
92
|
+
}), V = l(() => O.value?.selectedRows ?? []), H = l(() => O.value?.selectedRowKeys ?? []), U = l(() => {
|
|
93
|
+
let e = _.apis.delete;
|
|
94
|
+
return e ? {
|
|
95
|
+
default: "批量删除",
|
|
96
|
+
disabled: H.value.length === 0,
|
|
97
|
+
permission: e.permission,
|
|
98
|
+
popconfirm: {
|
|
99
|
+
content: "确认删除所选项吗?",
|
|
100
|
+
onConfirm: async () => {
|
|
101
|
+
await (typeof e.method == "string" ? r.Delete(`${e.method}/${H.value.join(",")}`) : e.method(V.value)), e.callback?.(), n.success("删除成功"), M();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
} : {};
|
|
105
|
+
}), W = l(() => {
|
|
106
|
+
let e = _.apis.delete;
|
|
107
|
+
if (e !== void 0) {
|
|
108
|
+
let i = _.columns.findIndex((e) => e.colKey === "_operation"), a = [..._.columns], o = ({ row: t }) => ({
|
|
109
|
+
default: "删除",
|
|
110
|
+
permission: e.permission,
|
|
111
|
+
popconfirm: {
|
|
112
|
+
content: "确认删除吗",
|
|
113
|
+
onConfirm: async () => {
|
|
114
|
+
await (typeof e.method == "string" ? r.Delete(`${e.method}/${t[O.value.rowKey]}`) : e.method([t])), e.callback?.(), n.success("删除成功"), M();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
if (i === -1) return a.push({
|
|
119
|
+
cell: {
|
|
120
|
+
buttons: [o],
|
|
121
|
+
component: "Buttons"
|
|
122
|
+
},
|
|
123
|
+
colKey: "_operation",
|
|
124
|
+
title: "操作"
|
|
125
|
+
}), a;
|
|
126
|
+
let s = _.columns[i]?.cell?.buttons;
|
|
127
|
+
if (Array.isArray(s)) return a[i] = {
|
|
128
|
+
...a[i],
|
|
129
|
+
cell: {
|
|
130
|
+
...a[i].cell,
|
|
131
|
+
buttons: [...s, o]
|
|
132
|
+
}
|
|
133
|
+
}, a;
|
|
134
|
+
t.warning("操作列必须使用数组形式");
|
|
135
|
+
}
|
|
136
|
+
return _.columns;
|
|
137
|
+
});
|
|
138
|
+
return h({
|
|
139
|
+
currentQueryParams: A,
|
|
140
|
+
finallyQueryParams: I,
|
|
141
|
+
query: M,
|
|
142
|
+
reset: N,
|
|
143
|
+
resetCurrentQueryParams: B,
|
|
144
|
+
selectedRowKeys: H,
|
|
145
|
+
selectedRows: V
|
|
146
|
+
}), (t, n) => (x(), u(T(i), b(g(v(t.$attrs, {
|
|
147
|
+
...o.cardProps ?? {},
|
|
148
|
+
bodyFullHeight: !0,
|
|
149
|
+
bodyClassName: ["!flex flex-col overflow-y-auto", o.cardProps?.bodyClassName].filter(Boolean).join(" ")
|
|
150
|
+
}, { class: "h-full" }))), {
|
|
151
|
+
default: D(() => [T(F).length > 0 ? (x(), u(T(s), v({
|
|
152
|
+
key: 0,
|
|
153
|
+
ref_key: "pageQueryRef",
|
|
154
|
+
ref: S,
|
|
155
|
+
data: o.initialFormData,
|
|
156
|
+
items: T(F)
|
|
157
|
+
}, o.formOtherProps, {
|
|
158
|
+
onQuery: T(L),
|
|
159
|
+
onReset: T(R)
|
|
160
|
+
}), p({ _: 2 }, [C(Object.keys(t.$slots).filter((e) => !e.startsWith("table-")), (e) => ({
|
|
161
|
+
name: e,
|
|
162
|
+
fn: D((n) => [w(t.$slots, e, b(g(n)))])
|
|
163
|
+
}))]), 1040, [
|
|
164
|
+
"data",
|
|
165
|
+
"items",
|
|
166
|
+
"onQuery",
|
|
167
|
+
"onReset"
|
|
168
|
+
])) : d("v-if", !0), m(T(a), v({
|
|
169
|
+
ref_key: "pageTableRef",
|
|
170
|
+
ref: O,
|
|
171
|
+
columns: W.value,
|
|
172
|
+
"flex-height": !0,
|
|
173
|
+
"initial-query": !1,
|
|
174
|
+
method: o.apis.list.method,
|
|
175
|
+
"query-params": T(z),
|
|
176
|
+
"show-column-config-btn": !0,
|
|
177
|
+
"show-row-select": o.apis.delete?.showBatch === !0 ? "multiple" : void 0,
|
|
178
|
+
"show-toggle-fullscreen-btn": !0,
|
|
179
|
+
"watch-query-params": !1
|
|
180
|
+
}, o.tableOtherProps), p({
|
|
181
|
+
"table-operations": D(() => [
|
|
182
|
+
(x(!0), f(c, null, C(o.operations?.filter((e) => e.show !== !1), (t, n) => (x(), u(T(e), v({ key: n }, { ref_for: !0 }, t), null, 16))), 128)),
|
|
183
|
+
o.apis.delete?.showBatch ? (x(), u(T(e), b(v({ key: 0 }, U.value)), null, 16)) : d("v-if", !0),
|
|
184
|
+
o.apis.export ? (x(), u(T(e), b(v({ key: 1 }, T(P))), null, 16)) : d("v-if", !0)
|
|
185
|
+
]),
|
|
186
|
+
_: 2
|
|
187
|
+
}, [C(Object.keys(t.$slots).filter((e) => [
|
|
188
|
+
"table-operations",
|
|
189
|
+
"table-top",
|
|
190
|
+
"table-bottom"
|
|
191
|
+
].includes(e)), (e) => ({
|
|
192
|
+
name: e,
|
|
193
|
+
fn: D((n) => [w(t.$slots, e, b(g(n)))])
|
|
194
|
+
})), C(Object.keys(t.$slots).filter((e) => e.startsWith("table-") && ![
|
|
195
|
+
"table-operations",
|
|
196
|
+
"table-top",
|
|
197
|
+
"table-bottom"
|
|
198
|
+
].includes(e)), (e) => ({
|
|
199
|
+
name: e.slice(6),
|
|
200
|
+
fn: D((n) => [w(t.$slots, e, b(g(n)))])
|
|
201
|
+
}))]), 1040, [
|
|
202
|
+
"columns",
|
|
203
|
+
"method",
|
|
204
|
+
"query-params",
|
|
205
|
+
"show-row-select"
|
|
206
|
+
])]),
|
|
207
|
+
_: 3
|
|
208
|
+
}, 16));
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
//#endregion
|
|
212
|
+
export { A as n, j as r, M as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "./form-
|
|
1
|
+
import { n as e } from "./form-iyDxFJGm.mjs";
|
|
2
2
|
import { computed as t, createBlock as n, createCommentVNode as r, createSlots as i, createTextVNode as a, createVNode as o, defineComponent as s, guardReactiveProps as c, mergeDefaults as l, mergeProps as u, nextTick as d, normalizeProps as f, openBlock as p, ref as m, renderList as h, renderSlot as g, resolveComponent as _, toDisplayString as v, useTemplateRef as y, watch as b, withCtx as x } from "vue";
|
|
3
3
|
import { useResizeObserver as S } from "@vueuse/core";
|
|
4
4
|
import { cloneDeep as C, groupBy as w } from "lodash-es";
|