@vue-start/pro 0.4.12 → 0.5.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/CHANGELOG.md +77 -77
- package/README.md +149 -149
- package/dist/index.d.ts +912 -417
- package/dist/index.es.js +2006 -1241
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,158 +1,350 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
var It = Object.defineProperty;
|
|
2
|
+
var Mt = (e, t, n) => t in e ? It(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var X = (e, t, n) => (Mt(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
import { defineComponent as M, provide as re, inject as Q, ref as j, computed as R, h as ie, isVNode as be, reactive as z, createVNode as h, Fragment as B, mergeProps as O, createTextVNode as je, toRef as Dt } from "vue";
|
|
5
|
+
import { reduce as V, get as b, isFunction as w, map as A, isString as Te, forEach as ee, size as J, set as ae, pick as K, omit as C, isArray as ne, some as se, keys as $, head as Nt, isObject as Se, filter as x, split as Ot, isEmpty as Lt, mergeWith as At, startsWith as Rt, mapKeys as wt, has as Xe, debounce as $t, clone as kt, isBoolean as ue, every as Ft, sortBy as Je, cloneDeep as Kt } from "lodash";
|
|
6
|
+
import { Observable as xt, filter as ve, tap as Pe, merge as jt, Subject as qt } from "rxjs";
|
|
7
|
+
import { useEffect as W, useState as we, setReactiveValue as Qe, useWatch as Ye, useUpdateKey as Ut, useResizeObserver as Bt } from "@vue-start/hooks";
|
|
8
|
+
import { useRequestProvide as ye, isDoneRequestActor as Ze, isFailedRequestActor as et } from "@vue-start/request";
|
|
9
|
+
import { map as Vt, distinctUntilChanged as Gt } from "rxjs/operators";
|
|
10
|
+
import { useRouter as _t, useRoute as zt } from "vue-router";
|
|
11
|
+
const Wt = () => ({
|
|
12
|
+
elementMap: { type: Object },
|
|
13
|
+
formElementMap: { type: Object },
|
|
14
|
+
columns: { type: Array },
|
|
15
|
+
columnState: { type: Object }
|
|
16
|
+
}), de = Wt(), Ht = () => ({
|
|
17
|
+
elementMap: { type: Object },
|
|
18
|
+
formElementMap: { type: Object },
|
|
19
|
+
registerStores: { type: Array },
|
|
20
|
+
registerActors: { type: Array },
|
|
21
|
+
registerMetas: { type: Array }
|
|
22
|
+
}), $e = Symbol("pro-config"), Y = () => Q($e) || {}, dr = M({
|
|
23
|
+
props: {
|
|
24
|
+
...Ht()
|
|
17
25
|
},
|
|
18
|
-
|
|
19
|
-
|
|
26
|
+
setup: (e, { slots: t }) => {
|
|
27
|
+
const n = V(e.registerStores, (c, f) => ({ ...c, [f.key]: f }), {}), s = V(e.registerActors, (c, f) => ({ ...c, [f.actor.name]: f }), {}), o = V(e.registerMetas, (c, f) => ({ ...c, [f.actorName]: f }), {});
|
|
28
|
+
ln(o, s);
|
|
29
|
+
const { dispatchRequest: a } = ye(), r = (c, f, p) => {
|
|
30
|
+
const g = b(s, c);
|
|
31
|
+
if (!!g)
|
|
32
|
+
return a(g.actor, f, p);
|
|
33
|
+
};
|
|
34
|
+
return re($e, {
|
|
35
|
+
elementMap: e.elementMap,
|
|
36
|
+
formElementMap: e.formElementMap,
|
|
37
|
+
registerStoreMap: n,
|
|
38
|
+
registerActorMap: s,
|
|
39
|
+
registerMetaMap: o,
|
|
40
|
+
dispatchRequest: r
|
|
41
|
+
}), () => {
|
|
42
|
+
var c;
|
|
43
|
+
return (c = t.default) == null ? void 0 : c.call(t);
|
|
44
|
+
};
|
|
20
45
|
}
|
|
21
|
-
}),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
46
|
+
}), mr = (e = {}) => (t) => {
|
|
47
|
+
t.provide($e, e);
|
|
48
|
+
}, Xt = Object.prototype.hasOwnProperty, qe = (e, t) => e === t ? e !== 0 || t !== 0 || 1 / e === 1 / t : e !== e && t !== t, Jt = (e, t) => {
|
|
49
|
+
if (qe(e, t))
|
|
50
|
+
return !0;
|
|
51
|
+
if (typeof e != "object" || e === null || typeof t != "object" || t === null)
|
|
52
|
+
return !1;
|
|
53
|
+
const n = Object.keys(e), s = Object.keys(t);
|
|
54
|
+
if (n.length !== s.length)
|
|
55
|
+
return !1;
|
|
56
|
+
for (let o = 0; o < n.length; o++)
|
|
57
|
+
if (!Xt.call(t, n[o]) || !qe(e[n[o]], t[n[o]]))
|
|
58
|
+
return !1;
|
|
59
|
+
return !0;
|
|
60
|
+
}, Qt = "$store", Ie = () => Q(Qt), Yt = (e, t) => (n = {}, s) => {
|
|
61
|
+
const o = typeof e == "function" ? e(s) : e;
|
|
62
|
+
if (o === "")
|
|
63
|
+
return n;
|
|
64
|
+
const a = t(n[o], s), r = {};
|
|
65
|
+
for (const c in n)
|
|
66
|
+
c !== o && (r[c] = n[c]);
|
|
67
|
+
return typeof a < "u" && (r[o] = a), r;
|
|
68
|
+
};
|
|
69
|
+
class Zt {
|
|
70
|
+
constructor(t) {
|
|
71
|
+
X(this, "group");
|
|
72
|
+
X(this, "name");
|
|
73
|
+
X(this, "stage");
|
|
74
|
+
X(this, "effect");
|
|
75
|
+
X(this, "arg");
|
|
76
|
+
X(this, "opts");
|
|
77
|
+
this.group = t.group || "UN_GROUPED", this.name = t.name || "UN_NAMED", this.stage = t.stage, this.effect = t.effect, this.arg = t.arg || {}, this.opts = t.opts || {};
|
|
78
|
+
}
|
|
79
|
+
static of(t) {
|
|
80
|
+
return new this({ group: t });
|
|
81
|
+
}
|
|
82
|
+
named(t, n) {
|
|
83
|
+
return new this.constructor({
|
|
84
|
+
...this,
|
|
85
|
+
name: t,
|
|
86
|
+
opts: {
|
|
87
|
+
...this.opts,
|
|
88
|
+
...n
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
staged(t) {
|
|
93
|
+
return new this.constructor({
|
|
94
|
+
...this,
|
|
95
|
+
stage: t
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
effectWith(t) {
|
|
99
|
+
return new this.constructor({
|
|
100
|
+
...this,
|
|
101
|
+
effect: t
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
effectOn(t, n) {
|
|
105
|
+
return this.effectWith(Yt(t, n));
|
|
106
|
+
}
|
|
107
|
+
with(t, n) {
|
|
108
|
+
return new this.constructor({
|
|
109
|
+
...this,
|
|
110
|
+
arg: t,
|
|
111
|
+
opts: {
|
|
112
|
+
...this.opts,
|
|
113
|
+
...n
|
|
114
|
+
}
|
|
33
115
|
});
|
|
34
116
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
117
|
+
invoke(t) {
|
|
118
|
+
t.dispatch(this);
|
|
119
|
+
}
|
|
120
|
+
get type() {
|
|
121
|
+
let t = !1;
|
|
122
|
+
for (const n in this.opts)
|
|
123
|
+
n !== "parentActor" && (this.opts[n], t = !0);
|
|
124
|
+
return `@@${this.group}/${this.name}${this.stage ? `::${this.stage}` : ""}${t ? `${JSON.stringify(this.opts)}` : ""}`;
|
|
125
|
+
}
|
|
126
|
+
is(t) {
|
|
127
|
+
const n = this.isSameGroup(t) && t.name === this.name;
|
|
128
|
+
return this.stage ? n && t.stage === this.stage : n;
|
|
129
|
+
}
|
|
130
|
+
isSameGroup(t) {
|
|
131
|
+
return t.group === this.group;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
class Me extends xt {
|
|
135
|
+
constructor(n, s, o = Jt) {
|
|
136
|
+
super((a) => this.state$.pipe(
|
|
137
|
+
Vt((r) => {
|
|
138
|
+
const c = this.mapper(r);
|
|
139
|
+
return o(c, this._value) || (this._value = c), this._value;
|
|
140
|
+
}),
|
|
141
|
+
Gt()
|
|
142
|
+
).subscribe(a));
|
|
143
|
+
X(this, "_value");
|
|
144
|
+
this.state$ = n, this.mapper = s;
|
|
145
|
+
}
|
|
146
|
+
static from(n, s) {
|
|
147
|
+
return new Me(n, s, s.equalFn);
|
|
148
|
+
}
|
|
149
|
+
get value() {
|
|
150
|
+
return typeof this._value > "u" && (this._value = this.mapper(this.state$.value)), this._value;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
const en = (e, t) => {
|
|
154
|
+
const [n, s] = we(t || e.value);
|
|
155
|
+
return W(() => {
|
|
156
|
+
const o = e.subscribe((a) => {
|
|
157
|
+
s(a);
|
|
158
|
+
});
|
|
159
|
+
return () => {
|
|
160
|
+
o && o.unsubscribe();
|
|
161
|
+
};
|
|
162
|
+
}, void 0), n;
|
|
163
|
+
}, tn = (e, t) => {
|
|
164
|
+
const n = j(t || e.value);
|
|
165
|
+
return W(() => {
|
|
166
|
+
const s = e.subscribe((o) => {
|
|
167
|
+
n.value = o;
|
|
168
|
+
});
|
|
169
|
+
return () => {
|
|
170
|
+
s && s.unsubscribe();
|
|
171
|
+
};
|
|
172
|
+
}, []), n;
|
|
173
|
+
}, nn = (e, t) => Me.from(e, t), rn = (e) => nn(Ie(), e || ((t) => t)), an = Zt.of("state"), tt = an.named("update").effectOn(
|
|
174
|
+
(e) => e.opts.key,
|
|
175
|
+
(e, t) => t.arg(e)
|
|
176
|
+
), nt = () => {
|
|
177
|
+
const e = Ie();
|
|
178
|
+
return (t, n, s, o) => {
|
|
179
|
+
const a = `${s ? "$" : ""}${t}`, r = w(o) ? o() : o;
|
|
180
|
+
tt.with(
|
|
181
|
+
(c = r) => w(n) ? n(c) : n,
|
|
182
|
+
{ key: a }
|
|
183
|
+
).invoke(e);
|
|
184
|
+
};
|
|
185
|
+
}, on = (e, t, n) => {
|
|
186
|
+
const s = `${n ? "$" : ""}${e}`, o = w(t) ? t() : t, a = Ie(), r = (p) => tt.with(
|
|
187
|
+
(g = o) => w(p) ? p(g) : p,
|
|
188
|
+
{ key: s }
|
|
189
|
+
).invoke(a), c = Me.from(a, (p) => b(p, [s], o));
|
|
190
|
+
return [en(c), r];
|
|
191
|
+
}, sn = (e, t, n = !1) => () => {
|
|
192
|
+
const [s, o] = on(e, t, n);
|
|
193
|
+
return [s, o];
|
|
194
|
+
}, rt = (e) => (t, n) => {
|
|
195
|
+
const { requestSubject$: s } = ye(), o = new Set(A(t, (a) => Te(a) ? a : a.name));
|
|
196
|
+
W(() => {
|
|
197
|
+
const a = s.pipe(
|
|
198
|
+
ve(e),
|
|
199
|
+
Pe((r) => {
|
|
200
|
+
o.has(r.name) && n(r);
|
|
42
201
|
})
|
|
43
202
|
).subscribe();
|
|
44
203
|
return () => {
|
|
45
|
-
|
|
204
|
+
a.unsubscribe();
|
|
46
205
|
};
|
|
47
206
|
}, []);
|
|
48
|
-
},
|
|
49
|
-
const { requestSubject$:
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var
|
|
56
|
-
|
|
207
|
+
}, fr = rt(Ze), pr = rt(et), cn = (e, t, n) => {
|
|
208
|
+
const { requestSubject$: s, dispatchRequest: o } = ye(), a = new Set(A(e, (c) => Te(c) ? c : c.name)), r = {};
|
|
209
|
+
W(() => {
|
|
210
|
+
const c = jt(
|
|
211
|
+
s.pipe(
|
|
212
|
+
ve(Ze),
|
|
213
|
+
Pe((f) => {
|
|
214
|
+
var p, g;
|
|
215
|
+
a.has(f.name) && ((p = t.onSuccess) == null || p.call(t, f), (g = t.onFinish) == null || g.call(t, f), r[f.name] = void 0);
|
|
57
216
|
})
|
|
58
217
|
),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
var
|
|
63
|
-
|
|
218
|
+
s.pipe(
|
|
219
|
+
ve(et),
|
|
220
|
+
Pe((f) => {
|
|
221
|
+
var p, g;
|
|
222
|
+
a.has(f.name) && ((p = t.onFailed) == null || p.call(t, f), (g = t.onFinish) == null || g.call(t, f), r[f.name] = void 0);
|
|
64
223
|
})
|
|
65
224
|
)
|
|
66
225
|
).subscribe();
|
|
67
226
|
return () => {
|
|
68
|
-
|
|
69
|
-
|
|
227
|
+
c.unsubscribe(), n && ee(r, (f) => {
|
|
228
|
+
f && o({ ...f, stage: "CANCEL" });
|
|
70
229
|
});
|
|
71
230
|
};
|
|
72
231
|
}, []);
|
|
73
|
-
},
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const
|
|
79
|
-
|
|
232
|
+
}, un = (e, t, n) => {
|
|
233
|
+
var o;
|
|
234
|
+
const s = (o = e.res) == null ? void 0 : o.data;
|
|
235
|
+
return t ? t(s, e) : n ? b(s, n) : s;
|
|
236
|
+
}, yr = () => {
|
|
237
|
+
const e = Ie(), { registerMetaMap: t, dispatchRequest: n } = Y();
|
|
238
|
+
return (s) => {
|
|
239
|
+
const o = b(t, s);
|
|
240
|
+
if (!o)
|
|
241
|
+
return;
|
|
242
|
+
const a = o.storeName || s;
|
|
243
|
+
b(e.value, a) || n(s, o.initParams || {});
|
|
244
|
+
};
|
|
245
|
+
}, ln = (e, t) => {
|
|
246
|
+
const { requestSubject$: n } = ye(), s = nt(), o = (a) => {
|
|
247
|
+
const r = b(e, a.name), c = b(t, a.name);
|
|
248
|
+
return !!(r && c && c.actor);
|
|
249
|
+
};
|
|
250
|
+
W(() => {
|
|
251
|
+
const a = n.pipe(
|
|
252
|
+
ve(o),
|
|
253
|
+
Pe((r) => {
|
|
254
|
+
const c = b(e, r.name);
|
|
255
|
+
if (!c)
|
|
256
|
+
return;
|
|
257
|
+
const f = c.storeName || r.name, p = un(r, c.convertData, c.convertPath);
|
|
258
|
+
s(f, p, !1, void 0);
|
|
259
|
+
})
|
|
260
|
+
).subscribe();
|
|
261
|
+
return () => {
|
|
262
|
+
a.unsubscribe();
|
|
263
|
+
};
|
|
264
|
+
}, []);
|
|
265
|
+
}, at = (e) => e.formValueType || e.valueType || "text", oe = (e) => {
|
|
266
|
+
var t;
|
|
267
|
+
return ((t = e.formItemProps) == null ? void 0 : t.name) || e.dataIndex;
|
|
268
|
+
}, ot = (e, t, n = !0) => {
|
|
269
|
+
var c;
|
|
270
|
+
const s = at(t), o = b(e, s);
|
|
271
|
+
if (!o)
|
|
80
272
|
return null;
|
|
81
|
-
const
|
|
82
|
-
return
|
|
83
|
-
key:
|
|
84
|
-
name:
|
|
85
|
-
label:
|
|
86
|
-
...
|
|
87
|
-
fieldProps: C(
|
|
88
|
-
showProps:
|
|
89
|
-
}, (
|
|
90
|
-
},
|
|
91
|
-
var
|
|
92
|
-
const
|
|
93
|
-
return
|
|
94
|
-
...C(
|
|
95
|
-
showProps:
|
|
96
|
-
value:
|
|
97
|
-
}, (
|
|
98
|
-
},
|
|
99
|
-
var
|
|
100
|
-
const
|
|
101
|
-
...
|
|
273
|
+
const a = oe(t), r = n ? t.formItemProps : C(t.formItemProps, "rules");
|
|
274
|
+
return ie(o, {
|
|
275
|
+
key: a,
|
|
276
|
+
name: a,
|
|
277
|
+
label: t.title,
|
|
278
|
+
...r,
|
|
279
|
+
fieldProps: C(t.formFieldProps, "slots"),
|
|
280
|
+
showProps: t.showProps
|
|
281
|
+
}, (c = t.formFieldProps) == null ? void 0 : c.slots);
|
|
282
|
+
}, ke = (e, t, n) => {
|
|
283
|
+
var a;
|
|
284
|
+
const s = t.valueType || "text", o = b(e, s);
|
|
285
|
+
return o ? ie(o, {
|
|
286
|
+
...C(t.formFieldProps, "slots"),
|
|
287
|
+
showProps: t.showProps,
|
|
288
|
+
value: n
|
|
289
|
+
}, (a = t.formFieldProps) == null ? void 0 : a.slots) : null;
|
|
290
|
+
}, Fe = (e, t) => A(t, (n) => me(e, n)), st = (e, t) => {
|
|
291
|
+
var o;
|
|
292
|
+
const n = t.elementProps, s = {
|
|
293
|
+
...t.elementProps
|
|
102
294
|
};
|
|
103
|
-
return
|
|
104
|
-
const
|
|
105
|
-
if (!(!
|
|
106
|
-
if (
|
|
107
|
-
if (
|
|
295
|
+
return ee((o = t.highConfig$) == null ? void 0 : o.registerPropsTrans, (a) => {
|
|
296
|
+
const r = b(n, a.name);
|
|
297
|
+
if (!(!r || be(r))) {
|
|
298
|
+
if (ne(r)) {
|
|
299
|
+
if (se(r, (c) => be(c)))
|
|
108
300
|
return;
|
|
109
|
-
|
|
301
|
+
ae(s, a.name, Fe(e, r));
|
|
110
302
|
return;
|
|
111
303
|
}
|
|
112
|
-
!
|
|
113
|
-
const
|
|
114
|
-
...
|
|
115
|
-
params$:
|
|
116
|
-
} :
|
|
117
|
-
return
|
|
118
|
-
...
|
|
119
|
-
elementProps:
|
|
304
|
+
!r.elementType || (a.isFun ? ae(s, a.name, (...c) => {
|
|
305
|
+
const f = a.needParams ? {
|
|
306
|
+
...r.elementProps,
|
|
307
|
+
params$: c
|
|
308
|
+
} : r.elementProps;
|
|
309
|
+
return me(e, {
|
|
310
|
+
...r,
|
|
311
|
+
elementProps: f
|
|
120
312
|
});
|
|
121
|
-
}) :
|
|
313
|
+
}) : ae(s, a.name, me(e, r)));
|
|
122
314
|
}
|
|
123
|
-
}),
|
|
124
|
-
},
|
|
125
|
-
const
|
|
126
|
-
return
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
const
|
|
130
|
-
...
|
|
131
|
-
params$:
|
|
132
|
-
} :
|
|
133
|
-
return
|
|
134
|
-
...
|
|
135
|
-
elementProps:
|
|
315
|
+
}), s;
|
|
316
|
+
}, ct = (e, t) => {
|
|
317
|
+
const n = J(t.children) > 0 ? Fe(e, t.children) : void 0, s = t.childrenSlotName || "default", o = C(t.slots, n ? s : "");
|
|
318
|
+
return ee($(o), (a) => {
|
|
319
|
+
const r = o[a];
|
|
320
|
+
r && !w(r) && r.elementType && (o[a] = (...c) => {
|
|
321
|
+
const f = r.needParams ? {
|
|
322
|
+
...r.elementProps,
|
|
323
|
+
params$: c
|
|
324
|
+
} : r.elementProps;
|
|
325
|
+
return me(e, {
|
|
326
|
+
...r,
|
|
327
|
+
elementProps: f
|
|
136
328
|
});
|
|
137
329
|
});
|
|
138
330
|
}), {
|
|
139
|
-
[
|
|
140
|
-
...
|
|
331
|
+
[s]: n ? () => n : void 0,
|
|
332
|
+
...o
|
|
141
333
|
};
|
|
142
|
-
},
|
|
143
|
-
const
|
|
144
|
-
if (
|
|
145
|
-
return
|
|
146
|
-
key:
|
|
334
|
+
}, me = (e, t) => {
|
|
335
|
+
const n = b(e, t.elementType) || t.elementType;
|
|
336
|
+
if (t.highConfig$)
|
|
337
|
+
return ie(mn, {
|
|
338
|
+
key: t.elementId,
|
|
147
339
|
elementMap: e,
|
|
148
|
-
elementConfig:
|
|
340
|
+
elementConfig: t
|
|
149
341
|
});
|
|
150
|
-
const
|
|
151
|
-
return
|
|
152
|
-
key:
|
|
153
|
-
...
|
|
154
|
-
},
|
|
155
|
-
},
|
|
342
|
+
const s = ct(e, t), o = st(e, t);
|
|
343
|
+
return ie(n, {
|
|
344
|
+
key: t.elementId,
|
|
345
|
+
...o
|
|
346
|
+
}, s);
|
|
347
|
+
}, dn = (e) => ne(e) ? Nt(e) : Te(e) && e.indexOf(".") > 0 ? e.substring(0, e.indexOf(".")) : e, mn = M({
|
|
156
348
|
props: {
|
|
157
349
|
elementMap: {
|
|
158
350
|
type: Object
|
|
@@ -163,43 +355,55 @@ const Et = () => ({
|
|
|
163
355
|
},
|
|
164
356
|
setup: (e) => {
|
|
165
357
|
const {
|
|
166
|
-
state:
|
|
167
|
-
sendEvent:
|
|
168
|
-
} =
|
|
169
|
-
elementMap:
|
|
170
|
-
elementConfig:
|
|
171
|
-
} = e,
|
|
358
|
+
state: t,
|
|
359
|
+
sendEvent: n
|
|
360
|
+
} = he(), {
|
|
361
|
+
elementMap: s,
|
|
362
|
+
elementConfig: o
|
|
363
|
+
} = e, a = o.highConfig$, r = st(s, o), c = V(a.registerEventList, (m, u) => ({
|
|
172
364
|
...m,
|
|
173
|
-
[
|
|
174
|
-
|
|
175
|
-
type:
|
|
176
|
-
payload:
|
|
365
|
+
[u.name]: (...l) => {
|
|
366
|
+
n({
|
|
367
|
+
type: u.sendEventName || o.elementId,
|
|
368
|
+
payload: l
|
|
177
369
|
});
|
|
178
370
|
}
|
|
179
|
-
}), {}),
|
|
180
|
-
if (!
|
|
371
|
+
}), {}), f = R(() => {
|
|
372
|
+
if (!a.registerStateList || J(a.registerStateList) <= 0)
|
|
181
373
|
return;
|
|
182
374
|
const m = {
|
|
183
|
-
...
|
|
184
|
-
},
|
|
185
|
-
const
|
|
186
|
-
return
|
|
375
|
+
...r
|
|
376
|
+
}, u = A(a.registerStateList, (l) => {
|
|
377
|
+
const y = l.mapName || l.name, i = b(t, l.name);
|
|
378
|
+
return ae(m, y, i), dn(y);
|
|
187
379
|
});
|
|
188
|
-
return K(m,
|
|
189
|
-
}),
|
|
190
|
-
return () =>
|
|
191
|
-
key:
|
|
192
|
-
...
|
|
193
|
-
...C(
|
|
194
|
-
...
|
|
195
|
-
},
|
|
380
|
+
return K(m, u);
|
|
381
|
+
}), p = b(s, o.elementType) || o.elementType, g = ct(s, o);
|
|
382
|
+
return () => b(f.value, "show$") === !1 ? null : ie(p, {
|
|
383
|
+
key: o.elementId,
|
|
384
|
+
...r,
|
|
385
|
+
...C(f.value, "show$"),
|
|
386
|
+
...c
|
|
387
|
+
}, g);
|
|
196
388
|
}
|
|
197
|
-
}),
|
|
198
|
-
|
|
199
|
-
},
|
|
389
|
+
}), ut = Symbol("pro-module"), he = () => Q(ut), fn = (e) => {
|
|
390
|
+
re(ut, e);
|
|
391
|
+
}, Ke = (e) => {
|
|
392
|
+
const {
|
|
393
|
+
subject$: t
|
|
394
|
+
} = he();
|
|
395
|
+
W(() => {
|
|
396
|
+
const n = t.subscribe({
|
|
397
|
+
next: (s) => {
|
|
398
|
+
e(s);
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
return () => n.unsubscribe();
|
|
402
|
+
}, []);
|
|
403
|
+
}, fe = {
|
|
200
404
|
Success: "request-success$",
|
|
201
405
|
Fail: "request-fail$"
|
|
202
|
-
},
|
|
406
|
+
}, pn = () => ({
|
|
203
407
|
state: {
|
|
204
408
|
type: Object
|
|
205
409
|
},
|
|
@@ -212,742 +416,945 @@ const Et = () => ({
|
|
|
212
416
|
requests: {
|
|
213
417
|
type: Array
|
|
214
418
|
}
|
|
215
|
-
}),
|
|
419
|
+
}), Ne = M({
|
|
216
420
|
props: {
|
|
217
|
-
...
|
|
421
|
+
...pn()
|
|
218
422
|
},
|
|
219
423
|
setup: (e, {
|
|
220
|
-
slots:
|
|
221
|
-
expose:
|
|
424
|
+
slots: t,
|
|
425
|
+
expose: n
|
|
222
426
|
}) => {
|
|
223
|
-
const
|
|
224
|
-
|
|
225
|
-
},
|
|
226
|
-
const
|
|
227
|
-
if (
|
|
228
|
-
|
|
427
|
+
const s = (u) => ne(u) ? Fe(e.elementMap, u) : me(e.elementMap, u), o = new qt(), a = (u) => {
|
|
428
|
+
o.next(u);
|
|
429
|
+
}, r = e.state || z({}), c = (u) => {
|
|
430
|
+
const l = r[u.type], y = w(u.payload) ? u.payload(l) : u.payload;
|
|
431
|
+
if (Se(l)) {
|
|
432
|
+
Qe(r[u.type], y);
|
|
229
433
|
return;
|
|
230
434
|
}
|
|
231
|
-
|
|
435
|
+
r[u.type] = y;
|
|
232
436
|
}, {
|
|
233
|
-
dispatchRequest:
|
|
234
|
-
} =
|
|
235
|
-
var
|
|
437
|
+
dispatchRequest: f
|
|
438
|
+
} = ye(), p = V(e.requests, (u, l) => {
|
|
439
|
+
var y;
|
|
236
440
|
return {
|
|
237
|
-
...
|
|
238
|
-
[(
|
|
441
|
+
...u,
|
|
442
|
+
[(y = l.actor) == null ? void 0 : y.name]: l
|
|
239
443
|
};
|
|
240
|
-
}, {}),
|
|
241
|
-
...
|
|
242
|
-
[
|
|
243
|
-
}), {}), m = (
|
|
244
|
-
const
|
|
245
|
-
if (!
|
|
444
|
+
}, {}), g = V(e.requests, (u, l) => ({
|
|
445
|
+
...u,
|
|
446
|
+
[l.action]: l
|
|
447
|
+
}), {}), m = (u, ...l) => {
|
|
448
|
+
const y = b(p, u) || b(g, u);
|
|
449
|
+
if (!y)
|
|
246
450
|
return;
|
|
247
451
|
let i;
|
|
248
|
-
|
|
249
|
-
type:
|
|
452
|
+
y.convertParams ? i = y.convertParams(...l) : i = b(l, 0), y.loadingName && c({
|
|
453
|
+
type: y.loadingName,
|
|
250
454
|
payload: !0
|
|
251
|
-
}), y
|
|
455
|
+
}), f(y.actor, i);
|
|
252
456
|
};
|
|
253
|
-
return
|
|
254
|
-
onSuccess: (
|
|
255
|
-
var
|
|
256
|
-
const
|
|
257
|
-
if (
|
|
258
|
-
const
|
|
259
|
-
|
|
260
|
-
type:
|
|
261
|
-
payload:
|
|
457
|
+
return cn($(p), {
|
|
458
|
+
onSuccess: (u) => {
|
|
459
|
+
var y, i;
|
|
460
|
+
const l = b(p, u.name);
|
|
461
|
+
if (l != null && l.stateName) {
|
|
462
|
+
const d = l.convertData ? l.convertData(u) : (y = u.res) == null ? void 0 : y.data;
|
|
463
|
+
c({
|
|
464
|
+
type: l.stateName,
|
|
465
|
+
payload: d
|
|
262
466
|
});
|
|
263
467
|
}
|
|
264
|
-
|
|
265
|
-
type:
|
|
468
|
+
a({
|
|
469
|
+
type: fe.Success,
|
|
266
470
|
payload: {
|
|
267
|
-
actor:
|
|
268
|
-
requestOpts:
|
|
471
|
+
actor: u,
|
|
472
|
+
requestOpts: l
|
|
269
473
|
}
|
|
270
|
-
}), (i =
|
|
474
|
+
}), (i = l.onSuccess) == null || i.call(l, u);
|
|
271
475
|
},
|
|
272
|
-
onFailed: (
|
|
273
|
-
var
|
|
274
|
-
const
|
|
275
|
-
|
|
276
|
-
type:
|
|
476
|
+
onFailed: (u) => {
|
|
477
|
+
var y;
|
|
478
|
+
const l = b(p, u.name);
|
|
479
|
+
a({
|
|
480
|
+
type: fe.Fail,
|
|
277
481
|
payload: {
|
|
278
|
-
actor:
|
|
279
|
-
requestOpts:
|
|
482
|
+
actor: u,
|
|
483
|
+
requestOpts: l
|
|
280
484
|
}
|
|
281
|
-
}), (
|
|
485
|
+
}), (y = l.onFailed) == null || y.call(l, u);
|
|
282
486
|
},
|
|
283
|
-
onFinish: (
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
type:
|
|
487
|
+
onFinish: (u) => {
|
|
488
|
+
const l = b(p, [u.name, "loadingName"]);
|
|
489
|
+
l && c({
|
|
490
|
+
type: l,
|
|
287
491
|
payload: !1
|
|
288
492
|
});
|
|
289
493
|
}
|
|
290
|
-
}, !0),
|
|
494
|
+
}, !0), fn({
|
|
291
495
|
elementMap: e.elementMap,
|
|
292
|
-
subject$:
|
|
293
|
-
sendEvent:
|
|
294
|
-
state:
|
|
295
|
-
dispatch:
|
|
496
|
+
subject$: o,
|
|
497
|
+
sendEvent: a,
|
|
498
|
+
state: r,
|
|
499
|
+
dispatch: c,
|
|
296
500
|
requests: e.requests,
|
|
297
501
|
sendRequest: m
|
|
298
|
-
}),
|
|
299
|
-
sendEvent:
|
|
502
|
+
}), n({
|
|
503
|
+
sendEvent: a,
|
|
300
504
|
sendRequest: m
|
|
301
505
|
}), () => {
|
|
302
|
-
var
|
|
303
|
-
return
|
|
506
|
+
var u;
|
|
507
|
+
return h(B, null, [J(e.elementConfigs) > 0 && s(e.elementConfigs), (u = t.default) == null ? void 0 : u.call(t)]);
|
|
304
508
|
};
|
|
305
509
|
}
|
|
306
|
-
}),
|
|
307
|
-
const {
|
|
308
|
-
|
|
309
|
-
const o = n
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
|
|
510
|
+
}), hr = () => {
|
|
511
|
+
const e = nt(), { registerStoreMap: t } = Y();
|
|
512
|
+
return (n, s) => {
|
|
513
|
+
const o = b(t, n);
|
|
514
|
+
!o || e(n, s, !!o.persist, o.initialState);
|
|
515
|
+
};
|
|
516
|
+
}, gr = (e) => {
|
|
517
|
+
const { registerStoreMap: t } = Y(), n = b(t, e), s = `${n != null && n.persist ? "$" : ""}${n == null ? void 0 : n.key}`;
|
|
518
|
+
return tn(rn((a) => {
|
|
519
|
+
const r = b(a, s);
|
|
520
|
+
return r || (w(n == null ? void 0 : n.initialState) ? n == null ? void 0 : n.initialState() : n == null ? void 0 : n.initialState);
|
|
521
|
+
}));
|
|
522
|
+
}, lt = sn("access", void 0, !0), yn = () => {
|
|
523
|
+
const [e] = lt();
|
|
524
|
+
return e;
|
|
525
|
+
}, br = () => {
|
|
526
|
+
const [e, t] = lt();
|
|
527
|
+
return [e, t, () => {
|
|
528
|
+
t(void 0);
|
|
529
|
+
}];
|
|
530
|
+
}, Sr = M((e, { slots: t, emit: n }) => {
|
|
531
|
+
const s = yn(), o = R(() => s && s.token);
|
|
532
|
+
return W(() => {
|
|
533
|
+
o.value || n("toLogin");
|
|
534
|
+
}, o), () => {
|
|
535
|
+
var a;
|
|
536
|
+
return o.value ? (a = t.default) == null ? void 0 : a.call(t) : null;
|
|
537
|
+
};
|
|
538
|
+
}), it = Symbol("logon-user"), vr = () => Q(it), Pr = M((e, { slots: t }) => {
|
|
539
|
+
const [n, s] = we(), [o, a] = we();
|
|
540
|
+
return re(it, { user: n, setUser: s, per: o, setPer: a, opts: {} }), () => {
|
|
541
|
+
var c;
|
|
542
|
+
return (c = t.default) == null ? void 0 : c.call(t);
|
|
543
|
+
};
|
|
544
|
+
}), dt = "Loading$", hn = "Row$", gn = "Col$", bn = "Button$", Sn = "ProDescriptions$", vn = "ProDescriptionsItem$", Pn = "Pagination$", En = "Popover$", Cn = "Checkbox$", Tn = "Modal$", In = "Form$", Mn = "FormItem$", Dn = "Table$", Nn = "ProForm$", On = "ProSearchForm$", Ln = "ProTable$", H = () => {
|
|
545
|
+
const { elementMap: e } = Y();
|
|
546
|
+
return (t) => b(e, t);
|
|
547
|
+
};
|
|
548
|
+
function An(e) {
|
|
549
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
550
|
+
}
|
|
551
|
+
const Rn = () => ({
|
|
552
|
+
row: {
|
|
553
|
+
type: Object,
|
|
554
|
+
default: void 0
|
|
555
|
+
},
|
|
556
|
+
col: {
|
|
557
|
+
type: Object
|
|
558
|
+
},
|
|
559
|
+
items: {
|
|
560
|
+
type: Array
|
|
561
|
+
}
|
|
562
|
+
}), Oe = M({
|
|
324
563
|
props: {
|
|
325
|
-
...
|
|
564
|
+
...Rn()
|
|
326
565
|
},
|
|
327
|
-
setup: (e
|
|
328
|
-
|
|
329
|
-
return (
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
},
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
566
|
+
setup: (e) => {
|
|
567
|
+
const t = H(), n = t(hn), s = t(gn);
|
|
568
|
+
return () => {
|
|
569
|
+
let o;
|
|
570
|
+
return !n || !s ? null : h(n, e.row, An(o = A(e.items, (a) => h(s, O({
|
|
571
|
+
key: a.rowKey
|
|
572
|
+
}, e.col, a.col), {
|
|
573
|
+
default: () => [a.vNode]
|
|
574
|
+
}))) ? o : {
|
|
575
|
+
default: () => [o]
|
|
576
|
+
});
|
|
577
|
+
};
|
|
339
578
|
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
579
|
+
}), wn = (e, t, n) => {
|
|
580
|
+
if (t) {
|
|
581
|
+
const s = x($(t), (o) => !t[o]);
|
|
582
|
+
return C(e, s);
|
|
583
|
+
}
|
|
584
|
+
if (n) {
|
|
585
|
+
const s = x($(n), (o) => !n[o](e));
|
|
586
|
+
return C(e, s);
|
|
343
587
|
}
|
|
344
588
|
return e;
|
|
345
|
-
},
|
|
589
|
+
}, mt = (e) => {
|
|
346
590
|
if (!!e)
|
|
347
|
-
return
|
|
348
|
-
},
|
|
349
|
-
const
|
|
350
|
-
return !
|
|
351
|
-
if (
|
|
352
|
-
return
|
|
591
|
+
return ne(e) ? e : e && Te(e) && e.indexOf(".") > 0 ? Ot(e, ".") : [e];
|
|
592
|
+
}, De = (e, t, n) => !t || !n ? e : A(e, (s) => {
|
|
593
|
+
const o = w(n) ? n(s) : b(s, n), a = b(t, o);
|
|
594
|
+
return !a || Lt(a) || w(a) || !Se(a) ? s : At(s, a, (r, c) => {
|
|
595
|
+
if (ne(r) || ne(c))
|
|
596
|
+
return c;
|
|
353
597
|
});
|
|
354
|
-
}),
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
598
|
+
}), ce = (e, t) => {
|
|
599
|
+
const n = V(
|
|
600
|
+
e,
|
|
601
|
+
(s, o) => ({
|
|
602
|
+
...s,
|
|
603
|
+
[o]: (...a) => {
|
|
604
|
+
var r, c;
|
|
605
|
+
return (c = (r = t.value) == null ? void 0 : r[o]) == null ? void 0 : c.call(r, ...a);
|
|
606
|
+
}
|
|
607
|
+
}),
|
|
608
|
+
{}
|
|
609
|
+
);
|
|
610
|
+
return n.originRef = t, n;
|
|
611
|
+
}, Er = (e, t, n) => {
|
|
612
|
+
const s = { originRef: e, ...n };
|
|
613
|
+
return t && J(t) > 0 && ee(t, (o) => {
|
|
614
|
+
s[o] = (...a) => {
|
|
615
|
+
var r, c;
|
|
616
|
+
return (c = (r = e.value) == null ? void 0 : r[o]) == null ? void 0 : c.call(r, ...a);
|
|
617
|
+
};
|
|
618
|
+
}), s;
|
|
619
|
+
}, ft = (e, t) => b(e, ["extra", t]) || b(e, t), le = (e, t) => {
|
|
620
|
+
const n = $(e), s = `${t}-`, o = x(n, (r) => Rt(r, s)), a = K(e, o);
|
|
621
|
+
return wt(a, (r) => r.replace(s, ""));
|
|
622
|
+
}, pt = Symbol("pro-form-list"), yt = () => Q(pt), ht = (e) => {
|
|
623
|
+
re(pt, e);
|
|
624
|
+
}, $n = M({
|
|
625
|
+
props: {
|
|
626
|
+
pathList: {
|
|
627
|
+
type: Array
|
|
361
628
|
}
|
|
362
|
-
}
|
|
363
|
-
{
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
},
|
|
629
|
+
},
|
|
630
|
+
setup: (e, {
|
|
631
|
+
slots: t
|
|
632
|
+
}) => (ht({
|
|
633
|
+
pathList: e.pathList
|
|
634
|
+
}), () => {
|
|
635
|
+
var n;
|
|
636
|
+
return (n = t.default) == null ? void 0 : n.call(t);
|
|
637
|
+
})
|
|
638
|
+
}), kn = () => ({
|
|
368
639
|
rowKey: {
|
|
369
640
|
type: String,
|
|
370
641
|
default: "id"
|
|
371
642
|
},
|
|
372
|
-
|
|
373
|
-
type: Array
|
|
643
|
+
name: {
|
|
644
|
+
type: [String, Number, Array],
|
|
645
|
+
required: !0
|
|
646
|
+
}
|
|
647
|
+
}), Cr = M({
|
|
648
|
+
props: {
|
|
649
|
+
...kn()
|
|
374
650
|
},
|
|
375
|
-
|
|
651
|
+
setup: (e, {
|
|
652
|
+
slots: t
|
|
653
|
+
}) => {
|
|
654
|
+
const s = H()(Mn), {
|
|
655
|
+
formState: o,
|
|
656
|
+
readonly: a
|
|
657
|
+
} = bt(), r = yt(), c = mt(e.name), f = r != null && r.pathList ? [...r.pathList, ...c] : c, p = () => {
|
|
658
|
+
let m = b(o, f);
|
|
659
|
+
ne(m) || (m = []), m.push({
|
|
660
|
+
[e.rowKey]: new Date().valueOf()
|
|
661
|
+
}), ae(o, f, m);
|
|
662
|
+
}, g = (m) => {
|
|
663
|
+
const u = b(o, f);
|
|
664
|
+
J(u) <= 0 || u.splice(m, 1);
|
|
665
|
+
};
|
|
666
|
+
return () => s ? h(s, C(e, "rowKey"), {
|
|
667
|
+
default: () => {
|
|
668
|
+
var m;
|
|
669
|
+
return [A(b(o, f), (u, l) => h($n, {
|
|
670
|
+
key: u[e.rowKey] || l,
|
|
671
|
+
pathList: [...f, l]
|
|
672
|
+
}, {
|
|
673
|
+
default: () => {
|
|
674
|
+
var y, i, d;
|
|
675
|
+
return [h("div", {
|
|
676
|
+
class: "pro-form-list-item"
|
|
677
|
+
}, [(y = t.default) == null ? void 0 : y.call(t), !a.value && h(B, null, [h("div", {
|
|
678
|
+
class: "pro-form-list-item-add",
|
|
679
|
+
onClick: p
|
|
680
|
+
}, [(i = t.itemAdd) == null ? void 0 : i.call(t)]), h("div", {
|
|
681
|
+
class: "pro-form-list-item-minus",
|
|
682
|
+
onClick: () => g(l)
|
|
683
|
+
}, [(d = t.itemMinus) == null ? void 0 : d.call(t)])])])];
|
|
684
|
+
}
|
|
685
|
+
})), !a.value && h("div", {
|
|
686
|
+
class: "pro-form-list-add",
|
|
687
|
+
onClick: p
|
|
688
|
+
}, [(m = t.add) == null ? void 0 : m.call(t)])];
|
|
689
|
+
}
|
|
690
|
+
}) : null;
|
|
691
|
+
}
|
|
692
|
+
}), gt = Symbol("pro-form"), bt = () => Q(gt), Fn = (e) => {
|
|
693
|
+
re(gt, e);
|
|
694
|
+
};
|
|
695
|
+
let U;
|
|
696
|
+
(function(e) {
|
|
697
|
+
e.RESET = "RESET", e.SUBMIT = "SUBMIT", e.CONTINUE = "CONTINUE";
|
|
698
|
+
})(U || (U = {}));
|
|
699
|
+
const Ue = () => ({
|
|
700
|
+
clsName: {
|
|
701
|
+
type: String,
|
|
702
|
+
default: "pro-form"
|
|
703
|
+
},
|
|
704
|
+
model: {
|
|
376
705
|
type: Object
|
|
377
706
|
},
|
|
378
|
-
|
|
707
|
+
readonly: {
|
|
708
|
+
type: Boolean,
|
|
709
|
+
default: void 0
|
|
710
|
+
},
|
|
711
|
+
showState: {
|
|
379
712
|
type: Object
|
|
380
713
|
},
|
|
381
|
-
|
|
714
|
+
showStateRules: {
|
|
382
715
|
type: Object
|
|
383
716
|
},
|
|
384
|
-
|
|
717
|
+
readonlyState: {
|
|
718
|
+
type: Object
|
|
719
|
+
},
|
|
720
|
+
readonlyStateRules: {
|
|
721
|
+
type: Object
|
|
722
|
+
},
|
|
723
|
+
disableState: {
|
|
724
|
+
type: Object
|
|
725
|
+
},
|
|
726
|
+
disableStateRules: {
|
|
727
|
+
type: Object
|
|
728
|
+
},
|
|
729
|
+
needRules: {
|
|
730
|
+
type: Boolean,
|
|
731
|
+
default: !0
|
|
732
|
+
},
|
|
733
|
+
provideExtra: {
|
|
734
|
+
type: Object
|
|
735
|
+
},
|
|
736
|
+
operate: {
|
|
385
737
|
type: Object
|
|
738
|
+
},
|
|
739
|
+
submitLoading: {
|
|
740
|
+
type: Boolean
|
|
741
|
+
},
|
|
742
|
+
formMethods: {
|
|
743
|
+
type: Array
|
|
386
744
|
}
|
|
387
|
-
}),
|
|
745
|
+
}), Kn = M({
|
|
746
|
+
inheritAttrs: !1,
|
|
388
747
|
props: {
|
|
389
|
-
...
|
|
390
|
-
...
|
|
748
|
+
...de,
|
|
749
|
+
...Ue(),
|
|
750
|
+
...C(Oe.props, "items")
|
|
391
751
|
},
|
|
392
752
|
setup: (e, {
|
|
393
|
-
slots:
|
|
394
|
-
|
|
753
|
+
slots: t,
|
|
754
|
+
emit: n,
|
|
755
|
+
expose: s,
|
|
756
|
+
attrs: o
|
|
395
757
|
}) => {
|
|
396
758
|
const {
|
|
397
|
-
elementMap:
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
})
|
|
406
|
-
|
|
407
|
-
}, m = w(() => l("form", !0)), a = w(() => l("detail", !0)), c = w(() => l("table", !0)), s = w(() => l("search"));
|
|
408
|
-
let i;
|
|
409
|
-
const h = (g) => {
|
|
410
|
-
d(T.LIST, {
|
|
411
|
-
...i,
|
|
412
|
-
...g
|
|
413
|
-
});
|
|
414
|
-
}, p = (g) => {
|
|
415
|
-
r({
|
|
416
|
-
type: g.action,
|
|
417
|
-
payload: C(g, "action", "source"),
|
|
418
|
-
source: g.source
|
|
759
|
+
elementMap: a,
|
|
760
|
+
formElementMap: r
|
|
761
|
+
} = Y(), c = e.elementMap || a, f = e.formElementMap || r, p = e.model || z({}), g = e.showState || z({}), m = e.readonlyState || z({}), u = e.disableState || z({});
|
|
762
|
+
W(() => {
|
|
763
|
+
e.showStateRules && ee(e.showStateRules, (I, E) => {
|
|
764
|
+
g[E] = I(p);
|
|
765
|
+
}), e.readonlyStateRules && ee(e.readonlyStateRules, (I, E) => {
|
|
766
|
+
m[E] = I(p);
|
|
767
|
+
}), e.disableStateRules && ee(e.disableStateRules, (I, E) => {
|
|
768
|
+
u[E] = I(p);
|
|
419
769
|
});
|
|
420
|
-
};
|
|
421
|
-
De(({
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
770
|
+
}, p);
|
|
771
|
+
const l = R(() => e.readonly), y = R(() => De(e.columns, e.columnState, (I) => oe(I))), i = (I) => {
|
|
772
|
+
const E = wn(I, g, e.showStateRules);
|
|
773
|
+
n("finish", E, I);
|
|
774
|
+
}, d = j();
|
|
775
|
+
s(ce(e.formMethods || [], d)), Fn({
|
|
776
|
+
formState: p,
|
|
777
|
+
showState: g,
|
|
778
|
+
readonlyState: m,
|
|
779
|
+
disableState: u,
|
|
780
|
+
elementMap: c,
|
|
781
|
+
formElementMap: f,
|
|
782
|
+
readonly: l,
|
|
783
|
+
columns: y,
|
|
784
|
+
formRef: d,
|
|
785
|
+
...e.provideExtra
|
|
786
|
+
});
|
|
787
|
+
const v = [{
|
|
788
|
+
value: U.RESET,
|
|
789
|
+
label: "\u91CD\u7F6E"
|
|
790
|
+
}, {
|
|
791
|
+
value: U.SUBMIT,
|
|
792
|
+
label: "\u63D0\u4EA4",
|
|
793
|
+
extraProps: {
|
|
794
|
+
type: "primary"
|
|
795
|
+
}
|
|
796
|
+
}], S = R(() => {
|
|
797
|
+
const I = e.operate, E = (I == null ? void 0 : I.items) || v;
|
|
798
|
+
return A(E, (N) => (!N.onClick && !b(I == null ? void 0 : I.itemState, [N.value, "onClick"]) && (N.value === U.RESET ? N.onClick = () => {
|
|
799
|
+
var F;
|
|
800
|
+
if (I != null && I.onReset) {
|
|
801
|
+
I.onReset();
|
|
443
802
|
return;
|
|
444
|
-
|
|
445
|
-
|
|
803
|
+
}
|
|
804
|
+
(F = d.value) == null || F.resetFields();
|
|
805
|
+
} : N.value === U.SUBMIT ? N.onClick = () => {
|
|
806
|
+
var F;
|
|
807
|
+
if (I != null && I.onSubmit) {
|
|
808
|
+
I.onSubmit();
|
|
446
809
|
return;
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
columns: f,
|
|
456
|
-
getSignColumns: l,
|
|
457
|
-
getFormItemVNode: y,
|
|
458
|
-
getItemVNode: E,
|
|
459
|
-
elementMap: t,
|
|
460
|
-
formElementMap: e.formElementMap,
|
|
461
|
-
rowKey: e.rowKey,
|
|
462
|
-
curdState: u,
|
|
463
|
-
formColumns: m,
|
|
464
|
-
descColumns: a,
|
|
465
|
-
tableColumns: c,
|
|
466
|
-
searchColumns: s,
|
|
467
|
-
sendCurdEvent: p,
|
|
468
|
-
operates: e.operates,
|
|
469
|
-
getOperate: P,
|
|
470
|
-
refreshList: h,
|
|
471
|
-
listProps: N,
|
|
472
|
-
formProps: F,
|
|
473
|
-
descProps: I,
|
|
474
|
-
modalProps: A
|
|
475
|
-
}), o({
|
|
476
|
-
sendCurdEvent: p,
|
|
477
|
-
refreshList: h
|
|
478
|
-
}), () => {
|
|
479
|
-
var g;
|
|
480
|
-
return (g = n.default) == null ? void 0 : g.call(n);
|
|
810
|
+
}
|
|
811
|
+
(F = d.value) == null || F.submit();
|
|
812
|
+
} : N.value === U.CONTINUE && (I == null ? void 0 : I.onContinue) && (N.onClick = () => {
|
|
813
|
+
I.onContinue();
|
|
814
|
+
})), N.value === U.SUBMIT && !Xe(N, "loading") && (N.loading = e.submitLoading), N));
|
|
815
|
+
}), P = (I) => {
|
|
816
|
+
const E = oe(I);
|
|
817
|
+
return E && t[E] ? t[E](I, p) : ot(f, I, e.needRules);
|
|
481
818
|
};
|
|
819
|
+
ht({});
|
|
820
|
+
const k = $(Ue()), D = $(C(Oe.props, "items")), Z = b(a, In);
|
|
821
|
+
return () => Z ? h(Z, O({
|
|
822
|
+
ref: d,
|
|
823
|
+
class: e.clsName
|
|
824
|
+
}, C(o, "onFinish"), C(e, ...k, ...D, "onFinish", "operate"), {
|
|
825
|
+
model: p,
|
|
826
|
+
onFinish: i
|
|
827
|
+
}), {
|
|
828
|
+
default: () => {
|
|
829
|
+
var I, E, N;
|
|
830
|
+
return [(I = t.start) == null ? void 0 : I.call(t), f && J(y.value) > 0 && h(B, null, [e.row ? h(Oe, {
|
|
831
|
+
row: e.row,
|
|
832
|
+
col: e.col,
|
|
833
|
+
items: A(y.value, (F) => ({
|
|
834
|
+
rowKey: oe(F),
|
|
835
|
+
vNode: P(F),
|
|
836
|
+
col: b(F, ["extra", "col"])
|
|
837
|
+
}))
|
|
838
|
+
}, null) : A(y.value, (F) => P(F))]), (E = t.default) == null ? void 0 : E.call(t), e.operate && h(St, O({
|
|
839
|
+
clsName: "pro-form-operate",
|
|
840
|
+
items: S.value
|
|
841
|
+
}, C(e.operate, "items", "onReset", "onSubmit", "onContinue")), null), (N = t.end) == null ? void 0 : N.call(t)];
|
|
842
|
+
}
|
|
843
|
+
}) : null;
|
|
844
|
+
}
|
|
845
|
+
});
|
|
846
|
+
let Ee;
|
|
847
|
+
(function(e) {
|
|
848
|
+
e.AUTO = "AUTO", e.MANUAL = "MANUAL";
|
|
849
|
+
})(Ee || (Ee = {}));
|
|
850
|
+
const Be = () => ({
|
|
851
|
+
initEmit: {
|
|
852
|
+
type: Boolean,
|
|
853
|
+
default: !0
|
|
854
|
+
},
|
|
855
|
+
searchMode: {
|
|
856
|
+
type: String,
|
|
857
|
+
default: Ee.AUTO
|
|
858
|
+
},
|
|
859
|
+
debounceKeys: {
|
|
860
|
+
type: Array
|
|
861
|
+
},
|
|
862
|
+
debounceTypes: {
|
|
863
|
+
type: Array,
|
|
864
|
+
default: ["text"]
|
|
865
|
+
},
|
|
866
|
+
debounceTime: {
|
|
867
|
+
type: Number,
|
|
868
|
+
default: 800
|
|
482
869
|
}
|
|
483
|
-
}),
|
|
870
|
+
}), Tr = M({
|
|
484
871
|
props: {
|
|
485
|
-
...
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
872
|
+
...Be(),
|
|
873
|
+
needRules: {
|
|
874
|
+
type: Boolean,
|
|
875
|
+
default: !1
|
|
489
876
|
}
|
|
490
877
|
},
|
|
491
878
|
setup: (e, {
|
|
492
|
-
slots:
|
|
493
|
-
expose:
|
|
879
|
+
slots: t,
|
|
880
|
+
expose: n
|
|
494
881
|
}) => {
|
|
495
|
-
const {
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
stateName: "detailData",
|
|
518
|
-
label: "\u8BE6\u60C5"
|
|
519
|
-
},
|
|
520
|
-
[T.ADD]: {
|
|
521
|
-
convertParams: (a, c) => ({
|
|
522
|
-
body: {
|
|
523
|
-
...c,
|
|
524
|
-
...a
|
|
525
|
-
}
|
|
526
|
-
}),
|
|
527
|
-
loadingName: "operateLoading",
|
|
528
|
-
label: "\u6DFB\u52A0"
|
|
529
|
-
},
|
|
530
|
-
[T.EDIT]: {
|
|
531
|
-
convertParams: (a, c) => ({
|
|
532
|
-
body: {
|
|
533
|
-
...c,
|
|
534
|
-
...a
|
|
535
|
-
}
|
|
536
|
-
}),
|
|
537
|
-
loadingName: "operateLoading",
|
|
538
|
-
label: "\u7F16\u8F91"
|
|
539
|
-
},
|
|
540
|
-
[T.DELETE]: {
|
|
541
|
-
convertParams: (a, c) => K(a, c),
|
|
542
|
-
label: "\u5220\u9664"
|
|
882
|
+
const o = H()(Nn), a = e.model || z({}), r = new Set(e.debounceTypes), c = A(x(e.columns, (y) => {
|
|
883
|
+
const i = at(y);
|
|
884
|
+
return r.has(i);
|
|
885
|
+
}), (y) => oe(y)), f = j(), p = e.formMethods || [];
|
|
886
|
+
n(ce(p, f));
|
|
887
|
+
const g = () => {
|
|
888
|
+
var y;
|
|
889
|
+
(y = f.value) == null || y.submit();
|
|
890
|
+
}, m = $t(() => {
|
|
891
|
+
g();
|
|
892
|
+
}, e.debounceTime);
|
|
893
|
+
W(() => {
|
|
894
|
+
e.initEmit && g();
|
|
895
|
+
}, []);
|
|
896
|
+
const u = (y, i, d) => se(d, (v) => b(y, v) !== b(i, v));
|
|
897
|
+
Ye((y, i) => {
|
|
898
|
+
if (e.searchMode !== Ee.AUTO)
|
|
899
|
+
return;
|
|
900
|
+
const d = J(e.debounceKeys) > 0 ? e.debounceKeys : c;
|
|
901
|
+
if (J(d) > 0 && u(y, i, d)) {
|
|
902
|
+
m();
|
|
903
|
+
return;
|
|
543
904
|
}
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
},
|
|
553
|
-
refreshList: (a) => {
|
|
554
|
-
var c;
|
|
555
|
-
(c = d.value) == null || c.refreshList(a);
|
|
556
|
-
},
|
|
557
|
-
sendEvent: (a) => {
|
|
558
|
-
var c;
|
|
559
|
-
(c = r.value) == null || c.sendEvent(a);
|
|
560
|
-
},
|
|
561
|
-
sendRequest: (a, ...c) => {
|
|
562
|
-
var s;
|
|
563
|
-
(s = r.value) == null || s.sendRequest(a, ...c);
|
|
564
|
-
}
|
|
565
|
-
}), () => b(ye, R({
|
|
566
|
-
ref: r
|
|
567
|
-
}, K(e, m), {
|
|
568
|
-
elementMap: e.elementMap || t,
|
|
569
|
-
state: f,
|
|
570
|
-
requests: l
|
|
571
|
-
}), {
|
|
572
|
-
default: () => [b(Me, R({
|
|
573
|
-
ref: d
|
|
574
|
-
}, C(e, ...m, "curdState", "operates"), {
|
|
575
|
-
formElementMap: e.formElementMap || u,
|
|
576
|
-
operates: E
|
|
577
|
-
}), n)]
|
|
578
|
-
});
|
|
905
|
+
g();
|
|
906
|
+
}, () => kt(a));
|
|
907
|
+
const l = $(C(Be(), "columns"));
|
|
908
|
+
return () => o ? h(o, O({
|
|
909
|
+
ref: f
|
|
910
|
+
}, C(e, l), {
|
|
911
|
+
model: a
|
|
912
|
+
}), t) : null;
|
|
579
913
|
}
|
|
580
|
-
}),
|
|
581
|
-
|
|
914
|
+
}), Ve = () => ({
|
|
915
|
+
readonly: {
|
|
916
|
+
type: Boolean,
|
|
917
|
+
default: void 0
|
|
918
|
+
},
|
|
919
|
+
fieldProps: {
|
|
920
|
+
type: Object
|
|
921
|
+
},
|
|
922
|
+
showProps: {
|
|
923
|
+
type: Object
|
|
924
|
+
},
|
|
925
|
+
slots: {
|
|
582
926
|
type: Object
|
|
583
927
|
}
|
|
584
|
-
}),
|
|
928
|
+
}), Ir = (e, t) => ({
|
|
929
|
+
InputComp: n,
|
|
930
|
+
valueType: s,
|
|
931
|
+
name: o
|
|
932
|
+
}) => M({
|
|
933
|
+
name: o,
|
|
585
934
|
props: {
|
|
586
|
-
...
|
|
935
|
+
...e.props,
|
|
936
|
+
...Ve()
|
|
587
937
|
},
|
|
588
|
-
setup: (
|
|
589
|
-
|
|
938
|
+
setup: (a, {
|
|
939
|
+
slots: r
|
|
940
|
+
}) => {
|
|
590
941
|
const {
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
942
|
+
formState: c,
|
|
943
|
+
showState: f,
|
|
944
|
+
readonlyState: p,
|
|
945
|
+
disableState: g,
|
|
946
|
+
readonly: m,
|
|
947
|
+
elementMap: u
|
|
948
|
+
} = bt(), l = yt(), y = R(() => ue(a.readonly) ? a.readonly : ue(p[a.name]) ? p[a.name] : m.value), i = mt(a.name), d = l != null && l.pathList ? [...l.pathList, ...i] : i, v = (P) => {
|
|
949
|
+
ae(c, d, P);
|
|
950
|
+
}, S = $(Ve());
|
|
951
|
+
return () => {
|
|
952
|
+
const P = b(f, d);
|
|
953
|
+
if (ue(P) && !P)
|
|
954
|
+
return null;
|
|
955
|
+
const k = b(c, d), D = b(u, s);
|
|
956
|
+
return h(e, O(C(a, ...S, "name", "slots"), {
|
|
957
|
+
name: d
|
|
958
|
+
}), {
|
|
959
|
+
default: () => [y.value ? h(B, null, [D ? h(D, O({
|
|
960
|
+
value: k
|
|
961
|
+
}, a.fieldProps, {
|
|
962
|
+
showProps: a.showProps
|
|
963
|
+
}), r) : h("span", null, [k])]) : h(n, O(t(k, v, b(g, d)), a.fieldProps), r)],
|
|
964
|
+
...a.slots
|
|
604
965
|
});
|
|
605
|
-
}, l = (s, {
|
|
606
|
-
record: i
|
|
607
|
-
}) => {
|
|
608
|
-
s === D.EMIT && (n({
|
|
609
|
-
type: "mode",
|
|
610
|
-
payload: q.DETAIL
|
|
611
|
-
}), E(i));
|
|
612
|
-
}, m = (s) => {
|
|
613
|
-
s === D.EMIT ? (n({
|
|
614
|
-
type: "mode",
|
|
615
|
-
payload: q.ADD
|
|
616
|
-
}), n({
|
|
617
|
-
type: "detailData",
|
|
618
|
-
payload: e.defaultAddRecord || {}
|
|
619
|
-
})) : s === D.SUCCESS && (y && (y.page = 1), f(), u.addAction === ae.CONTINUE ? n({
|
|
620
|
-
type: "detailData",
|
|
621
|
-
payload: e.defaultAddRecord || {}
|
|
622
|
-
}) : n({
|
|
623
|
-
type: "mode",
|
|
624
|
-
payload: void 0
|
|
625
|
-
}));
|
|
626
|
-
}, a = (s, {
|
|
627
|
-
record: i
|
|
628
|
-
}) => {
|
|
629
|
-
s === D.EMIT ? (n({
|
|
630
|
-
type: "mode",
|
|
631
|
-
payload: q.EDIT
|
|
632
|
-
}), E(i)) : s === D.SUCCESS && (n({
|
|
633
|
-
type: "mode",
|
|
634
|
-
payload: void 0
|
|
635
|
-
}), f());
|
|
636
966
|
};
|
|
637
|
-
return De(({
|
|
638
|
-
type: s,
|
|
639
|
-
payload: i,
|
|
640
|
-
source: h
|
|
641
|
-
}) => {
|
|
642
|
-
if (h)
|
|
643
|
-
return;
|
|
644
|
-
let p = s, S = i == null ? void 0 : i.type;
|
|
645
|
-
const P = i == null ? void 0 : i.record;
|
|
646
|
-
switch (p === re.Success && (p = v(i, ["requestOpts", "action"]), S = D.SUCCESS), p) {
|
|
647
|
-
case T.DETAIL:
|
|
648
|
-
l(S, {
|
|
649
|
-
record: P
|
|
650
|
-
});
|
|
651
|
-
break;
|
|
652
|
-
case T.ADD:
|
|
653
|
-
m(S);
|
|
654
|
-
break;
|
|
655
|
-
case T.EDIT:
|
|
656
|
-
a(S, {
|
|
657
|
-
record: P
|
|
658
|
-
});
|
|
659
|
-
break;
|
|
660
|
-
}
|
|
661
|
-
}), () => null;
|
|
662
967
|
}
|
|
663
|
-
})
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
968
|
+
});
|
|
969
|
+
function xn(e) {
|
|
970
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
971
|
+
}
|
|
972
|
+
const jn = () => ({
|
|
973
|
+
clsName: {
|
|
974
|
+
type: String,
|
|
975
|
+
default: "pro-operate"
|
|
667
976
|
},
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
expose: o
|
|
671
|
-
}) => {
|
|
672
|
-
const t = $();
|
|
673
|
-
o(Y(_e, t));
|
|
674
|
-
const u = k(Ee.props);
|
|
675
|
-
return () => b(le, R({
|
|
676
|
-
ref: t
|
|
677
|
-
}, C(e, u)), {
|
|
678
|
-
default: () => {
|
|
679
|
-
var r;
|
|
680
|
-
return [b(Ee, K(e, u), null), (r = n.default) == null ? void 0 : r.call(n)];
|
|
681
|
-
}
|
|
682
|
-
});
|
|
683
|
-
}
|
|
684
|
-
}), Ot = () => ({
|
|
685
|
-
defaultAddRecord: {
|
|
686
|
-
type: Object
|
|
977
|
+
items: {
|
|
978
|
+
type: Array
|
|
687
979
|
},
|
|
688
|
-
|
|
689
|
-
type:
|
|
690
|
-
}
|
|
691
|
-
}), Se = L({
|
|
692
|
-
props: {
|
|
693
|
-
...Ot()
|
|
980
|
+
itemState: {
|
|
981
|
+
type: Object
|
|
694
982
|
},
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
sendRequest: u
|
|
699
|
-
} = ue(), {
|
|
700
|
-
rowKey: r,
|
|
701
|
-
curdState: d
|
|
702
|
-
} = se(), f = (m) => {
|
|
703
|
-
m === D.PAGE && (t({
|
|
704
|
-
type: "mode",
|
|
705
|
-
payload: void 0
|
|
706
|
-
}), t({
|
|
707
|
-
type: "detailData",
|
|
708
|
-
payload: {}
|
|
709
|
-
}), t({
|
|
710
|
-
type: "detailLoading",
|
|
711
|
-
payload: !1
|
|
712
|
-
}), t({
|
|
713
|
-
type: "addAction",
|
|
714
|
-
payload: void 0
|
|
715
|
-
}));
|
|
716
|
-
}, y = (m, {
|
|
717
|
-
record: a
|
|
718
|
-
}) => {
|
|
719
|
-
m === D.EMIT ? n.push({
|
|
720
|
-
path: `${o.path}/detail`,
|
|
721
|
-
query: K(a, r)
|
|
722
|
-
}) : m === D.PAGE && (t({
|
|
723
|
-
type: "mode",
|
|
724
|
-
payload: q.DETAIL
|
|
725
|
-
}), u(T.DETAIL, o.query, r));
|
|
726
|
-
}, E = (m) => {
|
|
727
|
-
m === D.EMIT ? n.push({
|
|
728
|
-
path: `${o.path}/add`
|
|
729
|
-
}) : m === D.PAGE ? (t({
|
|
730
|
-
type: "mode",
|
|
731
|
-
payload: q.ADD
|
|
732
|
-
}), t({
|
|
733
|
-
type: "detailData",
|
|
734
|
-
payload: e.defaultAddRecord || {}
|
|
735
|
-
})) : m === D.SUCCESS && (d.addAction === ae.CONTINUE ? t({
|
|
736
|
-
type: "detailData",
|
|
737
|
-
payload: e.defaultAddRecord || {}
|
|
738
|
-
}) : e.routeBack ? e.routeBack(T.ADD) : n.go(-1));
|
|
739
|
-
}, l = (m, {
|
|
740
|
-
record: a
|
|
741
|
-
}) => {
|
|
742
|
-
m === D.EMIT ? n.push({
|
|
743
|
-
path: `${o.path}/edit`,
|
|
744
|
-
query: K(a, r)
|
|
745
|
-
}) : m === D.PAGE ? (t({
|
|
746
|
-
type: "mode",
|
|
747
|
-
payload: q.EDIT
|
|
748
|
-
}), u(T.DETAIL, o.query, r)) : m === D.SUCCESS && (e.routeBack ? e.routeBack(T.EDIT) : n.go(-1));
|
|
749
|
-
};
|
|
750
|
-
return De(({
|
|
751
|
-
type: m,
|
|
752
|
-
payload: a,
|
|
753
|
-
source: c
|
|
754
|
-
}) => {
|
|
755
|
-
if (c)
|
|
756
|
-
return;
|
|
757
|
-
let s = m, i = a == null ? void 0 : a.type;
|
|
758
|
-
const h = a == null ? void 0 : a.record;
|
|
759
|
-
switch (s === re.Success && (s = v(a, ["requestOpts", "action"]), i = D.SUCCESS), s) {
|
|
760
|
-
case T.LIST:
|
|
761
|
-
f(i);
|
|
762
|
-
break;
|
|
763
|
-
case T.DETAIL:
|
|
764
|
-
y(i, {
|
|
765
|
-
record: h
|
|
766
|
-
});
|
|
767
|
-
break;
|
|
768
|
-
case T.ADD:
|
|
769
|
-
E(i);
|
|
770
|
-
break;
|
|
771
|
-
case T.EDIT:
|
|
772
|
-
l(i, {
|
|
773
|
-
record: h
|
|
774
|
-
});
|
|
775
|
-
break;
|
|
776
|
-
}
|
|
777
|
-
}), () => null;
|
|
983
|
+
elementKey: {
|
|
984
|
+
type: String,
|
|
985
|
+
default: bn
|
|
778
986
|
}
|
|
779
|
-
}),
|
|
987
|
+
}), St = M({
|
|
780
988
|
props: {
|
|
781
|
-
...
|
|
782
|
-
...Se.props
|
|
989
|
+
...jn()
|
|
783
990
|
},
|
|
784
991
|
setup: (e, {
|
|
785
|
-
slots:
|
|
786
|
-
expose: o
|
|
992
|
+
slots: t
|
|
787
993
|
}) => {
|
|
788
|
-
const
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
994
|
+
const n = H(), s = e.elementKey ? n(e.elementKey) : void 0, o = R(() => {
|
|
995
|
+
const r = x(e.items, (c) => w(c.show) ? c.show() : ue(c.show) ? c.show : !0);
|
|
996
|
+
return A(r, (c) => Xe(e.itemState, c.value) ? {
|
|
997
|
+
...c,
|
|
998
|
+
...b(e.itemState, c.value)
|
|
999
|
+
} : c);
|
|
1000
|
+
}), a = (r) => {
|
|
1001
|
+
var c;
|
|
1002
|
+
(c = r.onClick) == null || c.call(r, r.value);
|
|
1003
|
+
};
|
|
1004
|
+
return () => h("div", {
|
|
1005
|
+
class: e.clsName
|
|
1006
|
+
}, [A(o.value, (r) => {
|
|
1007
|
+
const c = w(r.disabled) ? r.disabled() : r.disabled, f = w(r.loading) ? r.loading() : r.loading, p = w(r.label) ? r.label() : r.label, g = w(r.extraProps) ? r.extraProps() : r.extraProps, m = {
|
|
1008
|
+
...C(r, "show", "disabled", "element"),
|
|
1009
|
+
disabled: c
|
|
1010
|
+
};
|
|
1011
|
+
return r.element && w(r.element) ? r.element(m) : t[r.value] ? t[r.value](m) : s ? h(s, O({
|
|
1012
|
+
disabled: c,
|
|
1013
|
+
loading: f,
|
|
1014
|
+
onClick: () => a(r)
|
|
1015
|
+
}, g), xn(p) ? p : {
|
|
1016
|
+
default: () => [p]
|
|
1017
|
+
}) : h("div", {
|
|
1018
|
+
class: `${e.clsName}-item`,
|
|
1019
|
+
onClick: () => a(r)
|
|
1020
|
+
}, [p]);
|
|
1021
|
+
})]);
|
|
799
1022
|
}
|
|
800
|
-
})
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
1023
|
+
}), qn = () => ({
|
|
1024
|
+
clsName: {
|
|
1025
|
+
type: String,
|
|
1026
|
+
default: "pro-table-toolbar-column"
|
|
1027
|
+
},
|
|
1028
|
+
signName: {
|
|
1029
|
+
type: String,
|
|
1030
|
+
default: "columnSetting"
|
|
1031
|
+
},
|
|
1032
|
+
popoverProps: Object
|
|
1033
|
+
}), Un = M({
|
|
805
1034
|
props: {
|
|
806
|
-
...
|
|
807
|
-
renderItem: {
|
|
808
|
-
type: Function
|
|
809
|
-
},
|
|
810
|
-
signName: {
|
|
811
|
-
type: String
|
|
812
|
-
}
|
|
1035
|
+
...qn()
|
|
813
1036
|
},
|
|
814
|
-
setup: (
|
|
1037
|
+
setup: (e, {
|
|
815
1038
|
slots: t
|
|
816
1039
|
}) => {
|
|
817
|
-
const {
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
}, v(l.extra, "desc")), Mt(m = u(l, c)) ? m : {
|
|
835
|
-
default: () => [m]
|
|
836
|
-
});
|
|
1040
|
+
const n = H(), s = n(En), o = n(Cn), {
|
|
1041
|
+
originColumns: a,
|
|
1042
|
+
state: r
|
|
1043
|
+
} = Bn(), [c, f] = Ut();
|
|
1044
|
+
Ye(() => {
|
|
1045
|
+
f();
|
|
1046
|
+
}, () => r.selectIds);
|
|
1047
|
+
const p = R(() => V(r.selectIds, (i, d) => ({
|
|
1048
|
+
...i,
|
|
1049
|
+
[d]: !0
|
|
1050
|
+
}), {})), g = (i) => ft(i, e.signName), m = R(() => {
|
|
1051
|
+
const i = Ft(a.value, (v) => {
|
|
1052
|
+
const S = g(v);
|
|
1053
|
+
return S != null && S.disabled ? !0 : b(p.value, v.dataIndex);
|
|
1054
|
+
}), d = se(a.value, (v) => {
|
|
1055
|
+
const S = g(v);
|
|
1056
|
+
return S != null && S.disabled ? !0 : b(p.value, v.dataIndex);
|
|
837
1057
|
});
|
|
838
|
-
|
|
839
|
-
|
|
1058
|
+
return {
|
|
1059
|
+
checked: i,
|
|
1060
|
+
indeterminate: i ? !1 : d
|
|
1061
|
+
};
|
|
1062
|
+
}), u = (i) => {
|
|
1063
|
+
var v;
|
|
1064
|
+
(Se(i) ? (v = i.target) == null ? void 0 : v.checked : i) ? r.selectIds = A(a.value, (S) => S.dataIndex) : r.selectIds = A(x(a.value, (S) => {
|
|
1065
|
+
var P;
|
|
1066
|
+
return !!((P = g(S)) != null && P.disabled);
|
|
1067
|
+
}), (S) => S.dataIndex);
|
|
1068
|
+
}, l = () => {
|
|
1069
|
+
r.selectIds = A(x(a.value, (i) => {
|
|
1070
|
+
var d;
|
|
1071
|
+
return ((d = g(i)) == null ? void 0 : d.initShow) !== !1;
|
|
1072
|
+
}), (i) => i.dataIndex);
|
|
1073
|
+
}, y = (i, d) => {
|
|
1074
|
+
var S;
|
|
1075
|
+
(Se(d) ? (S = d.target) == null ? void 0 : S.checked : d) ? r.selectIds = [...r.selectIds, i.dataIndex] : r.selectIds = x(r.selectIds, (P) => i.dataIndex !== P);
|
|
1076
|
+
};
|
|
1077
|
+
return () => s ? h(s, O({
|
|
1078
|
+
trigger: "click"
|
|
1079
|
+
}, e.popoverProps), {
|
|
840
1080
|
default: () => {
|
|
841
|
-
var
|
|
842
|
-
return [(
|
|
1081
|
+
var i;
|
|
1082
|
+
return [((i = t.default) == null ? void 0 : i.call(t)) || "\u5217\u8BBE\u7F6E"];
|
|
843
1083
|
},
|
|
844
|
-
|
|
845
|
-
|
|
1084
|
+
content: () => h("div", {
|
|
1085
|
+
class: `${e.clsName}`
|
|
1086
|
+
}, [h("div", {
|
|
1087
|
+
class: `${e.clsName}-header`
|
|
1088
|
+
}, [h(o, {
|
|
1089
|
+
checked: m.value.checked,
|
|
1090
|
+
indeterminate: m.value.indeterminate,
|
|
1091
|
+
onChange: u
|
|
1092
|
+
}, {
|
|
1093
|
+
default: () => [je("\u5217\u5C55\u793A")]
|
|
1094
|
+
}), h("a", {
|
|
1095
|
+
onClick: l
|
|
1096
|
+
}, [je("\u91CD\u7F6E")])]), h("div", {
|
|
1097
|
+
key: c.value,
|
|
1098
|
+
class: `${e.clsName}-list`
|
|
1099
|
+
}, [A(a.value, (i) => {
|
|
1100
|
+
const d = g(i);
|
|
1101
|
+
return h(o, {
|
|
1102
|
+
checked: b(p.value, i.dataIndex, !1),
|
|
1103
|
+
disabled: d == null ? void 0 : d.disabled,
|
|
1104
|
+
onChange: (v) => {
|
|
1105
|
+
y(i, v);
|
|
1106
|
+
}
|
|
1107
|
+
}, {
|
|
1108
|
+
default: () => [i.title]
|
|
1109
|
+
});
|
|
1110
|
+
})])]),
|
|
1111
|
+
...C(t, "default")
|
|
1112
|
+
}) : null;
|
|
846
1113
|
}
|
|
847
|
-
}),
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
modelName: {
|
|
1114
|
+
}), vt = Symbol("pro-table"), Bn = () => Q(vt), Vn = (e) => {
|
|
1115
|
+
re(vt, e);
|
|
1116
|
+
}, Ge = () => ({
|
|
1117
|
+
clsName: {
|
|
852
1118
|
type: String,
|
|
853
|
-
default: "
|
|
1119
|
+
default: "pro-table"
|
|
854
1120
|
},
|
|
855
|
-
|
|
856
|
-
type:
|
|
857
|
-
default: !0
|
|
1121
|
+
operate: {
|
|
1122
|
+
type: Object
|
|
858
1123
|
},
|
|
859
|
-
|
|
860
|
-
type:
|
|
861
|
-
default: !1
|
|
1124
|
+
columnEmptyText: {
|
|
1125
|
+
type: String
|
|
862
1126
|
},
|
|
863
|
-
|
|
864
|
-
type:
|
|
865
|
-
|
|
1127
|
+
column: {
|
|
1128
|
+
type: Object
|
|
1129
|
+
},
|
|
1130
|
+
serialNumber: {
|
|
1131
|
+
type: [Boolean, Object]
|
|
866
1132
|
},
|
|
867
|
-
|
|
1133
|
+
paginationState: {
|
|
868
1134
|
type: Object
|
|
869
1135
|
},
|
|
870
|
-
|
|
871
|
-
type:
|
|
872
|
-
default: "\u786E\u5B9A\u5E76\u7EE7\u7EED"
|
|
1136
|
+
toolbar: {
|
|
1137
|
+
type: Object
|
|
873
1138
|
},
|
|
874
|
-
|
|
1139
|
+
provideExtra: {
|
|
875
1140
|
type: Object
|
|
1141
|
+
},
|
|
1142
|
+
tableMethods: {
|
|
1143
|
+
type: Array
|
|
876
1144
|
}
|
|
877
|
-
}),
|
|
1145
|
+
}), Mr = M({
|
|
878
1146
|
inheritAttrs: !1,
|
|
879
1147
|
props: {
|
|
880
|
-
...
|
|
881
|
-
...
|
|
1148
|
+
...de,
|
|
1149
|
+
...Ge()
|
|
882
1150
|
},
|
|
883
|
-
setup: (
|
|
884
|
-
slots:
|
|
885
|
-
|
|
886
|
-
|
|
1151
|
+
setup: (e, {
|
|
1152
|
+
slots: t,
|
|
1153
|
+
expose: n,
|
|
1154
|
+
attrs: s
|
|
887
1155
|
}) => {
|
|
888
1156
|
const {
|
|
889
|
-
elementMap:
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
d
|
|
898
|
-
|
|
1157
|
+
elementMap: o
|
|
1158
|
+
} = Y(), a = e.elementMap || o, r = b(o, Dn), c = () => ({
|
|
1159
|
+
title: "\u5E8F\u53F7",
|
|
1160
|
+
dataIndex: "serialNumber",
|
|
1161
|
+
width: 80,
|
|
1162
|
+
...e.column,
|
|
1163
|
+
...ue(e.serialNumber) ? void 0 : e.serialNumber,
|
|
1164
|
+
customRender: ({
|
|
1165
|
+
index: d
|
|
1166
|
+
}) => {
|
|
1167
|
+
var v, S;
|
|
1168
|
+
return ((v = e.paginationState) == null ? void 0 : v.page) && ((S = e.paginationState) == null ? void 0 : S.pageSize) ? e.paginationState.pageSize * (e.paginationState.page - 1) + d + 1 : d + 1;
|
|
899
1169
|
}
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
})
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
1170
|
+
}), f = () => {
|
|
1171
|
+
const d = e.operate, v = A(d.items, (P) => ({
|
|
1172
|
+
...P,
|
|
1173
|
+
...b(d.itemState, P.value)
|
|
1174
|
+
})), S = Je(v, (P) => P.sort);
|
|
1175
|
+
return {
|
|
1176
|
+
...e.column,
|
|
1177
|
+
title: "\u64CD\u4F5C",
|
|
1178
|
+
dataIndex: "operate",
|
|
1179
|
+
fixed: "right",
|
|
1180
|
+
...d.column,
|
|
1181
|
+
customRender: ({
|
|
1182
|
+
record: P
|
|
1183
|
+
}) => {
|
|
1184
|
+
const k = A(S, (D) => ({
|
|
1185
|
+
value: D.value,
|
|
1186
|
+
label: D.label,
|
|
1187
|
+
show: w(D.show) ? D.show(P) : D.show,
|
|
1188
|
+
disabled: w(D.disabled) ? D.disabled(P) : D.disabled,
|
|
1189
|
+
loading: w(D.loading) ? D.loading(P) : D.loading,
|
|
1190
|
+
extraProps: w(D.extraProps) ? D.extraProps(P) : D.extraProps,
|
|
1191
|
+
onClick: () => {
|
|
1192
|
+
var Z;
|
|
1193
|
+
(Z = D.onClick) == null || Z.call(D, P);
|
|
1194
|
+
},
|
|
1195
|
+
element: w(D.element) ? () => D.element(P, D) : D.element
|
|
1196
|
+
}));
|
|
1197
|
+
return h(St, {
|
|
1198
|
+
clsName: d.clsName || `${e.clsName}-operate`,
|
|
1199
|
+
items: k,
|
|
1200
|
+
elementKey: d.elementKey
|
|
1201
|
+
}, null);
|
|
1202
|
+
}
|
|
1203
|
+
};
|
|
1204
|
+
}, g = z({
|
|
1205
|
+
selectIds: (() => {
|
|
1206
|
+
var S, P;
|
|
1207
|
+
const d = ((P = (S = e.toolbar) == null ? void 0 : S.columnSetting) == null ? void 0 : P.signName) || "columnSetting", v = x(e.columns, (k) => {
|
|
1208
|
+
var D;
|
|
1209
|
+
return ((D = ft(k, d)) == null ? void 0 : D.initShow) !== !1;
|
|
1210
|
+
});
|
|
1211
|
+
return e.serialNumber && v.unshift(c()), A(v, (k) => k.dataIndex);
|
|
1212
|
+
})()
|
|
1213
|
+
}), m = Dt(e, "columns"), u = R(() => {
|
|
1214
|
+
const d = V(g.selectIds, (v, S) => ({
|
|
1215
|
+
...v,
|
|
1216
|
+
[S]: !0
|
|
1217
|
+
}), {});
|
|
1218
|
+
return x(e.columns, (v) => b(d, v.dataIndex));
|
|
1219
|
+
}), l = R(() => {
|
|
1220
|
+
const d = De(u.value, e.columnState, (S) => S.dataIndex), v = A(d, (S) => {
|
|
1221
|
+
const P = {
|
|
1222
|
+
...e.column,
|
|
1223
|
+
...S
|
|
1224
|
+
};
|
|
1225
|
+
return S.customRender || (P.customRender = ({
|
|
1226
|
+
text: k
|
|
1227
|
+
}) => ke(a, {
|
|
1228
|
+
...S,
|
|
1229
|
+
showProps: {
|
|
1230
|
+
...S.showProps,
|
|
1231
|
+
content: e.columnEmptyText
|
|
1232
|
+
}
|
|
1233
|
+
}, k) || k || e.columnEmptyText), P;
|
|
908
1234
|
});
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
1235
|
+
return e.serialNumber && v.unshift(c()), e.operate && e.operate.items && se(e.operate.items, (S) => S.show) && v.push(f()), v;
|
|
1236
|
+
}), y = j();
|
|
1237
|
+
Vn({
|
|
1238
|
+
columns: l,
|
|
1239
|
+
originColumns: m,
|
|
1240
|
+
state: g,
|
|
1241
|
+
tableRef: y,
|
|
1242
|
+
toolbar: e.toolbar,
|
|
1243
|
+
...e.provideExtra
|
|
1244
|
+
}), n(ce(e.tableMethods || [], y));
|
|
1245
|
+
const i = $(Ge());
|
|
1246
|
+
return () => {
|
|
1247
|
+
var v, S, P;
|
|
1248
|
+
if (!r)
|
|
1249
|
+
return null;
|
|
1250
|
+
const d = t.toolbar ? t.toolbar() : void 0;
|
|
1251
|
+
return h("div", O({
|
|
1252
|
+
class: e.clsName
|
|
1253
|
+
}, K(s, "class")), [(d || ((v = e.toolbar) == null ? void 0 : v.columnSetting)) && h("div", {
|
|
1254
|
+
class: `${e.clsName}-toolbar`
|
|
1255
|
+
}, [d, ((S = e.toolbar) == null ? void 0 : S.columnSetting) && h(Un, (P = e.toolbar) == null ? void 0 : P.columnSetting, null)]), h(r, O({
|
|
1256
|
+
ref: y
|
|
1257
|
+
}, C(s, "class"), C(e, i), {
|
|
1258
|
+
columns: l.value
|
|
1259
|
+
}), t)]);
|
|
915
1260
|
};
|
|
916
|
-
return f(Y(t, s)), () => b(e, R({
|
|
917
|
-
ref: s
|
|
918
|
-
}, C(d, "onFinish"), u, {
|
|
919
|
-
elementMap: u.elementMap || y,
|
|
920
|
-
formElementMap: u.formElementMap || E,
|
|
921
|
-
columns: u.columns || i.value,
|
|
922
|
-
model: u.model || l[u.modelName],
|
|
923
|
-
readonly: l.mode === q.DETAIL,
|
|
924
|
-
onFinish: h
|
|
925
|
-
}, o == null ? void 0 : o(l)), {
|
|
926
|
-
default: () => {
|
|
927
|
-
var P, N, F, I, A;
|
|
928
|
-
return [(P = r.divide) == null ? void 0 : P.call(r), u.operateBar && b("div", {
|
|
929
|
-
class: "pro-curd-form-operate"
|
|
930
|
-
}, [(N = r.operateStart) == null ? void 0 : N.call(r), l.mode !== q.DETAIL && b(n, R({
|
|
931
|
-
onClick: p
|
|
932
|
-
}, u.okButtonProps, {
|
|
933
|
-
loading: l.operateLoading
|
|
934
|
-
}), {
|
|
935
|
-
default: () => [u.okText]
|
|
936
|
-
}), (F = r.operateCenter) == null ? void 0 : F.call(r), u.showContinueAdd && l.mode === q.ADD && b(n, R({
|
|
937
|
-
onClick: S
|
|
938
|
-
}, u.continueButtonProps, {
|
|
939
|
-
loading: l.operateLoading
|
|
940
|
-
}), {
|
|
941
|
-
default: () => [u.continueText]
|
|
942
|
-
}), (I = r.operateEnd) == null ? void 0 : I.call(r)]), (A = r.default) == null ? void 0 : A.call(r)];
|
|
943
|
-
},
|
|
944
|
-
...C(r, "default", "divide", "operateStart", "operateCenter", "operateEnd")
|
|
945
|
-
});
|
|
946
1261
|
}
|
|
947
|
-
}),
|
|
948
|
-
|
|
1262
|
+
}), Gn = () => ({
|
|
1263
|
+
title: {
|
|
1264
|
+
type: String
|
|
1265
|
+
},
|
|
1266
|
+
subTitle: {
|
|
1267
|
+
type: String
|
|
1268
|
+
},
|
|
1269
|
+
showBack: Boolean,
|
|
1270
|
+
hideWhileNoHistory: {
|
|
1271
|
+
type: Boolean,
|
|
1272
|
+
default: !0
|
|
1273
|
+
}
|
|
1274
|
+
}), Le = M({
|
|
1275
|
+
props: {
|
|
1276
|
+
...Gn()
|
|
1277
|
+
},
|
|
1278
|
+
setup: (e, {
|
|
1279
|
+
slots: t,
|
|
1280
|
+
emit: n
|
|
1281
|
+
}) => () => {
|
|
1282
|
+
var o, a, r, c;
|
|
1283
|
+
const s = e.hideWhileNoHistory && ((a = (o = window.history) == null ? void 0 : o.state) == null ? void 0 : a.back) || e.hideWhileNoHistory === !1;
|
|
1284
|
+
return h("div", {
|
|
1285
|
+
class: "pro-page-header"
|
|
1286
|
+
}, [e.showBack && s && h("div", {
|
|
1287
|
+
class: "pro-page-header-back",
|
|
1288
|
+
onClick: () => {
|
|
1289
|
+
n("back");
|
|
1290
|
+
}
|
|
1291
|
+
}, [t.backIcon ? t.backIcon() : "\u8FD4\u56DE"]), h("div", {
|
|
1292
|
+
class: "pro-page-header-title"
|
|
1293
|
+
}, [t.title ? t.title() : e.title]), h("div", {
|
|
1294
|
+
class: "pro-page-header-sub-title"
|
|
1295
|
+
}, [t.subTitle ? t.subTitle() : e.subTitle]), h("div", {
|
|
1296
|
+
class: "pro-page-header-space"
|
|
1297
|
+
}, [(r = t.space) == null ? void 0 : r.call(t)]), h("div", {
|
|
1298
|
+
class: "pro-page-header-extra"
|
|
1299
|
+
}, [(c = t.extra) == null ? void 0 : c.call(t)])]);
|
|
1300
|
+
}
|
|
1301
|
+
}), _n = () => ({
|
|
1302
|
+
loading: {
|
|
949
1303
|
type: Boolean,
|
|
950
|
-
default:
|
|
1304
|
+
default: !1
|
|
1305
|
+
},
|
|
1306
|
+
loadingOpts: Object,
|
|
1307
|
+
fillMode: {
|
|
1308
|
+
type: Boolean,
|
|
1309
|
+
default: !0
|
|
1310
|
+
}
|
|
1311
|
+
}), Dr = M({
|
|
1312
|
+
props: {
|
|
1313
|
+
...Le.props,
|
|
1314
|
+
..._n()
|
|
1315
|
+
},
|
|
1316
|
+
setup: (e, {
|
|
1317
|
+
slots: t,
|
|
1318
|
+
emit: n
|
|
1319
|
+
}) => {
|
|
1320
|
+
const o = H()(dt), a = j(), r = j(0);
|
|
1321
|
+
Bt(a, (f) => {
|
|
1322
|
+
var g;
|
|
1323
|
+
const p = (g = f[0]) == null ? void 0 : g.contentRect;
|
|
1324
|
+
r.value = p == null ? void 0 : p.height;
|
|
1325
|
+
});
|
|
1326
|
+
const c = $(Le.props);
|
|
1327
|
+
return () => {
|
|
1328
|
+
var g, m, u;
|
|
1329
|
+
const f = e.title || t.title || e.subTitle || t.subTitle || t.extra, p = !!t.footer;
|
|
1330
|
+
return h("div", {
|
|
1331
|
+
class: "pro-page"
|
|
1332
|
+
}, [f && h(Le, O(K(e, c), {
|
|
1333
|
+
onBack: () => {
|
|
1334
|
+
n("back");
|
|
1335
|
+
}
|
|
1336
|
+
}), K(t, "backIcon", "title", "subTitle", "space", "extra")), e.loading && o ? h(o, O({
|
|
1337
|
+
loading: !0
|
|
1338
|
+
}, e.loadingOpts), {
|
|
1339
|
+
default: () => [h("div", {
|
|
1340
|
+
class: "pro-loading-dom"
|
|
1341
|
+
}, null)]
|
|
1342
|
+
}) : h("div", {
|
|
1343
|
+
ref: a,
|
|
1344
|
+
style: r.value > 0 ? `height:${r.value > 0}` : "",
|
|
1345
|
+
class: "pro-page-content"
|
|
1346
|
+
}, [e.fillMode ? h(B, null, [r.value > 0 && ((g = t.default) == null ? void 0 : g.call(t))]) : (m = t.default) == null ? void 0 : m.call(t)]), !e.loading && p && h("div", {
|
|
1347
|
+
class: "pro-page-footer"
|
|
1348
|
+
}, [(u = t.footer) == null ? void 0 : u.call(t)])]);
|
|
1349
|
+
};
|
|
1350
|
+
}
|
|
1351
|
+
}), zn = Object.freeze({
|
|
1352
|
+
page: 1,
|
|
1353
|
+
pageSize: 10
|
|
1354
|
+
}), Wn = () => ({
|
|
1355
|
+
clsName: {
|
|
1356
|
+
type: String,
|
|
1357
|
+
default: "pro-list"
|
|
951
1358
|
},
|
|
952
1359
|
searchProps: {
|
|
953
1360
|
type: Object
|
|
@@ -958,542 +1365,900 @@ const Ht = (e, n) => L({
|
|
|
958
1365
|
paginationProps: {
|
|
959
1366
|
type: Object
|
|
960
1367
|
},
|
|
961
|
-
showPagination: {
|
|
962
|
-
type: Boolean,
|
|
963
|
-
default: !0
|
|
964
|
-
},
|
|
965
1368
|
pageState: {
|
|
966
1369
|
type: Object
|
|
967
1370
|
}
|
|
968
|
-
}),
|
|
1371
|
+
}), _e = M({
|
|
969
1372
|
props: {
|
|
970
|
-
...
|
|
1373
|
+
...Wn()
|
|
971
1374
|
},
|
|
972
|
-
setup: (
|
|
973
|
-
slots: t
|
|
1375
|
+
setup: (e, {
|
|
1376
|
+
slots: t,
|
|
1377
|
+
emit: n
|
|
974
1378
|
}) => {
|
|
975
|
-
const {
|
|
976
|
-
|
|
977
|
-
formElementMap: r,
|
|
978
|
-
curdState: d,
|
|
979
|
-
searchColumns: f,
|
|
980
|
-
tableColumns: y,
|
|
981
|
-
sendCurdEvent: E,
|
|
982
|
-
operates: l
|
|
983
|
-
} = se(), m = o.pageState || B({
|
|
984
|
-
...It
|
|
1379
|
+
const s = H(), o = s(On), a = s(Ln), r = s(Pn), c = e.pageState || z({
|
|
1380
|
+
...zn
|
|
985
1381
|
});
|
|
986
|
-
let
|
|
987
|
-
const
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
values: {
|
|
992
|
-
...a,
|
|
993
|
-
...m
|
|
994
|
-
}
|
|
1382
|
+
let f;
|
|
1383
|
+
const p = () => {
|
|
1384
|
+
n("search", {
|
|
1385
|
+
...f,
|
|
1386
|
+
...c
|
|
995
1387
|
});
|
|
996
|
-
},
|
|
997
|
-
|
|
998
|
-
},
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
}), (p) => {
|
|
1002
|
-
const S = {
|
|
1003
|
-
...K(p, "label", "element", "disabled", "sort", "onClick"),
|
|
1004
|
-
show: ot(p == null ? void 0 : p.show) ? !1 : p == null ? void 0 : p.show,
|
|
1005
|
-
value: p.action
|
|
1006
|
-
};
|
|
1007
|
-
return S.onClick || (S.onClick = (P) => {
|
|
1008
|
-
E({
|
|
1009
|
-
action: p.action,
|
|
1010
|
-
type: D.EMIT,
|
|
1011
|
-
record: P
|
|
1012
|
-
});
|
|
1013
|
-
}), S;
|
|
1014
|
-
}), h = (p) => M(p, (S) => S.onClick ? S : {
|
|
1015
|
-
...S,
|
|
1016
|
-
onClick: (P) => {
|
|
1017
|
-
E({
|
|
1018
|
-
action: "operate",
|
|
1019
|
-
type: S.value,
|
|
1020
|
-
record: P
|
|
1021
|
-
});
|
|
1022
|
-
}
|
|
1023
|
-
});
|
|
1388
|
+
}, g = (i, d) => {
|
|
1389
|
+
f = i, c.page = d || 1, p();
|
|
1390
|
+
}, m = (i, d) => {
|
|
1391
|
+
c.page = i, c.pageSize = d, p();
|
|
1392
|
+
}, u = le(t, "search"), l = le(t, "table"), y = le(t, "pagination");
|
|
1024
1393
|
return () => {
|
|
1025
|
-
var
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
}),
|
|
1394
|
+
var i, d, v, S;
|
|
1395
|
+
return h(B, null, [(i = t.start) == null ? void 0 : i.call(t), t.search ? t.search({
|
|
1396
|
+
executeSearchWithResetPage: g,
|
|
1397
|
+
pageState: c
|
|
1398
|
+
}) : h(B, null, [o ? h(o, O({
|
|
1399
|
+
clsName: `${e.clsName}-search`
|
|
1400
|
+
}, C(e.searchProps, "onFinish"), {
|
|
1401
|
+
onFinish: (P) => g(P)
|
|
1402
|
+
}), u) : null]), (d = t.divide) == null ? void 0 : d.call(t), t.table ? t.table() : h(B, null, [h(B, null, [a ? h(a, O({
|
|
1403
|
+
clsName: `${e.clsName}-table`,
|
|
1036
1404
|
paginationState: {
|
|
1037
|
-
page:
|
|
1038
|
-
pageSize:
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
}, C(o.searchProps, "slots"), {
|
|
1051
|
-
onFinish: s
|
|
1052
|
-
}), {
|
|
1053
|
-
default: () => [o.extraInSearch && P],
|
|
1054
|
-
...(I = o.searchProps) == null ? void 0 : I.slots
|
|
1055
|
-
}), (A = t.divide) == null ? void 0 : A.call(t), !o.extraInSearch && P, t.table ? t.table(S) : b(n, S, p == null ? void 0 : p.slots), (g = t.divide2) == null ? void 0 : g.call(t), o.showPagination && b("div", {
|
|
1056
|
-
class: "pro-curd-list-footer"
|
|
1057
|
-
}, [(O = t.footerStart) == null ? void 0 : O.call(t), (j = t.pagination) == null ? void 0 : j.call(t, m, (G = d.listData) == null ? void 0 : G.total, c), (x = t.footerEnd) == null ? void 0 : x.call(t)]), (V = t.end) == null ? void 0 : V.call(t)]);
|
|
1405
|
+
page: c.page,
|
|
1406
|
+
pageSize: c.pageSize
|
|
1407
|
+
}
|
|
1408
|
+
}, e.tableProps), l) : null])]), (v = t.divide2) == null ? void 0 : v.call(t), t.pagination ? t.pagination({
|
|
1409
|
+
executePageChange: m,
|
|
1410
|
+
pageState: c
|
|
1411
|
+
}) : h(B, null, [r ? h(r, O({
|
|
1412
|
+
clsName: `${e.clsName}-pagination`
|
|
1413
|
+
}, C(e.paginationProps, "onChange"), {
|
|
1414
|
+
page: c.page,
|
|
1415
|
+
pageSize: c.pageSize,
|
|
1416
|
+
onComposeChange: m
|
|
1417
|
+
}), y) : null]), (S = t.end) == null ? void 0 : S.call(t)]);
|
|
1058
1418
|
};
|
|
1059
1419
|
}
|
|
1060
|
-
}),
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
pathList: {
|
|
1065
|
-
type: Array
|
|
1066
|
-
}
|
|
1420
|
+
}), ze = () => ({
|
|
1421
|
+
clsName: {
|
|
1422
|
+
type: String,
|
|
1423
|
+
default: "pro-desc"
|
|
1067
1424
|
},
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
}), () => {
|
|
1073
|
-
var o;
|
|
1074
|
-
return (o = n.default) == null ? void 0 : o.call(n);
|
|
1075
|
-
})
|
|
1076
|
-
}), Yt = (e) => L({
|
|
1425
|
+
model: {
|
|
1426
|
+
type: Object
|
|
1427
|
+
}
|
|
1428
|
+
}), Hn = M({
|
|
1077
1429
|
props: {
|
|
1078
|
-
...
|
|
1079
|
-
|
|
1080
|
-
type: String,
|
|
1081
|
-
default: "id"
|
|
1082
|
-
}
|
|
1430
|
+
...de,
|
|
1431
|
+
...ze()
|
|
1083
1432
|
},
|
|
1084
|
-
setup: (
|
|
1085
|
-
slots:
|
|
1433
|
+
setup: (e, {
|
|
1434
|
+
slots: t
|
|
1086
1435
|
}) => {
|
|
1087
1436
|
const {
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
pathList: [...f, a]
|
|
1105
|
-
}, {
|
|
1106
|
-
default: () => {
|
|
1107
|
-
var c, s, i;
|
|
1108
|
-
return [b("div", {
|
|
1109
|
-
class: "pro-form-list-item"
|
|
1110
|
-
}, [(c = o.default) == null ? void 0 : c.call(o), !u.value && b(oe, null, [b("div", {
|
|
1111
|
-
class: "pro-form-list-item-add",
|
|
1112
|
-
onClick: y
|
|
1113
|
-
}, [(s = o.itemAdd) == null ? void 0 : s.call(o)]), b("div", {
|
|
1114
|
-
class: "pro-form-list-item-minus",
|
|
1115
|
-
onClick: () => E(a)
|
|
1116
|
-
}, [(i = o.itemMinus) == null ? void 0 : i.call(o)])])])];
|
|
1117
|
-
}
|
|
1118
|
-
})), !u.value && b("div", {
|
|
1119
|
-
class: "pro-form-list-add",
|
|
1120
|
-
onClick: y
|
|
1121
|
-
}, [(l = o.add) == null ? void 0 : l.call(o)])];
|
|
1122
|
-
}
|
|
1437
|
+
elementMap: n
|
|
1438
|
+
} = Y(), s = e.elementMap || n, o = H(), a = o(Sn), r = o(vn), c = R(() => De(e.columns, e.columnState, "dataIndex")), f = A(e.columns, (u) => u.dataIndex), p = C(t, ...f, ...A(f, (u) => u + "Label")), g = $(de), m = $(ze());
|
|
1439
|
+
return () => !a || !r ? null : h(a, O({
|
|
1440
|
+
class: e.clsName
|
|
1441
|
+
}, C(e, ...g, ...m, "model")), {
|
|
1442
|
+
default: () => [A(c.value, (u) => {
|
|
1443
|
+
const l = u.dataIndex, y = b(e.model, l);
|
|
1444
|
+
return h(r, O({
|
|
1445
|
+
class: `${e.clsName}-item`
|
|
1446
|
+
}, b(u.extra, "desc"), {
|
|
1447
|
+
label: t[`${l}Label`] ? t[`${l}Label`]() : u.title
|
|
1448
|
+
}), {
|
|
1449
|
+
default: () => [t[l] ? t[l]() : ke(s, u, y)]
|
|
1450
|
+
});
|
|
1451
|
+
})],
|
|
1452
|
+
...p
|
|
1123
1453
|
});
|
|
1124
1454
|
}
|
|
1125
|
-
}),
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
type:
|
|
1130
|
-
|
|
1131
|
-
readonly: {
|
|
1132
|
-
type: Boolean,
|
|
1133
|
-
default: void 0
|
|
1134
|
-
},
|
|
1135
|
-
showState: {
|
|
1136
|
-
type: Object
|
|
1137
|
-
},
|
|
1138
|
-
showStateRules: {
|
|
1139
|
-
type: Object
|
|
1455
|
+
}), Pt = Symbol("pro-curd"), G = () => Q(Pt), Xn = (e) => re(Pt, e);
|
|
1456
|
+
var T = /* @__PURE__ */ ((e) => (e.LIST = "LIST", e.DETAIL = "DETAIL", e.ADD = "ADD", e.EDIT = "EDIT", e.DELETE = "DELETE", e))(T || {}), L = /* @__PURE__ */ ((e) => (e.EMIT = "EMIT", e.EXECUTE = "EXECUTE", e.PAGE = "PAGE", e.SUCCESS = "SUCCESS", e.FAIL = "FAIL", e))(L || {}), te = /* @__PURE__ */ ((e) => (e.ADD = "ADD", e.EDIT = "EDIT", e.DETAIL = "DETAIL", e))(te || {}), pe = /* @__PURE__ */ ((e) => (e.NORMAL = "NORMAL", e.CONTINUE = "CONTINUE", e))(pe || {});
|
|
1457
|
+
const Jn = () => ({
|
|
1458
|
+
rowKey: {
|
|
1459
|
+
type: String,
|
|
1460
|
+
default: "id"
|
|
1140
1461
|
},
|
|
1141
|
-
|
|
1142
|
-
type:
|
|
1462
|
+
operates: {
|
|
1463
|
+
type: Array
|
|
1143
1464
|
},
|
|
1144
|
-
|
|
1465
|
+
listProps: {
|
|
1145
1466
|
type: Object
|
|
1146
1467
|
},
|
|
1147
|
-
|
|
1468
|
+
formProps: {
|
|
1148
1469
|
type: Object
|
|
1149
1470
|
},
|
|
1150
|
-
|
|
1471
|
+
descProps: {
|
|
1151
1472
|
type: Object
|
|
1152
1473
|
},
|
|
1153
|
-
|
|
1154
|
-
type: Boolean,
|
|
1155
|
-
default: !0
|
|
1156
|
-
},
|
|
1157
|
-
provideExtra: {
|
|
1474
|
+
modalProps: {
|
|
1158
1475
|
type: Object
|
|
1159
1476
|
}
|
|
1160
|
-
}),
|
|
1161
|
-
inheritAttrs: !1,
|
|
1477
|
+
}), Et = ["sendCurdEvent", "refreshList", "sendEvent", "sendRequest"], We = M({
|
|
1162
1478
|
props: {
|
|
1163
|
-
...
|
|
1164
|
-
...
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
slots: u,
|
|
1170
|
-
emit: r,
|
|
1171
|
-
expose: d,
|
|
1172
|
-
attrs: f
|
|
1479
|
+
...de,
|
|
1480
|
+
...Jn()
|
|
1481
|
+
},
|
|
1482
|
+
setup: (e, {
|
|
1483
|
+
slots: t,
|
|
1484
|
+
expose: n
|
|
1173
1485
|
}) => {
|
|
1174
1486
|
const {
|
|
1175
|
-
elementMap:
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
}), t.disableStateRules && W(t.disableStateRules, (I, A) => {
|
|
1184
|
-
i[A] = I(a);
|
|
1487
|
+
elementMap: s,
|
|
1488
|
+
state: o,
|
|
1489
|
+
sendEvent: a,
|
|
1490
|
+
sendRequest: r
|
|
1491
|
+
} = he(), c = R(() => De(e.columns, e.columnState, (E) => oe(E))), f = (E, N = !0) => ot(e.formElementMap, E, N), p = (E, N) => ke(s, E, N), g = (E, N) => {
|
|
1492
|
+
const F = x(c.value, (q) => {
|
|
1493
|
+
const _ = b(q, ["extra", E]) || b(q, E);
|
|
1494
|
+
return N ? _ !== !1 : _;
|
|
1185
1495
|
});
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1496
|
+
return Je(F, (q) => b(q, ["extra", `${E}Sort`]) || b(q, `${E}Sort`));
|
|
1497
|
+
}, m = R(() => g("form", !0)), u = R(() => g("detail", !0)), l = R(() => g("table", !0)), y = R(() => g("search"));
|
|
1498
|
+
let i;
|
|
1499
|
+
const d = (E) => {
|
|
1500
|
+
r(T.LIST, {
|
|
1501
|
+
...i,
|
|
1502
|
+
...E
|
|
1503
|
+
});
|
|
1504
|
+
}, v = (E) => {
|
|
1505
|
+
a({
|
|
1506
|
+
type: E.action,
|
|
1507
|
+
payload: C(E, "action", "source"),
|
|
1508
|
+
source: E.source
|
|
1509
|
+
});
|
|
1510
|
+
};
|
|
1511
|
+
Ke(({
|
|
1512
|
+
type: E,
|
|
1513
|
+
payload: N,
|
|
1514
|
+
source: F
|
|
1515
|
+
}) => {
|
|
1516
|
+
if (F)
|
|
1517
|
+
return;
|
|
1518
|
+
let q = E, _ = N == null ? void 0 : N.type;
|
|
1519
|
+
q === fe.Success && (q = b(N, ["requestOpts", "action"]), _ = L.SUCCESS);
|
|
1520
|
+
const {
|
|
1521
|
+
values: ge,
|
|
1522
|
+
record: Tt
|
|
1523
|
+
} = N;
|
|
1524
|
+
switch (q) {
|
|
1525
|
+
case T.LIST:
|
|
1526
|
+
_ === L.EMIT && (i = ge, d());
|
|
1527
|
+
return;
|
|
1528
|
+
case T.ADD:
|
|
1529
|
+
_ === L.EXECUTE && r(T.ADD, ge, o.detailData);
|
|
1530
|
+
return;
|
|
1531
|
+
case T.EDIT:
|
|
1532
|
+
_ === L.EXECUTE && r(T.EDIT, ge, o.detailData);
|
|
1533
|
+
return;
|
|
1534
|
+
case T.DELETE:
|
|
1535
|
+
_ === L.EMIT ? r(T.DELETE, Tt, e.rowKey) : _ === L.SUCCESS && d();
|
|
1536
|
+
return;
|
|
1537
|
+
}
|
|
1538
|
+
q && E === L.EXECUTE && r(q, ge);
|
|
1223
1539
|
});
|
|
1540
|
+
const S = V(e.operates, (E, N) => ({
|
|
1541
|
+
...E,
|
|
1542
|
+
[N.action]: N
|
|
1543
|
+
}), {}), P = (E) => b(S, E), k = R(() => e.listProps), D = R(() => e.formProps), Z = R(() => e.descProps), I = R(() => e.modalProps);
|
|
1544
|
+
return Xn({
|
|
1545
|
+
columns: c,
|
|
1546
|
+
getSignColumns: g,
|
|
1547
|
+
getFormItemVNode: f,
|
|
1548
|
+
getItemVNode: p,
|
|
1549
|
+
elementMap: s,
|
|
1550
|
+
formElementMap: e.formElementMap,
|
|
1551
|
+
rowKey: e.rowKey,
|
|
1552
|
+
curdState: o,
|
|
1553
|
+
formColumns: m,
|
|
1554
|
+
descColumns: u,
|
|
1555
|
+
tableColumns: l,
|
|
1556
|
+
searchColumns: y,
|
|
1557
|
+
sendCurdEvent: v,
|
|
1558
|
+
operates: e.operates,
|
|
1559
|
+
getOperate: P,
|
|
1560
|
+
refreshList: d,
|
|
1561
|
+
listProps: k,
|
|
1562
|
+
formProps: D,
|
|
1563
|
+
descProps: Z,
|
|
1564
|
+
modalProps: I
|
|
1565
|
+
}), n({
|
|
1566
|
+
sendCurdEvent: v,
|
|
1567
|
+
refreshList: d
|
|
1568
|
+
}), () => {
|
|
1569
|
+
var E;
|
|
1570
|
+
return (E = t.default) == null ? void 0 : E.call(t);
|
|
1571
|
+
};
|
|
1224
1572
|
}
|
|
1225
|
-
})
|
|
1226
|
-
|
|
1227
|
-
(
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
type: Boolean,
|
|
1233
|
-
default: !0
|
|
1234
|
-
},
|
|
1235
|
-
searchMode: {
|
|
1236
|
-
type: String,
|
|
1237
|
-
default: me.AUTO
|
|
1238
|
-
},
|
|
1239
|
-
debounceKeys: {
|
|
1240
|
-
type: Array
|
|
1241
|
-
},
|
|
1242
|
-
debounceTypes: {
|
|
1243
|
-
type: Array,
|
|
1244
|
-
default: ["text"]
|
|
1573
|
+
}), Ce = M({
|
|
1574
|
+
props: {
|
|
1575
|
+
...C(Ne.props, "state", "requests"),
|
|
1576
|
+
...We.props,
|
|
1577
|
+
curdState: {
|
|
1578
|
+
type: Object
|
|
1579
|
+
}
|
|
1245
1580
|
},
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1581
|
+
setup: (e, {
|
|
1582
|
+
slots: t,
|
|
1583
|
+
expose: n
|
|
1584
|
+
}) => {
|
|
1585
|
+
const {
|
|
1586
|
+
elementMap: s,
|
|
1587
|
+
formElementMap: o
|
|
1588
|
+
} = Y(), a = j(), r = j(), c = e.curdState || z({
|
|
1589
|
+
detailData: {}
|
|
1590
|
+
}), f = {
|
|
1591
|
+
[T.LIST]: {
|
|
1592
|
+
convertParams: (u) => u,
|
|
1593
|
+
convertData: (u) => {
|
|
1594
|
+
var l;
|
|
1595
|
+
return (l = u.res) == null ? void 0 : l.data;
|
|
1596
|
+
},
|
|
1597
|
+
loadingName: "listLoading",
|
|
1598
|
+
stateName: "listData"
|
|
1599
|
+
},
|
|
1600
|
+
[T.DETAIL]: {
|
|
1601
|
+
convertParams: (u, l) => K(u, l),
|
|
1602
|
+
convertData: (u) => {
|
|
1603
|
+
var l;
|
|
1604
|
+
return (l = u.res) == null ? void 0 : l.data;
|
|
1605
|
+
},
|
|
1606
|
+
loadingName: "detailLoading",
|
|
1607
|
+
stateName: "detailData",
|
|
1608
|
+
label: "\u8BE6\u60C5"
|
|
1609
|
+
},
|
|
1610
|
+
[T.ADD]: {
|
|
1611
|
+
convertParams: (u, l) => ({
|
|
1612
|
+
body: {
|
|
1613
|
+
...l,
|
|
1614
|
+
...u
|
|
1615
|
+
}
|
|
1616
|
+
}),
|
|
1617
|
+
loadingName: "operateLoading",
|
|
1618
|
+
label: "\u6DFB\u52A0"
|
|
1619
|
+
},
|
|
1620
|
+
[T.EDIT]: {
|
|
1621
|
+
convertParams: (u, l) => ({
|
|
1622
|
+
body: {
|
|
1623
|
+
...l,
|
|
1624
|
+
...u
|
|
1625
|
+
}
|
|
1626
|
+
}),
|
|
1627
|
+
loadingName: "operateLoading",
|
|
1628
|
+
label: "\u7F16\u8F91"
|
|
1629
|
+
},
|
|
1630
|
+
[T.DELETE]: {
|
|
1631
|
+
convertParams: (u, l) => K(u, l),
|
|
1632
|
+
label: "\u5220\u9664"
|
|
1633
|
+
}
|
|
1634
|
+
}, p = A(e.operates, (u) => ({
|
|
1635
|
+
...b(f, u.action),
|
|
1636
|
+
...u
|
|
1637
|
+
})), g = x(p, (u) => u.actor), m = $(C(Ne.props, "state", "requests"));
|
|
1638
|
+
return n({
|
|
1639
|
+
sendCurdEvent: (u) => {
|
|
1640
|
+
var l;
|
|
1641
|
+
(l = r.value) == null || l.sendCurdEvent(u);
|
|
1642
|
+
},
|
|
1643
|
+
refreshList: (u) => {
|
|
1644
|
+
var l;
|
|
1645
|
+
(l = r.value) == null || l.refreshList(u);
|
|
1646
|
+
},
|
|
1647
|
+
sendEvent: (u) => {
|
|
1648
|
+
var l;
|
|
1649
|
+
(l = a.value) == null || l.sendEvent(u);
|
|
1650
|
+
},
|
|
1651
|
+
sendRequest: (u, ...l) => {
|
|
1652
|
+
var y;
|
|
1653
|
+
(y = a.value) == null || y.sendRequest(u, ...l);
|
|
1654
|
+
}
|
|
1655
|
+
}), () => h(Ne, O({
|
|
1656
|
+
ref: a
|
|
1657
|
+
}, K(e, m), {
|
|
1658
|
+
elementMap: e.elementMap || s,
|
|
1659
|
+
state: c,
|
|
1660
|
+
requests: g
|
|
1661
|
+
}), {
|
|
1662
|
+
default: () => [h(We, O({
|
|
1663
|
+
ref: r
|
|
1664
|
+
}, C(e, ...m, "curdState", "operates"), {
|
|
1665
|
+
formElementMap: e.formElementMap || o,
|
|
1666
|
+
operates: p
|
|
1667
|
+
}), t)]
|
|
1668
|
+
});
|
|
1669
|
+
}
|
|
1670
|
+
}), Qn = () => ({
|
|
1671
|
+
defaultAddRecord: {
|
|
1672
|
+
type: Object
|
|
1249
1673
|
}
|
|
1250
|
-
}),
|
|
1674
|
+
}), Ae = M({
|
|
1251
1675
|
props: {
|
|
1252
|
-
...
|
|
1253
|
-
...n,
|
|
1254
|
-
...Re()
|
|
1676
|
+
...Qn()
|
|
1255
1677
|
},
|
|
1256
|
-
setup: (
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
},
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1678
|
+
setup: (e) => {
|
|
1679
|
+
var l;
|
|
1680
|
+
const {
|
|
1681
|
+
dispatch: t,
|
|
1682
|
+
sendRequest: n
|
|
1683
|
+
} = he(), {
|
|
1684
|
+
rowKey: s,
|
|
1685
|
+
curdState: o,
|
|
1686
|
+
listProps: a,
|
|
1687
|
+
getOperate: r,
|
|
1688
|
+
refreshList: c
|
|
1689
|
+
} = G(), f = (l = a == null ? void 0 : a.value) == null ? void 0 : l.pageState, p = (y) => {
|
|
1690
|
+
const i = r(T.DETAIL);
|
|
1691
|
+
i != null && i.actor ? n(T.DETAIL, y, s) : t({
|
|
1692
|
+
type: "detailData",
|
|
1693
|
+
payload: Kt(y)
|
|
1694
|
+
});
|
|
1695
|
+
}, g = (y, {
|
|
1696
|
+
record: i
|
|
1697
|
+
}) => {
|
|
1698
|
+
y === L.EMIT && (t({
|
|
1699
|
+
type: "mode",
|
|
1700
|
+
payload: te.DETAIL
|
|
1701
|
+
}), p(i));
|
|
1702
|
+
}, m = (y) => {
|
|
1703
|
+
y === L.EMIT ? (t({
|
|
1704
|
+
type: "mode",
|
|
1705
|
+
payload: te.ADD
|
|
1706
|
+
}), t({
|
|
1707
|
+
type: "detailData",
|
|
1708
|
+
payload: e.defaultAddRecord || {}
|
|
1709
|
+
})) : y === L.SUCCESS && (f && (f.page = 1), c(), o.addAction === pe.CONTINUE ? t({
|
|
1710
|
+
type: "detailData",
|
|
1711
|
+
payload: e.defaultAddRecord || {}
|
|
1712
|
+
}) : t({
|
|
1713
|
+
type: "mode",
|
|
1714
|
+
payload: void 0
|
|
1715
|
+
}));
|
|
1716
|
+
}, u = (y, {
|
|
1717
|
+
record: i
|
|
1718
|
+
}) => {
|
|
1719
|
+
y === L.EMIT ? (t({
|
|
1720
|
+
type: "mode",
|
|
1721
|
+
payload: te.EDIT
|
|
1722
|
+
}), p(i)) : y === L.SUCCESS && (t({
|
|
1723
|
+
type: "mode",
|
|
1724
|
+
payload: void 0
|
|
1725
|
+
}), c());
|
|
1726
|
+
};
|
|
1727
|
+
return Ke(({
|
|
1728
|
+
type: y,
|
|
1729
|
+
payload: i,
|
|
1730
|
+
source: d
|
|
1731
|
+
}) => {
|
|
1732
|
+
if (d)
|
|
1281
1733
|
return;
|
|
1734
|
+
let v = y, S = i == null ? void 0 : i.type;
|
|
1735
|
+
const P = i == null ? void 0 : i.record;
|
|
1736
|
+
switch (v === fe.Success && (v = b(i, ["requestOpts", "action"]), S = L.SUCCESS), v) {
|
|
1737
|
+
case T.DETAIL:
|
|
1738
|
+
g(S, {
|
|
1739
|
+
record: P
|
|
1740
|
+
});
|
|
1741
|
+
break;
|
|
1742
|
+
case T.ADD:
|
|
1743
|
+
m(S);
|
|
1744
|
+
break;
|
|
1745
|
+
case T.EDIT:
|
|
1746
|
+
u(S, {
|
|
1747
|
+
record: P
|
|
1748
|
+
});
|
|
1749
|
+
break;
|
|
1282
1750
|
}
|
|
1283
|
-
|
|
1284
|
-
}, () => st(d));
|
|
1285
|
-
const c = k(C(Re(), "columns"));
|
|
1286
|
-
return () => b(e, R({
|
|
1287
|
-
ref: E
|
|
1288
|
-
}, C(t, c), {
|
|
1289
|
-
model: d
|
|
1290
|
-
}), u);
|
|
1751
|
+
}), () => null;
|
|
1291
1752
|
}
|
|
1292
|
-
}),
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1753
|
+
}), Nr = M({
|
|
1754
|
+
props: {
|
|
1755
|
+
...Ce.props,
|
|
1756
|
+
...Ae.props
|
|
1296
1757
|
},
|
|
1297
|
-
|
|
1758
|
+
setup: (e, {
|
|
1759
|
+
slots: t,
|
|
1760
|
+
expose: n
|
|
1761
|
+
}) => {
|
|
1762
|
+
const s = j();
|
|
1763
|
+
n(ce(Et, s));
|
|
1764
|
+
const o = $(Ae.props);
|
|
1765
|
+
return () => h(Ce, O({
|
|
1766
|
+
ref: s
|
|
1767
|
+
}, C(e, o)), {
|
|
1768
|
+
default: () => {
|
|
1769
|
+
var a;
|
|
1770
|
+
return [h(Ae, K(e, o), null), (a = t.default) == null ? void 0 : a.call(t)];
|
|
1771
|
+
}
|
|
1772
|
+
});
|
|
1773
|
+
}
|
|
1774
|
+
}), Yn = () => ({
|
|
1775
|
+
defaultAddRecord: {
|
|
1298
1776
|
type: Object
|
|
1299
1777
|
},
|
|
1300
|
-
|
|
1301
|
-
type:
|
|
1778
|
+
routeBack: {
|
|
1779
|
+
type: Function
|
|
1780
|
+
}
|
|
1781
|
+
}), Re = M({
|
|
1782
|
+
props: {
|
|
1783
|
+
...Yn()
|
|
1302
1784
|
},
|
|
1303
|
-
|
|
1304
|
-
|
|
1785
|
+
setup: (e) => {
|
|
1786
|
+
const t = _t(), n = zt(), {
|
|
1787
|
+
dispatch: s,
|
|
1788
|
+
sendRequest: o
|
|
1789
|
+
} = he(), {
|
|
1790
|
+
rowKey: a,
|
|
1791
|
+
curdState: r
|
|
1792
|
+
} = G(), c = (m) => {
|
|
1793
|
+
m === L.PAGE && (s({
|
|
1794
|
+
type: "mode",
|
|
1795
|
+
payload: void 0
|
|
1796
|
+
}), s({
|
|
1797
|
+
type: "detailData",
|
|
1798
|
+
payload: {}
|
|
1799
|
+
}), s({
|
|
1800
|
+
type: "detailLoading",
|
|
1801
|
+
payload: !1
|
|
1802
|
+
}), s({
|
|
1803
|
+
type: "addAction",
|
|
1804
|
+
payload: void 0
|
|
1805
|
+
}));
|
|
1806
|
+
}, f = (m, {
|
|
1807
|
+
record: u
|
|
1808
|
+
}) => {
|
|
1809
|
+
m === L.EMIT ? t.push({
|
|
1810
|
+
path: `${n.path}/detail`,
|
|
1811
|
+
query: K(u, a)
|
|
1812
|
+
}) : m === L.PAGE && (s({
|
|
1813
|
+
type: "mode",
|
|
1814
|
+
payload: te.DETAIL
|
|
1815
|
+
}), o(T.DETAIL, n.query, a));
|
|
1816
|
+
}, p = (m) => {
|
|
1817
|
+
m === L.EMIT ? t.push({
|
|
1818
|
+
path: `${n.path}/add`
|
|
1819
|
+
}) : m === L.PAGE ? (s({
|
|
1820
|
+
type: "mode",
|
|
1821
|
+
payload: te.ADD
|
|
1822
|
+
}), s({
|
|
1823
|
+
type: "detailData",
|
|
1824
|
+
payload: e.defaultAddRecord || {}
|
|
1825
|
+
})) : m === L.SUCCESS && (r.addAction === pe.CONTINUE ? s({
|
|
1826
|
+
type: "detailData",
|
|
1827
|
+
payload: e.defaultAddRecord || {}
|
|
1828
|
+
}) : e.routeBack ? e.routeBack(T.ADD) : t.go(-1));
|
|
1829
|
+
}, g = (m, {
|
|
1830
|
+
record: u
|
|
1831
|
+
}) => {
|
|
1832
|
+
m === L.EMIT ? t.push({
|
|
1833
|
+
path: `${n.path}/edit`,
|
|
1834
|
+
query: K(u, a)
|
|
1835
|
+
}) : m === L.PAGE ? (s({
|
|
1836
|
+
type: "mode",
|
|
1837
|
+
payload: te.EDIT
|
|
1838
|
+
}), o(T.DETAIL, n.query, a)) : m === L.SUCCESS && (e.routeBack ? e.routeBack(T.EDIT) : t.go(-1));
|
|
1839
|
+
};
|
|
1840
|
+
return Ke(({
|
|
1841
|
+
type: m,
|
|
1842
|
+
payload: u,
|
|
1843
|
+
source: l
|
|
1844
|
+
}) => {
|
|
1845
|
+
if (l)
|
|
1846
|
+
return;
|
|
1847
|
+
let y = m, i = u == null ? void 0 : u.type;
|
|
1848
|
+
const d = u == null ? void 0 : u.record;
|
|
1849
|
+
switch (y === fe.Success && (y = b(u, ["requestOpts", "action"]), i = L.SUCCESS), y) {
|
|
1850
|
+
case T.LIST:
|
|
1851
|
+
c(i);
|
|
1852
|
+
break;
|
|
1853
|
+
case T.DETAIL:
|
|
1854
|
+
f(i, {
|
|
1855
|
+
record: d
|
|
1856
|
+
});
|
|
1857
|
+
break;
|
|
1858
|
+
case T.ADD:
|
|
1859
|
+
p(i);
|
|
1860
|
+
break;
|
|
1861
|
+
case T.EDIT:
|
|
1862
|
+
g(i, {
|
|
1863
|
+
record: d
|
|
1864
|
+
});
|
|
1865
|
+
break;
|
|
1866
|
+
}
|
|
1867
|
+
}), () => null;
|
|
1305
1868
|
}
|
|
1306
|
-
}),
|
|
1307
|
-
InputComp: o,
|
|
1308
|
-
valueType: t,
|
|
1309
|
-
name: u
|
|
1310
|
-
}) => L({
|
|
1311
|
-
name: u,
|
|
1869
|
+
}), Or = M({
|
|
1312
1870
|
props: {
|
|
1313
|
-
...
|
|
1314
|
-
...
|
|
1871
|
+
...Ce.props,
|
|
1872
|
+
...Re.props
|
|
1315
1873
|
},
|
|
1316
|
-
setup: (
|
|
1317
|
-
slots:
|
|
1874
|
+
setup: (e, {
|
|
1875
|
+
slots: t,
|
|
1876
|
+
expose: n
|
|
1877
|
+
}) => {
|
|
1878
|
+
const s = j();
|
|
1879
|
+
n(ce(Et, s));
|
|
1880
|
+
const o = $(Re.props);
|
|
1881
|
+
return () => h(Ce, O({
|
|
1882
|
+
ref: s
|
|
1883
|
+
}, C(e, o)), {
|
|
1884
|
+
default: () => {
|
|
1885
|
+
var a;
|
|
1886
|
+
return [h(Re, K(e, o), null), (a = t.default) == null ? void 0 : a.call(t)];
|
|
1887
|
+
}
|
|
1888
|
+
});
|
|
1889
|
+
}
|
|
1890
|
+
}), Zn = M({
|
|
1891
|
+
props: {
|
|
1892
|
+
..._e.props,
|
|
1893
|
+
clsName: {
|
|
1894
|
+
type: String,
|
|
1895
|
+
default: "pro-curd-list"
|
|
1896
|
+
}
|
|
1897
|
+
},
|
|
1898
|
+
setup: (e, {
|
|
1899
|
+
slots: t
|
|
1318
1900
|
}) => {
|
|
1319
1901
|
const {
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1902
|
+
elementMap: n,
|
|
1903
|
+
formElementMap: s,
|
|
1904
|
+
curdState: o,
|
|
1905
|
+
searchColumns: a,
|
|
1906
|
+
tableColumns: r,
|
|
1907
|
+
sendCurdEvent: c,
|
|
1908
|
+
operates: f
|
|
1909
|
+
} = G(), p = A(
|
|
1910
|
+
x(f, (m) => {
|
|
1911
|
+
const u = m.action;
|
|
1912
|
+
return u === T.DETAIL || u === T.EDIT || u === T.DELETE || m.tableOperate;
|
|
1913
|
+
}),
|
|
1914
|
+
(m) => {
|
|
1915
|
+
const u = {
|
|
1916
|
+
...K(m, "label", "show", "disabled", "loading", "extraProps", "onClick", "element"),
|
|
1917
|
+
value: m.action
|
|
1918
|
+
};
|
|
1919
|
+
return u.onClick || (u.onClick = (l) => {
|
|
1920
|
+
c({
|
|
1921
|
+
action: m.action,
|
|
1922
|
+
type: L.EMIT,
|
|
1923
|
+
record: l
|
|
1924
|
+
});
|
|
1925
|
+
}), u;
|
|
1926
|
+
}
|
|
1927
|
+
), g = (m) => {
|
|
1928
|
+
c({
|
|
1929
|
+
action: T.LIST,
|
|
1930
|
+
type: L.EMIT,
|
|
1931
|
+
values: m
|
|
1932
|
+
});
|
|
1933
|
+
};
|
|
1329
1934
|
return () => {
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1935
|
+
var v, S;
|
|
1936
|
+
const m = e.searchProps, u = {
|
|
1937
|
+
formElementMap: s,
|
|
1938
|
+
columns: a.value,
|
|
1939
|
+
...m
|
|
1940
|
+
}, l = e.tableProps, y = {
|
|
1941
|
+
elementMap: n,
|
|
1942
|
+
columns: r.value,
|
|
1943
|
+
loading: o.listLoading,
|
|
1944
|
+
dataSource: (v = o.listData) == null ? void 0 : v.dataSource,
|
|
1945
|
+
...C(l, "operate"),
|
|
1946
|
+
operate: {
|
|
1947
|
+
items: p,
|
|
1948
|
+
...l == null ? void 0 : l.operate
|
|
1949
|
+
}
|
|
1950
|
+
}, i = e.paginationProps, d = {
|
|
1951
|
+
total: (S = o.listData) == null ? void 0 : S.total,
|
|
1952
|
+
...i
|
|
1953
|
+
};
|
|
1954
|
+
return h(_e, O(C(e, "searchProps", "tableProps", "paginationProps"), {
|
|
1955
|
+
searchProps: u,
|
|
1956
|
+
tableProps: y,
|
|
1957
|
+
paginationProps: d,
|
|
1958
|
+
onSearch: g
|
|
1336
1959
|
}), {
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
showProps: r.showProps
|
|
1341
|
-
}), d) : b("span", null, [N])]) : b(o, R(n(N, p, v(l, h)), r.fieldProps), d)],
|
|
1342
|
-
...r.slots
|
|
1960
|
+
...t,
|
|
1961
|
+
search: t.search ? (P) => t.search(P, u) : void 0,
|
|
1962
|
+
pagination: t.pagination ? (P) => t.pagination(P, d) : void 0
|
|
1343
1963
|
});
|
|
1344
1964
|
};
|
|
1345
1965
|
}
|
|
1346
|
-
}),
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1966
|
+
}), Lr = M(() => {
|
|
1967
|
+
const {
|
|
1968
|
+
listProps: e
|
|
1969
|
+
} = G();
|
|
1970
|
+
return () => h(Zn, C(e == null ? void 0 : e.value, "slots"), b(e == null ? void 0 : e.value, "slots"));
|
|
1971
|
+
}), er = () => ({
|
|
1972
|
+
clsName: {
|
|
1973
|
+
type: String,
|
|
1974
|
+
default: "pro-curd-form"
|
|
1351
1975
|
},
|
|
1352
|
-
|
|
1976
|
+
signName: {
|
|
1353
1977
|
type: String
|
|
1978
|
+
}
|
|
1979
|
+
}), xe = M({
|
|
1980
|
+
props: {
|
|
1981
|
+
...er()
|
|
1354
1982
|
},
|
|
1355
|
-
|
|
1356
|
-
|
|
1983
|
+
setup: (e, {
|
|
1984
|
+
slots: t,
|
|
1985
|
+
expose: n,
|
|
1986
|
+
attrs: s
|
|
1987
|
+
}) => {
|
|
1988
|
+
const {
|
|
1989
|
+
elementMap: o,
|
|
1990
|
+
formElementMap: a,
|
|
1991
|
+
curdState: r,
|
|
1992
|
+
formColumns: c,
|
|
1993
|
+
getSignColumns: f,
|
|
1994
|
+
sendCurdEvent: p
|
|
1995
|
+
} = G(), g = j();
|
|
1996
|
+
n(ce(e.formMethods || [], g));
|
|
1997
|
+
const m = R(() => e.signName ? f(e.signName) : c.value), u = () => {
|
|
1998
|
+
var d;
|
|
1999
|
+
r.addAction = pe.NORMAL, (d = g.value) == null || d.submit();
|
|
2000
|
+
}, l = () => {
|
|
2001
|
+
var d;
|
|
2002
|
+
r.addAction = pe.CONTINUE, (d = g.value) == null || d.submit();
|
|
2003
|
+
}, y = [
|
|
2004
|
+
{
|
|
2005
|
+
value: U.RESET,
|
|
2006
|
+
label: "\u91CD\u7F6E"
|
|
2007
|
+
},
|
|
2008
|
+
{
|
|
2009
|
+
value: U.SUBMIT,
|
|
2010
|
+
label: "\u63D0\u4EA4",
|
|
2011
|
+
extraProps: {
|
|
2012
|
+
type: "primary"
|
|
2013
|
+
}
|
|
2014
|
+
},
|
|
2015
|
+
{
|
|
2016
|
+
value: U.CONTINUE,
|
|
2017
|
+
label: "\u786E\u5B9A\u5E76\u7EE7\u7EED",
|
|
2018
|
+
extraProps: {
|
|
2019
|
+
type: "primary"
|
|
2020
|
+
},
|
|
2021
|
+
show: !1
|
|
2022
|
+
}
|
|
2023
|
+
], i = (d) => {
|
|
2024
|
+
s.onFinish || (r.mode === T.EDIT ? p({
|
|
2025
|
+
action: T.EDIT,
|
|
2026
|
+
type: L.EXECUTE,
|
|
2027
|
+
values: d
|
|
2028
|
+
}) : p({
|
|
2029
|
+
action: T.ADD,
|
|
2030
|
+
type: L.EXECUTE,
|
|
2031
|
+
values: d
|
|
2032
|
+
}));
|
|
2033
|
+
};
|
|
2034
|
+
return () => h(Kn, O({
|
|
2035
|
+
ref: g
|
|
2036
|
+
}, C(e, "operate"), {
|
|
2037
|
+
elementMap: e.elementMap || o,
|
|
2038
|
+
formElementMap: e.formElementMap || a,
|
|
2039
|
+
columns: e.columns || m.value,
|
|
2040
|
+
readonly: r.mode === T.DETAIL,
|
|
2041
|
+
model: e.model || r.detailData,
|
|
2042
|
+
hideRequiredMark: r.mode === T.DETAIL,
|
|
2043
|
+
operate: e.operate ? {
|
|
2044
|
+
items: y,
|
|
2045
|
+
onSubmit: u,
|
|
2046
|
+
onContinue: l,
|
|
2047
|
+
...e.operate
|
|
2048
|
+
} : void 0,
|
|
2049
|
+
onFinish: i
|
|
2050
|
+
}), t);
|
|
2051
|
+
}
|
|
2052
|
+
}), Ar = M(() => {
|
|
2053
|
+
const {
|
|
2054
|
+
formProps: e
|
|
2055
|
+
} = G();
|
|
2056
|
+
return () => h(xe, C(e == null ? void 0 : e.value, "slots"), b(e == null ? void 0 : e.value, "slots"));
|
|
2057
|
+
}), tr = () => ({
|
|
2058
|
+
clsName: {
|
|
2059
|
+
type: String,
|
|
2060
|
+
default: "pro-curd-desc"
|
|
1357
2061
|
},
|
|
1358
|
-
|
|
1359
|
-
type:
|
|
2062
|
+
signName: {
|
|
2063
|
+
type: String
|
|
2064
|
+
}
|
|
2065
|
+
}), nr = M({
|
|
2066
|
+
props: {
|
|
2067
|
+
...tr()
|
|
1360
2068
|
},
|
|
1361
|
-
|
|
1362
|
-
|
|
2069
|
+
setup: (e, {
|
|
2070
|
+
slots: t
|
|
2071
|
+
}) => {
|
|
2072
|
+
const {
|
|
2073
|
+
curdState: n,
|
|
2074
|
+
descColumns: s,
|
|
2075
|
+
getSignColumns: o
|
|
2076
|
+
} = G(), a = R(() => e.signName ? o(e.signName) : s.value);
|
|
2077
|
+
return () => h(Hn, O(C(e, "signName", "model", "columns"), {
|
|
2078
|
+
model: e.model || n.detailData,
|
|
2079
|
+
columns: a.value
|
|
2080
|
+
}), t);
|
|
2081
|
+
}
|
|
2082
|
+
}), Rr = M(() => {
|
|
2083
|
+
const {
|
|
2084
|
+
descProps: e
|
|
2085
|
+
} = G();
|
|
2086
|
+
return () => h(nr, C(e == null ? void 0 : e.value, "slots"), b(e == null ? void 0 : e.value, "slots"));
|
|
2087
|
+
}), He = () => ({
|
|
2088
|
+
clsName: {
|
|
2089
|
+
type: String,
|
|
2090
|
+
default: "pro-curd-modal"
|
|
1363
2091
|
},
|
|
1364
|
-
|
|
1365
|
-
type:
|
|
2092
|
+
validMode: {
|
|
2093
|
+
type: Array,
|
|
2094
|
+
default: [T.ADD, T.DETAIL, T.EDIT]
|
|
1366
2095
|
}
|
|
1367
|
-
}),
|
|
2096
|
+
}), Ct = M({
|
|
1368
2097
|
props: {
|
|
1369
|
-
...
|
|
1370
|
-
...Ce,
|
|
1371
|
-
...n,
|
|
1372
|
-
...je()
|
|
2098
|
+
...He()
|
|
1373
2099
|
},
|
|
1374
|
-
setup: (
|
|
1375
|
-
slots:
|
|
1376
|
-
expose: r
|
|
2100
|
+
setup: (e, {
|
|
2101
|
+
slots: t
|
|
1377
2102
|
}) => {
|
|
1378
|
-
const {
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
const p = z(i, (S) => S.show && H(S.show) ? S.show(h) : S.show !== !1);
|
|
1406
|
-
return b("div", {
|
|
1407
|
-
class: "pro-table-operate"
|
|
1408
|
-
}, [M(p, (S) => H(S.element) ? S.element(h, S) : b("div", {
|
|
1409
|
-
class: "pro-table-operate-item",
|
|
1410
|
-
key: S.value,
|
|
1411
|
-
onClick: () => {
|
|
1412
|
-
var P;
|
|
1413
|
-
(P = S.onClick) == null || P.call(S, h);
|
|
1414
|
-
}
|
|
1415
|
-
}, [S.label]))]);
|
|
1416
|
-
}
|
|
1417
|
-
};
|
|
1418
|
-
}, l = w(() => {
|
|
1419
|
-
const c = Ae(t.columns, t.columnState, (i) => i.dataIndex), s = M(c, (i) => {
|
|
1420
|
-
const h = {
|
|
1421
|
-
...t.column,
|
|
1422
|
-
...i
|
|
1423
|
-
};
|
|
1424
|
-
return i.customRender || (h.customRender = ({
|
|
1425
|
-
text: p
|
|
1426
|
-
}) => $e(f, {
|
|
1427
|
-
...i,
|
|
1428
|
-
showProps: {
|
|
1429
|
-
...i.showProps,
|
|
1430
|
-
content: t.columnEmptyText
|
|
1431
|
-
}
|
|
1432
|
-
}, p) || p || t.columnEmptyText), h;
|
|
2103
|
+
const n = H(), s = n(Tn), o = n(dt), {
|
|
2104
|
+
curdState: a,
|
|
2105
|
+
getOperate: r
|
|
2106
|
+
} = G(), c = () => {
|
|
2107
|
+
a.mode = void 0, Qe(a.detailData, {}), a.detailLoading = !1, a.addAction = void 0;
|
|
2108
|
+
}, f = $(He());
|
|
2109
|
+
return () => {
|
|
2110
|
+
var g;
|
|
2111
|
+
const p = a.mode;
|
|
2112
|
+
return !se(e.validMode, (m) => m === p) || !s ? null : h(s, O(C(e, f), {
|
|
2113
|
+
visible: se(e.validMode, (m) => m === p),
|
|
2114
|
+
title: e.title || ((g = r(a.mode)) == null ? void 0 : g.label),
|
|
2115
|
+
confirmLoading: a.operateLoading,
|
|
2116
|
+
maskClosable: a.mode === T.DETAIL,
|
|
2117
|
+
onCancel: c
|
|
2118
|
+
}), {
|
|
2119
|
+
default: () => {
|
|
2120
|
+
var m;
|
|
2121
|
+
return [a.detailLoading && o ? h(o, {
|
|
2122
|
+
loading: !0
|
|
2123
|
+
}, {
|
|
2124
|
+
default: () => [h("div", {
|
|
2125
|
+
class: `${e.clsName}-loading-dom`
|
|
2126
|
+
}, null)]
|
|
2127
|
+
}) : (m = t.default) == null ? void 0 : m.call(t)];
|
|
2128
|
+
},
|
|
2129
|
+
...C(t, "default")
|
|
1433
2130
|
});
|
|
1434
|
-
|
|
1435
|
-
}), m = $();
|
|
1436
|
-
Ft({
|
|
1437
|
-
columns: l,
|
|
1438
|
-
tableRef: m,
|
|
1439
|
-
...t.provideExtra
|
|
1440
|
-
}), r(Y(o || [], m));
|
|
1441
|
-
const a = k(je());
|
|
1442
|
-
return () => b(e, R({
|
|
1443
|
-
ref: m
|
|
1444
|
-
}, C(t, a), {
|
|
1445
|
-
columns: l.value
|
|
1446
|
-
}), u);
|
|
2131
|
+
};
|
|
1447
2132
|
}
|
|
2133
|
+
}), wr = M({
|
|
2134
|
+
props: {
|
|
2135
|
+
modalProps: Object,
|
|
2136
|
+
formProps: Object
|
|
2137
|
+
},
|
|
2138
|
+
setup: (e, {
|
|
2139
|
+
slots: t
|
|
2140
|
+
}) => {
|
|
2141
|
+
const n = j(), s = le(t, "modal"), o = le(t, "form");
|
|
2142
|
+
return () => h(Ct, O(e.modalProps, {
|
|
2143
|
+
onOk: () => {
|
|
2144
|
+
var a;
|
|
2145
|
+
(a = n.value) == null || a.submit();
|
|
2146
|
+
}
|
|
2147
|
+
}), {
|
|
2148
|
+
default: () => [h(xe, O({
|
|
2149
|
+
ref: n
|
|
2150
|
+
}, e.formProps), o)],
|
|
2151
|
+
...s
|
|
2152
|
+
});
|
|
2153
|
+
}
|
|
2154
|
+
}), $r = M(() => {
|
|
2155
|
+
const {
|
|
2156
|
+
modalProps: e,
|
|
2157
|
+
formProps: t
|
|
2158
|
+
} = G(), n = j();
|
|
2159
|
+
return () => h(Ct, O(C(e, "slots"), {
|
|
2160
|
+
onOk: () => {
|
|
2161
|
+
var s;
|
|
2162
|
+
(s = n.value) == null || s.submit();
|
|
2163
|
+
}
|
|
2164
|
+
}), {
|
|
2165
|
+
default: () => [h(xe, O({
|
|
2166
|
+
ref: n
|
|
2167
|
+
}, C(t, "slots")), b(t, "slots"))],
|
|
2168
|
+
...b(e, "slots")
|
|
2169
|
+
});
|
|
1448
2170
|
});
|
|
1449
2171
|
export {
|
|
2172
|
+
bn as ButtonKey,
|
|
2173
|
+
Cn as CheckboxKey,
|
|
2174
|
+
gn as ColKey,
|
|
1450
2175
|
T as CurdAction,
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
2176
|
+
pe as CurdAddAction,
|
|
2177
|
+
te as CurdCurrentMode,
|
|
2178
|
+
Et as CurdMethods,
|
|
2179
|
+
L as CurdSubAction,
|
|
2180
|
+
vn as DescriptionsItemKey,
|
|
2181
|
+
Sn as DescriptionsKey,
|
|
2182
|
+
U as FormAction,
|
|
2183
|
+
Mn as FormItemKey,
|
|
2184
|
+
In as FormKey,
|
|
2185
|
+
dt as LoadingKey,
|
|
2186
|
+
Pr as LogonUser,
|
|
2187
|
+
it as LogonUserKey,
|
|
2188
|
+
Tn as ModalKey,
|
|
2189
|
+
Sr as MustLogon,
|
|
2190
|
+
Le as PageHeader,
|
|
2191
|
+
Pn as PaginationKey,
|
|
2192
|
+
En as PopoverKey,
|
|
2193
|
+
dr as ProConfig,
|
|
2194
|
+
Ce as ProCurd,
|
|
2195
|
+
nr as ProCurdDesc,
|
|
2196
|
+
Rr as ProCurdDescConnect,
|
|
2197
|
+
xe as ProCurdForm,
|
|
2198
|
+
Ar as ProCurdFormConnect,
|
|
2199
|
+
Zn as ProCurdList,
|
|
2200
|
+
Lr as ProCurdListConnect,
|
|
2201
|
+
Ct as ProCurdModal,
|
|
2202
|
+
wr as ProCurdModalForm,
|
|
2203
|
+
$r as ProCurdModalFormConnect,
|
|
2204
|
+
Hn as ProDesc,
|
|
2205
|
+
Kn as ProForm,
|
|
2206
|
+
Nn as ProFormKey,
|
|
2207
|
+
Cr as ProFormList,
|
|
2208
|
+
Oe as ProGrid,
|
|
2209
|
+
_e as ProList,
|
|
2210
|
+
Nr as ProModalCurd,
|
|
2211
|
+
Ne as ProModule,
|
|
2212
|
+
St as ProOperate,
|
|
2213
|
+
Dr as ProPage,
|
|
2214
|
+
Or as ProPageCurd,
|
|
2215
|
+
Tr as ProSearchForm,
|
|
2216
|
+
On as ProSearchFormKey,
|
|
2217
|
+
Mr as ProTable,
|
|
2218
|
+
Ln as ProTableKey,
|
|
2219
|
+
fe as RequestAction,
|
|
2220
|
+
hn as RowKey,
|
|
2221
|
+
Ee as SearchMode,
|
|
2222
|
+
Dn as TableKey,
|
|
2223
|
+
mn as Wrapper,
|
|
2224
|
+
mt as convertPathToList,
|
|
2225
|
+
un as convertResData,
|
|
2226
|
+
ce as createExpose,
|
|
2227
|
+
Er as createExposeObj,
|
|
2228
|
+
Ir as createFormItemCompFn,
|
|
2229
|
+
mr as createProConfig,
|
|
2230
|
+
zn as defaultPage,
|
|
2231
|
+
le as filterSlotsByPrefix,
|
|
2232
|
+
oe as getColumnFormItemName,
|
|
2233
|
+
at as getColumnValueType,
|
|
2234
|
+
dn as getFirstPropName,
|
|
2235
|
+
ot as getFormItemEl,
|
|
2236
|
+
ke as getItemEl,
|
|
2237
|
+
ft as getSignValue,
|
|
2238
|
+
wn as getValidValues,
|
|
2239
|
+
De as mergeStateToList,
|
|
2240
|
+
de as proBaseProps,
|
|
2241
|
+
Xn as provideProCurd,
|
|
2242
|
+
ht as provideProFormList,
|
|
2243
|
+
fn as provideProModule,
|
|
2244
|
+
me as renderElement,
|
|
2245
|
+
Fe as renderElements,
|
|
2246
|
+
yn as useAccess,
|
|
2247
|
+
br as useAccessMgr,
|
|
2248
|
+
cn as useComposeRequestActor,
|
|
2249
|
+
yr as useDispatchMeta,
|
|
2250
|
+
hr as useDispatchStore,
|
|
2251
|
+
fr as useDoneRequestActor,
|
|
2252
|
+
pr as useFailedRequestActor,
|
|
2253
|
+
H as useGetCompByKey,
|
|
2254
|
+
vr as useLogonUser,
|
|
2255
|
+
ln as useMetaRegister,
|
|
2256
|
+
Ke as useModuleEvent,
|
|
2257
|
+
Y as useProConfig,
|
|
2258
|
+
G as useProCurd,
|
|
2259
|
+
bt as useProForm,
|
|
2260
|
+
yt as useProFormList,
|
|
2261
|
+
he as useProModule,
|
|
2262
|
+
Bn as useProTable,
|
|
2263
|
+
gr as useReadStore
|
|
1499
2264
|
};
|