@yqg/permission 1.3.0-alpha.5 → 1.3.0-alpha.7

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.
@@ -1,1264 +0,0 @@
1
- import { c as ge, Y as Ne, a as H, a1 as Ge, b as nt, _ as E, ae as We, aX as He, aZ as je, P as ne, $ as Be, ar as ot, as as it, aE as st, aY as rt, a_ as ct, a0 as ze, ak as Ce, aj as ut, am as dt, N as vt, R as mt, a$ as ft, b0 as gt, Q as pt, b1 as ht, b2 as bt, b3 as yt, aq as St, aD as Ct, aP as W, aS as we, aQ as At } from "./yqg-permission-DM6aHNXO.js";
2
- import { p as Ot, a as It, d as pe, c as I, G as wt, w as Te, E as Xe, q as Ke, e as N, F as ke, s as de, b as Ve, y as ae, r as Le, K as J, P as Ae, L as Oe, M as Z, S as Pe, R as _, O as xt, u as B, U as ue, N as X, a0 as Tt, Y as Vt } from "./index-jGgeGy8X.js";
3
- import { L as Nt, j as Pt, p as Et, K as ee, d as Ft, F as Dt, e as Rt, f as Bt, Q as kt } from "./apply-modal-B7qjeZSE.js";
4
- import { u as Lt, b as $t, T as Mt, i as De, c as _t, h as Ht, j as jt, k as zt, t as Kt, B as Ut, e as Yt, f as Gt, g as Wt } from "./index-rX3BorbX.js";
5
- function Xt() {
6
- return /(mac\sos|macintosh)/i.test(navigator.appVersion);
7
- }
8
- const Qe = Symbol("SelectContextKey");
9
- function Qt(e) {
10
- return Ot(Qe, e);
11
- }
12
- function qt() {
13
- return It(Qe, {});
14
- }
15
- var Jt = function(e, g) {
16
- var o = {};
17
- for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && g.indexOf(a) < 0 && (o[a] = e[a]);
18
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, a = Object.getOwnPropertySymbols(e); t < a.length; t++)
19
- g.indexOf(a[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[t]) && (o[a[t]] = e[a[t]]);
20
- return o;
21
- };
22
- function Ue(e) {
23
- return typeof e == "string" || typeof e == "number";
24
- }
25
- const Zt = pe({
26
- compatConfig: {
27
- MODE: 3
28
- },
29
- name: "OptionList",
30
- inheritAttrs: !1,
31
- setup(e, g) {
32
- let {
33
- expose: o,
34
- slots: a
35
- } = g;
36
- const t = Lt(), n = qt(), d = I(() => `${t.prefixCls}-item`), m = $t(() => n.flattenOptions, [() => t.open, () => n.flattenOptions], (r) => r[0]), p = Pt(), y = (r) => {
37
- r.preventDefault();
38
- }, s = (r) => {
39
- p.current && p.current.scrollTo(typeof r == "number" ? {
40
- index: r
41
- } : r);
42
- }, c = function(r) {
43
- let w = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
44
- const T = m.value.length;
45
- for (let S = 0; S < T; S += 1) {
46
- const F = (r + S * w + T) % T, {
47
- group: z,
48
- data: $
49
- } = m.value[F];
50
- if (!z && !$.disabled)
51
- return F;
52
- }
53
- return -1;
54
- }, x = wt({
55
- activeIndex: c(0)
56
- }), A = function(r) {
57
- let w = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
58
- x.activeIndex = r;
59
- const T = {
60
- source: w ? "keyboard" : "mouse"
61
- }, S = m.value[r];
62
- if (!S) {
63
- n.onActiveValue(null, -1, T);
64
- return;
65
- }
66
- n.onActiveValue(S.value, r, T);
67
- };
68
- Te([() => m.value.length, () => t.searchValue], () => {
69
- A(n.defaultActiveFirstOption !== !1 ? c(0) : -1);
70
- }, {
71
- immediate: !0
72
- });
73
- const f = (r) => n.rawValues.has(r) && t.mode !== "combobox";
74
- Te([() => t.open, () => t.searchValue], () => {
75
- if (!t.multiple && t.open && n.rawValues.size === 1) {
76
- const r = Array.from(n.rawValues)[0], w = Xe(m.value).findIndex((T) => {
77
- let {
78
- data: S
79
- } = T;
80
- return S[n.fieldNames.value] === r;
81
- });
82
- w !== -1 && (A(w), Ke(() => {
83
- s(w);
84
- }));
85
- }
86
- t.open && Ke(() => {
87
- var r;
88
- (r = p.current) === null || r === void 0 || r.scrollTo(void 0);
89
- });
90
- }, {
91
- immediate: !0,
92
- flush: "post"
93
- });
94
- const C = (r) => {
95
- r !== void 0 && n.onSelect(r, {
96
- selected: !n.rawValues.has(r)
97
- }), t.multiple || t.toggleOpen(!1);
98
- }, h = (r) => typeof r.label == "function" ? r.label() : r.label;
99
- function V(r) {
100
- const w = m.value[r];
101
- if (!w) return null;
102
- const T = w.data || {}, {
103
- value: S
104
- } = T, {
105
- group: F
106
- } = w, z = Et(T, !0), $ = h(w);
107
- return w ? N("div", H(H({
108
- "aria-label": typeof $ == "string" && !F ? $ : null
109
- }, z), {}, {
110
- key: r,
111
- role: F ? "presentation" : "option",
112
- id: `${t.id}_list_${r}`,
113
- "aria-selected": f(S)
114
- }), [S]) : null;
115
- }
116
- return o({
117
- onKeydown: (r) => {
118
- const {
119
- which: w,
120
- ctrlKey: T
121
- } = r;
122
- switch (w) {
123
- case ee.N:
124
- case ee.P:
125
- case ee.UP:
126
- case ee.DOWN: {
127
- let S = 0;
128
- if (w === ee.UP ? S = -1 : w === ee.DOWN ? S = 1 : Xt() && T && (w === ee.N ? S = 1 : w === ee.P && (S = -1)), S !== 0) {
129
- const F = c(x.activeIndex + S, S);
130
- s(F), A(F, !0);
131
- }
132
- break;
133
- }
134
- case ee.ENTER: {
135
- const S = m.value[x.activeIndex];
136
- S && !S.data.disabled ? C(S.value) : C(void 0), t.open && r.preventDefault();
137
- break;
138
- }
139
- case ee.ESC:
140
- t.toggleOpen(!1), t.open && r.stopPropagation();
141
- }
142
- },
143
- onKeyup: () => {
144
- },
145
- scrollTo: (r) => {
146
- s(r);
147
- }
148
- }), () => {
149
- const {
150
- id: r,
151
- notFoundContent: w,
152
- onPopupScroll: T
153
- } = t, {
154
- menuItemSelectedIcon: S,
155
- fieldNames: F,
156
- virtual: z,
157
- listHeight: $,
158
- listItemHeight: he
159
- } = n, Q = a.option, {
160
- activeIndex: K
161
- } = x, be = Object.keys(F).map((M) => F[M]);
162
- return m.value.length === 0 ? N("div", {
163
- role: "listbox",
164
- id: `${r}_list`,
165
- class: `${d.value}-empty`,
166
- onMousedown: y
167
- }, [w]) : N(ke, null, [N("div", {
168
- role: "listbox",
169
- id: `${r}_list`,
170
- style: {
171
- height: 0,
172
- width: 0,
173
- overflow: "hidden"
174
- }
175
- }, [V(K - 1), V(K), V(K + 1)]), N(Nt, {
176
- itemKey: "key",
177
- ref: p,
178
- data: m.value,
179
- height: $,
180
- itemHeight: he,
181
- fullHeight: !1,
182
- onMousedown: y,
183
- onScroll: T,
184
- virtual: z
185
- }, {
186
- default: (M, oe) => {
187
- var ie;
188
- const {
189
- group: ye,
190
- groupOption: ve,
191
- data: U,
192
- value: O
193
- } = M, {
194
- key: k
195
- } = U, L = typeof M.label == "function" ? M.label() : M.label;
196
- if (ye) {
197
- const ce = (ie = U.title) !== null && ie !== void 0 ? ie : Ue(L) && L;
198
- return N("div", {
199
- class: ge(d.value, `${d.value}-group`),
200
- title: ce
201
- }, [Q ? Q(U) : L !== void 0 ? L : k]);
202
- }
203
- const {
204
- disabled: q,
205
- title: se,
206
- children: re,
207
- style: Se,
208
- class: l,
209
- className: i
210
- } = U, u = Jt(U, ["disabled", "title", "children", "style", "class", "className"]), b = Ne(u, be), v = f(O), D = `${d.value}-option`, le = ge(d.value, D, l, i, {
211
- [`${D}-grouped`]: ve,
212
- [`${D}-active`]: K === oe && !q,
213
- [`${D}-disabled`]: q,
214
- [`${D}-selected`]: v
215
- }), G = h(M), me = !S || typeof S == "function" || v, P = typeof G == "number" ? G : G || O;
216
- let Ie = Ue(P) ? P.toString() : void 0;
217
- return se !== void 0 && (Ie = se), N("div", H(H({}, b), {}, {
218
- "aria-selected": v,
219
- class: le,
220
- title: Ie,
221
- onMousemove: (ce) => {
222
- u.onMousemove && u.onMousemove(ce), !(K === oe || q) && A(oe);
223
- },
224
- onClick: (ce) => {
225
- q || C(O), u.onClick && u.onClick(ce);
226
- },
227
- style: Se
228
- }), [N("div", {
229
- class: `${D}-content`
230
- }, [Q ? Q(U) : P]), Ge(S) || v, me && N(Mt, {
231
- class: `${d.value}-option-state`,
232
- customizeIcon: S,
233
- customizeIconProps: {
234
- isSelected: v
235
- }
236
- }, {
237
- default: () => [v ? "✓" : null]
238
- })]);
239
- }
240
- })]);
241
- };
242
- }
243
- });
244
- var el = function(e, g) {
245
- var o = {};
246
- for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && g.indexOf(a) < 0 && (o[a] = e[a]);
247
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, a = Object.getOwnPropertySymbols(e); t < a.length; t++)
248
- g.indexOf(a[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[t]) && (o[a[t]] = e[a[t]]);
249
- return o;
250
- };
251
- function tl(e) {
252
- const g = e, {
253
- key: o,
254
- children: a
255
- } = g, t = g.props, {
256
- value: n,
257
- disabled: d
258
- } = t, m = el(t, ["value", "disabled"]), p = a == null ? void 0 : a.default;
259
- return E({
260
- key: o,
261
- value: n !== void 0 ? n : o,
262
- children: p,
263
- disabled: d || d === ""
264
- }, m);
265
- }
266
- function qe(e) {
267
- let g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
268
- return nt(e).map((a, t) => {
269
- var n;
270
- if (!Ge(a) || !a.type)
271
- return null;
272
- const {
273
- type: {
274
- isSelectOptGroup: d
275
- },
276
- key: m,
277
- children: p,
278
- props: y
279
- } = a;
280
- if (g || !d)
281
- return tl(a);
282
- const s = p && p.default ? p.default() : void 0, c = (y == null ? void 0 : y.label) || ((n = p.label) === null || n === void 0 ? void 0 : n.call(p)) || m;
283
- return E(E({
284
- key: `__RC_SELECT_GRP__${m === null ? t : String(m)}__`
285
- }, y), {
286
- label: c,
287
- options: qe(s || [])
288
- });
289
- }).filter((a) => a);
290
- }
291
- function ll(e, g, o) {
292
- const a = de(), t = de(), n = de(), d = de([]);
293
- return Te([e, g], () => {
294
- e.value ? d.value = Xe(e.value).slice() : d.value = qe(g.value);
295
- }, {
296
- immediate: !0,
297
- deep: !0
298
- }), Ve(() => {
299
- const m = d.value, p = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), s = o.value;
300
- function c(x) {
301
- let A = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
302
- for (let f = 0; f < x.length; f += 1) {
303
- const C = x[f];
304
- !C[s.options] || A ? (p.set(C[s.value], C), y.set(C[s.label], C)) : c(C[s.options], !0);
305
- }
306
- }
307
- c(m), a.value = m, t.value = p, n.value = y;
308
- }), {
309
- options: a,
310
- valueOptions: t,
311
- labelOptions: n
312
- };
313
- }
314
- function Je(e) {
315
- return Array.isArray(e) ? e : e !== void 0 ? [e] : [];
316
- }
317
- function Ee(e, g) {
318
- return Je(e).join("").toUpperCase().includes(g);
319
- }
320
- const al = (e, g, o, a, t) => I(() => {
321
- const n = o.value, d = t == null ? void 0 : t.value, m = a == null ? void 0 : a.value;
322
- if (!n || m === !1)
323
- return e.value;
324
- const {
325
- options: p,
326
- label: y,
327
- value: s
328
- } = g.value, c = [], x = typeof m == "function", A = n.toUpperCase(), f = x ? m : (h, V) => d ? Ee(V[d], A) : V[p] ? Ee(V[y !== "children" ? y : "label"], A) : Ee(V[s], A), C = x ? (h) => De(h) : (h) => h;
329
- return e.value.forEach((h) => {
330
- if (h[p]) {
331
- if (f(n, C(h)))
332
- c.push(h);
333
- else {
334
- const j = h[p].filter((Y) => f(n, C(Y)));
335
- j.length && c.push(E(E({}, h), {
336
- [p]: j
337
- }));
338
- }
339
- return;
340
- }
341
- f(n, C(h)) && c.push(h);
342
- }), c;
343
- }), nl = (e, g) => {
344
- const o = de({
345
- values: /* @__PURE__ */ new Map(),
346
- options: /* @__PURE__ */ new Map()
347
- });
348
- return [I(() => {
349
- const {
350
- values: n,
351
- options: d
352
- } = o.value, m = e.value.map((s) => {
353
- var c;
354
- return s.label === void 0 ? E(E({}, s), {
355
- label: (c = n.get(s.value)) === null || c === void 0 ? void 0 : c.label
356
- }) : s;
357
- }), p = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map();
358
- return m.forEach((s) => {
359
- p.set(s.value, s), y.set(s.value, g.value.get(s.value) || d.get(s.value));
360
- }), o.value.values = p, o.value.options = y, m;
361
- }), (n) => g.value.get(n) || o.value.options.get(n)];
362
- }, ol = ["inputValue"];
363
- function Ze() {
364
- return E(E({}, Yt()), {
365
- prefixCls: String,
366
- id: String,
367
- backfill: {
368
- type: Boolean,
369
- default: void 0
370
- },
371
- // >>> Field Names
372
- fieldNames: Object,
373
- // >>> Search
374
- /** @deprecated Use `searchValue` instead */
375
- inputValue: String,
376
- searchValue: String,
377
- onSearch: Function,
378
- autoClearSearchValue: {
379
- type: Boolean,
380
- default: void 0
381
- },
382
- // >>> Select
383
- onSelect: Function,
384
- onDeselect: Function,
385
- // >>> Options
386
- /**
387
- * In Select, `false` means do nothing.
388
- * In TreeSelect, `false` will highlight match item.
389
- * It's by design.
390
- */
391
- filterOption: {
392
- type: [Boolean, Function],
393
- default: void 0
394
- },
395
- filterSort: Function,
396
- optionFilterProp: String,
397
- optionLabelProp: String,
398
- options: Array,
399
- defaultActiveFirstOption: {
400
- type: Boolean,
401
- default: void 0
402
- },
403
- virtual: {
404
- type: Boolean,
405
- default: void 0
406
- },
407
- listHeight: Number,
408
- listItemHeight: Number,
409
- // >>> Icon
410
- menuItemSelectedIcon: ne.any,
411
- mode: String,
412
- labelInValue: {
413
- type: Boolean,
414
- default: void 0
415
- },
416
- value: ne.any,
417
- defaultValue: ne.any,
418
- onChange: Function,
419
- children: Array
420
- });
421
- }
422
- function il(e) {
423
- return !e || typeof e != "object";
424
- }
425
- const sl = pe({
426
- compatConfig: {
427
- MODE: 3
428
- },
429
- name: "VcSelect",
430
- inheritAttrs: !1,
431
- props: We(Ze(), {
432
- prefixCls: "vc-select",
433
- autoClearSearchValue: !0,
434
- listHeight: 200,
435
- listItemHeight: 20,
436
- dropdownMatchSelectWidth: !0
437
- }),
438
- setup(e, g) {
439
- let {
440
- expose: o,
441
- attrs: a,
442
- slots: t
443
- } = g;
444
- const n = _t(ae(e, "id")), d = I(() => Ht(e.mode)), m = I(() => !!(!e.options && e.children)), p = I(() => e.filterOption === void 0 && e.mode === "combobox" ? !1 : e.filterOption), y = I(() => jt(e.fieldNames, m.value)), [s, c] = He("", {
445
- value: I(() => e.searchValue !== void 0 ? e.searchValue : e.inputValue),
446
- postState: (l) => l || ""
447
- }), x = ll(ae(e, "options"), ae(e, "children"), y), {
448
- valueOptions: A,
449
- labelOptions: f,
450
- options: C
451
- } = x, h = (l) => Je(l).map((u) => {
452
- var b, v;
453
- let D, le, G, me;
454
- il(u) ? D = u : (G = u.key, le = u.label, D = (b = u.value) !== null && b !== void 0 ? b : G);
455
- const P = A.value.get(D);
456
- return P && (le === void 0 && (le = P == null ? void 0 : P[e.optionLabelProp || y.value.label]), G === void 0 && (G = (v = P == null ? void 0 : P.key) !== null && v !== void 0 ? v : D), me = P == null ? void 0 : P.disabled), {
457
- label: le,
458
- value: D,
459
- key: G,
460
- disabled: me,
461
- option: P
462
- };
463
- }), [V, j] = He(e.defaultValue, {
464
- value: ae(e, "value")
465
- }), Y = I(() => {
466
- var l;
467
- const i = h(V.value);
468
- return e.mode === "combobox" && !(!((l = i[0]) === null || l === void 0) && l.value) ? [] : i;
469
- }), [R, r] = nl(Y, A), w = I(() => {
470
- if (!e.mode && R.value.length === 1) {
471
- const l = R.value[0];
472
- if (l.value === null && (l.label === null || l.label === void 0))
473
- return [];
474
- }
475
- return R.value.map((l) => {
476
- var i;
477
- return E(E({}, l), {
478
- label: (i = typeof l.label == "function" ? l.label() : l.label) !== null && i !== void 0 ? i : l.value
479
- });
480
- });
481
- }), T = I(() => new Set(R.value.map((l) => l.value)));
482
- Ve(() => {
483
- var l;
484
- if (e.mode === "combobox") {
485
- const i = (l = R.value[0]) === null || l === void 0 ? void 0 : l.value;
486
- i != null && c(String(i));
487
- }
488
- }, {
489
- flush: "post"
490
- });
491
- const S = (l, i) => {
492
- const u = i ?? l;
493
- return {
494
- [y.value.value]: l,
495
- [y.value.label]: u
496
- };
497
- }, F = de();
498
- Ve(() => {
499
- if (e.mode !== "tags") {
500
- F.value = C.value;
501
- return;
502
- }
503
- const l = C.value.slice(), i = (u) => A.value.has(u);
504
- [...R.value].sort((u, b) => u.value < b.value ? -1 : 1).forEach((u) => {
505
- const b = u.value;
506
- i(b) || l.push(S(b, u.label));
507
- }), F.value = l;
508
- });
509
- const z = al(F, y, s, p, ae(e, "optionFilterProp")), $ = I(() => e.mode !== "tags" || !s.value || z.value.some((l) => l[e.optionFilterProp || "value"] === s.value) ? z.value : [S(s.value), ...z.value]), he = I(() => e.filterSort ? [...$.value].sort((l, i) => e.filterSort(l, i)) : $.value), Q = I(() => zt(he.value, {
510
- fieldNames: y.value,
511
- childrenAsData: m.value
512
- })), K = (l) => {
513
- const i = h(l);
514
- if (j(i), e.onChange && // Trigger event only when value changed
515
- (i.length !== R.value.length || i.some((u, b) => {
516
- var v;
517
- return ((v = R.value[b]) === null || v === void 0 ? void 0 : v.value) !== (u == null ? void 0 : u.value);
518
- }))) {
519
- const u = e.labelInValue ? i.map((v) => E(E({}, v), {
520
- originLabel: v.label,
521
- label: typeof v.label == "function" ? v.label() : v.label
522
- })) : i.map((v) => v.value), b = i.map((v) => De(r(v.value)));
523
- e.onChange(
524
- // Value
525
- d.value ? u : u[0],
526
- // Option
527
- d.value ? b : b[0]
528
- );
529
- }
530
- }, [be, M] = je(null), [oe, ie] = je(0), ye = I(() => e.defaultActiveFirstOption !== void 0 ? e.defaultActiveFirstOption : e.mode !== "combobox"), ve = function(l, i) {
531
- let {
532
- source: u = "keyboard"
533
- } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
534
- ie(i), e.backfill && e.mode === "combobox" && l !== null && u === "keyboard" && M(String(l));
535
- }, U = (l, i) => {
536
- const u = () => {
537
- var b;
538
- const v = r(l), D = v == null ? void 0 : v[y.value.label];
539
- return [e.labelInValue ? {
540
- label: typeof D == "function" ? D() : D,
541
- originLabel: D,
542
- value: l,
543
- key: (b = v == null ? void 0 : v.key) !== null && b !== void 0 ? b : l
544
- } : l, De(v)];
545
- };
546
- if (i && e.onSelect) {
547
- const [b, v] = u();
548
- e.onSelect(b, v);
549
- } else if (!i && e.onDeselect) {
550
- const [b, v] = u();
551
- e.onDeselect(b, v);
552
- }
553
- }, O = (l, i) => {
554
- let u;
555
- const b = d.value ? i.selected : !0;
556
- b ? u = d.value ? [...R.value, l] : [l] : u = R.value.filter((v) => v.value !== l), K(u), U(l, b), e.mode === "combobox" ? M("") : (!d.value || e.autoClearSearchValue) && (c(""), M(""));
557
- }, k = (l, i) => {
558
- K(l), (i.type === "remove" || i.type === "clear") && i.values.forEach((u) => {
559
- U(u.value, !1);
560
- });
561
- }, L = (l, i) => {
562
- var u;
563
- if (c(l), M(null), i.source === "submit") {
564
- const b = (l || "").trim();
565
- if (b) {
566
- const v = Array.from(/* @__PURE__ */ new Set([...T.value, b]));
567
- K(v), U(b, !0), c("");
568
- }
569
- return;
570
- }
571
- i.source !== "blur" && (e.mode === "combobox" && K(l), (u = e.onSearch) === null || u === void 0 || u.call(e, l));
572
- }, q = (l) => {
573
- let i = l;
574
- e.mode !== "tags" && (i = l.map((b) => {
575
- const v = f.value.get(b);
576
- return v == null ? void 0 : v.value;
577
- }).filter((b) => b !== void 0));
578
- const u = Array.from(/* @__PURE__ */ new Set([...T.value, ...i]));
579
- K(u), u.forEach((b) => {
580
- U(b, !0);
581
- });
582
- }, se = I(() => e.virtual !== !1 && e.dropdownMatchSelectWidth !== !1);
583
- Qt(Kt(E(E({}, x), {
584
- flattenOptions: Q,
585
- onActiveValue: ve,
586
- defaultActiveFirstOption: ye,
587
- onSelect: O,
588
- menuItemSelectedIcon: ae(e, "menuItemSelectedIcon"),
589
- rawValues: T,
590
- fieldNames: y,
591
- virtual: se,
592
- listHeight: ae(e, "listHeight"),
593
- listItemHeight: ae(e, "listItemHeight"),
594
- childrenAsData: m
595
- })));
596
- const re = Le();
597
- o({
598
- focus() {
599
- var l;
600
- (l = re.value) === null || l === void 0 || l.focus();
601
- },
602
- blur() {
603
- var l;
604
- (l = re.value) === null || l === void 0 || l.blur();
605
- },
606
- scrollTo(l) {
607
- var i;
608
- (i = re.value) === null || i === void 0 || i.scrollTo(l);
609
- }
610
- });
611
- const Se = I(() => Ne(e, [
612
- "id",
613
- "mode",
614
- "prefixCls",
615
- "backfill",
616
- "fieldNames",
617
- // Search
618
- "inputValue",
619
- "searchValue",
620
- "onSearch",
621
- "autoClearSearchValue",
622
- // Select
623
- "onSelect",
624
- "onDeselect",
625
- "dropdownMatchSelectWidth",
626
- // Options
627
- "filterOption",
628
- "filterSort",
629
- "optionFilterProp",
630
- "optionLabelProp",
631
- "options",
632
- "children",
633
- "defaultActiveFirstOption",
634
- "menuItemSelectedIcon",
635
- "virtual",
636
- "listHeight",
637
- "listItemHeight",
638
- // Value
639
- "value",
640
- "defaultValue",
641
- "labelInValue",
642
- "onChange"
643
- ]));
644
- return () => N(Ut, H(H(H({}, Se.value), a), {}, {
645
- id: n,
646
- prefixCls: e.prefixCls,
647
- ref: re,
648
- omitDomProps: ol,
649
- mode: e.mode,
650
- displayValues: w.value,
651
- onDisplayValuesChange: k,
652
- searchValue: s.value,
653
- onSearch: L,
654
- onSearchSplit: q,
655
- dropdownMatchSelectWidth: e.dropdownMatchSelectWidth,
656
- OptionList: Zt,
657
- emptyOptions: !Q.value.length,
658
- activeValue: be.value,
659
- activeDescendantId: `${n}_list_${oe.value}`
660
- }), t);
661
- }
662
- }), $e = () => null;
663
- $e.isSelectOption = !0;
664
- $e.displayName = "ASelectOption";
665
- const Me = () => null;
666
- Me.isSelectOptGroup = !0;
667
- Me.displayName = "ASelectOptGroup";
668
- const rl = () => E(E({}, Ne(Ze(), ["inputIcon", "mode", "getInputElement", "getRawInputElement", "backfill"])), {
669
- value: ze([Array, Object, String, Number]),
670
- defaultValue: ze([Array, Object, String, Number]),
671
- notFoundContent: ne.any,
672
- suffixIcon: ne.any,
673
- itemIcon: ne.any,
674
- size: Ce(),
675
- mode: Ce(),
676
- bordered: ut(!0),
677
- transitionName: String,
678
- choiceTransitionName: Ce(""),
679
- popupClassName: String,
680
- /** @deprecated Please use `popupClassName` instead */
681
- dropdownClassName: String,
682
- placement: Ce(),
683
- status: Ce(),
684
- "onUpdate:value": dt()
685
- }), Ye = "SECRET_COMBOBOX_MODE_DO_NOT_USE", te = pe({
686
- compatConfig: {
687
- MODE: 3
688
- },
689
- name: "ASelect",
690
- Option: $e,
691
- OptGroup: Me,
692
- inheritAttrs: !1,
693
- props: We(rl(), {
694
- listHeight: 256,
695
- listItemHeight: 24
696
- }),
697
- SECRET_COMBOBOX_MODE_DO_NOT_USE: Ye,
698
- slots: Object,
699
- setup(e, g) {
700
- let {
701
- attrs: o,
702
- emit: a,
703
- slots: t,
704
- expose: n
705
- } = g;
706
- const d = Le(), m = Ft(), p = Dt.useInject(), y = I(() => Rt(p.status, e.status)), s = () => {
707
- var O;
708
- (O = d.value) === null || O === void 0 || O.focus();
709
- }, c = () => {
710
- var O;
711
- (O = d.value) === null || O === void 0 || O.blur();
712
- }, x = (O) => {
713
- var k;
714
- (k = d.value) === null || k === void 0 || k.scrollTo(O);
715
- }, A = I(() => {
716
- const {
717
- mode: O
718
- } = e;
719
- if (O !== "combobox")
720
- return O === Ye ? "combobox" : O;
721
- }), {
722
- prefixCls: f,
723
- direction: C,
724
- configProvider: h,
725
- renderEmpty: V,
726
- size: j,
727
- getPrefixCls: Y,
728
- getPopupContainer: R,
729
- disabled: r,
730
- select: w
731
- } = Be("select", e), {
732
- compactSize: T,
733
- compactItemClassnames: S
734
- } = ot(f, C), F = I(() => T.value || j.value), z = it(), $ = I(() => {
735
- var O;
736
- return (O = r.value) !== null && O !== void 0 ? O : z.value;
737
- }), [he, Q] = Gt(f), K = I(() => Y()), be = I(() => e.placement !== void 0 ? e.placement : C.value === "rtl" ? "bottomRight" : "bottomLeft"), M = I(() => st(K.value, rt(be.value), e.transitionName)), oe = I(() => ge({
738
- [`${f.value}-lg`]: F.value === "large",
739
- [`${f.value}-sm`]: F.value === "small",
740
- [`${f.value}-rtl`]: C.value === "rtl",
741
- [`${f.value}-borderless`]: !e.bordered,
742
- [`${f.value}-in-form-item`]: p.isFormItemInput
743
- }, Bt(f.value, y.value, p.hasFeedback), S.value, Q.value)), ie = function() {
744
- for (var O = arguments.length, k = new Array(O), L = 0; L < O; L++)
745
- k[L] = arguments[L];
746
- a("update:value", k[0]), a("change", ...k), m.onFieldChange();
747
- }, ye = (O) => {
748
- a("blur", O), m.onFieldBlur();
749
- };
750
- n({
751
- blur: c,
752
- focus: s,
753
- scrollTo: x
754
- });
755
- const ve = I(() => A.value === "multiple" || A.value === "tags"), U = I(() => e.showArrow !== void 0 ? e.showArrow : e.loading || !(ve.value || A.value === "combobox"));
756
- return () => {
757
- var O, k, L, q;
758
- const {
759
- notFoundContent: se,
760
- listHeight: re = 256,
761
- listItemHeight: Se = 24,
762
- popupClassName: l,
763
- dropdownClassName: i,
764
- virtual: u,
765
- dropdownMatchSelectWidth: b,
766
- id: v = m.id.value,
767
- placeholder: D = (O = t.placeholder) === null || O === void 0 ? void 0 : O.call(t),
768
- showArrow: le
769
- } = e, {
770
- hasFeedback: G,
771
- feedbackIcon: me
772
- } = p;
773
- let P;
774
- se !== void 0 ? P = se : t.notFoundContent ? P = t.notFoundContent() : A.value === "combobox" ? P = null : P = (V == null ? void 0 : V("Select")) || N(ct, {
775
- componentName: "Select"
776
- }, null);
777
- const {
778
- suffixIcon: Ie,
779
- itemIcon: ce,
780
- removeIcon: tt,
781
- clearIcon: lt
782
- } = Wt(E(E({}, e), {
783
- multiple: ve.value,
784
- prefixCls: f.value,
785
- hasFeedback: G,
786
- feedbackIcon: me,
787
- showArrow: U.value
788
- }), t), _e = Ne(e, ["prefixCls", "suffixIcon", "itemIcon", "removeIcon", "clearIcon", "size", "bordered", "status"]), at = ge(l || i, {
789
- [`${f.value}-dropdown-${C.value}`]: C.value === "rtl"
790
- }, Q.value);
791
- return he(N(sl, H(H(H({
792
- ref: d,
793
- virtual: u,
794
- dropdownMatchSelectWidth: b
795
- }, _e), o), {}, {
796
- showSearch: (k = e.showSearch) !== null && k !== void 0 ? k : (L = w == null ? void 0 : w.value) === null || L === void 0 ? void 0 : L.showSearch,
797
- placeholder: D,
798
- listHeight: re,
799
- listItemHeight: Se,
800
- mode: A.value,
801
- prefixCls: f.value,
802
- direction: C.value,
803
- inputIcon: Ie,
804
- menuItemSelectedIcon: ce,
805
- removeIcon: tt,
806
- clearIcon: lt,
807
- notFoundContent: P,
808
- class: [oe.value, o.class],
809
- getPopupContainer: R == null ? void 0 : R.value,
810
- dropdownClassName: at,
811
- onChange: ie,
812
- onBlur: ye,
813
- id: v,
814
- dropdownRender: _e.dropdownRender || t.dropdownRender,
815
- transitionName: M.value,
816
- children: (q = t.default) === null || q === void 0 ? void 0 : q.call(t),
817
- tagRender: e.tagRender || t.tagRender,
818
- optionLabelRender: t.optionLabel,
819
- maxTagPlaceholder: e.maxTagPlaceholder || t.maxTagPlaceholder,
820
- showArrow: G || le,
821
- disabled: $.value
822
- }), {
823
- option: t.option
824
- }));
825
- };
826
- }
827
- });
828
- te.install = function(e) {
829
- return e.component(te.name, te), e.component(te.Option.displayName, te.Option), e.component(te.OptGroup.displayName, te.OptGroup), e;
830
- };
831
- te.Option;
832
- te.OptGroup;
833
- const xe = (e, g, o) => {
834
- const a = ft(o);
835
- return {
836
- [`${e.componentCls}-${g}`]: {
837
- color: e[`color${o}`],
838
- background: e[`color${a}Bg`],
839
- borderColor: e[`color${a}Border`],
840
- [`&${e.componentCls}-borderless`]: {
841
- borderColor: "transparent"
842
- }
843
- }
844
- };
845
- }, cl = (e) => gt(e, (g, o) => {
846
- let {
847
- textColor: a,
848
- lightBorderColor: t,
849
- lightColor: n,
850
- darkColor: d
851
- } = o;
852
- return {
853
- [`${e.componentCls}-${g}`]: {
854
- color: a,
855
- background: n,
856
- borderColor: t,
857
- // Inverse color
858
- "&-inverse": {
859
- color: e.colorTextLightSolid,
860
- background: d,
861
- borderColor: d
862
- },
863
- [`&${e.componentCls}-borderless`]: {
864
- borderColor: "transparent"
865
- }
866
- }
867
- };
868
- }), ul = (e) => {
869
- const {
870
- paddingXXS: g,
871
- lineWidth: o,
872
- tagPaddingHorizontal: a,
873
- componentCls: t
874
- } = e, n = a - o, d = g - o;
875
- return {
876
- // Result
877
- [t]: E(E({}, pt(e)), {
878
- display: "inline-block",
879
- height: "auto",
880
- marginInlineEnd: e.marginXS,
881
- paddingInline: n,
882
- fontSize: e.tagFontSize,
883
- lineHeight: `${e.tagLineHeight}px`,
884
- whiteSpace: "nowrap",
885
- background: e.tagDefaultBg,
886
- border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
887
- borderRadius: e.borderRadiusSM,
888
- opacity: 1,
889
- transition: `all ${e.motionDurationMid}`,
890
- textAlign: "start",
891
- // RTL
892
- [`&${t}-rtl`]: {
893
- direction: "rtl"
894
- },
895
- "&, a, a:hover": {
896
- color: e.tagDefaultColor
897
- },
898
- [`${t}-close-icon`]: {
899
- marginInlineStart: d,
900
- color: e.colorTextDescription,
901
- fontSize: e.tagIconSize,
902
- cursor: "pointer",
903
- transition: `all ${e.motionDurationMid}`,
904
- "&:hover": {
905
- color: e.colorTextHeading
906
- }
907
- },
908
- [`&${t}-has-color`]: {
909
- borderColor: "transparent",
910
- [`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]: {
911
- color: e.colorTextLightSolid
912
- }
913
- },
914
- "&-checkable": {
915
- backgroundColor: "transparent",
916
- borderColor: "transparent",
917
- cursor: "pointer",
918
- [`&:not(${t}-checkable-checked):hover`]: {
919
- color: e.colorPrimary,
920
- backgroundColor: e.colorFillSecondary
921
- },
922
- "&:active, &-checked": {
923
- color: e.colorTextLightSolid
924
- },
925
- "&-checked": {
926
- backgroundColor: e.colorPrimary,
927
- "&:hover": {
928
- backgroundColor: e.colorPrimaryHover
929
- }
930
- },
931
- "&:active": {
932
- backgroundColor: e.colorPrimaryActive
933
- }
934
- },
935
- "&-hidden": {
936
- display: "none"
937
- },
938
- // To ensure that a space will be placed between character and `Icon`.
939
- [`> ${e.iconCls} + span, > span + ${e.iconCls}`]: {
940
- marginInlineStart: n
941
- }
942
- }),
943
- [`${t}-borderless`]: {
944
- borderColor: "transparent",
945
- background: e.tagBorderlessBg
946
- }
947
- };
948
- }, et = vt("Tag", (e) => {
949
- const {
950
- fontSize: g,
951
- lineHeight: o,
952
- lineWidth: a,
953
- fontSizeIcon: t
954
- } = e, n = Math.round(g * o), d = e.fontSizeSM, m = n - a * 2, p = e.colorFillAlter, y = e.colorText, s = mt(e, {
955
- tagFontSize: d,
956
- tagLineHeight: m,
957
- tagDefaultBg: p,
958
- tagDefaultColor: y,
959
- tagIconSize: t - 2 * a,
960
- tagPaddingHorizontal: 8,
961
- tagBorderlessBg: e.colorFillTertiary
962
- });
963
- return [ul(s), cl(s), xe(s, "success", "Success"), xe(s, "processing", "Info"), xe(s, "error", "Error"), xe(s, "warning", "Warning")];
964
- }), dl = () => ({
965
- prefixCls: String,
966
- checked: {
967
- type: Boolean,
968
- default: void 0
969
- },
970
- onChange: {
971
- type: Function
972
- },
973
- onClick: {
974
- type: Function
975
- },
976
- "onUpdate:checked": Function
977
- }), Re = pe({
978
- compatConfig: {
979
- MODE: 3
980
- },
981
- name: "ACheckableTag",
982
- inheritAttrs: !1,
983
- props: dl(),
984
- // emits: ['update:checked', 'change', 'click'],
985
- setup(e, g) {
986
- let {
987
- slots: o,
988
- emit: a,
989
- attrs: t
990
- } = g;
991
- const {
992
- prefixCls: n
993
- } = Be("tag", e), [d, m] = et(n), p = (s) => {
994
- const {
995
- checked: c
996
- } = e;
997
- a("update:checked", !c), a("change", !c), a("click", s);
998
- }, y = I(() => ge(n.value, m.value, {
999
- [`${n.value}-checkable`]: !0,
1000
- [`${n.value}-checkable-checked`]: e.checked
1001
- }));
1002
- return () => {
1003
- var s;
1004
- return d(N("span", H(H({}, t), {}, {
1005
- class: [y.value, t.class],
1006
- onClick: p
1007
- }), [(s = o.default) === null || s === void 0 ? void 0 : s.call(o)]));
1008
- };
1009
- }
1010
- }), vl = () => ({
1011
- prefixCls: String,
1012
- color: {
1013
- type: String
1014
- },
1015
- closable: {
1016
- type: Boolean,
1017
- default: !1
1018
- },
1019
- closeIcon: ne.any,
1020
- /** @deprecated `visible` will be removed in next major version. */
1021
- visible: {
1022
- type: Boolean,
1023
- default: void 0
1024
- },
1025
- onClose: {
1026
- type: Function
1027
- },
1028
- onClick: St(),
1029
- "onUpdate:visible": Function,
1030
- icon: ne.any,
1031
- bordered: {
1032
- type: Boolean,
1033
- default: !0
1034
- }
1035
- }), fe = pe({
1036
- compatConfig: {
1037
- MODE: 3
1038
- },
1039
- name: "ATag",
1040
- inheritAttrs: !1,
1041
- props: vl(),
1042
- // emits: ['update:visible', 'close'],
1043
- slots: Object,
1044
- setup(e, g) {
1045
- let {
1046
- slots: o,
1047
- emit: a,
1048
- attrs: t
1049
- } = g;
1050
- const {
1051
- prefixCls: n,
1052
- direction: d
1053
- } = Be("tag", e), [m, p] = et(n), y = de(!0);
1054
- Ve(() => {
1055
- e.visible !== void 0 && (y.value = e.visible);
1056
- });
1057
- const s = (f) => {
1058
- f.stopPropagation(), a("update:visible", !1), a("close", f), !f.defaultPrevented && e.visible === void 0 && (y.value = !1);
1059
- }, c = I(() => ht(e.color) || bt(e.color)), x = I(() => ge(n.value, p.value, {
1060
- [`${n.value}-${e.color}`]: c.value,
1061
- [`${n.value}-has-color`]: e.color && !c.value,
1062
- [`${n.value}-hidden`]: !y.value,
1063
- [`${n.value}-rtl`]: d.value === "rtl",
1064
- [`${n.value}-borderless`]: !e.bordered
1065
- })), A = (f) => {
1066
- a("click", f);
1067
- };
1068
- return () => {
1069
- var f, C, h;
1070
- const {
1071
- icon: V = (f = o.icon) === null || f === void 0 ? void 0 : f.call(o),
1072
- color: j,
1073
- closeIcon: Y = (C = o.closeIcon) === null || C === void 0 ? void 0 : C.call(o),
1074
- closable: R = !1
1075
- } = e, r = () => R ? Y ? N("span", {
1076
- class: `${n.value}-close-icon`,
1077
- onClick: s
1078
- }, [Y]) : N(Ct, {
1079
- class: `${n.value}-close-icon`,
1080
- onClick: s
1081
- }, null) : null, w = {
1082
- backgroundColor: j && !c.value ? j : void 0
1083
- }, T = V || null, S = (h = o.default) === null || h === void 0 ? void 0 : h.call(o), F = T ? N(ke, null, [T, N("span", null, [S])]) : S, z = e.onClick !== void 0, $ = N("span", H(H({}, t), {}, {
1084
- onClick: A,
1085
- class: [x.value, t.class],
1086
- style: [w, t.style]
1087
- }), [F, r()]);
1088
- return m(z ? N(yt, null, {
1089
- default: () => [$]
1090
- }) : $);
1091
- };
1092
- }
1093
- });
1094
- fe.CheckableTag = Re;
1095
- fe.install = function(e) {
1096
- return e.component(fe.name, fe), e.component(Re.name, Re), e;
1097
- };
1098
- const ml = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGXSURBVHgBlVNLTgJBEK1qOrjtI4w34AhwAuQEZBJc4yyVBbCRxE2HrZoQT4CcAI7AEeYIbDUM5asGZYj0KJX0J1WvX9eXqUIm/qUpbNp6ZzHT+yzNY1iOGR796w2sc1w3B5Ujoc5D1ns/hzcxImb2OPJPqV3rwn0NYh/DR4mEJBGhxShLN7pEZAF1EsPbmAExr7C1kad9KGy6oF/RpR6R1FIGkzAvw4KPqqv4OC4jP3N1LpZ6R55aGiJd7JES4SF+CquK5JdHWnKE48o6YenjcCw8PtGTbMqtwGWSQ9/8X0p9ZY+M7DShLNKCOq9m2Cb7Ahy9P1N+m1eNgsrEz7AXJ7qQ7Cf/3IBLw71rxQzApIIkUUyAsgzDWyXSEhdcm2tY6N4xuqXxDTwrsCkGXT/VPtuyWSqHuaJtQ8cBuUkH2e0IgDcAmzEeteHD6SDr3eHMoHLKYT/IruuIF0PaR+UczjaIc4rLGpguRmfFTN1dUNncHAZyDEUoP0iclV0nxgLbz+joG32rxeGTJKKs6uFfXaw50XDK2C8hpcmbpfjHLAAAAABJRU5ErkJggg==", fl = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGxSURBVHgB1VQ9TsNQDLYTKtYeIUeAjQXRboztESLoTDIGhqZLA1OSua3CEdqRidygPULYGDsipMTYLy9Sq/yIbuDqqe99tr989nMC8NcNu5xBmFiAeUIAF3zsGwBrItP1XDs7mVDICPOtEHFQKhgTD/hvj2RetpEabYRMFioyoqHn3Ksle8FEdVteKyHbSJR57iStANkLpltwMuG+w9c/mZCV7KRnQbgYVJjsBePSN215Z20OINPmXm0J8T2IlqmC9KVwmtOWZjaBfpj0TcivCOgDEYXE0guI6EWor2/Hn+nb5gvqlR3bc7x8KAh86OiTtozZ40d3Eh2CRz0M4tWUySJVFpGrllIFsR4ZsR0S2ihaEMN5uHAaCdUgE/ny5G8eXHkygrEvg2hdjgxmcvbcu1cgY6jOiFNpUYPCYlCqwZnv2oqIoFCBfDHJPFqF3FOrilZvCsFMWtODYlQjLKBQwT3IdxUmKlm1JLGPnLJcc3xQYKqzrQaFpeXQOxroJ3fis5KxEHMrhl0fBrH6HPJ7ynNXh/l3DvnNoY8g77cSGmBkIKOg5+03pmcuI31Z/8N+AJZHvSBz6IiBAAAAAElFTkSuQmCC", gl = { class: "crane-flex-center permission-item-wraper" }, pl = { style: { "flex-shrink": "0" } }, hl = { style: { "max-width": "400px" } }, bl = { class: "crane-text-overflow" }, yl = { style: { "max-width": "400px" } }, Sl = { style: { "max-width": "400px" } }, Cl = { class: "crane-flex-center crane-margin-left-4" }, Al = ["src"], Ol = { class: "crane-weak-color crane-margin-left-4" }, Il = ["src"], wl = { style: { "max-width": "400px" } }, xl = { class: "crane-weak-color crane-margin-left-4 crane-text-overflow" }, Tl = {
1099
- key: 6,
1100
- class: "crane-weak-color crane-margin-left-12"
1101
- }, Fe = "OWNER", Vl = /* @__PURE__ */ pe({
1102
- __name: "permission-item",
1103
- props: {
1104
- checkedKeys: {
1105
- type: Array,
1106
- default: () => []
1107
- },
1108
- validTimeOptions: {
1109
- type: Array,
1110
- default: () => []
1111
- },
1112
- item: {
1113
- type: Object,
1114
- default: () => {
1115
- }
1116
- }
1117
- },
1118
- emits: ["onChangeTime", "updateTime"],
1119
- setup(e, { emit: g }) {
1120
- const o = {
1121
- L1: {
1122
- color: "#1AA83B",
1123
- text: W("levels.L1"),
1124
- background: "#E3F9E9"
1125
- },
1126
- L2: {
1127
- color: "#F37D1C",
1128
- text: W("levels.L2"),
1129
- background: "#FFE4BA"
1130
- },
1131
- L3: {
1132
- color: "#F2494B",
1133
- text: W("levels.L3"),
1134
- background: "#FDCDC5"
1135
- }
1136
- };
1137
- let a = g, t = e;
1138
- const n = W("status"), d = Le(""), m = I(() => t.validTimeOptions.filter((c) => c.value !== "FOREVER")), p = (c) => {
1139
- var h;
1140
- if (c.businessApplyType === Fe)
1141
- return (h = c.virtualOwnState) == null ? void 0 : h.timeStatus;
1142
- const x = {
1143
- L1: "SIXTY_DAYS",
1144
- L2: "THIRTY_DAYS",
1145
- L3: "SEVEN_DAYS"
1146
- }, { relatedDepartmentIds: A = [], curDepartmentId: f = 0, securityLevel: C } = c;
1147
- return A != null && A.includes(f) ? c.validTime = "NINETY_DAYS" : c.validTime = x[C], c.validTime;
1148
- }, y = (c) => {
1149
- var x, A;
1150
- return `【${c.categoryName}】:${((A = (x = c.attributeValues) == null ? void 0 : x.map((f) => f.attributeName)) == null ? void 0 : A.join("、")) || W("empty")}`;
1151
- };
1152
- Te(() => t.checkedKeys, (c, x) => {
1153
- x && !x.includes(t.item.feature) && c.includes(t.item.feature) && (d.value = p(t.item), t.item.validTime = p(t.item), a("updateTime", t.item));
1154
- }, { immediate: !0 });
1155
- const s = (c) => {
1156
- t.item.validTime = c, a("updateTime", t.item), a("onChangeTime", t.item);
1157
- };
1158
- return (c, x) => {
1159
- var A, f, C;
1160
- return J(), Ae("div", gl, [
1161
- e.item.securityLevel ? (J(), Oe(B(fe), {
1162
- key: 0,
1163
- bordered: !1,
1164
- style: xt({ color: o[e.item.securityLevel].color, background: o[e.item.securityLevel].background }),
1165
- class: "crane-tag-position"
1166
- }, {
1167
- default: Z(() => [
1168
- Pe(_(o[e.item.securityLevel].text), 1)
1169
- ]),
1170
- _: 1
1171
- }, 8, ["style"])) : ue("", !0),
1172
- X("div", pl, _(B(W)(`operationType.${e.item.operationType}`)) + "| ", 1),
1173
- N(B(we), null, {
1174
- content: Z(() => [
1175
- X("div", hl, _(e.item.name), 1)
1176
- ]),
1177
- default: Z(() => [
1178
- X("div", bl, _(e.item.shortName), 1)
1179
- ]),
1180
- _: 1
1181
- }),
1182
- e.item.businessApplyType ? (J(), Oe(B(fe), {
1183
- key: 1,
1184
- bordered: !1,
1185
- class: Tt(["crane-tag-position crane-margin-left-4 crane-margin-right-0", ["PENDING"].includes(e.item.businessApplyType) ? "" : "crane-disabled-color"])
1186
- }, {
1187
- default: Z(() => {
1188
- var h, V, j, Y;
1189
- return [
1190
- Pe(_(B(n)[e.item.businessApplyType]) + " " + _(e.item.businessApplyType === "TEMP_OWNER" ? `(${((V = (h = e.item) == null ? void 0 : h.ownStatusVO) == null ? void 0 : V.dayDiff) > 0 ? B(W)("lastDays", {
1191
- count: (Y = (j = e.item) == null ? void 0 : j.ownStatusVO) == null ? void 0 : Y.dayDiff
1192
- }) : B(W)("today")})` : ""), 1)
1193
- ];
1194
- }),
1195
- _: 1
1196
- }, 8, ["class"])) : ue("", !0),
1197
- e.item.desc ? (J(), Oe(B(we), { key: 2 }, {
1198
- content: Z(() => [
1199
- X("div", yl, _(e.item.desc), 1)
1200
- ]),
1201
- default: Z(() => [
1202
- N(B(kt), { class: "crane-weak-color crane-margin-left-4" })
1203
- ]),
1204
- _: 1
1205
- })) : ue("", !0),
1206
- (A = e.item.relatedCompleteNames) != null && A.length ? (J(), Oe(B(we), { key: 3 }, {
1207
- content: Z(() => [
1208
- X("div", Sl, _(B(W)("adaptDepartment")) + ":" + _(e.item.relatedCompleteNames.map((h) => h).join("、")), 1)
1209
- ]),
1210
- default: Z(() => [
1211
- X("div", Cl, [
1212
- X("img", {
1213
- src: B(ml),
1214
- height: "14",
1215
- width: "14"
1216
- }, null, 8, Al),
1217
- X("span", Ol, _(e.item.relatedCompleteNames.length), 1)
1218
- ])
1219
- ]),
1220
- _: 1
1221
- })) : ue("", !0),
1222
- (f = e.item.categoryVOS) != null && f.length ? (J(), Ae("img", {
1223
- key: 4,
1224
- src: B(fl),
1225
- height: "16",
1226
- width: "16",
1227
- class: "crane-margin-left-4"
1228
- }, null, 8, Il)) : ue("", !0),
1229
- (C = e.item.categoryVOS) != null && C.length ? (J(), Oe(B(we), { key: 5 }, {
1230
- content: Z(() => [
1231
- X("div", wl, [
1232
- X("div", null, _(B(W)("categoryTips")), 1),
1233
- (J(!0), Ae(ke, null, Vt(e.item.categoryVOS, (h) => (J(), Ae("div", {
1234
- key: h.id
1235
- }, _(y(h)), 1))), 128))
1236
- ])
1237
- ]),
1238
- default: Z(() => {
1239
- var h;
1240
- return [
1241
- X("div", xl, _((h = e.item.categoryVOS) == null ? void 0 : h.map((V) => V.categoryName).join("、")), 1)
1242
- ];
1243
- }),
1244
- _: 1
1245
- })) : ue("", !0),
1246
- e.checkedKeys.includes(e.item.feature) ? (J(), Ae("span", Tl, [
1247
- Pe(_(B(W)("availableTime")) + ": ", 1),
1248
- N(B(te), {
1249
- value: d.value,
1250
- "onUpdate:value": x[0] || (x[0] = (h) => d.value = h),
1251
- style: { width: "100px" },
1252
- disabled: e.item.businessApplyType === Fe,
1253
- options: e.item.businessApplyType === Fe ? e.validTimeOptions : m.value,
1254
- onChange: s,
1255
- size: "small"
1256
- }, null, 8, ["value", "disabled", "options"])
1257
- ])) : ue("", !0)
1258
- ]);
1259
- };
1260
- }
1261
- }), Dl = /* @__PURE__ */ At(Vl, [["__scopeId", "data-v-c5efdf9a"]]);
1262
- export {
1263
- Dl as default
1264
- };