liyu-pc-base 1.0.2

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.
@@ -0,0 +1,2480 @@
1
+ import { defineComponent as Z, ref as H, resolveComponent as k, openBlock as i, createBlock as C, withCtx as c, createVNode as O, createElementBlock as E, Fragment as A, renderList as K, createElementVNode as I, toDisplayString as G, reactive as P, computed as ce, watch as Y, onMounted as Me, createTextVNode as J, createCommentVNode as N, withDirectives as re, vShow as ue, pushScopeId as Ae, popScopeId as Ie, createSlots as Ve, onUnmounted as qe, onActivated as Be, normalizeStyle as de, withModifiers as le } from "vue";
2
+ import { _ as x, h as Fe, F as De } from "../SearchRender-4500beb0.js";
3
+ import { B as Cl, e as Ol, S as Sl, i as El } from "../SearchRender-4500beb0.js";
4
+ import { message as L, Modal as be } from "ant-design-vue";
5
+ import { get_operator_type_map as se, isNotEmpty as ve, copyValue as Ke } from "../utils/function.js";
6
+ import { CloseOutlined as Ne, LeftOutlined as Re, RightOutlined as Te, CloseCircleOutlined as Ge, CaretRightOutlined as Le, PlusOutlined as Je, SettingOutlined as ze, ExclamationCircleOutlined as we } from "@ant-design/icons-vue";
7
+ import { useI18n as Ue } from "vue-i18n";
8
+ import ke from "moment";
9
+ import { m as _e } from "../modal-tools-05a597e4.js";
10
+ import { i as ee, j as Pe, k as We, m as He, n as Ce, o as Oe } from "../init-plugin-3dcd1452.js";
11
+ import { getApiData as Ye } from "../api/api-model.js";
12
+ import { getViewSettingsAndPageConfig as Qe, getPageConfig as ge } from "./remotePages/index.js";
13
+ import "lodash-es";
14
+ import "../utils/hooks/useFetchData.js";
15
+ import "scroll-into-view-if-needed";
16
+ import "../utils/hooks/useTableColumn.js";
17
+ import "vue3-ts-jsoneditor";
18
+ import "numeral";
19
+ import "../utils/excel.js";
20
+ import "xlsx";
21
+ import "dayjs";
22
+ import "../lodash-14d7cb6d.js";
23
+ import "./remotePages/utils.js";
24
+ const Xe = Z({
25
+ name: "AddConditionModal",
26
+ props: {
27
+ open: {
28
+ type: Boolean,
29
+ required: !0
30
+ },
31
+ loading: {
32
+ type: Boolean,
33
+ required: !1
34
+ },
35
+ default_search_condition_config_list: {
36
+ type: Array,
37
+ required: !1
38
+ },
39
+ base_search_condition_config_list: {
40
+ type: Array,
41
+ required: !1
42
+ }
43
+ },
44
+ emits: ["ok", "cancel"],
45
+ setup(e, { emit: u }) {
46
+ const B = H("condition_tab_0"), V = H([]);
47
+ e.default_search_condition_config_list.forEach((f, $) => {
48
+ const h = JSON.parse(
49
+ JSON.stringify(e.base_search_condition_config_list)
50
+ );
51
+ h && h.forEach((U) => {
52
+ U.group.forEach((p) => {
53
+ f.forEach((r) => {
54
+ p.field_name == r.field_name && (p.operator = r.operator, p.checked = !0);
55
+ });
56
+ });
57
+ }), V.value.push({
58
+ tab_name: `条件组${$ + 1}`,
59
+ key: `condition_tab_${$}`,
60
+ base_search_list: h
61
+ });
62
+ });
63
+ const D = (f) => {
64
+ f.preventDefault();
65
+ const $ = [];
66
+ V.value.forEach((h) => {
67
+ const U = [];
68
+ h.base_search_list.forEach((p) => {
69
+ p.group.forEach((r) => {
70
+ if (r.checked) {
71
+ if (!r.operator) {
72
+ const v = S(r);
73
+ if (v.length > 0) {
74
+ const [g] = v;
75
+ r.operator = g;
76
+ }
77
+ }
78
+ U.push(r);
79
+ }
80
+ });
81
+ }), $.push(U);
82
+ }), u("ok", { new_list: $ });
83
+ }, S = (f) => f.operator_list_selected ? f.operator_list_selected : f.operator_list ? f.operator_list : [];
84
+ return {
85
+ props: e,
86
+ activeKey: B,
87
+ tab_list: V,
88
+ handleSubmit: D
89
+ };
90
+ }
91
+ });
92
+ const Ze = { style: { "font-size": "14px" } }, xe = { style: { color: "#7d8089" } };
93
+ function ea(e, u, B, V, D, S) {
94
+ const f = k("a-checkbox"), $ = k("a-space"), h = k("a-tab-pane"), U = k("a-tabs"), p = k("a-modal");
95
+ return i(), C(p, {
96
+ title: "添加过滤条件",
97
+ width: "800px",
98
+ open: e.open,
99
+ transitionName: "",
100
+ maskTransitionName: "",
101
+ destroyOnClose: !0,
102
+ confirmLoading: e.loading,
103
+ centered: "",
104
+ onOk: e.handleSubmit,
105
+ onCancel: u[1] || (u[1] = () => {
106
+ e.$emit("cancel");
107
+ })
108
+ }, {
109
+ default: c(() => [
110
+ O(U, {
111
+ activeKey: e.activeKey,
112
+ "onUpdate:activeKey": u[0] || (u[0] = (r) => e.activeKey = r)
113
+ }, {
114
+ default: c(() => [
115
+ (i(!0), E(A, null, K(e.tab_list, (r) => (i(), C(h, {
116
+ class: "my-card",
117
+ key: r.key,
118
+ tab: r.tab_name
119
+ }, {
120
+ default: c(() => [
121
+ (i(!0), E(A, null, K(r.base_search_list, (v) => (i(), E("div", {
122
+ key: v.name
123
+ }, [
124
+ I("div", Ze, G(v.name), 1),
125
+ O($, {
126
+ wrap: "",
127
+ style: { "padding-left": "10px", "margin-bottom": "0" }
128
+ }, {
129
+ default: c(() => [
130
+ (i(!0), E(A, null, K(v.group, (g) => (i(), E("div", {
131
+ key: g.field_name
132
+ }, [
133
+ O(f, {
134
+ checked: g.checked,
135
+ "onUpdate:checked": (M) => g.checked = M
136
+ }, {
137
+ default: c(() => [
138
+ I("span", xe, G(g.label), 1)
139
+ ]),
140
+ _: 2
141
+ }, 1032, ["checked", "onUpdate:checked"])
142
+ ]))), 128))
143
+ ]),
144
+ _: 2
145
+ }, 1024)
146
+ ]))), 128))
147
+ ]),
148
+ _: 2
149
+ }, 1032, ["tab"]))), 128))
150
+ ]),
151
+ _: 1
152
+ }, 8, ["activeKey"])
153
+ ]),
154
+ _: 1
155
+ }, 8, ["open", "confirmLoading", "onOk"]);
156
+ }
157
+ const aa = /* @__PURE__ */ x(Xe, [["render", ea], ["__scopeId", "data-v-25d1dc13"]]), la = Z({
158
+ name: "AddConditionGroupModal",
159
+ props: {
160
+ open: {
161
+ type: Boolean,
162
+ required: !0
163
+ },
164
+ loading: {
165
+ type: Boolean,
166
+ required: !1
167
+ },
168
+ default_search_condition_config_list: {
169
+ type: Array,
170
+ required: !1
171
+ },
172
+ base_search_condition_config_list: {
173
+ type: Array,
174
+ required: !1
175
+ }
176
+ },
177
+ emits: ["ok", "cancel"],
178
+ setup(e, { emit: u }) {
179
+ var h, U;
180
+ const B = H([]), V = (p) => p.operator_list_selected ? p.operator_list_selected : p.operator_list ? p.operator_list : [];
181
+ (h = e.default_search_condition_config_list) == null || h.forEach((p, r) => {
182
+ const v = JSON.parse(JSON.stringify(e.base_search_condition_config_list));
183
+ v && v.forEach((g) => {
184
+ g.group.forEach((M) => {
185
+ p.forEach((R) => {
186
+ M.field_name == R.field_name && (M.checked = !0);
187
+ });
188
+ });
189
+ }), B.value.push({
190
+ tab_name: `条件组${r + 1}`,
191
+ key: `condition_tab_${r}`,
192
+ base_search_list: v
193
+ });
194
+ });
195
+ const D = ((U = e.default_search_condition_config_list) == null ? void 0 : U.length) || 0, S = [];
196
+ e.base_search_condition_config_list.forEach((p) => {
197
+ const r = [];
198
+ p.group.forEach((v) => {
199
+ const g = V(v);
200
+ if (v.default_operator && (v.operator = v.default_operator), g.includes(v.operator) || (v.operator = null), !v.operator && g.length > 0) {
201
+ const [R] = g;
202
+ v.operator = R;
203
+ }
204
+ const M = { ...v, checked: !1 };
205
+ r.push(M);
206
+ }), S.push({
207
+ name: p.name,
208
+ group: r
209
+ });
210
+ }), B.value.push({
211
+ tab_name: `条件组${D + 1}`,
212
+ key: `condition_tab_${D}`,
213
+ base_search_list: S
214
+ });
215
+ const f = H(`condition_tab_${D}`);
216
+ return {
217
+ props: e,
218
+ activeKey: f,
219
+ tab_list: B,
220
+ handleSubmit: (p) => {
221
+ p.preventDefault();
222
+ const r = [];
223
+ B.value.forEach((v) => {
224
+ const g = [];
225
+ v.base_search_list.forEach((M) => {
226
+ M.group.forEach((R) => {
227
+ R.checked && g.push(R);
228
+ });
229
+ }), g.length > 0 && r.push(g);
230
+ }), r.length == 0 ? (L.error("新增条件组未增加新的字段,自动取消"), u("cancel")) : u("ok", { new_list: r });
231
+ },
232
+ get_operator_list_selected: V
233
+ };
234
+ }
235
+ });
236
+ const ta = { style: { "font-size": "14px" } }, na = { style: { color: "#7d8089" } }, oa = { style: { "font-size": "14px" } }, sa = { style: { color: "#7d8089" } };
237
+ function ia(e, u, B, V, D, S) {
238
+ const f = k("a-checkbox"), $ = k("a-space"), h = k("a-tab-pane"), U = k("a-tabs"), p = k("a-modal");
239
+ return i(), C(p, {
240
+ title: "添加过滤条件组",
241
+ width: "800px",
242
+ open: e.open,
243
+ transitionName: "",
244
+ maskTransitionName: "",
245
+ destroyOnClose: !0,
246
+ confirmLoading: e.loading,
247
+ centered: "",
248
+ onOk: e.handleSubmit,
249
+ onCancel: u[1] || (u[1] = () => {
250
+ e.$emit("cancel");
251
+ })
252
+ }, {
253
+ default: c(() => [
254
+ (i(!0), E(A, null, K(e.tab_list, (r) => (i(), C(h, {
255
+ class: "my-card",
256
+ key: r.key,
257
+ tab: r.tab_name
258
+ }, {
259
+ default: c(() => [
260
+ (i(!0), E(A, null, K(r.base_search_list, (v) => (i(), E("div", {
261
+ key: v.name
262
+ }, [
263
+ I("div", ta, G(v.name), 1),
264
+ O($, { wrap: "" }, {
265
+ default: c(() => [
266
+ (i(!0), E(A, null, K(v.group, (g) => (i(), E("div", {
267
+ key: g.field_name
268
+ }, [
269
+ O(f, {
270
+ checked: g.checked,
271
+ "onUpdate:checked": (M) => g.checked = M
272
+ }, {
273
+ default: c(() => [
274
+ I("span", na, G(g.label), 1)
275
+ ]),
276
+ _: 2
277
+ }, 1032, ["checked", "onUpdate:checked"])
278
+ ]))), 128))
279
+ ]),
280
+ _: 2
281
+ }, 1024)
282
+ ]))), 128))
283
+ ]),
284
+ _: 2
285
+ }, 1032, ["tab"]))), 128)),
286
+ O(U, {
287
+ activeKey: e.activeKey,
288
+ "onUpdate:activeKey": u[0] || (u[0] = (r) => e.activeKey = r)
289
+ }, {
290
+ default: c(() => [
291
+ (i(!0), E(A, null, K(e.tab_list, (r) => (i(), C(h, {
292
+ class: "my-card",
293
+ key: r.key,
294
+ tab: r.tab_name
295
+ }, {
296
+ default: c(() => [
297
+ (i(!0), E(A, null, K(r.base_search_list, (v) => (i(), E("div", {
298
+ key: v.name
299
+ }, [
300
+ I("div", oa, G(v.name), 1),
301
+ O($, {
302
+ wrap: "",
303
+ style: { "padding-left": "10px", "margin-bottom": "0" }
304
+ }, {
305
+ default: c(() => [
306
+ (i(!0), E(A, null, K(v.group, (g) => (i(), E("div", {
307
+ key: g.field_name
308
+ }, [
309
+ O(f, {
310
+ checked: g.checked,
311
+ "onUpdate:checked": (M) => g.checked = M
312
+ }, {
313
+ default: c(() => [
314
+ I("span", sa, G(g.label), 1)
315
+ ]),
316
+ _: 2
317
+ }, 1032, ["checked", "onUpdate:checked"])
318
+ ]))), 128))
319
+ ]),
320
+ _: 2
321
+ }, 1024)
322
+ ]))), 128))
323
+ ]),
324
+ _: 2
325
+ }, 1032, ["tab"]))), 128))
326
+ ]),
327
+ _: 1
328
+ }, 8, ["activeKey"])
329
+ ]),
330
+ _: 1
331
+ }, 8, ["open", "confirmLoading", "onOk"]);
332
+ }
333
+ const ra = /* @__PURE__ */ x(la, [["render", ia], ["__scopeId", "data-v-52b515e0"]]), ua = (e) => ({
334
+ options_eq: [
335
+ { value: "上月", label: "上月" },
336
+ { value: "本月", label: "本月" },
337
+ { value: "今日", label: "今日" },
338
+ { value: "昨日", label: "昨日" },
339
+ { value: "期初", label: "期初" }
340
+ ]
341
+ }), da = Z({
342
+ name: "GeneralFilter",
343
+ props: {
344
+ base_search_condition_config_list: {
345
+ type: Array
346
+ },
347
+ default_search_condition_config_list: {
348
+ type: Array
349
+ },
350
+ is_show_normal_search: {
351
+ type: Boolean,
352
+ default: () => !1
353
+ },
354
+ is_clear_model: {
355
+ type: Boolean,
356
+ default: () => !1
357
+ },
358
+ is_show_advantage: {
359
+ type: Boolean,
360
+ default: () => !1
361
+ },
362
+ is_massage_default: {
363
+ type: Boolean,
364
+ default: () => !1
365
+ }
366
+ },
367
+ components: {
368
+ FieldRender2: Fe,
369
+ CloseOutlined: Ne,
370
+ LeftOutlined: Re,
371
+ RightOutlined: Te,
372
+ FieldRender: De,
373
+ AddConditionGroupModal: ra,
374
+ AddConditionModal: aa,
375
+ CloseCircleOutlined: Ge
376
+ },
377
+ emits: [
378
+ "search",
379
+ "resize",
380
+ "update_default_search_condition_config_list",
381
+ "onShowSearchRender",
382
+ "delSearch",
383
+ "onChangeValue",
384
+ "update:is_clear_model"
385
+ ],
386
+ setup(e, { emit: u }) {
387
+ const B = H(e.is_massage_default), V = H({}), { t: D } = Ue(), { options_eq: S } = ua(), f = H({}), $ = {}, h = H(null);
388
+ h.value || (h.value = JSON.parse(
389
+ JSON.stringify(e.default_search_condition_config_list)
390
+ ));
391
+ const U = {
392
+ between: 2,
393
+ gt: 1,
394
+ lt: 1,
395
+ gte: 1,
396
+ lte: 1,
397
+ in: 0,
398
+ eq: 1,
399
+ _eq: 1,
400
+ contains: 1,
401
+ icontains: 1,
402
+ startswith: 1,
403
+ notbetween: 2,
404
+ notin: 0,
405
+ notcontains: 1,
406
+ not_eq: 1,
407
+ not_blank_not_null: 1,
408
+ json_list_not_blank_not_null: 1,
409
+ json_list_is_blank_is_null: 1
410
+ }, p = (a) => {
411
+ const [l] = [a];
412
+ return Array.isArray(l) && a.every((s) => Array.isArray(s));
413
+ };
414
+ let r = null;
415
+ const v = (a, l, s) => {
416
+ const y = f.value[l][s.field_name];
417
+ if (d(s).includes("_eq") && a == "_eq") {
418
+ f.value[l][s.field_name] = null;
419
+ return;
420
+ }
421
+ if (d(s).includes("not_blank_not_null")) {
422
+ if (a == "not_blank_not_null") {
423
+ f.value[l][s.field_name] = "是", r = a, u("onChangeValue", { model: f.value });
424
+ return;
425
+ } else if (r == "not_blank_not_null") {
426
+ f.value[l][s.field_name] = null, r = a, u("onChangeValue", { model: f.value });
427
+ return;
428
+ }
429
+ }
430
+ if (y instanceof Array && p(y))
431
+ f.value[l][s.field_name] = null;
432
+ else if (U[a] == 1) {
433
+ if (y instanceof Array) {
434
+ const [t] = f.value[l][s.field_name];
435
+ ve(t) ? f.value[l][s.field_name] = t : f.value[l][s.field_name] = null;
436
+ } else
437
+ f.value[l][s.field_name] = y || null;
438
+ S.some(
439
+ (t) => t.value === f.value[l][s.field_name]
440
+ ) && (f.value[l][s.field_name] = null);
441
+ } else if (U[a] == 2) {
442
+ if (f.value[l][s.field_name] instanceof Array) {
443
+ const [t, _] = f.value[l][s.field_name];
444
+ f.value[l][s.field_name] = [t, _];
445
+ } else if (f.value[l][s.field_name]) {
446
+ const t = f.value[l][s.field_name];
447
+ f.value[l][s.field_name] = [t, null];
448
+ } else
449
+ f.value[l][s.field_name] = [null, null];
450
+ S.some(
451
+ (t) => t.value === f.value[l][s.field_name][0]
452
+ ) && (f.value[l][s.field_name] = [null, null]);
453
+ }
454
+ r = a, u("onChangeValue", { model: f.value });
455
+ }, g = P({
456
+ open: !1
457
+ }), M = () => {
458
+ g.open = !0;
459
+ }, R = (a) => {
460
+ e.default_search_condition_config_list.forEach((l, s) => {
461
+ a.new_list.forEach((y, m) => {
462
+ s == m && l.forEach((t) => {
463
+ y.forEach((_) => {
464
+ t.field_name == _.field_name && (_.value = t.value, _.operator = t.operator);
465
+ });
466
+ });
467
+ });
468
+ }), u("update_default_search_condition_config_list", { new_list: a.new_list }), g.open = !1;
469
+ }, Q = () => {
470
+ g.open = !1;
471
+ }, j = P({
472
+ open: !1
473
+ }), F = () => {
474
+ j.open = !0;
475
+ }, z = (a) => {
476
+ e.default_search_condition_config_list.forEach((l, s) => {
477
+ a.new_list.forEach((y, m) => {
478
+ s == m && l.forEach((t) => {
479
+ y.forEach((_) => {
480
+ t.field_name == _.field_name && (_.value = t.value, _.operator = t.operator);
481
+ });
482
+ });
483
+ });
484
+ }), u("update_default_search_condition_config_list", { new_list: a.new_list }), j.open = !1;
485
+ }, te = () => {
486
+ j.open = !1;
487
+ }, ne = () => {
488
+ B.value = !1, u("search", { model: f.value });
489
+ }, W = () => {
490
+ var a;
491
+ e.base_search_condition_config_list.length != 0 && ((a = e.default_search_condition_config_list) == null || a.forEach((l, s) => {
492
+ b[s] = {}, f.value[s] || (f.value[s] = {}), e.base_search_condition_config_list.forEach((y) => {
493
+ var m;
494
+ (m = y.group) == null || m.forEach((t) => {
495
+ l.forEach((_) => {
496
+ t.field_name == _.field_name && (f.value[s][_.field_name] == null && (U[_.operator] == 1 ? _.value !== void 0 ? f.value[s][_.field_name] = _.value : f.value[s][_.field_name] = null : U[_.operator] == 2 ? _.value !== void 0 ? f.value[s][_.field_name] = _.value : f.value[s][_.field_name] = [null, null] : U[_.operator] == 0 && (_.value !== void 0 ? f.value[s][_.field_name] = _.value : f.value[s][_.field_name] = [])), Object.assign(_, { ...t, operator: _.operator }), _.operator == "eq" && _.mode != "default" ? (t.mode = "default", Object.assign(_, { model: "default" })) : ["in", "notin"].includes(_.operator) && _.mode != "multiple" && (t.mode = "multiple", Object.assign(_, { model: "multiple" })));
497
+ });
498
+ });
499
+ });
500
+ }));
501
+ }, b = P({}), o = (a, l) => {
502
+ b[a][l.field_name] = !0;
503
+ }, ae = (a, l) => {
504
+ b[a][l.field_name] = !1;
505
+ }, w = (a, l) => {
506
+ const s = [];
507
+ e.default_search_condition_config_list.forEach((y, m) => {
508
+ if (m !== a)
509
+ s.push(y);
510
+ else {
511
+ const t = [];
512
+ y.forEach((_) => {
513
+ _.field_name !== l.field_name && t.push(_);
514
+ }), t.length > 0 && s.push(t);
515
+ }
516
+ }), u("update_default_search_condition_config_list", { new_list: s });
517
+ }, me = (a, l) => {
518
+ f.value[a][l] instanceof Array ? f.value[a][l].length = 0 : f.value[a][l] = null, u("onChangeValue", { model: f.value }), u("delSearch", { model: JSON.parse(JSON.stringify(f.value)) });
519
+ }, pe = (a, l, s, y) => {
520
+ if (a instanceof Array && a.length > 0) {
521
+ const m = a[a.length - 1];
522
+ let t = null;
523
+ if (e.base_search_condition_config_list.forEach((_) => {
524
+ _.group.forEach((q) => {
525
+ if (q.field_name === m) {
526
+ if (t = JSON.parse(JSON.stringify(q)), t.default_operator)
527
+ t.operator = t.default_operator;
528
+ else if (d(t).length > 0) {
529
+ const [T] = d(t);
530
+ t.operator = T;
531
+ }
532
+ }
533
+ });
534
+ }), t) {
535
+ const _ = JSON.parse(JSON.stringify(e.default_search_condition_config_list));
536
+ _.forEach((q, T) => {
537
+ T === l && q.forEach((X, ye) => {
538
+ X.field_name == s.field_name && ye == y && (q.splice(ye, 1, t), delete f.value[l][X.field_name]);
539
+ });
540
+ }), u("update_default_search_condition_config_list", {
541
+ new_list: _
542
+ });
543
+ }
544
+ W();
545
+ }
546
+ }, he = ce(() => {
547
+ const a = {};
548
+ return e.default_search_condition_config_list.forEach((l, s) => {
549
+ a[s] = [];
550
+ const y = l.map((m) => m.field_name);
551
+ e.base_search_condition_config_list.forEach((m) => {
552
+ const t = m.group.filter(
553
+ (q) => !y.includes(q.field_name)
554
+ ), _ = {
555
+ value: m.name,
556
+ label: m.name,
557
+ children: t.map((q) => ({
558
+ value: q.field_name,
559
+ label: q.label
560
+ }))
561
+ };
562
+ a[s].push(_);
563
+ });
564
+ }), a;
565
+ }), oe = (a, l) => {
566
+ const s = f.value[a][l.field_name];
567
+ if (s instanceof Array) {
568
+ const [y] = s;
569
+ if (ve(y))
570
+ return !0;
571
+ } else if (ve(s))
572
+ return !0;
573
+ return !1;
574
+ }, ie = (a, l) => {
575
+ const s = [], y = f.value[a][l.field_name];
576
+ if (V.value[l.field_name] != null)
577
+ return `${se(l.format, l.operator)} ${V.value[l.field_name]}`;
578
+ if (y instanceof Array && l.field_name_list instanceof Array) {
579
+ let m;
580
+ return l.field_name_list && (y instanceof Array ? m = y.join(",") : m = y), `${se(l.format, l.operator)} ${m}`;
581
+ } else {
582
+ if (y instanceof Array && l.options instanceof Array)
583
+ return y.forEach((m) => {
584
+ l.options.forEach((t) => {
585
+ m == t.value && s.push(t.label);
586
+ });
587
+ }), `${se(l.format, l.operator)} ${s.join(
588
+ ","
589
+ )}`;
590
+ {
591
+ let m;
592
+ if (l.options)
593
+ l.options.forEach((t) => {
594
+ y == t.value && (m = t.label);
595
+ });
596
+ else if (l.type == "monthpicker" && l.dateFormat)
597
+ if (y instanceof Array) {
598
+ const t = [];
599
+ y.forEach((_) => {
600
+ _ ? t.push(ke(_).format(l.dateFormat)) : t.push(_);
601
+ }), m = t.join(",");
602
+ } else
603
+ m = ke(y).format(l.dateFormat);
604
+ else
605
+ m = y;
606
+ return `${se(l.format, l.operator)} ${m}`;
607
+ }
608
+ }
609
+ }, n = () => {
610
+ u("onShowSearchRender");
611
+ }, d = (a) => a.operator_list_selected ? a.operator_list_selected : a.operator_list ? a.operator_list : [];
612
+ return Y(
613
+ () => f.value,
614
+ () => {
615
+ u("onChangeValue", { model: f.value });
616
+ },
617
+ { deep: !0 }
618
+ ), Y(
619
+ () => e.default_search_condition_config_list,
620
+ () => {
621
+ var a;
622
+ if (((a = e.default_search_condition_config_list) == null ? void 0 : a.length) == 0) {
623
+ u("update_default_search_condition_config_list", {
624
+ new_list: h.value
625
+ });
626
+ return;
627
+ }
628
+ W();
629
+ },
630
+ { deep: !0 }
631
+ ), Y(
632
+ () => e.base_search_condition_config_list,
633
+ () => {
634
+ W();
635
+ },
636
+ { deep: !0 }
637
+ ), Y(
638
+ () => e.is_clear_model,
639
+ () => {
640
+ e.is_clear_model && (f.value = {}, W(), u("update:is_clear_model", !1));
641
+ }
642
+ ), Me(() => {
643
+ }), W(), {
644
+ props: e,
645
+ t: D,
646
+ isShowForm: B,
647
+ labelModel: V,
648
+ get_operator_type_map: se,
649
+ condition_model_dict: f,
650
+ addConditionModal: g,
651
+ handleAddConditions: M,
652
+ handleAddConditionOk: R,
653
+ handleAddConditionCancel: Q,
654
+ onChangeOperator: v,
655
+ handleAddGroupCondition: F,
656
+ handleSearch: ne,
657
+ addConditionGroupModal: j,
658
+ handleAddGroupConditionOK: z,
659
+ handleAddGroupConditionCancel: te,
660
+ validateInfos: $,
661
+ deleteBtnDict: b,
662
+ handleMouseEnter: o,
663
+ handleMouseLeave: ae,
664
+ handleDeleteFormItem: w,
665
+ handleDelSearch: me,
666
+ searchItemOptionsDict: he,
667
+ onChangeSearchItem: pe,
668
+ transferValueFunc: ie,
669
+ isShowSearchTag: oe,
670
+ handleShowSearchRender: n,
671
+ options_eq: S,
672
+ get_operator_list_selected: d
673
+ };
674
+ }
675
+ });
676
+ const je = (e) => (Ae("data-v-8c25a993"), e = e(), Ie(), e), _a = /* @__PURE__ */ je(() => /* @__PURE__ */ I("span", { class: "expand-btn" }, "展开", -1)), fa = { class: "card" }, ca = {
677
+ key: 0,
678
+ class: "condition-group"
679
+ }, ma = { style: { width: "315px", height: "40px" } }, pa = /* @__PURE__ */ je(() => /* @__PURE__ */ I("div", { class: "range" }, "~", -1)), ha = { class: "close-icon" }, va = { class: "search-bar" };
680
+ function ga(e, u, B, V, D, S) {
681
+ const f = k("a-button"), $ = k("a-space"), h = k("a-tag"), U = k("close-outlined"), p = k("a-cascader"), r = k("a-tooltip"), v = k("a-select-option"), g = k("a-select"), M = k("field-render-2"), R = k("a-flex"), Q = k("close-circle-outlined"), j = k("a-input-group"), F = k("a-space-compact"), z = k("a-divider"), te = k("add-condition-modal"), ne = k("add-condition-group-modal");
682
+ return i(), E(A, null, [
683
+ e.is_massage_default ? N("", !0) : (i(), C($, { key: 0 }, {
684
+ default: c(() => [
685
+ e.is_show_normal_search ? (i(), C(f, {
686
+ key: 0,
687
+ type: "link",
688
+ onClick: e.handleShowSearchRender
689
+ }, {
690
+ default: c(() => [
691
+ J(" 普通 ")
692
+ ]),
693
+ _: 1
694
+ }, 8, ["onClick"])) : N("", !0),
695
+ e.isShowForm ? (i(), C(f, {
696
+ key: 2,
697
+ type: "link",
698
+ onClick: u[1] || (u[1] = () => {
699
+ e.isShowForm = !1, e.$emit("resize");
700
+ })
701
+ }, {
702
+ default: c(() => [
703
+ J(" 隐藏 ")
704
+ ]),
705
+ _: 1
706
+ })) : (i(), C(f, {
707
+ key: 1,
708
+ type: "link",
709
+ onClick: u[0] || (u[0] = () => {
710
+ e.isShowForm = !0, e.$emit("resize");
711
+ })
712
+ }, {
713
+ default: c(() => [
714
+ _a
715
+ ]),
716
+ _: 1
717
+ }))
718
+ ]),
719
+ _: 1
720
+ })),
721
+ re(I("span", null, [
722
+ (i(!0), E(A, null, K(e.default_search_condition_config_list, (W, b) => (i(), E("span", { key: b }, [
723
+ O(h, null, {
724
+ default: c(() => [
725
+ J("条件组" + G(b + 1) + ":", 1)
726
+ ]),
727
+ _: 2
728
+ }, 1024),
729
+ (i(!0), E(A, null, K(W, (o) => (i(), E("span", {
730
+ key: o.field_name
731
+ }, [
732
+ re(O(h, { color: "green" }, {
733
+ default: c(() => [
734
+ J(G(o.label) + ": " + G(e.transferValueFunc(b, o)) + " ", 1),
735
+ O(U, {
736
+ style: { cursor: "pointer", "margin-left": "5px" },
737
+ onClick: (ae) => e.handleDelSearch(b, o.field_name)
738
+ }, null, 8, ["onClick"])
739
+ ]),
740
+ _: 2
741
+ }, 1536), [
742
+ [ue, e.isShowSearchTag(b, o)]
743
+ ])
744
+ ]))), 128))
745
+ ]))), 128))
746
+ ], 512), [
747
+ [ue, !e.isShowForm]
748
+ ]),
749
+ re(I("div", fa, [
750
+ (i(!0), E(A, null, K(e.default_search_condition_config_list, (W, b) => (i(), E("div", { key: b }, [
751
+ e.default_search_condition_config_list.length > 1 ? (i(), E("div", ca, " 条件组 " + G(b + 1), 1)) : N("", !0),
752
+ O($, {
753
+ wrap: !0,
754
+ align: "center",
755
+ size: 0
756
+ }, {
757
+ default: c(() => [
758
+ (i(!0), E(A, null, K(W, (o, ae) => (i(), C(F, {
759
+ block: "",
760
+ key: o.field_name,
761
+ size: "middle",
762
+ onMouseenter: (w) => e.handleMouseEnter(b, o),
763
+ onMouseleave: (w) => e.handleMouseLeave(b, o)
764
+ }, {
765
+ default: c(() => [
766
+ O(j, { compact: "" }, {
767
+ default: c(() => [
768
+ O(r, {
769
+ title: o.label
770
+ }, {
771
+ default: c(() => [
772
+ O(p, {
773
+ value: o.label,
774
+ style: { width: "125px" },
775
+ options: e.searchItemOptionsDict[b],
776
+ showSearch: "",
777
+ allowClear: !1,
778
+ placeholder: "请选择...",
779
+ onChange: (w) => e.onChangeSearchItem(w, b, o, ae)
780
+ }, null, 8, ["value", "options", "onChange"])
781
+ ]),
782
+ _: 2
783
+ }, 1032, ["title"]),
784
+ O(r, {
785
+ title: e.get_operator_type_map(o.format, o.operator)
786
+ }, {
787
+ default: c(() => [
788
+ e.get_operator_list_selected(o).length > 0 ? (i(), C(g, {
789
+ key: 0,
790
+ dropdownMatchSelectWidth: !1,
791
+ value: o.operator,
792
+ "onUpdate:value": (w) => o.operator = w,
793
+ onChange: (w) => e.onChangeOperator(w, b, o),
794
+ style: { width: "100px" }
795
+ }, {
796
+ default: c(() => [
797
+ (i(!0), E(A, null, K(e.get_operator_list_selected(o), (w) => (i(), C(v, {
798
+ value: w,
799
+ key: w
800
+ }, {
801
+ default: c(() => [
802
+ J(G(e.get_operator_type_map(o.format, w)), 1)
803
+ ]),
804
+ _: 2
805
+ }, 1032, ["value"]))), 128))
806
+ ]),
807
+ _: 2
808
+ }, 1032, ["value", "onUpdate:value", "onChange"])) : N("", !0)
809
+ ]),
810
+ _: 2
811
+ }, 1032, ["title"]),
812
+ I("span", ma, [
813
+ ["input"].includes(o.format) ? (i(), E(A, { key: 0 }, [
814
+ o.operator === "between" || o.operator === "notbetween" ? (i(), E(A, { key: 0 }, [
815
+ o.type === "datepicker" ? (i(), C(M, {
816
+ key: 0,
817
+ is_show_label: !1,
818
+ label: e.labelModel[o.field_name],
819
+ "onUpdate:label": (w) => e.labelModel[o.field_name] = w,
820
+ value: e.condition_model_dict[b][o.field_name],
821
+ "onUpdate:value": (w) => e.condition_model_dict[b][o.field_name] = w,
822
+ field: { ...o, type: "rangepicker", format: o.dateFormat },
823
+ formModel: e.condition_model_dict[b],
824
+ options: o.options,
825
+ validateInfos: e.validateInfos
826
+ }, null, 8, ["label", "onUpdate:label", "value", "onUpdate:value", "field", "formModel", "options", "validateInfos"])) : o.type === "monthpicker" ? (i(), C(M, {
827
+ key: 1,
828
+ is_show_label: !1,
829
+ label: e.labelModel[o.field_name],
830
+ "onUpdate:label": (w) => e.labelModel[o.field_name] = w,
831
+ value: e.condition_model_dict[b][o.field_name],
832
+ "onUpdate:value": (w) => e.condition_model_dict[b][o.field_name] = w,
833
+ field: {
834
+ ...o,
835
+ type: "monthrangepicker"
836
+ },
837
+ formModel: e.condition_model_dict[b],
838
+ options: o.options,
839
+ validateInfos: e.validateInfos
840
+ }, null, 8, ["label", "onUpdate:label", "value", "onUpdate:value", "field", "formModel", "options", "validateInfos"])) : (i(), C(R, { key: 2 }, {
841
+ default: c(() => [
842
+ O(M, {
843
+ is_show_label: !1,
844
+ label: e.labelModel[o.field_name],
845
+ "onUpdate:label": (w) => e.labelModel[o.field_name] = w,
846
+ value: e.condition_model_dict[b][o.field_name][0],
847
+ "onUpdate:value": (w) => e.condition_model_dict[b][o.field_name][0] = w,
848
+ field: o,
849
+ formModel: e.condition_model_dict[b],
850
+ options: o.options,
851
+ validateInfos: e.validateInfos
852
+ }, null, 8, ["label", "onUpdate:label", "value", "onUpdate:value", "field", "formModel", "options", "validateInfos"]),
853
+ pa,
854
+ O(M, {
855
+ is_show_label: !1,
856
+ label: e.labelModel[o.field_name],
857
+ "onUpdate:label": (w) => e.labelModel[o.field_name] = w,
858
+ value: e.condition_model_dict[b][o.field_name][1],
859
+ "onUpdate:value": (w) => e.condition_model_dict[b][o.field_name][1] = w,
860
+ field: o,
861
+ formModel: e.condition_model_dict[b],
862
+ options: o.options,
863
+ validateInfos: e.validateInfos
864
+ }, null, 8, ["label", "onUpdate:label", "value", "onUpdate:value", "field", "formModel", "options", "validateInfos"])
865
+ ]),
866
+ _: 2
867
+ }, 1024))
868
+ ], 64)) : o.operator === "_eq" ? (i(), C(M, {
869
+ key: 1,
870
+ is_show_label: !1,
871
+ label: e.labelModel[o.field_name],
872
+ "onUpdate:label": (w) => e.labelModel[o.field_name] = w,
873
+ value: e.condition_model_dict[b][o.field_name],
874
+ "onUpdate:value": (w) => e.condition_model_dict[b][o.field_name] = w,
875
+ field: {
876
+ ...o,
877
+ type: "select",
878
+ mode: "default",
879
+ format: "choices",
880
+ class_name: "str",
881
+ placeholder: ""
882
+ },
883
+ formModel: e.condition_model_dict[b],
884
+ options: e.options_eq,
885
+ validateInfos: e.validateInfos
886
+ }, null, 8, ["label", "onUpdate:label", "value", "onUpdate:value", "field", "formModel", "options", "validateInfos"])) : o.type === "datepicker" || o.type === "monthpicker" ? (i(), C(M, {
887
+ key: 2,
888
+ is_show_label: !1,
889
+ label: e.labelModel[o.field_name],
890
+ "onUpdate:label": (w) => e.labelModel[o.field_name] = w,
891
+ value: e.condition_model_dict[b][o.field_name],
892
+ "onUpdate:value": (w) => e.condition_model_dict[b][o.field_name] = w,
893
+ field: { ...o, format: o.dateFormat },
894
+ formModel: e.condition_model_dict[b],
895
+ options: o.options,
896
+ validateInfos: e.validateInfos
897
+ }, null, 8, ["label", "onUpdate:label", "value", "onUpdate:value", "field", "formModel", "options", "validateInfos"])) : (i(), C(M, {
898
+ key: 3,
899
+ is_show_label: !1,
900
+ label: e.labelModel[o.field_name],
901
+ "onUpdate:label": (w) => e.labelModel[o.field_name] = w,
902
+ value: e.condition_model_dict[b][o.field_name],
903
+ "onUpdate:value": (w) => e.condition_model_dict[b][o.field_name] = w,
904
+ field: o,
905
+ formModel: e.condition_model_dict[b],
906
+ options: o.options,
907
+ validateInfos: e.validateInfos
908
+ }, null, 8, ["label", "onUpdate:label", "value", "onUpdate:value", "field", "formModel", "options", "validateInfos"]))
909
+ ], 64)) : ["choices", "remote"].includes(o.format) ? (i(), E(A, { key: 1 }, [
910
+ o.format === "choices" ? (i(), C(M, {
911
+ key: 0,
912
+ is_show_label: !1,
913
+ label: e.labelModel[o.field_name],
914
+ "onUpdate:label": (w) => e.labelModel[o.field_name] = w,
915
+ value: e.condition_model_dict[b][o.field_name],
916
+ "onUpdate:value": (w) => e.condition_model_dict[b][o.field_name] = w,
917
+ field: o,
918
+ formModel: e.condition_model_dict[b],
919
+ options: o.options,
920
+ validateInfos: e.validateInfos
921
+ }, null, 8, ["label", "onUpdate:label", "value", "onUpdate:value", "field", "formModel", "options", "validateInfos"])) : o.format === "remote" ? (i(), C(M, {
922
+ key: 1,
923
+ is_show_label: !1,
924
+ label: e.labelModel[o.field_name],
925
+ "onUpdate:label": (w) => e.labelModel[o.field_name] = w,
926
+ value: e.condition_model_dict[b][o.field_name],
927
+ "onUpdate:value": (w) => e.condition_model_dict[b][o.field_name] = w,
928
+ field: { ...o, name: o == null ? void 0 : o.field_name },
929
+ formModel: e.condition_model_dict[b],
930
+ options: o.options,
931
+ validateInfos: e.validateInfos
932
+ }, null, 8, ["label", "onUpdate:label", "value", "onUpdate:value", "field", "formModel", "options", "validateInfos"])) : N("", !0)
933
+ ], 64)) : N("", !0)
934
+ ]),
935
+ I("span", ha, [
936
+ e.deleteBtnDict[b][o.field_name] && (e.default_search_condition_config_list[0].length > 1 || e.default_search_condition_config_list.length > 1) && !e.is_massage_default ? (i(), C(r, {
937
+ key: 0,
938
+ title: "删除此条件"
939
+ }, {
940
+ default: c(() => [
941
+ O(Q, {
942
+ onClick: (w) => e.handleDeleteFormItem(b, o)
943
+ }, null, 8, ["onClick"])
944
+ ]),
945
+ _: 2
946
+ }, 1024)) : N("", !0)
947
+ ])
948
+ ]),
949
+ _: 2
950
+ }, 1024)
951
+ ]),
952
+ _: 2
953
+ }, 1032, ["onMouseenter", "onMouseleave"]))), 128))
954
+ ]),
955
+ _: 2
956
+ }, 1024),
957
+ e.default_search_condition_config_list.length > 1 && b != e.default_search_condition_config_list.length - 1 ? (i(), C(z, {
958
+ key: 1,
959
+ class: "divider",
960
+ style: { margin: "0" }
961
+ }, {
962
+ default: c(() => [
963
+ J(" 或 ")
964
+ ]),
965
+ _: 1
966
+ })) : N("", !0)
967
+ ]))), 128))
968
+ ], 512), [
969
+ [ue, e.isShowForm]
970
+ ]),
971
+ re(I("div", va, [
972
+ O($, null, {
973
+ default: c(() => [
974
+ O(f, {
975
+ size: "small",
976
+ type: "primary",
977
+ onClick: e.handleAddConditions
978
+ }, {
979
+ default: c(() => [
980
+ J(" 添加条件 ")
981
+ ]),
982
+ _: 1
983
+ }, 8, ["onClick"]),
984
+ O(f, {
985
+ size: "small",
986
+ type: "primary",
987
+ onClick: e.handleAddGroupCondition
988
+ }, {
989
+ default: c(() => [
990
+ J(" 添加条件组 ")
991
+ ]),
992
+ _: 1
993
+ }, 8, ["onClick"]),
994
+ O(f, {
995
+ size: "small",
996
+ type: "primary",
997
+ onClick: e.handleSearch
998
+ }, {
999
+ default: c(() => [
1000
+ J(" 查询 ")
1001
+ ]),
1002
+ _: 1
1003
+ }, 8, ["onClick"])
1004
+ ]),
1005
+ _: 1
1006
+ })
1007
+ ], 512), [
1008
+ [ue, e.isShowForm && !e.is_massage_default]
1009
+ ]),
1010
+ e.addConditionModal.open ? (i(), C(te, {
1011
+ key: 1,
1012
+ open: e.addConditionModal.open,
1013
+ default_search_condition_config_list: e.default_search_condition_config_list,
1014
+ base_search_condition_config_list: e.base_search_condition_config_list,
1015
+ onOk: e.handleAddConditionOk,
1016
+ onCancel: e.handleAddConditionCancel
1017
+ }, null, 8, ["open", "default_search_condition_config_list", "base_search_condition_config_list", "onOk", "onCancel"])) : N("", !0),
1018
+ e.addConditionGroupModal.open ? (i(), C(ne, {
1019
+ key: 2,
1020
+ open: e.addConditionGroupModal.open,
1021
+ default_search_condition_config_list: e.default_search_condition_config_list,
1022
+ base_search_condition_config_list: e.base_search_condition_config_list,
1023
+ onOk: e.handleAddGroupConditionOK,
1024
+ onCancel: e.handleAddGroupConditionCancel
1025
+ }, null, 8, ["open", "default_search_condition_config_list", "base_search_condition_config_list", "onOk", "onCancel"])) : N("", !0)
1026
+ ], 64);
1027
+ }
1028
+ const hl = /* @__PURE__ */ x(da, [["render", ga], ["__scopeId", "data-v-8c25a993"]]), ya = Z({
1029
+ name: "FormRender3",
1030
+ components: {
1031
+ FieldRender2: Fe
1032
+ },
1033
+ props: {
1034
+ model: {
1035
+ type: Object,
1036
+ required: !0
1037
+ },
1038
+ outModel: {
1039
+ type: Object,
1040
+ default: () => {
1041
+ }
1042
+ },
1043
+ form: {
1044
+ type: Object,
1045
+ required: !0
1046
+ },
1047
+ options: {
1048
+ type: Object,
1049
+ required: !0,
1050
+ default: () => {
1051
+ }
1052
+ },
1053
+ validateInfos: {
1054
+ type: Object,
1055
+ default: () => {
1056
+ }
1057
+ }
1058
+ },
1059
+ emits: ["update_model", "update_model"],
1060
+ setup(e, { emit: u }) {
1061
+ if (e.form.watch)
1062
+ for (let S in e.form.watch)
1063
+ Y(
1064
+ () => e.model[S],
1065
+ () => {
1066
+ e.form.watch[S](e.model, e.form);
1067
+ }
1068
+ );
1069
+ return {
1070
+ validate: () => e.form.validate(),
1071
+ onUpdateModel: (S) => {
1072
+ u("update_model", S);
1073
+ },
1074
+ onUpdateName2: (S) => {
1075
+ u("update_model", S);
1076
+ }
1077
+ };
1078
+ }
1079
+ });
1080
+ function ba(e, u, B, V, D, S) {
1081
+ const f = k("field-render-2"), $ = k("a-col"), h = k("a-row"), U = k("a-card"), p = k("a-form");
1082
+ return i(), C(p, {
1083
+ ref: "form",
1084
+ autocomplete: "off",
1085
+ model: e.model,
1086
+ rules: e.form.rules,
1087
+ layout: e.form.settings.layout,
1088
+ scrollToFirstError: "",
1089
+ class: "cards",
1090
+ validateTrigger: !1
1091
+ }, {
1092
+ default: c(() => [
1093
+ (i(!0), E(A, null, K(e.form.dynamicFieldList, (r, v) => (i(), C(U, {
1094
+ key: v,
1095
+ "body-style": { padding: "10px 10px 0" },
1096
+ style: { "margin-bottom": "5px" }
1097
+ }, Ve({
1098
+ default: c(() => [
1099
+ O(h, {
1100
+ gutter: 5,
1101
+ type: "flex"
1102
+ }, {
1103
+ default: c(() => [
1104
+ (i(!0), E(A, null, K(r == null ? void 0 : r.children, (g, M) => (i(), C($, {
1105
+ key: M,
1106
+ span: g.is_show_field ? g.span !== void 0 ? g.span : 24 : 0,
1107
+ offset: g.offset,
1108
+ push: g.push,
1109
+ pull: g.pull
1110
+ }, {
1111
+ default: c(() => [
1112
+ (i(), C(f, {
1113
+ value: e.model[g.name],
1114
+ "onUpdate:value": (R) => e.model[g.name] = R,
1115
+ is_show_field: g.is_show_field,
1116
+ "onUpdate:is_show_field": (R) => g.is_show_field = R,
1117
+ field: g,
1118
+ formModel: e.model,
1119
+ outModel: e.outModel,
1120
+ key: g.name,
1121
+ validateInfos: e.validateInfos,
1122
+ options: e.options[g.datasource ? g.datasource : g.name],
1123
+ onUpdate_model: e.onUpdateModel,
1124
+ onUpdate_name2: e.onUpdateName2
1125
+ }, null, 8, ["value", "onUpdate:value", "is_show_field", "onUpdate:is_show_field", "field", "formModel", "outModel", "validateInfos", "options", "onUpdate_model", "onUpdate_name2"]))
1126
+ ]),
1127
+ _: 2
1128
+ }, 1032, ["span", "offset", "push", "pull"]))), 128))
1129
+ ]),
1130
+ _: 2
1131
+ }, 1024)
1132
+ ]),
1133
+ _: 2
1134
+ }, [
1135
+ r.group_name && r.group_name !== "默认参数组" ? {
1136
+ name: "title",
1137
+ fn: c(() => [
1138
+ J(G(r.group_name), 1)
1139
+ ]),
1140
+ key: "0"
1141
+ } : void 0
1142
+ ]), 1024))), 128))
1143
+ ]),
1144
+ _: 1
1145
+ }, 8, ["model", "rules", "layout"]);
1146
+ }
1147
+ const vl = /* @__PURE__ */ x(ya, [["render", ba], ["__scopeId", "data-v-1f94c291"]]), wa = Z({
1148
+ name: "FormRender",
1149
+ components: {},
1150
+ props: {
1151
+ model: {
1152
+ type: Object,
1153
+ required: !0
1154
+ },
1155
+ form: {
1156
+ type: Object,
1157
+ required: !0
1158
+ },
1159
+ options: {
1160
+ type: Object,
1161
+ required: !0
1162
+ },
1163
+ validateInfos: {
1164
+ type: Object,
1165
+ default: () => {
1166
+ }
1167
+ }
1168
+ },
1169
+ setup(e) {
1170
+ if (e.form.watch)
1171
+ for (const u in e.form.watch)
1172
+ Y(
1173
+ () => e.model[u],
1174
+ () => {
1175
+ e.form.watch[u](e.model, e.form);
1176
+ }
1177
+ );
1178
+ },
1179
+ data() {
1180
+ return {
1181
+ fieldList: []
1182
+ };
1183
+ },
1184
+ methods: {
1185
+ validate() {
1186
+ return this.$refs.form.validate();
1187
+ },
1188
+ reset() {
1189
+ this.$refs.form.resetFields();
1190
+ },
1191
+ disable(e) {
1192
+ this.form.fields[e].disabled = !0;
1193
+ },
1194
+ disableAll() {
1195
+ this.form.fields.forEach((e) => {
1196
+ e.disabled = !0;
1197
+ });
1198
+ }
1199
+ },
1200
+ created() {
1201
+ let e = 0;
1202
+ this.form.settings.col && this.form.settings.col.length > 0 && this.form.settings.col.forEach((u, B) => {
1203
+ e = e + u, B === 0 ? this.fieldList.push([0, e]) : this.fieldList.push([e - u, e]);
1204
+ });
1205
+ }
1206
+ });
1207
+ function ka(e, u, B, V, D, S) {
1208
+ const f = k("field-render"), $ = k("a-col"), h = k("a-row"), U = k("a-form");
1209
+ return i(), C(U, {
1210
+ ref: "form",
1211
+ autocomplete: "off",
1212
+ model: e.model,
1213
+ rules: e.form.rules,
1214
+ layout: e.form.settings.layout,
1215
+ validateTrigger: !1,
1216
+ "label-col": e.form.settings.layout == "vertical" ? void 0 : e.form.settings.labelCol ? e.form.settings.labelCol : e.form.settings.col && e.form.settings.col.length > 0 ? { span: 6 } : { span: 4 },
1217
+ "wrapper-col": e.form.settings.layout == "vertical" ? void 0 : e.form.settings.wrapperCol ? e.form.settings.wrapperCol : e.form.settings.col && e.form.settings.col.length > 0 ? { span: 18 } : { span: 20 },
1218
+ labelAlign: e.form.settings.labelAlign,
1219
+ scrollToFirstError: ""
1220
+ }, {
1221
+ default: c(() => [
1222
+ O(h, {
1223
+ gutter: 20,
1224
+ style: { margin: "0" }
1225
+ }, {
1226
+ default: c(() => [
1227
+ e.form.settings.col && e.form.settings.col.length > 0 ? (i(!0), E(A, { key: 0 }, K(e.fieldList, (p) => (i(), C($, {
1228
+ xl: 24 / e.fieldList.length,
1229
+ lg: 24,
1230
+ md: 24,
1231
+ sm: 24,
1232
+ xs: 24
1233
+ }, {
1234
+ default: c(() => [
1235
+ (i(!0), E(A, null, K(e.form.fields.slice(p[0], p[1]), (r) => (i(), C(f, {
1236
+ value: e.model[r.name],
1237
+ "onUpdate:value": (v) => e.model[r.name] = v,
1238
+ field: r,
1239
+ formModel: e.model,
1240
+ key: r.name,
1241
+ validateInfos: e.validateInfos,
1242
+ options: e.options[r.datasource ? r.datasource : r.name]
1243
+ }, null, 8, ["value", "onUpdate:value", "field", "formModel", "validateInfos", "options"]))), 128))
1244
+ ]),
1245
+ _: 2
1246
+ }, 1032, ["xl"]))), 256)) : N("", !0),
1247
+ !e.form.settings.col || e.form.settings.col.length === 0 ? (i(), C($, {
1248
+ key: 1,
1249
+ xl: 24,
1250
+ lg: 24,
1251
+ md: 24,
1252
+ sm: 24,
1253
+ xs: 24
1254
+ }, {
1255
+ default: c(() => [
1256
+ (i(!0), E(A, null, K(e.form.fields, (p) => (i(), E(A, null, [
1257
+ p.name2 ? (i(), C(f, {
1258
+ value: e.model[p.name],
1259
+ "onUpdate:value": (r) => e.model[p.name] = r,
1260
+ label: e.model[p.name2],
1261
+ "onUpdate:label": (r) => e.model[p.name2] = r,
1262
+ field: p,
1263
+ formModel: e.model,
1264
+ key: p.name,
1265
+ validateInfos: e.validateInfos,
1266
+ options: e.options[p.datasource ? p.datasource : p.name]
1267
+ }, null, 8, ["value", "onUpdate:value", "label", "onUpdate:label", "field", "formModel", "validateInfos", "options"])) : (i(), C(f, {
1268
+ value: e.model[p.name],
1269
+ "onUpdate:value": (r) => e.model[p.name] = r,
1270
+ field: p,
1271
+ formModel: e.model,
1272
+ key: p.name,
1273
+ validateInfos: e.validateInfos,
1274
+ options: e.options[p.datasource ? p.datasource : p.name]
1275
+ }, null, 8, ["value", "onUpdate:value", "field", "formModel", "validateInfos", "options"]))
1276
+ ], 64))), 256))
1277
+ ]),
1278
+ _: 1
1279
+ })) : N("", !0)
1280
+ ]),
1281
+ _: 1
1282
+ })
1283
+ ]),
1284
+ _: 1
1285
+ }, 8, ["model", "rules", "layout", "label-col", "wrapper-col", "labelAlign"]);
1286
+ }
1287
+ const gl = /* @__PURE__ */ x(wa, [["render", ka]]), Ca = Z({
1288
+ name: "FormRender2",
1289
+ components: {},
1290
+ props: {
1291
+ model: {
1292
+ type: Object,
1293
+ required: !0
1294
+ },
1295
+ form: {
1296
+ type: Object,
1297
+ required: !0
1298
+ },
1299
+ options: {
1300
+ type: Object,
1301
+ required: !0
1302
+ },
1303
+ validateInfos: {
1304
+ type: Object,
1305
+ default: () => {
1306
+ }
1307
+ }
1308
+ },
1309
+ setup(e) {
1310
+ if (e.form.watch)
1311
+ for (const u in e.form.watch)
1312
+ Y(
1313
+ () => e.model[u],
1314
+ () => {
1315
+ e.form.watch[u](e.model, e.form);
1316
+ }
1317
+ );
1318
+ },
1319
+ data() {
1320
+ return {};
1321
+ },
1322
+ methods: {
1323
+ validate() {
1324
+ return this.$refs.form.validate();
1325
+ },
1326
+ reset() {
1327
+ this.$refs.form.resetFields();
1328
+ },
1329
+ disable(e) {
1330
+ this.form.fields[e].disabled = !0;
1331
+ },
1332
+ disableAll() {
1333
+ this.form.fields.forEach((e) => {
1334
+ e.disabled = !0;
1335
+ });
1336
+ }
1337
+ },
1338
+ created() {
1339
+ }
1340
+ });
1341
+ function Oa(e, u, B, V, D, S) {
1342
+ const f = k("field-render"), $ = k("a-col"), h = k("a-row"), U = k("a-form");
1343
+ return i(), C(U, {
1344
+ ref: "form",
1345
+ autocomplete: "off",
1346
+ model: e.model,
1347
+ rules: e.form.rules,
1348
+ scrollToFirstError: ""
1349
+ }, {
1350
+ default: c(() => [
1351
+ (i(!0), E(A, null, K(e.form.fieldList, (p) => (i(), C(h, {
1352
+ gutter: "5",
1353
+ type: "flex"
1354
+ }, {
1355
+ default: c(() => [
1356
+ (i(!0), E(A, null, K(p, (r) => (i(), C($, {
1357
+ span: r.span
1358
+ }, {
1359
+ default: c(() => [
1360
+ (i(!0), E(A, null, K(e.form.fields, (v) => (i(), E(A, null, [
1361
+ v.name2 ? (i(), C(f, {
1362
+ value: e.model[v.name],
1363
+ "onUpdate:value": (g) => e.model[v.name] = g,
1364
+ label: e.model[v.name2],
1365
+ "onUpdate:label": (g) => e.model[v.name2] = g,
1366
+ field: v,
1367
+ formModel: e.model,
1368
+ key: v.name,
1369
+ validateInfos: e.validateInfos,
1370
+ options: e.options[v.datasource ? v.datasource : v.name]
1371
+ }, null, 8, ["value", "onUpdate:value", "label", "onUpdate:label", "field", "formModel", "validateInfos", "options"])) : (i(), C(f, {
1372
+ value: e.model[v.name],
1373
+ "onUpdate:value": (g) => e.model[v.name] = g,
1374
+ field: v,
1375
+ formModel: e.model,
1376
+ key: v.name,
1377
+ validateInfos: e.validateInfos,
1378
+ options: e.options[v.datasource ? v.datasource : v.name]
1379
+ }, null, 8, ["value", "onUpdate:value", "field", "formModel", "validateInfos", "options"]))
1380
+ ], 64))), 256))
1381
+ ]),
1382
+ _: 2
1383
+ }, 1032, ["span"]))), 256))
1384
+ ]),
1385
+ _: 2
1386
+ }, 1024))), 256))
1387
+ ]),
1388
+ _: 1
1389
+ }, 8, ["model", "rules"]);
1390
+ }
1391
+ const yl = /* @__PURE__ */ x(Ca, [["render", Oa]]);
1392
+ async function Sa(e) {
1393
+ return ee().post("/view/create_view_settings", e);
1394
+ }
1395
+ async function Se(e) {
1396
+ return ee().post("/view/update_view_settings", e);
1397
+ }
1398
+ async function fe(e) {
1399
+ return ee().post("/view/refresh_view_settings_cache", e);
1400
+ }
1401
+ async function Ee(e) {
1402
+ return ee().post("/view/set_view_settings_default", e);
1403
+ }
1404
+ async function Ea(e) {
1405
+ return ee().post("/view/delete_view_settings", e);
1406
+ }
1407
+ async function $a(e) {
1408
+ return ee().post("/view/change_view_settings_sort", e);
1409
+ }
1410
+ async function Ma(e) {
1411
+ return ee().post("/view/query_view_settings_list", e);
1412
+ }
1413
+ const $e = "customviewdatauser", Fa = "view_system_edit", Ua = [
1414
+ {
1415
+ title: "",
1416
+ dataIndex: "name",
1417
+ key: "name"
1418
+ }
1419
+ ], ja = Z({
1420
+ name: "ViewManage",
1421
+ components: {
1422
+ CaretRightOutlined: Le,
1423
+ PlusOutlined: Je,
1424
+ SettingOutlined: ze
1425
+ },
1426
+ props: {
1427
+ currentViewObj: {
1428
+ type: Object,
1429
+ required: !0
1430
+ },
1431
+ menu_flag: {
1432
+ type: String,
1433
+ required: !0
1434
+ },
1435
+ menu_name: {
1436
+ type: String,
1437
+ required: !0
1438
+ },
1439
+ countData: {
1440
+ type: String,
1441
+ required: !0
1442
+ },
1443
+ create_num: {
1444
+ type: Number,
1445
+ required: !0
1446
+ },
1447
+ current_num: {
1448
+ type: Number,
1449
+ required: !0
1450
+ },
1451
+ count_num: {
1452
+ type: Number,
1453
+ required: !0
1454
+ },
1455
+ height: {
1456
+ type: Number,
1457
+ required: !0
1458
+ },
1459
+ modalType: {
1460
+ type: String
1461
+ },
1462
+ app_flag: {
1463
+ type: String
1464
+ }
1465
+ },
1466
+ emits: ["change"],
1467
+ setup(e, { emit: u }) {
1468
+ const B = Pe(), V = We(), D = He(), S = D.currentOrg, f = D.userid, $ = H(D.CHECK_AUTH(Fa)), h = H([]), { t: U } = Ue();
1469
+ let p, r;
1470
+ const v = ce(() => {
1471
+ const n = h.value.filter((a) => !!a.user_id && a.is_system).map((a) => a).sort((a, l) => a.sort == l.sort ? a.id - l.id : a.sort - l.sort), d = h.value.filter((a) => !!a.user_id && !a.is_system).map((a) => a).sort((a, l) => a.sort == l.sort ? a.id - l.id : a.sort - l.sort);
1472
+ return n.concat(d);
1473
+ }), g = ce(() => {
1474
+ const n = h.value.filter((a) => !a.user_id && a.is_system).map((a) => a).sort((a, l) => a.sort == l.sort ? a.id - l.id : a.sort - l.sort), d = h.value.filter((a) => !a.user_id && !a.is_system).map((a) => a).sort((a, l) => a.sort == l.sort ? a.id - l.id : a.sort - l.sort);
1475
+ return n.concat(d);
1476
+ }), M = ce(() => h.value.map((n) => n.name)), R = async ({
1477
+ id: n,
1478
+ search_model: d,
1479
+ filter_map: a,
1480
+ sort_fields: l,
1481
+ group_condition: s,
1482
+ conditions: y,
1483
+ isShowGeneralFilter: m
1484
+ }) => new Promise((t) => {
1485
+ !e.countData && !(p != null && p.countData) && (console.error("无count接口"), t(null));
1486
+ const _ = {
1487
+ org_id: S.id,
1488
+ ...d,
1489
+ ...a,
1490
+ sort_fields: l
1491
+ };
1492
+ m && (_.group_condition = s, _.conditions = y), _.required_condition = he(), Ye(_, p != null && p.countData ? p.countData : e.countData).then((q) => {
1493
+ h.value.forEach((T) => {
1494
+ T.id == n && (T.num = q);
1495
+ }), t(null);
1496
+ }).catch((q) => {
1497
+ console.log("error", q), L.error("获取数据失败, 请刷新页面");
1498
+ });
1499
+ }), Q = async (n) => {
1500
+ for (const d of n)
1501
+ try {
1502
+ await R(d);
1503
+ } catch (a) {
1504
+ console.log("error", a), L.error("获取数据失败, 请刷新页面");
1505
+ }
1506
+ }, j = () => {
1507
+ Qe({
1508
+ org_id: S.id,
1509
+ user_id: f,
1510
+ app_flag: e.app_flag,
1511
+ modalType: e.modalType,
1512
+ sort_fields: ["sort", "create_time"],
1513
+ is_cache: !1
1514
+ }).then((n) => {
1515
+ if (p = ge(
1516
+ e.app_flag,
1517
+ e.modalType,
1518
+ n.defaultAndServerConfig,
1519
+ U
1520
+ ), r = n.defaultAndServerConfig, (p == null ? void 0 : p.isView) === !1) {
1521
+ window.location.hash = "", u("change", r, {}, !0, !0);
1522
+ return;
1523
+ }
1524
+ V.set_required_condition(
1525
+ e.modalType,
1526
+ p.required_condition
1527
+ ), h.value.length = 0;
1528
+ let d = [];
1529
+ const a = [];
1530
+ n && n.system_user_datas && n.system_user_datas.length > 0 && (d = d.concat(n.system_user_datas)), n && n.system_public_datas && n.system_public_datas.length > 0 && (d = d.concat(n.system_public_datas)), n && n.public_datas && n.public_datas.length > 0 && (d = d.concat(n.public_datas)), n && n.user_datas && n.user_datas.length > 0 && (d = d.concat(n.user_datas)), d.forEach((l) => {
1531
+ let s = null, y = null, m = null, t = null;
1532
+ l.data.isShowGeneralFilter ? (s = {}, y = {}, m = l.data.group_condition, t = l.data.conditions) : (s = l.data.search_model, y = l.data.filter_map, m = {}, t = []), h.value.push({
1533
+ ...l,
1534
+ search_model: s,
1535
+ filter_map: y,
1536
+ sort_fields: l.data.sort_fields,
1537
+ group_condition: m,
1538
+ conditions: t
1539
+ }), a.push({
1540
+ id: l.id,
1541
+ isShowGeneralFilter: l.data.isShowGeneralFilter,
1542
+ search_model: s,
1543
+ filter_map: y,
1544
+ sort_fields: l.data.sort_fields,
1545
+ group_condition: m,
1546
+ conditions: t
1547
+ });
1548
+ }), a.length > 0 && Q(a), F(null);
1549
+ }).catch((n) => {
1550
+ console.log("err", n), L.error("获取视图失败, 请刷新页面");
1551
+ });
1552
+ }, F = (n) => {
1553
+ var a;
1554
+ let d = null;
1555
+ if (n ? d = n : window.location.hash && (d = window.location.hash.substring(1)), d) {
1556
+ const l = h.value.filter((s) => s.uid == d);
1557
+ l && l.length > 0 ? u("change", r, { ...l[0], ...l[0].data }, !0, !0) : Ma({
1558
+ org_id: S.id,
1559
+ is_active: !0,
1560
+ view_menu__name: e.menu_flag,
1561
+ uid: d
1562
+ }).then((s) => {
1563
+ if (s && s.data && s.data.length > 0)
1564
+ u(
1565
+ "change",
1566
+ r,
1567
+ {
1568
+ ...s.data[0],
1569
+ ...s.data[0].data
1570
+ },
1571
+ !0,
1572
+ !1
1573
+ );
1574
+ else {
1575
+ const y = h.value.filter((t) => !t.user_id && t.is_default);
1576
+ if (y && y.length > 0) {
1577
+ window.location.hash = y[0].uid, u("change", r, { ...y[0], ...y[0].data }, !0, !0);
1578
+ return;
1579
+ }
1580
+ let m = h.value.sort((t, _) => t.sort == _.sort ? t.id - _.id : t.sort - _.sort).find((t) => !t.user_id);
1581
+ if (m && m.uid)
1582
+ window.location.hash = m.uid, u("change", r, { ...m, ...m.data }, !0, !0);
1583
+ else if (m = h.value.sort((t, _) => t.sort == _.sort ? t.id - _.id : t.sort - _.sort).find((t) => t.user_id), m && m.uid)
1584
+ window.location.hash = m.uid, u("change", r, { ...m, ...m.data }, !0, !0);
1585
+ else {
1586
+ const t = {
1587
+ uid: null,
1588
+ view_menu__flag: e.menu_flag,
1589
+ column: {},
1590
+ search_model: {},
1591
+ filter_map: {},
1592
+ sort_fields: [],
1593
+ filtered_value: {},
1594
+ sort_orders: []
1595
+ };
1596
+ u("change", r, t, !0, !1), window.location.hash = "";
1597
+ }
1598
+ }
1599
+ });
1600
+ } else {
1601
+ let l = "";
1602
+ if (Oe().get($e) && (l = (a = Oe().get($e)) == null ? void 0 : a[e.menu_flag]), l)
1603
+ window.location.hash = l, F(l);
1604
+ else {
1605
+ const s = h.value.filter(
1606
+ (t) => !t.user_id && t.is_default && !t.is_system
1607
+ );
1608
+ if (s && s.length > 0) {
1609
+ window.location.hash = s[0].uid, u("change", r, { ...s[0], ...s[0].data }, !0, !0);
1610
+ return;
1611
+ }
1612
+ const y = h.value.filter(
1613
+ (t) => !t.user_id && t.is_default && t.is_system
1614
+ );
1615
+ if (y && y.length > 0) {
1616
+ window.location.hash = y[0].uid, u(
1617
+ "change",
1618
+ r,
1619
+ { ...y[0], ...y[0].data },
1620
+ !0,
1621
+ !0
1622
+ );
1623
+ return;
1624
+ }
1625
+ let m = h.value.sort((t, _) => t.sort == _.sort ? t.id - _.id : t.sort - _.sort).find((t) => !t.user_id);
1626
+ if (m && m.uid)
1627
+ window.location.hash = m.uid, u("change", r, { ...m, ...m.data }, !0, !0);
1628
+ else if (m = h.value.sort((t, _) => t.sort == _.sort ? t.id - _.id : t.sort - _.sort).find((t) => t.user_id), m && m.uid)
1629
+ window.location.hash = m.uid, u("change", r, { ...m, ...m.data }, !0, !0);
1630
+ else {
1631
+ window.location.hash = "";
1632
+ const t = {
1633
+ uid: null,
1634
+ view_menu__flag: e.menu_flag,
1635
+ column: {},
1636
+ search_model: {},
1637
+ filter_map: {},
1638
+ sort_fields: [],
1639
+ filtered_value: {},
1640
+ sort_orders: []
1641
+ };
1642
+ u("change", r, t, !0, !1);
1643
+ }
1644
+ }
1645
+ }
1646
+ };
1647
+ j();
1648
+ const z = H(["1", "2"]), te = "background: #ffffff;border-radius: 4px;margin-bottom: 2px;border: 0;overflow: hidden;", ne = (n) => e.currentViewObj && n && n.id === e.currentViewObj.id ? { style: { backgroundColor: "#ddf1ff" } } : { style: {} }, W = (n) => {
1649
+ window.location.hash = n.uid, F(n.uid), oe([n]);
1650
+ }, b = ({ updateView: n, record: d }) => {
1651
+ var a, l, s, y;
1652
+ if (d.name != n.name && M.value.includes(n.name)) {
1653
+ L.error("视图名称已存在");
1654
+ return;
1655
+ }
1656
+ if (d != null && d.id) {
1657
+ const m = h.value.filter((t) => (d == null ? void 0 : d.id) == t.id);
1658
+ if ((a = n.is_submit) != null && a[0]) {
1659
+ const t = {
1660
+ ...m[0].data,
1661
+ search_model: { ...e.currentViewObj.search_model, current: 1 },
1662
+ filter_map: e.currentViewObj.filter_map,
1663
+ sort_fields: e.currentViewObj.sort_fields,
1664
+ filtered_value: e.currentViewObj.filtered_value,
1665
+ sort_orders: e.currentViewObj.sort_orders,
1666
+ column: e.currentViewObj.column,
1667
+ isShowGeneralFilter: e.currentViewObj.isShowGeneralFilter,
1668
+ conditions: e.currentViewObj.conditions,
1669
+ group_condition: e.currentViewObj.group_condition,
1670
+ group_record: e.currentViewObj.group_record,
1671
+ default_search_condition_config_list: e.currentViewObj.default_search_condition_config_list
1672
+ };
1673
+ delete t.is_system, Se({
1674
+ org_id: S.id,
1675
+ view_settings_id: d == null ? void 0 : d.id,
1676
+ is_system: (l = n.is_system) == null ? void 0 : l[0],
1677
+ name: n.name,
1678
+ data: JSON.stringify(t)
1679
+ }).then((_) => {
1680
+ var q;
1681
+ (q = n.is_default) != null && q[0] ? Ee({
1682
+ org_id: S.id,
1683
+ view_settings_id: d == null ? void 0 : d.id
1684
+ }).then(() => {
1685
+ fe({
1686
+ org_id: S.id,
1687
+ view_settings_id: d == null ? void 0 : d.id
1688
+ }).then(() => {
1689
+ var T;
1690
+ L.success("保存成功"), _.id == ((T = e.currentViewObj) == null ? void 0 : T.id) ? u("change", r, { ..._, ..._.data }, !1, !0) : h.value.forEach((X) => {
1691
+ X.id == _.id && Object.assign(X, { ..._, ..._.data });
1692
+ }), j();
1693
+ });
1694
+ }) : fe({
1695
+ org_id: S.id,
1696
+ view_settings_id: d == null ? void 0 : d.id
1697
+ }).then(() => {
1698
+ var T;
1699
+ L.success("保存成功"), _.id == ((T = e.currentViewObj) == null ? void 0 : T.id) ? u("change", r, { ..._, ..._.data }, !1, !0) : h.value.forEach((X) => {
1700
+ X.id == _.id && Object.assign(X, { ..._, ..._.data });
1701
+ }), j();
1702
+ });
1703
+ });
1704
+ } else
1705
+ Se({
1706
+ org_id: S.id,
1707
+ view_settings_id: d == null ? void 0 : d.id,
1708
+ is_system: (s = n.is_system) == null ? void 0 : s[0],
1709
+ name: n.name
1710
+ }).then((t) => {
1711
+ var _;
1712
+ (_ = n.is_default) != null && _[0] ? Ee({
1713
+ org_id: S.id,
1714
+ view_settings_id: d == null ? void 0 : d.id
1715
+ }).then(() => {
1716
+ fe({
1717
+ org_id: S.id,
1718
+ view_settings_id: d == null ? void 0 : d.id
1719
+ }).then(() => {
1720
+ var q;
1721
+ L.success("保存成功"), t.id == ((q = e.currentViewObj) == null ? void 0 : q.id) ? u("change", r, { ...t, ...t.data }, !1, !0) : h.value.forEach((T) => {
1722
+ T.id == t.id && Object.assign(T, { ...t, ...t.data });
1723
+ }), j();
1724
+ });
1725
+ }) : fe({
1726
+ org_id: S.id,
1727
+ view_settings_id: d == null ? void 0 : d.id
1728
+ }).then(() => {
1729
+ var q;
1730
+ L.success("保存成功"), t.id == ((q = e.currentViewObj) == null ? void 0 : q.id) ? u("change", r, { ...t, ...t.data }, !1, !0) : h.value.forEach((T) => {
1731
+ T.id == t.id && Object.assign(T, { ...t, ...t.data });
1732
+ }), j();
1733
+ });
1734
+ });
1735
+ } else {
1736
+ let m = {};
1737
+ (y = n.is_submit) != null && y[0] ? (m = {
1738
+ search_model: { ...e.currentViewObj.search_model, current: 1 },
1739
+ filter_map: e.currentViewObj.filter_map,
1740
+ sort_fields: e.currentViewObj.sort_fields,
1741
+ filtered_value: e.currentViewObj.filtered_value,
1742
+ sort_orders: e.currentViewObj.sort_orders,
1743
+ column: e.currentViewObj.column,
1744
+ isShowGeneralFilter: e.currentViewObj.isShowGeneralFilter,
1745
+ conditions: e.currentViewObj.conditions,
1746
+ group_condition: e.currentViewObj.group_condition,
1747
+ group_record: e.currentViewObj.group_record,
1748
+ default_search_condition_config_list: e.currentViewObj.default_search_condition_config_list
1749
+ }, delete m.is_system) : m = {
1750
+ column: {},
1751
+ search_model: {},
1752
+ filter_map: {},
1753
+ sort_fields: [],
1754
+ filtered_value: {},
1755
+ sort_orders: [],
1756
+ isShowGeneralFilter: null,
1757
+ conditions: [],
1758
+ group_condition: {},
1759
+ group_record: {}
1760
+ }, Sa({
1761
+ org_id: S.id,
1762
+ user_id: n.view_type == "personal" ? f : null,
1763
+ name: n.name,
1764
+ view_project__flag: B.VITE_APP_VIEW_PROJECT_FLAG,
1765
+ view_menu__flag: e.menu_flag,
1766
+ view_menu__name: e.menu_name,
1767
+ is_system: !1,
1768
+ data: JSON.stringify(m)
1769
+ }).then((t) => {
1770
+ u("change", r, { ...t, ...t.data }, !0, !0), t.id && (h.value = h.value.concat([
1771
+ {
1772
+ ...t
1773
+ }
1774
+ ]), Q([
1775
+ {
1776
+ id: t.id,
1777
+ search_model: m.search_model,
1778
+ filter_map: m.filter_map,
1779
+ sort_fields: m.sort_fields,
1780
+ group_condition: m.group_condition,
1781
+ conditions: m.conditions,
1782
+ isShowGeneralFilter: m.isShowGeneralFilter
1783
+ }
1784
+ ]), window.location.hash = t.uid, F(t.uid));
1785
+ });
1786
+ }
1787
+ }, o = (n, d) => {
1788
+ let a = [!1];
1789
+ e.currentViewObj.id == n.id && (a = [!0]);
1790
+ const l = P({
1791
+ open: !0,
1792
+ loading: !1,
1793
+ title: "编辑视图",
1794
+ form: {
1795
+ settings: {
1796
+ labelAlign: "right",
1797
+ layout: "vertical",
1798
+ col: []
1799
+ },
1800
+ fields: [
1801
+ {
1802
+ type: "input",
1803
+ name: "name",
1804
+ label: "视图名称",
1805
+ disabled: !1,
1806
+ allowClear: !0,
1807
+ inputType: "text",
1808
+ defaultValue: "",
1809
+ placeholder: "请输入视图名称"
1810
+ },
1811
+ {
1812
+ type: "checkbox",
1813
+ name: "is_submit",
1814
+ label: "",
1815
+ disabled: !1,
1816
+ allowClear: !0,
1817
+ labelKey: "name",
1818
+ valueKey: "value",
1819
+ defaultValue: [!1],
1820
+ placeholder: ""
1821
+ }
1822
+ ],
1823
+ rules: P({
1824
+ name: [
1825
+ {
1826
+ required: !0,
1827
+ message: "请输入视图名称"
1828
+ }
1829
+ ]
1830
+ }),
1831
+ model: P({
1832
+ name: n.name,
1833
+ is_submit: a,
1834
+ is_default: [n != null && n.is_default ? n == null ? void 0 : n.is_default : !1],
1835
+ is_system: [n != null && n.is_system ? n == null ? void 0 : n.is_system : !1]
1836
+ })
1837
+ },
1838
+ options: {
1839
+ is_submit: [
1840
+ {
1841
+ name: "将当前过滤条件、排序、显示属性、视图和分组等设置更新到该视图中",
1842
+ value: !0
1843
+ }
1844
+ ],
1845
+ is_default: [
1846
+ {
1847
+ name: "设为默认视图",
1848
+ value: !0
1849
+ }
1850
+ ],
1851
+ is_system: [
1852
+ {
1853
+ name: "设为系统视图",
1854
+ value: !0
1855
+ }
1856
+ ]
1857
+ },
1858
+ ok: (s) => new Promise(function(y) {
1859
+ b({ updateView: s, record: n }), y(null);
1860
+ })
1861
+ });
1862
+ d == "public" && (l.form.fields.push({
1863
+ type: "checkbox",
1864
+ name: "is_default",
1865
+ label: "",
1866
+ disabled: !1,
1867
+ allowClear: !0,
1868
+ labelKey: "name",
1869
+ valueKey: "value",
1870
+ defaultValue: [!1],
1871
+ placeholder: ""
1872
+ }), $.value && l.form.fields.push({
1873
+ type: "checkbox",
1874
+ name: "is_system",
1875
+ label: "",
1876
+ disabled: !1,
1877
+ allowClear: !0,
1878
+ labelKey: "name",
1879
+ valueKey: "value",
1880
+ defaultValue: [!1],
1881
+ placeholder: ""
1882
+ })), _e(l);
1883
+ }, ae = (n) => {
1884
+ const d = P({
1885
+ open: !0,
1886
+ loading: !1,
1887
+ title: "新建视图",
1888
+ form: {
1889
+ settings: {
1890
+ labelAlign: "right",
1891
+ layout: "vertical",
1892
+ col: []
1893
+ },
1894
+ fields: [
1895
+ {
1896
+ type: "input",
1897
+ name: "name",
1898
+ label: "视图名称",
1899
+ disabled: !1,
1900
+ allowClear: !0,
1901
+ inputType: "text",
1902
+ defaultValue: "",
1903
+ placeholder: "请输入视图名称"
1904
+ },
1905
+ {
1906
+ type: "radio",
1907
+ name: "view_type",
1908
+ label: "视图可见范围",
1909
+ disabled: !1,
1910
+ allowClear: !0,
1911
+ labelKey: "name",
1912
+ valueKey: "value",
1913
+ defaultValue: "",
1914
+ placeholder: ""
1915
+ },
1916
+ {
1917
+ type: "checkbox",
1918
+ name: "is_submit",
1919
+ label: "",
1920
+ disabled: !1,
1921
+ allowClear: !0,
1922
+ labelKey: "name",
1923
+ valueKey: "value",
1924
+ defaultValue: [!1],
1925
+ placeholder: ""
1926
+ }
1927
+ ],
1928
+ rules: P({
1929
+ name: [
1930
+ {
1931
+ required: !0,
1932
+ message: "请输入视图名称"
1933
+ }
1934
+ ]
1935
+ }),
1936
+ model: P({
1937
+ name: null,
1938
+ view_type: n,
1939
+ is_submit: [!0]
1940
+ })
1941
+ },
1942
+ options: {
1943
+ view_type: [
1944
+ { name: "个人视图(仅自己可见)", value: "personal" },
1945
+ { name: "公共视图(项目成员均可见)", value: "public" }
1946
+ ],
1947
+ is_submit: [
1948
+ {
1949
+ name: "将当前过滤条件、排序、显示属性、视图和分组等设置更新到该视图中",
1950
+ value: !0
1951
+ }
1952
+ ]
1953
+ },
1954
+ ok: (a) => new Promise(function(l) {
1955
+ if (M.value.includes(a.name)) {
1956
+ L.error("视图名称已存在");
1957
+ return;
1958
+ }
1959
+ b({ updateView: a, record: a }), l(null);
1960
+ })
1961
+ });
1962
+ _e(d);
1963
+ }, w = (n) => {
1964
+ const d = P({
1965
+ open: !0,
1966
+ component: "ViewEditModal",
1967
+ compObj: {
1968
+ title: n == "personal" ? "个人视图管理" : "公共视图管理",
1969
+ data: n == "personal" ? v.value : g.value
1970
+ },
1971
+ ok: (a) => {
1972
+ a && a.length > 0 ? $a({
1973
+ org_id: S.id,
1974
+ view_settings_ids: a
1975
+ }).then(() => {
1976
+ L.success("保存成功"), j();
1977
+ }) : (L.success("保存成功"), j());
1978
+ },
1979
+ cancel: (a) => {
1980
+ a && j();
1981
+ }
1982
+ });
1983
+ _e(d);
1984
+ }, me = (n) => {
1985
+ let d = "";
1986
+ const a = window.location.href.indexOf("#");
1987
+ a !== -1 ? d = window.location.href.substring(0, a) + "#" + n.uid : d = window.location.href + "#" + n.uid, Ke({ val: d, message: "复制成功" });
1988
+ }, pe = (n) => {
1989
+ be.confirm({
1990
+ title: () => "确认删除此【" + n.name + "】" + (n != null && n.user_id ? "个人视图" : "公共视图") + "?",
1991
+ content: "视图删除后不可恢复,视图下工作项不受影响,是否确认删除?",
1992
+ icon: () => O(we),
1993
+ okText: "确定",
1994
+ onOk() {
1995
+ return new Promise((d) => {
1996
+ Ea({
1997
+ org_id: S.id,
1998
+ view_settings_id: n == null ? void 0 : n.id
1999
+ }).then(() => {
2000
+ h.value = h.value.filter((a) => a.id != n.id), F(null), L.success("删除成功");
2001
+ }).finally(() => {
2002
+ d(null);
2003
+ });
2004
+ }).catch(() => console.log("Oops errors!"));
2005
+ },
2006
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
2007
+ onCancel() {
2008
+ }
2009
+ });
2010
+ }, he = () => {
2011
+ const d = ge(e.app_flag, e.modalType, null, !0).required_condition, a = {};
2012
+ return d && d.forEach((l) => {
2013
+ const s = V.value_map[l.key];
2014
+ s != null && (a[l.field_name] = s);
2015
+ }), a;
2016
+ }, oe = (n) => {
2017
+ const d = [];
2018
+ n.forEach((a) => {
2019
+ let l = null, s = null, y = null, m = null;
2020
+ a.data.isShowGeneralFilter ? (l = {}, s = {}, y = a.data.group_condition, m = a.data.conditions) : (l = a.data.search_model, s = a.data.filter_map, y = {}, m = []), d.push({
2021
+ id: a.id,
2022
+ search_model: l,
2023
+ filter_map: s,
2024
+ sort_fields: a.data.sort_fields,
2025
+ group_condition: y,
2026
+ conditions: m,
2027
+ isShowGeneralFilter: a.data.isShowGeneralFilter
2028
+ });
2029
+ }), Q(d);
2030
+ };
2031
+ Y(
2032
+ () => e.current_num,
2033
+ // 监听保存当前视图
2034
+ () => {
2035
+ be.confirm({
2036
+ title: () => "确定覆盖视图吗?",
2037
+ content: "当前视图原有的数据会被覆盖",
2038
+ icon: () => O(we),
2039
+ okText: "确定",
2040
+ onOk() {
2041
+ return new Promise((n) => {
2042
+ b({
2043
+ updateView: {
2044
+ is_submit: [!0],
2045
+ is_system: [e.currentViewObj.is_system],
2046
+ name: e.currentViewObj.name
2047
+ },
2048
+ record: e.currentViewObj
2049
+ }), n(null);
2050
+ }).catch(() => console.log("Oops errors!"));
2051
+ },
2052
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
2053
+ onCancel() {
2054
+ }
2055
+ });
2056
+ }
2057
+ ), Y(
2058
+ () => e.create_num,
2059
+ // 监听另存为
2060
+ () => {
2061
+ const n = P({
2062
+ open: !0,
2063
+ loading: !1,
2064
+ title: "新建视图",
2065
+ form: {
2066
+ settings: {
2067
+ labelAlign: "right",
2068
+ layout: "vertical",
2069
+ col: []
2070
+ },
2071
+ fields: [
2072
+ {
2073
+ type: "input",
2074
+ name: "name",
2075
+ label: "视图名称",
2076
+ disabled: !1,
2077
+ allowClear: !0,
2078
+ inputType: "text",
2079
+ defaultValue: "",
2080
+ placeholder: "请输入视图名称"
2081
+ },
2082
+ {
2083
+ type: "radio",
2084
+ name: "view_type",
2085
+ label: "视图可见范围",
2086
+ disabled: !1,
2087
+ allowClear: !0,
2088
+ labelKey: "name",
2089
+ valueKey: "value",
2090
+ defaultValue: "",
2091
+ placeholder: ""
2092
+ }
2093
+ ],
2094
+ rules: P({
2095
+ name: [
2096
+ {
2097
+ required: !0,
2098
+ message: "请输入视图名称"
2099
+ }
2100
+ ]
2101
+ }),
2102
+ model: P({
2103
+ name: null,
2104
+ view_type: "personal",
2105
+ is_submit: [!0]
2106
+ })
2107
+ },
2108
+ options: {
2109
+ view_type: [
2110
+ { name: "个人视图(仅自己可见)", value: "personal" },
2111
+ { name: "公共视图(项目成员均可见)", value: "public" }
2112
+ ],
2113
+ is_submit: [
2114
+ {
2115
+ name: "将当前过滤条件、排序、显示属性、视图和分组等设置更新到该视图中",
2116
+ value: !0
2117
+ }
2118
+ ]
2119
+ },
2120
+ ok: (d) => new Promise(function(a) {
2121
+ if (h.value.map((s) => s.name).includes(d.name)) {
2122
+ L.error("视图名称已存在");
2123
+ return;
2124
+ }
2125
+ b({ updateView: d, record: d }), a(null);
2126
+ })
2127
+ });
2128
+ _e(n);
2129
+ }
2130
+ ), Y(
2131
+ () => e.count_num,
2132
+ // 监听刷新当前视图count
2133
+ () => {
2134
+ oe(h.value);
2135
+ }
2136
+ );
2137
+ const ie = (n) => {
2138
+ const d = ge(e.currentViewObj.app_flag, e.modalType, null, !0);
2139
+ d.required_condition && d.required_condition.find((l) => l.key === n) && j();
2140
+ };
2141
+ return Me(() => {
2142
+ Ce().on("change", ie);
2143
+ }), qe(() => {
2144
+ Ce().off("change", ie);
2145
+ }), Be(() => {
2146
+ oe(h.value);
2147
+ }), {
2148
+ props: e,
2149
+ viewKey: z,
2150
+ customStyle: te,
2151
+ columns: Ua,
2152
+ personData: v,
2153
+ publicData: g,
2154
+ is_auth: $,
2155
+ addView: ae,
2156
+ editView: w,
2157
+ customRow: ne,
2158
+ changeView: W,
2159
+ handleSubmit: o,
2160
+ handleShare: me,
2161
+ handleDelet: pe
2162
+ };
2163
+ }
2164
+ });
2165
+ const Aa = /* @__PURE__ */ I("span", { style: { "font-weight": "700" } }, "个人视图", -1), Ia = ["onClick"], Va = { style: { "max-width": "130px", float: "left", "white-space": "nowrap", overflow: "hidden" } }, qa = ["onClick"], Ba = ["onClick"], Da = ["onClick"], Ka = /* @__PURE__ */ I("span", { style: { "font-weight": "700" } }, "公共视图", -1), Na = ["onClick"], Ra = { style: { "max-width": "130px", float: "left", "white-space": "nowrap", overflow: "hidden" } }, Ta = ["onClick"], Ga = ["onClick"], La = ["onClick"];
2166
+ function Ja(e, u, B, V, D, S) {
2167
+ const f = k("caret-right-outlined"), $ = k("setting-outlined"), h = k("a-tooltip"), U = k("plus-outlined"), p = k("a-menu-item"), r = k("a-menu"), v = k("a-dropdown"), g = k("a-table"), M = k("a-collapse-panel"), R = k("a-collapse"), Q = k("a-card");
2168
+ return i(), C(Q, {
2169
+ "body-style": { padding: 0, height: e.height + 96 + "px", overflowY: "auto" }
2170
+ }, {
2171
+ default: c(() => [
2172
+ O(R, {
2173
+ activeKey: e.viewKey,
2174
+ "onUpdate:activeKey": u[6] || (u[6] = (j) => e.viewKey = j),
2175
+ bordered: !1,
2176
+ class: "collapses",
2177
+ style: { background: "rgb(255, 255, 255)" }
2178
+ }, {
2179
+ expandIcon: c(({ isActive: j }) => [
2180
+ O(f, {
2181
+ rotate: j ? 90 : 0
2182
+ }, null, 8, ["rotate"])
2183
+ ]),
2184
+ default: c(() => [
2185
+ (i(), C(M, {
2186
+ key: "1",
2187
+ style: de(e.customStyle)
2188
+ }, {
2189
+ header: c(() => [
2190
+ Aa
2191
+ ]),
2192
+ extra: c(() => [
2193
+ O(h, null, {
2194
+ title: c(() => [
2195
+ J("个人视图管理")
2196
+ ]),
2197
+ default: c(() => [
2198
+ O($, {
2199
+ style: { "margin-right": "10px" },
2200
+ onClick: u[0] || (u[0] = le((j) => e.editView("personal"), ["stop"]))
2201
+ })
2202
+ ]),
2203
+ _: 1
2204
+ }),
2205
+ O(h, null, {
2206
+ title: c(() => [
2207
+ J("新建个人视图")
2208
+ ]),
2209
+ default: c(() => [
2210
+ O(U, {
2211
+ onClick: u[1] || (u[1] = le((j) => e.addView("personal"), ["stop"]))
2212
+ })
2213
+ ]),
2214
+ _: 1
2215
+ })
2216
+ ]),
2217
+ default: c(() => [
2218
+ e.personData.length > 0 ? (i(), C(g, {
2219
+ key: 0,
2220
+ columns: e.columns,
2221
+ customRow: e.customRow,
2222
+ dataSource: e.personData,
2223
+ pagination: !1,
2224
+ showHeader: !1,
2225
+ size: "small"
2226
+ }, {
2227
+ bodyCell: c(({ column: j, record: F }) => [
2228
+ j.dataIndex === "name" ? (i(), E("div", {
2229
+ key: 0,
2230
+ class: "table",
2231
+ style: { width: "100%", cursor: "pointer" },
2232
+ onClick: (z) => e.changeView(F)
2233
+ }, [
2234
+ O(h, {
2235
+ title: F.name,
2236
+ color: "magenta",
2237
+ placement: "left",
2238
+ destroyTooltipOnHide: !0,
2239
+ overlayStyle: { maxWidth: "200px" }
2240
+ }, {
2241
+ default: c(() => [
2242
+ I("div", Va, G(F.name), 1)
2243
+ ]),
2244
+ _: 2
2245
+ }, 1032, ["title"]),
2246
+ I("span", {
2247
+ class: "num",
2248
+ style: de([
2249
+ { float: "right" },
2250
+ e.currentViewObj.id === F.id ? { color: "#1890ff", fontWeight: "bold" } : {}
2251
+ ])
2252
+ }, G(F.num), 5),
2253
+ O(v, { class: "dropdown" }, {
2254
+ overlay: c(() => [
2255
+ O(r, null, {
2256
+ default: c(() => [
2257
+ !F.is_system || e.is_auth ? (i(), C(p, { key: 0 }, {
2258
+ default: c(() => [
2259
+ I("a", {
2260
+ href: "javascript:;",
2261
+ onClick: (z) => e.handleSubmit(F, "personal")
2262
+ }, " 编辑 ", 8, qa)
2263
+ ]),
2264
+ _: 2
2265
+ }, 1024)) : N("", !0),
2266
+ O(p, null, {
2267
+ default: c(() => [
2268
+ I("a", {
2269
+ href: "javascript:;",
2270
+ onClick: (z) => e.handleShare(F)
2271
+ }, " 分享视图 ", 8, Ba)
2272
+ ]),
2273
+ _: 2
2274
+ }, 1024),
2275
+ !F.is_system || e.is_auth ? (i(), C(p, { key: 1 }, {
2276
+ default: c(() => [
2277
+ I("a", {
2278
+ href: "javascript:;",
2279
+ onClick: (z) => e.handleDelet(F)
2280
+ }, " 删除 ", 8, Da)
2281
+ ]),
2282
+ _: 2
2283
+ }, 1024)) : N("", !0)
2284
+ ]),
2285
+ _: 2
2286
+ }, 1024)
2287
+ ]),
2288
+ default: c(() => [
2289
+ I("span", {
2290
+ style: { float: "right", "font-weight": "800" },
2291
+ onClick: u[2] || (u[2] = le(() => {
2292
+ }, ["stop"]))
2293
+ }, " · · · ")
2294
+ ]),
2295
+ _: 2
2296
+ }, 1024)
2297
+ ], 8, Ia)) : N("", !0)
2298
+ ]),
2299
+ _: 1
2300
+ }, 8, ["columns", "customRow", "dataSource"])) : N("", !0)
2301
+ ]),
2302
+ _: 1
2303
+ }, 8, ["style"])),
2304
+ (i(), C(M, {
2305
+ key: "2",
2306
+ style: de(e.customStyle)
2307
+ }, {
2308
+ header: c(() => [
2309
+ Ka
2310
+ ]),
2311
+ extra: c(() => [
2312
+ O(h, null, {
2313
+ title: c(() => [
2314
+ J("公共视图管理")
2315
+ ]),
2316
+ default: c(() => [
2317
+ O($, {
2318
+ style: { "margin-right": "10px" },
2319
+ onClick: u[3] || (u[3] = le((j) => e.editView("public"), ["stop"]))
2320
+ })
2321
+ ]),
2322
+ _: 1
2323
+ }),
2324
+ O(h, null, {
2325
+ title: c(() => [
2326
+ J("新建公共视图")
2327
+ ]),
2328
+ default: c(() => [
2329
+ O(U, {
2330
+ onClick: u[4] || (u[4] = le((j) => e.addView("public"), ["stop"]))
2331
+ })
2332
+ ]),
2333
+ _: 1
2334
+ })
2335
+ ]),
2336
+ default: c(() => [
2337
+ e.publicData.length > 0 ? (i(), C(g, {
2338
+ key: 0,
2339
+ columns: e.columns,
2340
+ customRow: e.customRow,
2341
+ dataSource: e.publicData,
2342
+ pagination: !1,
2343
+ showHeader: !1,
2344
+ size: "small"
2345
+ }, {
2346
+ bodyCell: c(({ column: j, record: F }) => [
2347
+ j.dataIndex === "name" ? (i(), E("div", {
2348
+ key: 0,
2349
+ class: "table",
2350
+ style: { width: "100%", cursor: "pointer" },
2351
+ onClick: (z) => e.changeView(F)
2352
+ }, [
2353
+ O(h, {
2354
+ title: F.name,
2355
+ color: "magenta",
2356
+ placement: "left",
2357
+ destroyTooltipOnHide: !0,
2358
+ overlayStyle: { maxWidth: "200px" }
2359
+ }, {
2360
+ default: c(() => [
2361
+ I("div", Ra, G(F.name), 1)
2362
+ ]),
2363
+ _: 2
2364
+ }, 1032, ["title"]),
2365
+ I("span", {
2366
+ class: "num",
2367
+ style: de([
2368
+ { float: "right" },
2369
+ e.currentViewObj.id === F.id ? { color: "#1890ff", fontWeight: "bold" } : {}
2370
+ ])
2371
+ }, G(F.num), 5),
2372
+ O(v, { class: "dropdown" }, {
2373
+ overlay: c(() => [
2374
+ O(r, null, {
2375
+ default: c(() => [
2376
+ !F.is_system || e.is_auth ? (i(), C(p, { key: 0 }, {
2377
+ default: c(() => [
2378
+ I("a", {
2379
+ href: "javascript:;",
2380
+ onClick: (z) => e.handleSubmit(F, "public")
2381
+ }, " 编辑 ", 8, Ta)
2382
+ ]),
2383
+ _: 2
2384
+ }, 1024)) : N("", !0),
2385
+ O(p, null, {
2386
+ default: c(() => [
2387
+ I("a", {
2388
+ href: "javascript:;",
2389
+ onClick: (z) => e.handleShare(F)
2390
+ }, " 分享视图 ", 8, Ga)
2391
+ ]),
2392
+ _: 2
2393
+ }, 1024),
2394
+ !F.is_system || e.is_auth ? (i(), C(p, { key: 1 }, {
2395
+ default: c(() => [
2396
+ I("a", {
2397
+ href: "javascript:;",
2398
+ onClick: (z) => e.handleDelet(F)
2399
+ }, " 删除 ", 8, La)
2400
+ ]),
2401
+ _: 2
2402
+ }, 1024)) : N("", !0)
2403
+ ]),
2404
+ _: 2
2405
+ }, 1024)
2406
+ ]),
2407
+ default: c(() => [
2408
+ I("span", {
2409
+ style: { float: "right", "font-weight": "800" },
2410
+ onClick: u[5] || (u[5] = le(() => {
2411
+ }, ["stop"]))
2412
+ }, " · · · ")
2413
+ ]),
2414
+ _: 2
2415
+ }, 1024)
2416
+ ], 8, Na)) : N("", !0)
2417
+ ]),
2418
+ _: 1
2419
+ }, 8, ["columns", "customRow", "dataSource"])) : N("", !0)
2420
+ ]),
2421
+ _: 1
2422
+ }, 8, ["style"]))
2423
+ ]),
2424
+ _: 1
2425
+ }, 8, ["activeKey"])
2426
+ ]),
2427
+ _: 1
2428
+ }, 8, ["body-style"]);
2429
+ }
2430
+ const za = /* @__PURE__ */ x(ja, [["render", Ja]]), Pa = Z({
2431
+ name: "SideSearchRender",
2432
+ components: {
2433
+ ViewManage: za
2434
+ },
2435
+ props: {
2436
+ selectObj: {
2437
+ type: Object,
2438
+ required: !0
2439
+ }
2440
+ },
2441
+ emits: ["change"],
2442
+ setup(e, { emit: u }) {
2443
+ return {
2444
+ props: e,
2445
+ change: (V, D, S) => {
2446
+ u("change", V, D, S);
2447
+ }
2448
+ };
2449
+ }
2450
+ });
2451
+ function Wa(e, u, B, V, D, S) {
2452
+ const f = k("view-manage"), $ = k("a-card");
2453
+ return i(), C($, {
2454
+ "body-style": { padding: 0, height: e.selectObj.height + 96 + "px", overflowY: "auto" }
2455
+ }, {
2456
+ default: c(() => [
2457
+ O(f, {
2458
+ "select-obj": e.selectObj,
2459
+ onChange: e.change
2460
+ }, null, 8, ["select-obj", "onChange"])
2461
+ ]),
2462
+ _: 1
2463
+ }, 8, ["body-style"]);
2464
+ }
2465
+ const bl = /* @__PURE__ */ x(Pa, [["render", Wa]]);
2466
+ export {
2467
+ ra as AddConditionGroupModal,
2468
+ Cl as BoldMatcher,
2469
+ De as FieldRender,
2470
+ Fe as FieldRender2,
2471
+ gl as FormRender,
2472
+ yl as FormRender2,
2473
+ vl as FormRender3,
2474
+ hl as GeneralFilter,
2475
+ Ol as JsonObj,
2476
+ Sl as SearchRender,
2477
+ bl as SideSearchRender,
2478
+ za as ViewManage,
2479
+ El as getFormConfig
2480
+ };