@bsgoal/common 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.mjs ADDED
@@ -0,0 +1,1763 @@
1
+ var Be = Object.defineProperty;
2
+ var Ve = Object.getOwnPropertySymbols;
3
+ var we = Object.prototype.hasOwnProperty, De = Object.prototype.propertyIsEnumerable;
4
+ var Ae = (a, r, o) => r in a ? Be(a, r, { enumerable: !0, configurable: !0, writable: !0, value: o }) : a[r] = o, ye = (a, r) => {
5
+ for (var o in r || (r = {}))
6
+ we.call(r, o) && Ae(a, o, r[o]);
7
+ if (Ve)
8
+ for (var o of Ve(r))
9
+ De.call(r, o) && Ae(a, o, r[o]);
10
+ return a;
11
+ };
12
+ import { ref as w, watchEffect as pe, unref as s, computed as ue, resolveComponent as g, openBlock as u, createElementBlock as V, createElementVNode as F, withDirectives as G, createBlock as E, withCtx as A, createVNode as D, Fragment as U, renderList as X, createCommentVNode as x, createTextVNode as q, toDisplayString as j, pushScopeId as ke, popScopeId as Oe, nextTick as xe, inject as Ce, watch as se, resolveDirective as Ne, renderSlot as de, normalizeClass as he, vShow as Z, provide as Fe, useSlots as Me, createSlots as Re } from "vue";
13
+ import { ElMessage as Ie } from "element-plus";
14
+ const e = {
15
+ INPUT: "text",
16
+ INPUT_NUMBER: "number",
17
+ INPUT_TEXT_AREA: "textarea",
18
+ SELECT: "select",
19
+ SLIDER: "slider",
20
+ SWITCH: "switch",
21
+ RADIO: "radio",
22
+ CHECKBOX: "checkbox",
23
+ DATE: "date",
24
+ WEEK: "week",
25
+ MONTH: "month",
26
+ YEAR: "year",
27
+ DATE_RANGE: "daterange",
28
+ MONTH_RANGE: "monthrange",
29
+ TIME: "time",
30
+ TIME_RANGE: "timerange",
31
+ DATE_TIME: "datetime",
32
+ DATE_TIME_RANGE: "datetimerange",
33
+ OPERATION: "operation"
34
+ };
35
+ let fe = null;
36
+ const ge = (a) => {
37
+ const r = [], o = [], d = (l = []) => {
38
+ const c = l.map((b) => b.width), p = Math.max(...c);
39
+ l.forEach((b) => {
40
+ const { labelEl: $ } = b;
41
+ $.style.width = `${p}px`;
42
+ });
43
+ }, i = () => {
44
+ if (a) {
45
+ const l = a.querySelectorAll(".el-form-item__label");
46
+ if (l && l.length) {
47
+ let c = 0;
48
+ l.forEach((p, b) => {
49
+ p.style.width = "initial", p.style.whiteSpace = "nowrap";
50
+ const { x: $ = 0, width: B = 0 } = p.getBoundingClientRect(), N = { x: $, width: B, labelEl: p };
51
+ b === 0 && (c = $), $ === c ? r.push(N) : o.push(N);
52
+ });
53
+ }
54
+ }
55
+ };
56
+ fe && clearTimeout(fe), fe = setTimeout(() => {
57
+ i(), d(r), d(o);
58
+ }, 50);
59
+ }, Ee = {
60
+ /**
61
+ * 表单自动左对齐
62
+ */
63
+ align: {
64
+ created(a) {
65
+ window.addEventListener("resize", () => {
66
+ ge(a);
67
+ });
68
+ },
69
+ mounted(a) {
70
+ ge(a);
71
+ },
72
+ unmounted(a) {
73
+ window.removeEventListener("resize", ge(a));
74
+ }
75
+ },
76
+ /**
77
+ * 表格自动高度
78
+ */
79
+ height: (a, { value: r = 65, arg: o = "" }) => {
80
+ if (a) {
81
+ const { y: d = 0 } = a.getBoundingClientRect();
82
+ a.style.height = `calc(100vh - ${d + r}px)`;
83
+ }
84
+ }
85
+ };
86
+ const W = (a, r) => {
87
+ const o = a.__vccOpts || a;
88
+ for (const [d, i] of r)
89
+ o[d] = i;
90
+ return o;
91
+ }, Se = { class: "bsgoal-base-form" }, Ue = { class: "base_form" }, Pe = { key: 1 }, Le = {
92
+ name: "BsgoalBaseForm"
93
+ }, ze = /* @__PURE__ */ Object.assign(Le, {
94
+ props: {
95
+ /**
96
+ * >----------props----------<
97
+ * {
98
+ * label:'' // 名称
99
+ * value:'' // 值
100
+ * prop:'' // 绑定字段
101
+ * type:'text' // 内容组件的类型 : 参照 enumType
102
+ * placeholder:'' // placeholder 提示文本
103
+ * readonly: false // 是否为只读文本
104
+ * clearable: true //是否为可清空
105
+ * }
106
+ *
107
+ * >----------events----------<
108
+ *
109
+ * on-form // 触发查询
110
+ * on-clear // 触发清空
111
+ * on-change // 触发查询变动
112
+ * on-fold // 触发折叠
113
+ */
114
+ configOptions: {
115
+ type: [Array],
116
+ default: () => []
117
+ },
118
+ /**
119
+ * 中屏设备宽度的比例
120
+ */
121
+ medium: {
122
+ type: [Number, String],
123
+ default: 24
124
+ },
125
+ /**
126
+ * 初始值
127
+ */
128
+ values: {
129
+ type: [Object],
130
+ default: () => ({})
131
+ }
132
+ },
133
+ emits: ["on-form", "on-clear", "on-change", "on-fold"],
134
+ setup(a, { expose: r, emit: o }) {
135
+ const d = a, i = w(null), l = Ee.align, c = w({});
136
+ pe(() => {
137
+ const { configOptions: h, values: f } = d, T = s(h), m = s(f);
138
+ T.forEach((y) => {
139
+ const { value: k = "", prop: O = "", type: M = "" } = y;
140
+ [e.INPUT, e.INPUT_TEXT_AREA].includes(M), c.value[O] = m[O] || k;
141
+ });
142
+ });
143
+ const p = ue(() => {
144
+ const { configOptions: h } = d;
145
+ return s(h).map((m) => {
146
+ let { rules: y = !1, label: k = "" } = m;
147
+ const O = { required: !0, message: `${k}不能为空`, trigger: "blur" };
148
+ return y && (typeof y == "boolean" ? y = [O] : Array.isArray(y) ? y = [O, ...y] : y = [O, y]), m.rules = y, m;
149
+ });
150
+ }), b = (h = "", f = "", T = "") => {
151
+ if (!T)
152
+ switch (h) {
153
+ case e.INPUT:
154
+ case e.INPUT_TEXT_AREA:
155
+ return `请输入${f}`;
156
+ case e.SELECT:
157
+ case e.DATE:
158
+ case e.WEEK:
159
+ case e.MONTH:
160
+ case e.YEAR:
161
+ case e.DATE_TIME:
162
+ case e.TIME:
163
+ return `请选择${f}`;
164
+ case e.DATE_RANGE:
165
+ case e.DATE_TIME_RANGE:
166
+ return ["开始日期", "结束日期"];
167
+ case e.TIME_RANGE:
168
+ return ["开始时间", "结束时间"];
169
+ case e.MONTH_RANGE:
170
+ return ["开始月份", "结束月份"];
171
+ }
172
+ return T;
173
+ }, $ = (h = "", f = "") => {
174
+ if (!f)
175
+ switch (h) {
176
+ case e.WEEK:
177
+ return "ww";
178
+ case e.DATE:
179
+ case e.DATE_RANGE:
180
+ return "YYYY-MM-DD";
181
+ case e.MONTH:
182
+ return "MM";
183
+ case e.YEAR:
184
+ return "YYYY";
185
+ case e.MONTH_RANGE:
186
+ return "YYYY-MM";
187
+ case e.TIME:
188
+ case e.TIME_RANGE:
189
+ return "HH:mm:ss";
190
+ case e.DATE_TIME:
191
+ case e.DATE_TIME_RANGE:
192
+ return "YYYY-MM-DD HH:mm:ss";
193
+ }
194
+ return f;
195
+ }, B = () => {
196
+ const h = s(c), { configOptions: f } = d, T = s(f);
197
+ for (const m of T) {
198
+ const { type: y = "", range: k = [], prop: O = "" } = m;
199
+ if (y.endsWith("range") && k && k.length === 2) {
200
+ const { 0: M = "", 1: P = "" } = h[O], { 0: I = "", 1: S = "" } = k;
201
+ h[I] = M, h[S] = P;
202
+ }
203
+ }
204
+ return o("on-form", h), h;
205
+ }, N = () => {
206
+ i.value.resetFields(), o("on-clear", c.value);
207
+ }, C = (h, f) => {
208
+ const T = {
209
+ type: h,
210
+ prop: f,
211
+ value: c.value[f] || ""
212
+ };
213
+ o("on-change", T);
214
+ };
215
+ return r({
216
+ triggerOperationClear: N,
217
+ triggerOperationForm: B,
218
+ validateForm: (h = () => {
219
+ }) => {
220
+ i.value.validate((f = !1, T = {}) => {
221
+ if (f) {
222
+ const m = B();
223
+ h(m);
224
+ } else {
225
+ h(!1), console.log("field", T);
226
+ const m = Object.keys(T)[0], {
227
+ [m]: {
228
+ 0: { message: y = "" }
229
+ }
230
+ } = T;
231
+ Ie.error(y);
232
+ }
233
+ });
234
+ }
235
+ }), (h, f) => {
236
+ const T = g("el-input"), m = g("el-input-number"), y = g("el-radio"), k = g("el-radio-group"), O = g("el-option"), M = g("el-select"), P = g("el-slider"), I = g("el-switch"), S = g("el-date-picker"), K = g("el-time-picker"), ee = g("el-checkbox"), le = g("el-checkbox-group"), te = g("el-form-item"), ie = g("el-col"), me = g("el-row"), ve = g("el-form");
237
+ return u(), V("div", Se, [
238
+ F("div", Ue, [
239
+ G((u(), E(ve, {
240
+ ref_key: "EL_FORM_REF",
241
+ ref: i,
242
+ "label-suffix": ":",
243
+ model: c.value
244
+ }, {
245
+ default: A(() => [
246
+ D(me, null, {
247
+ default: A(() => [
248
+ (u(!0), V(U, null, X(s(p), ({
249
+ label: L = "",
250
+ prop: v = "",
251
+ type: n = "text",
252
+ placeholder: _ = "",
253
+ readonly: z = !1,
254
+ clearable: ce = !0,
255
+ rows: re = 2,
256
+ min: _e = 1,
257
+ max: oe = 10,
258
+ range: J = [],
259
+ format: Y = "",
260
+ rules: Q = []
261
+ } = {}, ae) => (u(), E(ie, {
262
+ key: ae,
263
+ xs: 24,
264
+ sm: 24,
265
+ md: a.medium
266
+ }, {
267
+ default: A(() => [
268
+ D(te, {
269
+ label: L,
270
+ prop: v,
271
+ rules: Q
272
+ }, {
273
+ default: A(() => [
274
+ z ? (u(), V("div", Pe, j(c.value[v]), 1)) : (u(), V(U, { key: 0 }, [
275
+ n === s(e).INPUT ? (u(), E(T, {
276
+ key: 0,
277
+ modelValue: c.value[v],
278
+ "onUpdate:modelValue": (t) => c.value[v] = t,
279
+ placeholder: b(n, L, _),
280
+ clearable: ce,
281
+ onChange: (t) => C(n, v)
282
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "clearable", "onChange"])) : x("", !0),
283
+ n === s(e).INPUT_TEXT_AREA ? (u(), E(T, {
284
+ key: 1,
285
+ modelValue: c.value[v],
286
+ "onUpdate:modelValue": (t) => c.value[v] = t,
287
+ type: "textarea",
288
+ rows: re,
289
+ clearable: ce,
290
+ placeholder: b(n, L, _),
291
+ onChange: (t) => C(n, v)
292
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "rows", "clearable", "placeholder", "onChange"])) : x("", !0),
293
+ n === s(e).INPUT_NUMBER ? (u(), E(m, {
294
+ key: 2,
295
+ modelValue: h.num,
296
+ "onUpdate:modelValue": f[0] || (f[0] = (t) => h.num = t),
297
+ min: _e,
298
+ max: oe,
299
+ onChange: C
300
+ }, null, 8, ["modelValue", "min", "max"])) : x("", !0),
301
+ n === s(e).RADIO ? (u(), E(k, {
302
+ key: 3,
303
+ modelValue: c.value[v],
304
+ "onUpdate:modelValue": (t) => c.value[v] = t,
305
+ onChange: (t) => C(n, v)
306
+ }, {
307
+ default: A(() => [
308
+ (u(!0), V(U, null, X(J, (t, H) => (u(), E(y, {
309
+ key: H,
310
+ label: t.value
311
+ }, {
312
+ default: A(() => [
313
+ q(j(t.label), 1)
314
+ ]),
315
+ _: 2
316
+ }, 1032, ["label"]))), 128))
317
+ ]),
318
+ _: 2
319
+ }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : x("", !0),
320
+ n === s(e).SELECT ? (u(), E(M, {
321
+ key: 4,
322
+ modelValue: c.value[v],
323
+ "onUpdate:modelValue": (t) => c.value[v] = t,
324
+ placeholder: b(n, L, _),
325
+ onChange: (t) => C(n, v)
326
+ }, {
327
+ default: A(() => [
328
+ (u(!0), V(U, null, X(J, (t, H) => (u(), E(O, {
329
+ key: H,
330
+ label: t.label,
331
+ value: t.value
332
+ }, null, 8, ["label", "value"]))), 128))
333
+ ]),
334
+ _: 2
335
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "onChange"])) : x("", !0),
336
+ n === s(e).SLIDER ? (u(), E(P, {
337
+ key: 5,
338
+ modelValue: c.value[v],
339
+ "onUpdate:modelValue": (t) => c.value[v] = t,
340
+ min: _e,
341
+ max: oe,
342
+ onChange: (t) => C(n, v)
343
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "onChange"])) : x("", !0),
344
+ n === s(e).SWITCH ? (u(), E(I, {
345
+ key: 6,
346
+ modelValue: c.value[v],
347
+ "onUpdate:modelValue": (t) => c.value[v] = t,
348
+ "active-value": J[0] || !0,
349
+ "inactive-value": J[1] || !1,
350
+ onChange: (t) => C(n, v)
351
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "active-value", "inactive-value", "onChange"])) : x("", !0),
352
+ [s(e).DATE, s(e).MONTH, s(e).YEAR, s(e).DATE_TIME].includes(
353
+ n
354
+ ) ? (u(), E(S, {
355
+ key: 7,
356
+ modelValue: c.value[v],
357
+ "onUpdate:modelValue": (t) => c.value[v] = t,
358
+ format: $(n, Y),
359
+ "value-format": $(n, Y),
360
+ type: n,
361
+ placeholder: b(n, L, _),
362
+ onChange: (t) => C(n, v)
363
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "format", "value-format", "type", "placeholder", "onChange"])) : x("", !0),
364
+ [
365
+ s(e).DATE_RANGE,
366
+ s(e).MONTH_RANGE,
367
+ s(e).DATE_TIME_RANGE
368
+ ].includes(n) ? (u(), E(S, {
369
+ key: 8,
370
+ modelValue: c.value[v],
371
+ "onUpdate:modelValue": (t) => c.value[v] = t,
372
+ type: n,
373
+ "value-format": $(n, Y),
374
+ "start-placeholder": b(n, L, _)[0],
375
+ "end-placeholder": b(n, L, _)[1],
376
+ onChange: (t) => C(n, v)
377
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "value-format", "start-placeholder", "end-placeholder", "onChange"])) : x("", !0),
378
+ [s(e).TIME].includes(n) ? (u(), E(K, {
379
+ key: 9,
380
+ modelValue: c.value[v],
381
+ "onUpdate:modelValue": (t) => c.value[v] = t,
382
+ "arrow-control": "",
383
+ "value-format": $(n, Y),
384
+ placeholder: b(n, L, _),
385
+ onChange: (t) => C(n, v)
386
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "value-format", "placeholder", "onChange"])) : x("", !0),
387
+ [s(e).TIME_RANGE].includes(n) ? (u(), E(K, {
388
+ key: 10,
389
+ modelValue: c.value[v],
390
+ "onUpdate:modelValue": (t) => c.value[v] = t,
391
+ "is-range": "",
392
+ "value-format": $(n, Y),
393
+ "start-placeholder": b(n, L, _)[0],
394
+ "end-placeholder": b(n, L, _)[1],
395
+ onChange: (t) => C(n, v)
396
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "value-format", "start-placeholder", "end-placeholder", "onChange"])) : x("", !0),
397
+ [s(e).CHECKBOX].includes(n) ? (u(), E(le, {
398
+ key: 11,
399
+ modelValue: c.value[v],
400
+ "onUpdate:modelValue": (t) => c.value[v] = t,
401
+ onChange: (t) => C(n, v)
402
+ }, {
403
+ default: A(() => [
404
+ (u(!0), V(U, null, X(J, (t, H) => (u(), E(ee, {
405
+ key: H,
406
+ label: t.value
407
+ }, {
408
+ default: A(() => [
409
+ q(j(t.label), 1)
410
+ ]),
411
+ _: 2
412
+ }, 1032, ["label"]))), 128))
413
+ ]),
414
+ _: 2
415
+ }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : x("", !0),
416
+ [].includes(n) ? (u(), V(U, { key: 12 }, [], 64)) : x("", !0)
417
+ ], 64))
418
+ ]),
419
+ _: 2
420
+ }, 1032, ["label", "prop", "rules"])
421
+ ]),
422
+ _: 2
423
+ }, 1032, ["md"]))), 128))
424
+ ]),
425
+ _: 1
426
+ })
427
+ ]),
428
+ _: 1
429
+ }, 8, ["model"])), [
430
+ [s(l)]
431
+ ])
432
+ ])
433
+ ]);
434
+ };
435
+ }
436
+ }), Ye = /* @__PURE__ */ W(ze, [["__scopeId", "data-v-8c079baa"]]);
437
+ const He = { class: "bsgoal-base-table-content" }, Ge = { class: "bas_tabl_content" }, je = {
438
+ name: "BsgoalBaseTableContent"
439
+ }, We = /* @__PURE__ */ Object.assign(je, {
440
+ props: {
441
+ data: {
442
+ type: [String, Number, Object, Number, Boolean],
443
+ default: ""
444
+ }
445
+ },
446
+ setup(a) {
447
+ return (r, o) => (u(), V("div", He, [
448
+ F("div", Ge, j(a.data), 1)
449
+ ]));
450
+ }
451
+ }), Xe = /* @__PURE__ */ W(We, [["__scopeId", "data-v-a66a56ec"]]);
452
+ /*! Element Plus v2.3.3 */
453
+ var Ke = {
454
+ name: "zh-cn",
455
+ el: {
456
+ colorpicker: {
457
+ confirm: "确定",
458
+ clear: "清空"
459
+ },
460
+ datepicker: {
461
+ now: "此刻",
462
+ today: "今天",
463
+ cancel: "取消",
464
+ clear: "清空",
465
+ confirm: "确定",
466
+ selectDate: "选择日期",
467
+ selectTime: "选择时间",
468
+ startDate: "开始日期",
469
+ startTime: "开始时间",
470
+ endDate: "结束日期",
471
+ endTime: "结束时间",
472
+ prevYear: "前一年",
473
+ nextYear: "后一年",
474
+ prevMonth: "上个月",
475
+ nextMonth: "下个月",
476
+ year: "年",
477
+ month1: "1 月",
478
+ month2: "2 月",
479
+ month3: "3 月",
480
+ month4: "4 月",
481
+ month5: "5 月",
482
+ month6: "6 月",
483
+ month7: "7 月",
484
+ month8: "8 月",
485
+ month9: "9 月",
486
+ month10: "10 月",
487
+ month11: "11 月",
488
+ month12: "12 月",
489
+ weeks: {
490
+ sun: "日",
491
+ mon: "一",
492
+ tue: "二",
493
+ wed: "三",
494
+ thu: "四",
495
+ fri: "五",
496
+ sat: "六"
497
+ },
498
+ months: {
499
+ jan: "一月",
500
+ feb: "二月",
501
+ mar: "三月",
502
+ apr: "四月",
503
+ may: "五月",
504
+ jun: "六月",
505
+ jul: "七月",
506
+ aug: "八月",
507
+ sep: "九月",
508
+ oct: "十月",
509
+ nov: "十一月",
510
+ dec: "十二月"
511
+ }
512
+ },
513
+ select: {
514
+ loading: "加载中",
515
+ noMatch: "无匹配数据",
516
+ noData: "无数据",
517
+ placeholder: "请选择"
518
+ },
519
+ cascader: {
520
+ noMatch: "无匹配数据",
521
+ loading: "加载中",
522
+ placeholder: "请选择",
523
+ noData: "暂无数据"
524
+ },
525
+ pagination: {
526
+ goto: "前往",
527
+ pagesize: "条/页",
528
+ total: "共 {total} 条",
529
+ pageClassifier: "页",
530
+ page: "页",
531
+ prev: "上一页",
532
+ next: "下一页",
533
+ currentPage: "第 {pager} 页",
534
+ prevPages: "向前 {pager} 页",
535
+ nextPages: "向后 {pager} 页",
536
+ deprecationWarning: "你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"
537
+ },
538
+ messagebox: {
539
+ title: "提示",
540
+ confirm: "确定",
541
+ cancel: "取消",
542
+ error: "输入的数据不合法!"
543
+ },
544
+ upload: {
545
+ deleteTip: "按 delete 键可删除",
546
+ delete: "删除",
547
+ preview: "查看图片",
548
+ continue: "继续上传"
549
+ },
550
+ table: {
551
+ emptyText: "暂无数据",
552
+ confirmFilter: "筛选",
553
+ resetFilter: "重置",
554
+ clearFilter: "全部",
555
+ sumText: "合计"
556
+ },
557
+ tree: {
558
+ emptyText: "暂无数据"
559
+ },
560
+ transfer: {
561
+ noMatch: "无匹配数据",
562
+ noData: "无数据",
563
+ titles: ["列表 1", "列表 2"],
564
+ filterPlaceholder: "请输入搜索内容",
565
+ noCheckedFormat: "共 {total} 项",
566
+ hasCheckedFormat: "已选 {checked}/{total} 项"
567
+ },
568
+ image: {
569
+ error: "加载失败"
570
+ },
571
+ pageHeader: {
572
+ title: "返回"
573
+ },
574
+ popconfirm: {
575
+ confirmButtonText: "确定",
576
+ cancelButtonText: "取消"
577
+ }
578
+ }
579
+ };
580
+ const qe = (a) => (ke("data-v-05353ff7"), a = a(), Oe(), a), Je = { class: "bsgoal-base-table-pagination" }, Qe = { class: "base_table_pagination" }, Ze = /* @__PURE__ */ qe(() => /* @__PURE__ */ F("span", null, "总数", -1)), et = {
581
+ name: "BsgoalBaseTablePagination"
582
+ }, tt = /* @__PURE__ */ Object.assign(et, {
583
+ props: {
584
+ /**
585
+ * 当前页数
586
+ */
587
+ currentPage: {
588
+ type: [Number],
589
+ default: 1
590
+ },
591
+ /**
592
+ * 可选页数集合
593
+ */
594
+ pageSizes: {
595
+ type: [Array],
596
+ default: () => [10, 20, 30, 40, 50, 100]
597
+ },
598
+ /**
599
+ * 每页显示条目个数
600
+ */
601
+ pageSize: {
602
+ type: [Number],
603
+ default: 10
604
+ },
605
+ /**
606
+ * 总条目
607
+ */
608
+ total: {
609
+ type: [Number],
610
+ default: 0
611
+ }
612
+ },
613
+ emits: ["on-size-change", "on-current-change"],
614
+ setup(a, { emit: r }) {
615
+ const o = (l = 0) => {
616
+ r("on-size-change", l);
617
+ }, d = (l = 1) => {
618
+ r("on-current-change", l);
619
+ }, i = w(1);
620
+ return (l, c) => {
621
+ const p = g("el-pagination"), b = g("el-config-provider");
622
+ return u(), V("div", Je, [
623
+ F("div", Qe, [
624
+ D(b, { locale: s(Ke) }, {
625
+ default: A(() => [
626
+ D(p, {
627
+ background: "",
628
+ layout: "total, sizes, prev, pager, next, jumper",
629
+ "current-page": i.value,
630
+ "onUpdate:currentPage": c[0] || (c[0] = ($) => i.value = $),
631
+ "page-sizes": a.pageSizes,
632
+ "page-size": a.pageSize,
633
+ total: a.total,
634
+ onSizeChange: o,
635
+ onCurrentChange: d
636
+ }, {
637
+ next: A(() => [
638
+ Ze
639
+ ]),
640
+ _: 1
641
+ }, 8, ["current-page", "page-sizes", "page-size", "total"])
642
+ ]),
643
+ _: 1
644
+ }, 8, ["locale"])
645
+ ])
646
+ ]);
647
+ };
648
+ }
649
+ }), at = /* @__PURE__ */ W(tt, [["__scopeId", "data-v-05353ff7"]]), nt = (a = null, { expression: r = 65, arg: o = {} } = {}) => {
650
+ const d = s(a);
651
+ if (d) {
652
+ const i = d.querySelector(".el-table");
653
+ i && xe(() => {
654
+ const { y: l = 0 } = i.getBoundingClientRect();
655
+ i.style.height = `calc(100vh - ${l + r}px)`;
656
+ });
657
+ }
658
+ }, be = (a = Promise.resolve(), r = null, o = w(!1), d = w(null)) => {
659
+ const i = w("");
660
+ return o.value = !0, a.then((l = {}) => {
661
+ const { data: c = {}, message: p = "" } = l;
662
+ d.value = c, i.value = p, r && r(!0, c), o.value = !1;
663
+ }).catch((l = {}) => {
664
+ if (typeof l == "object") {
665
+ const { message: c = "" } = l;
666
+ i.value = c;
667
+ } else
668
+ i.value = l;
669
+ r(!1, l), o.value = !1;
670
+ }).finally(() => {
671
+ o.value = !1;
672
+ }), { data: d, message: i, loading: o };
673
+ };
674
+ const lt = { class: "bsgoal-base-table" }, ot = { class: "base_table" }, ut = {
675
+ key: 0,
676
+ class: "base_table_menu"
677
+ }, st = {
678
+ name: "BsgoalBaseTable"
679
+ }, ct = /* @__PURE__ */ Object.assign(st, {
680
+ props: {
681
+ /**
682
+ * >----------props----------<
683
+ * {
684
+ * label: '' // 列名
685
+ * prop: '' // 绑定字段
686
+ * }
687
+ * >----------slots----------<
688
+ *
689
+ * menu: 顶部操作区域
690
+ * operation: 列表右侧操作区域
691
+ *
692
+ */
693
+ configOptions: {
694
+ type: [Array],
695
+ default: () => []
696
+ },
697
+ /**
698
+ * 表格数据
699
+ */
700
+ data: {
701
+ type: [Array],
702
+ default: () => []
703
+ },
704
+ /**
705
+ * 是否包含多选列
706
+ */
707
+ selection: {
708
+ type: [Boolean],
709
+ default: !1
710
+ },
711
+ /**
712
+ * 是否包含操作列
713
+ */
714
+ operation: {
715
+ type: [Boolean],
716
+ default: !1
717
+ },
718
+ /**
719
+ * 操作列宽度
720
+ */
721
+ operationWidth: {
722
+ type: [String, Number],
723
+ default: 100
724
+ },
725
+ /**
726
+ * 表格 loading 状态
727
+ */
728
+ loading: {
729
+ type: [Boolean],
730
+ default: !1
731
+ },
732
+ /**
733
+ * 请求的 promise
734
+ */
735
+ fetch: {
736
+ type: [Object, Function],
737
+ default: null
738
+ },
739
+ /**
740
+ * 响应的 call
741
+ */
742
+ call: {
743
+ type: [Object, Function],
744
+ default: null
745
+ },
746
+ /**
747
+ * 映射字段
748
+ */
749
+ mapProps: {
750
+ type: [Object],
751
+ default: () => ({
752
+ currentPage: "currentPage",
753
+ pageSize: "pageSize",
754
+ rows: "rows",
755
+ total: "total"
756
+ })
757
+ }
758
+ },
759
+ setup(a, { expose: r }) {
760
+ const o = a, d = ue(() => {
761
+ const { configOptions: m = [], operation: y = !1, operationWidth: k = 0 } = o, O = s(m), M = [];
762
+ return y && M.push({
763
+ label: "操作",
764
+ fixed: "right",
765
+ prop: "operation",
766
+ width: k
767
+ }), [...O, ...M];
768
+ }), i = w(null), l = Ce("transferFoldStatus");
769
+ pe(() => {
770
+ const m = l ? l.value : !1;
771
+ nt(i, { arg: m });
772
+ });
773
+ const c = w(1), p = w(10), b = w(0), $ = w({}), B = w(o.loading), N = w(o.data), C = w({}), R = () => {
774
+ const { fetch: m, call: y, mapProps: k } = o, O = $.value, M = c.value, P = p.value, I = ye({}, O), S = s(k);
775
+ I[S.currentPage] = M, I[S.pageSize] = P, be(m(I), y, B, C);
776
+ };
777
+ se(C, (m) => {
778
+ const { mapProps: y } = o, k = s(y);
779
+ N.value = m[k.rows], b.value = m[k.total];
780
+ });
781
+ const h = (m = {}) => {
782
+ $.value = m, c.value = 1, R();
783
+ }, f = (m = 1) => {
784
+ c.value = m;
785
+ }, T = (m = 10) => {
786
+ p.value = m;
787
+ };
788
+ return se([c, p], () => {
789
+ R();
790
+ }), r({
791
+ refreshList: h
792
+ }), (m, y) => {
793
+ const k = g("el-table-column"), O = g("el-table"), M = Ne("loading");
794
+ return u(), V("div", lt, [
795
+ F("div", ot, [
796
+ m.$slots.menu ? (u(), V("div", ut, [
797
+ de(m.$slots, "menu", {}, void 0, !0)
798
+ ])) : x("", !0),
799
+ F("div", {
800
+ ref_key: "EL_TABLE_WRAP_REF",
801
+ ref: i
802
+ }, [
803
+ G((u(), E(O, {
804
+ stripe: "",
805
+ border: "",
806
+ "highlight-current-row": "",
807
+ style: { width: "100%" },
808
+ data: N.value,
809
+ "header-cell-style": {
810
+ fontWeight: "bold",
811
+ backgroundColor: "#EBEEF5",
812
+ color: "rgba(0,0,0,.85)",
813
+ fontSize: "14px"
814
+ }
815
+ }, {
816
+ empty: A(() => []),
817
+ default: A(() => [
818
+ a.selection ? (u(), E(k, {
819
+ key: 0,
820
+ fixed: "left",
821
+ type: "selection",
822
+ width: "40"
823
+ })) : x("", !0),
824
+ (u(!0), V(U, null, X(s(d), ({ prop: P = "", label: I = "", align: S = "center", width: K = "", fixed: ee = !1 } = {}, le) => (u(), E(k, {
825
+ key: le,
826
+ label: I,
827
+ align: S,
828
+ width: K,
829
+ fixed: ee,
830
+ "min-width": `${I.length * 14 + 24}px`
831
+ }, {
832
+ default: A(({ row: te }) => [
833
+ de(m.$slots, P, { row: te }, () => [
834
+ D(Xe, {
835
+ data: te[P]
836
+ }, null, 8, ["data"])
837
+ ], !0)
838
+ ]),
839
+ _: 2
840
+ }, 1032, ["label", "align", "width", "fixed", "min-width"]))), 128))
841
+ ]),
842
+ _: 3
843
+ }, 8, ["data", "header-cell-style"])), [
844
+ [M, B.value]
845
+ ])
846
+ ], 512),
847
+ D(at, {
848
+ total: b.value,
849
+ onOnCurrentChange: f,
850
+ onOnSizeChange: T
851
+ }, null, 8, ["total"])
852
+ ])
853
+ ]);
854
+ };
855
+ }
856
+ }), $e = /* @__PURE__ */ W(ct, [["__scopeId", "data-v-05083aef"]]);
857
+ const rt = {
858
+ name: "BsgoalBaseLine"
859
+ }, _t = /* @__PURE__ */ Object.assign(rt, {
860
+ props: {
861
+ /**
862
+ * 是否为垂直
863
+ */
864
+ vertical: {
865
+ type: [Boolean],
866
+ default: !1
867
+ }
868
+ },
869
+ setup(a) {
870
+ return (r, o) => (u(), V("div", {
871
+ class: he(["bsgoal-base-line", { "bsgoal-base-line__vertical": a.vertical }])
872
+ }, [
873
+ F("div", {
874
+ class: he(["base_line", { base_line__vertical: a.vertical }])
875
+ }, null, 2)
876
+ ], 2));
877
+ }
878
+ }), Te = /* @__PURE__ */ W(_t, [["__scopeId", "data-v-b52ba9cb"]]);
879
+ /*! Element Plus Icons Vue v2.1.0 */
880
+ var ne = (a, r) => {
881
+ let o = a.__vccOpts || a;
882
+ for (let [d, i] of r)
883
+ o[d] = i;
884
+ return o;
885
+ }, dt = {
886
+ name: "ArrowDown"
887
+ }, it = {
888
+ xmlns: "http://www.w3.org/2000/svg",
889
+ viewBox: "0 0 1024 1024"
890
+ }, mt = /* @__PURE__ */ F(
891
+ "path",
892
+ {
893
+ fill: "currentColor",
894
+ d: "M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"
895
+ },
896
+ null,
897
+ -1
898
+ /* HOISTED */
899
+ ), vt = [
900
+ mt
901
+ ];
902
+ function ft(a, r, o, d, i, l) {
903
+ return u(), V("svg", it, vt);
904
+ }
905
+ var gt = /* @__PURE__ */ ne(dt, [["render", ft], ["__file", "arrow-down.vue"]]), ht = {
906
+ name: "ArrowLeft"
907
+ }, pt = {
908
+ xmlns: "http://www.w3.org/2000/svg",
909
+ viewBox: "0 0 1024 1024"
910
+ }, Et = /* @__PURE__ */ F(
911
+ "path",
912
+ {
913
+ fill: "currentColor",
914
+ d: "M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"
915
+ },
916
+ null,
917
+ -1
918
+ /* HOISTED */
919
+ ), bt = [
920
+ Et
921
+ ];
922
+ function Tt(a, r, o, d, i, l) {
923
+ return u(), V("svg", pt, bt);
924
+ }
925
+ var Vt = /* @__PURE__ */ ne(ht, [["render", Tt], ["__file", "arrow-left.vue"]]), At = {
926
+ name: "ArrowRight"
927
+ }, yt = {
928
+ xmlns: "http://www.w3.org/2000/svg",
929
+ viewBox: "0 0 1024 1024"
930
+ }, xt = /* @__PURE__ */ F(
931
+ "path",
932
+ {
933
+ fill: "currentColor",
934
+ d: "M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"
935
+ },
936
+ null,
937
+ -1
938
+ /* HOISTED */
939
+ ), Ct = [
940
+ xt
941
+ ];
942
+ function $t(a, r, o, d, i, l) {
943
+ return u(), V("svg", yt, Ct);
944
+ }
945
+ var Bt = /* @__PURE__ */ ne(At, [["render", $t], ["__file", "arrow-right.vue"]]), wt = {
946
+ name: "ArrowUp"
947
+ }, Dt = {
948
+ xmlns: "http://www.w3.org/2000/svg",
949
+ viewBox: "0 0 1024 1024"
950
+ }, kt = /* @__PURE__ */ F(
951
+ "path",
952
+ {
953
+ fill: "currentColor",
954
+ d: "m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0z"
955
+ },
956
+ null,
957
+ -1
958
+ /* HOISTED */
959
+ ), Ot = [
960
+ kt
961
+ ];
962
+ function Nt(a, r, o, d, i, l) {
963
+ return u(), V("svg", Dt, Ot);
964
+ }
965
+ var Ft = /* @__PURE__ */ ne(wt, [["render", Nt], ["__file", "arrow-up.vue"]]), Mt = {
966
+ name: "Delete"
967
+ }, Rt = {
968
+ xmlns: "http://www.w3.org/2000/svg",
969
+ viewBox: "0 0 1024 1024"
970
+ }, It = /* @__PURE__ */ F(
971
+ "path",
972
+ {
973
+ fill: "currentColor",
974
+ d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V256zm448-64v-64H416v64h192zM224 896h576V256H224v640zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32zm192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32z"
975
+ },
976
+ null,
977
+ -1
978
+ /* HOISTED */
979
+ ), St = [
980
+ It
981
+ ];
982
+ function Ut(a, r, o, d, i, l) {
983
+ return u(), V("svg", Rt, St);
984
+ }
985
+ var Pt = /* @__PURE__ */ ne(Mt, [["render", Ut], ["__file", "delete.vue"]]), Lt = {
986
+ name: "Search"
987
+ }, zt = {
988
+ xmlns: "http://www.w3.org/2000/svg",
989
+ viewBox: "0 0 1024 1024"
990
+ }, Yt = /* @__PURE__ */ F(
991
+ "path",
992
+ {
993
+ fill: "currentColor",
994
+ d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704z"
995
+ },
996
+ null,
997
+ -1
998
+ /* HOISTED */
999
+ ), Ht = [
1000
+ Yt
1001
+ ];
1002
+ function Gt(a, r, o, d, i, l) {
1003
+ return u(), V("svg", zt, Ht);
1004
+ }
1005
+ var jt = /* @__PURE__ */ ne(Lt, [["render", Gt], ["__file", "search.vue"]]);
1006
+ const Wt = { class: "bsgoal-base-search-operation" }, Xt = {
1007
+ name: "BsgoalBaseSearchOperation"
1008
+ }, Kt = /* @__PURE__ */ Object.assign(Xt, {
1009
+ props: {
1010
+ /**
1011
+ * 是否显示折叠按钮
1012
+ */
1013
+ fold: {
1014
+ type: [Boolean],
1015
+ default: !1
1016
+ }
1017
+ },
1018
+ emits: ["on-fold"],
1019
+ setup(a, { emit: r }) {
1020
+ const o = w(!1), d = () => {
1021
+ o.value = !s(o), r("on-fold", o.value);
1022
+ };
1023
+ return (i, l) => {
1024
+ const c = g("el-button"), p = g("el-icon");
1025
+ return u(), V("div", Wt, [
1026
+ D(c, {
1027
+ type: "primary",
1028
+ icon: s(jt),
1029
+ onClick: l[0] || (l[0] = (b) => i.$emit("on-search"))
1030
+ }, {
1031
+ default: A(() => [
1032
+ q("搜索")
1033
+ ]),
1034
+ _: 1
1035
+ }, 8, ["icon"]),
1036
+ D(c, {
1037
+ icon: s(Pt),
1038
+ onClick: l[1] || (l[1] = (b) => i.$emit("on-clear"))
1039
+ }, {
1040
+ default: A(() => [
1041
+ q("清空")
1042
+ ]),
1043
+ _: 1
1044
+ }, 8, ["icon"]),
1045
+ a.fold ? (u(), V("div", {
1046
+ key: 0,
1047
+ class: "operation_fold",
1048
+ style: { color: "var(--el-color-primary)" },
1049
+ onClick: d
1050
+ }, [
1051
+ q(j(o.value ? "收起" : "展开"), 1),
1052
+ D(p, { color: "#409EFC" }, {
1053
+ default: A(() => [
1054
+ G(D(s(Ft), null, null, 512), [
1055
+ [Z, o.value]
1056
+ ]),
1057
+ G(D(s(gt), null, null, 512), [
1058
+ [Z, !o.value]
1059
+ ])
1060
+ ]),
1061
+ _: 1
1062
+ })
1063
+ ])) : x("", !0)
1064
+ ]);
1065
+ };
1066
+ }
1067
+ }), qt = /* @__PURE__ */ W(Kt, [["__scopeId", "data-v-b5796be8"]]);
1068
+ const Jt = { class: "bsgoal-base-search" }, Qt = { class: "base_search" }, Zt = { key: 1 }, ea = {
1069
+ name: "BsgoalBaseSearch"
1070
+ }, ta = /* @__PURE__ */ Object.assign(ea, {
1071
+ props: {
1072
+ /**
1073
+ * >----------props----------<
1074
+ * {
1075
+ * label:'' // 名称
1076
+ * value:'' // 值
1077
+ * prop:'' // 绑定字段
1078
+ * type:'text' // 内容组件的类型 : 参照 enumType
1079
+ * placeholder:'' // placeholder 提示文本
1080
+ * readonly: false // 是否为只读文本
1081
+ * clearable: true //是否为可清空
1082
+ * }
1083
+ *
1084
+ * >----------events----------<
1085
+ *
1086
+ * on-search // 触发查询
1087
+ * on-clear // 触发清空
1088
+ * on-change // 触发查询变动
1089
+ * on-fold // 触发折叠
1090
+ */
1091
+ configOptions: {
1092
+ type: [Array],
1093
+ default: () => []
1094
+ },
1095
+ /**
1096
+ * 中屏设备宽度的比例
1097
+ */
1098
+ medium: {
1099
+ type: [Number, String],
1100
+ default: 6
1101
+ }
1102
+ },
1103
+ emits: ["on-search", "on-clear", "on-change", "on-fold"],
1104
+ setup(a, { emit: r }) {
1105
+ const o = a, d = w(null), i = Ee.align, l = w({});
1106
+ pe(() => {
1107
+ const { configOptions: f } = o;
1108
+ s(f).forEach((m) => {
1109
+ const { value: y = "", prop: k = "", type: O = "" } = m;
1110
+ [e.INPUT, e.INPUT_TEXT_AREA].includes(O), l.value[k] = y;
1111
+ });
1112
+ });
1113
+ const c = ue(() => {
1114
+ const { configOptions: f } = o, T = s(f), m = {
1115
+ type: e.OPERATION
1116
+ };
1117
+ return [...T, m];
1118
+ }), p = (f = "", T = "", m = "") => {
1119
+ if (!m)
1120
+ switch (f) {
1121
+ case e.INPUT:
1122
+ case e.INPUT_TEXT_AREA:
1123
+ return `请输入${T}`;
1124
+ case e.SELECT:
1125
+ case e.DATE:
1126
+ case e.WEEK:
1127
+ case e.MONTH:
1128
+ case e.YEAR:
1129
+ case e.DATE_TIME:
1130
+ case e.TIME:
1131
+ return `请选择${T}`;
1132
+ case e.DATE_RANGE:
1133
+ case e.DATE_TIME_RANGE:
1134
+ return ["开始日期", "结束日期"];
1135
+ case e.TIME_RANGE:
1136
+ return ["开始时间", "结束时间"];
1137
+ case e.MONTH_RANGE:
1138
+ return ["开始月份", "结束月份"];
1139
+ }
1140
+ return m;
1141
+ }, b = (f = "", T = "") => {
1142
+ if (!T)
1143
+ switch (f) {
1144
+ case e.WEEK:
1145
+ return "ww";
1146
+ case e.DATE:
1147
+ case e.DATE_RANGE:
1148
+ return "YYYY-MM-DD";
1149
+ case e.MONTH:
1150
+ return "MM";
1151
+ case e.YEAR:
1152
+ return "YYYY";
1153
+ case e.MONTH_RANGE:
1154
+ return "YYYY-MM";
1155
+ case e.TIME:
1156
+ case e.TIME_RANGE:
1157
+ return "HH:mm:ss";
1158
+ case e.DATE_TIME:
1159
+ case e.DATE_TIME_RANGE:
1160
+ return "YYYY-MM-DD HH:mm:ss";
1161
+ }
1162
+ return T;
1163
+ }, $ = () => {
1164
+ const f = s(l), { configOptions: T } = o, m = s(T);
1165
+ for (const y of m) {
1166
+ const { type: k = "", range: O = [], prop: M = "" } = y;
1167
+ if (k.endsWith("range") && O && O.length === 2) {
1168
+ const { 0: P = "", 1: I = "" } = f[M], { 0: S = "", 1: K = "" } = O;
1169
+ f[S] = P, f[K] = I;
1170
+ }
1171
+ }
1172
+ r("on-search", f);
1173
+ };
1174
+ xe(() => {
1175
+ $();
1176
+ });
1177
+ const B = () => {
1178
+ d.value.resetFields(), r("on-clear", l.value);
1179
+ }, N = Ce("transferFoldStatus"), C = w(!1), R = (f = !1) => {
1180
+ C.value = f, N && (N.value = f), r("on-fold", C);
1181
+ }, h = (f, T) => {
1182
+ $();
1183
+ const m = {
1184
+ type: f,
1185
+ prop: T,
1186
+ value: l.value[T] || ""
1187
+ };
1188
+ r("on-change", m);
1189
+ };
1190
+ return (f, T) => {
1191
+ const m = g("el-input"), y = g("el-input-number"), k = g("el-radio"), O = g("el-radio-group"), M = g("el-option"), P = g("el-select"), I = g("el-slider"), S = g("el-switch"), K = g("el-date-picker"), ee = g("el-time-picker"), le = g("el-checkbox"), te = g("el-checkbox-group"), ie = g("el-form-item"), me = g("el-col"), ve = g("el-row"), L = g("el-form");
1192
+ return u(), V("div", Jt, [
1193
+ F("div", Qt, [
1194
+ G((u(), E(L, {
1195
+ ref_key: "EL_FORM_REF",
1196
+ ref: d,
1197
+ "label-suffix": ":",
1198
+ "show-message": !1,
1199
+ model: l.value
1200
+ }, {
1201
+ default: A(() => [
1202
+ D(ve, null, {
1203
+ default: A(() => [
1204
+ (u(!0), V(U, null, X(s(c), ({
1205
+ label: v = "",
1206
+ prop: n = "",
1207
+ type: _ = "text",
1208
+ placeholder: z = "",
1209
+ readonly: ce = !1,
1210
+ clearable: re = !0,
1211
+ rows: _e = 2,
1212
+ min: oe = 1,
1213
+ max: J = 10,
1214
+ range: Y = [],
1215
+ format: Q = ""
1216
+ } = {}, ae) => G((u(), E(me, {
1217
+ key: ae,
1218
+ xs: 24,
1219
+ sm: 12,
1220
+ md: a.medium
1221
+ }, {
1222
+ default: A(() => [
1223
+ D(ie, {
1224
+ label: v,
1225
+ prop: n
1226
+ }, {
1227
+ default: A(() => [
1228
+ ce ? (u(), V("div", Zt, j(l.value[n]), 1)) : (u(), V(U, { key: 0 }, [
1229
+ _ === s(e).INPUT ? (u(), E(m, {
1230
+ key: 0,
1231
+ modelValue: l.value[n],
1232
+ "onUpdate:modelValue": (t) => l.value[n] = t,
1233
+ placeholder: p(_, v, z),
1234
+ clearable: re,
1235
+ onChange: (t) => h(_, n)
1236
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "clearable", "onChange"])) : x("", !0),
1237
+ _ === s(e).INPUT_TEXT_AREA ? (u(), E(m, {
1238
+ key: 1,
1239
+ modelValue: l.value[n],
1240
+ "onUpdate:modelValue": (t) => l.value[n] = t,
1241
+ type: "textarea",
1242
+ rows: _e,
1243
+ clearable: re,
1244
+ placeholder: p(_, v, z),
1245
+ onChange: (t) => h(_, n)
1246
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "rows", "clearable", "placeholder", "onChange"])) : x("", !0),
1247
+ _ === s(e).INPUT_NUMBER ? (u(), E(y, {
1248
+ key: 2,
1249
+ modelValue: f.num,
1250
+ "onUpdate:modelValue": T[0] || (T[0] = (t) => f.num = t),
1251
+ min: oe,
1252
+ max: J,
1253
+ onChange: h
1254
+ }, null, 8, ["modelValue", "min", "max"])) : x("", !0),
1255
+ _ === s(e).RADIO ? (u(), E(O, {
1256
+ key: 3,
1257
+ modelValue: l.value[n],
1258
+ "onUpdate:modelValue": (t) => l.value[n] = t,
1259
+ onChange: (t) => h(_, n)
1260
+ }, {
1261
+ default: A(() => [
1262
+ (u(!0), V(U, null, X(Y, (t, H) => (u(), E(k, {
1263
+ key: H,
1264
+ label: t.value
1265
+ }, {
1266
+ default: A(() => [
1267
+ q(j(t.label), 1)
1268
+ ]),
1269
+ _: 2
1270
+ }, 1032, ["label"]))), 128))
1271
+ ]),
1272
+ _: 2
1273
+ }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : x("", !0),
1274
+ _ === s(e).SELECT ? (u(), E(P, {
1275
+ key: 4,
1276
+ modelValue: l.value[n],
1277
+ "onUpdate:modelValue": (t) => l.value[n] = t,
1278
+ placeholder: p(_, v, z),
1279
+ onChange: (t) => h(_, n)
1280
+ }, {
1281
+ default: A(() => [
1282
+ (u(!0), V(U, null, X(Y, (t, H) => (u(), E(M, {
1283
+ key: H,
1284
+ label: t.label,
1285
+ value: t.value
1286
+ }, null, 8, ["label", "value"]))), 128))
1287
+ ]),
1288
+ _: 2
1289
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "onChange"])) : x("", !0),
1290
+ _ === s(e).SLIDER ? (u(), E(I, {
1291
+ key: 5,
1292
+ modelValue: l.value[n],
1293
+ "onUpdate:modelValue": (t) => l.value[n] = t,
1294
+ min: oe,
1295
+ max: J,
1296
+ onChange: (t) => h(_, n)
1297
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "onChange"])) : x("", !0),
1298
+ _ === s(e).SWITCH ? (u(), E(S, {
1299
+ key: 6,
1300
+ modelValue: l.value[n],
1301
+ "onUpdate:modelValue": (t) => l.value[n] = t,
1302
+ "active-value": Y[0] || !0,
1303
+ "inactive-value": Y[1] || !1,
1304
+ onChange: (t) => h(_, n)
1305
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "active-value", "inactive-value", "onChange"])) : x("", !0),
1306
+ [s(e).DATE, s(e).MONTH, s(e).YEAR, s(e).DATE_TIME].includes(
1307
+ _
1308
+ ) ? (u(), E(K, {
1309
+ key: 7,
1310
+ modelValue: l.value[n],
1311
+ "onUpdate:modelValue": (t) => l.value[n] = t,
1312
+ format: b(_, Q),
1313
+ "value-format": b(_, Q),
1314
+ type: _,
1315
+ placeholder: p(_, v, z),
1316
+ onChange: (t) => h(_, n)
1317
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "format", "value-format", "type", "placeholder", "onChange"])) : x("", !0),
1318
+ [
1319
+ s(e).DATE_RANGE,
1320
+ s(e).MONTH_RANGE,
1321
+ s(e).DATE_TIME_RANGE
1322
+ ].includes(_) ? (u(), E(K, {
1323
+ key: 8,
1324
+ modelValue: l.value[n],
1325
+ "onUpdate:modelValue": (t) => l.value[n] = t,
1326
+ type: _,
1327
+ "value-format": b(_, Q),
1328
+ "start-placeholder": p(_, v, z)[0],
1329
+ "end-placeholder": p(_, v, z)[1],
1330
+ onChange: (t) => h(_, n)
1331
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "value-format", "start-placeholder", "end-placeholder", "onChange"])) : x("", !0),
1332
+ [s(e).TIME].includes(_) ? (u(), E(ee, {
1333
+ key: 9,
1334
+ modelValue: l.value[n],
1335
+ "onUpdate:modelValue": (t) => l.value[n] = t,
1336
+ "arrow-control": "",
1337
+ "value-format": b(_, Q),
1338
+ placeholder: p(_, v, z),
1339
+ onChange: (t) => h(_, n)
1340
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "value-format", "placeholder", "onChange"])) : x("", !0),
1341
+ [s(e).TIME_RANGE].includes(_) ? (u(), E(ee, {
1342
+ key: 10,
1343
+ modelValue: l.value[n],
1344
+ "onUpdate:modelValue": (t) => l.value[n] = t,
1345
+ "is-range": "",
1346
+ "value-format": b(_, Q),
1347
+ "start-placeholder": p(_, v, z)[0],
1348
+ "end-placeholder": p(_, v, z)[1],
1349
+ onChange: (t) => h(_, n)
1350
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "value-format", "start-placeholder", "end-placeholder", "onChange"])) : x("", !0),
1351
+ [s(e).CHECKBOX].includes(_) ? (u(), E(te, {
1352
+ key: 11,
1353
+ modelValue: l.value[n],
1354
+ "onUpdate:modelValue": (t) => l.value[n] = t,
1355
+ onChange: (t) => h(_, n)
1356
+ }, {
1357
+ default: A(() => [
1358
+ (u(!0), V(U, null, X(Y, (t, H) => (u(), E(le, {
1359
+ key: H,
1360
+ label: t.value
1361
+ }, {
1362
+ default: A(() => [
1363
+ q(j(t.label), 1)
1364
+ ]),
1365
+ _: 2
1366
+ }, 1032, ["label"]))), 128))
1367
+ ]),
1368
+ _: 2
1369
+ }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : x("", !0),
1370
+ [].includes(_) ? (u(), V(U, { key: 12 }, [], 64)) : x("", !0),
1371
+ [s(e).OPERATION].includes(_) ? (u(), E(qt, {
1372
+ key: 13,
1373
+ fold: ae >= 7,
1374
+ onOnSearch: $,
1375
+ onOnClear: B,
1376
+ onOnFold: R
1377
+ }, null, 8, ["fold"])) : x("", !0)
1378
+ ], 64))
1379
+ ]),
1380
+ _: 2
1381
+ }, 1032, ["label", "prop"])
1382
+ ]),
1383
+ _: 2
1384
+ }, 1032, ["md"])), [
1385
+ [Z, ae < 7 || _ === s(e).OPERATION || ae >= 7 && C.value]
1386
+ ])), 128))
1387
+ ]),
1388
+ _: 1
1389
+ })
1390
+ ]),
1391
+ _: 1
1392
+ }, 8, ["model"])), [
1393
+ [s(i)]
1394
+ ])
1395
+ ]),
1396
+ D(Te)
1397
+ ]);
1398
+ };
1399
+ }
1400
+ }), aa = /* @__PURE__ */ W(ta, [["__scopeId", "data-v-c4e64d40"]]);
1401
+ const na = { class: "bsgoal-base-search-table" }, la = { class: "base_search_table" }, oa = {
1402
+ name: "BsgoalBaseSearchTable"
1403
+ }, ua = /* @__PURE__ */ Object.assign(oa, {
1404
+ props: {
1405
+ /**
1406
+ * >----------props----------<
1407
+ * {
1408
+ *
1409
+ * label: '' // 列名
1410
+ * prop : '' // 绑定字段
1411
+ *
1412
+ *
1413
+ * value: '' // 初始值 (查询)
1414
+ * type : '' // 查询组件的类型 (查询)
1415
+ *
1416
+ *
1417
+ * width: 0 // 列宽度 (表格)
1418
+ *
1419
+ * }
1420
+ *
1421
+ * >----------slots----------<
1422
+ *
1423
+ * menu: 顶部操作区域
1424
+ * operation: 列表右侧操作区域
1425
+ *
1426
+ */
1427
+ configOptions: {
1428
+ type: [Array],
1429
+ default: () => []
1430
+ },
1431
+ /**
1432
+ * 表格数据
1433
+ */
1434
+ tableData: {
1435
+ type: [Array],
1436
+ default: () => []
1437
+ },
1438
+ /**
1439
+ * 是否多选
1440
+ */
1441
+ selection: {
1442
+ type: [Boolean],
1443
+ default: !1
1444
+ },
1445
+ /**
1446
+ * 是否配置操作列
1447
+ */
1448
+ operation: {
1449
+ type: [Boolean],
1450
+ default: !1
1451
+ },
1452
+ /**
1453
+ * 操作列宽度
1454
+ */
1455
+ operationWidth: {
1456
+ type: [String, Number],
1457
+ default: 100
1458
+ },
1459
+ /**
1460
+ * 请求的 promise
1461
+ */
1462
+ fetch: {
1463
+ type: [Object, Function],
1464
+ default: null
1465
+ },
1466
+ /**
1467
+ * 响应的 call
1468
+ */
1469
+ call: {
1470
+ type: [Object, Function],
1471
+ default: null
1472
+ }
1473
+ },
1474
+ setup(a) {
1475
+ const r = a, o = w(!1);
1476
+ Fe("transferFoldStatus", o);
1477
+ const d = s(r.configOptions), i = ue(() => d), l = ue(() => d), c = Me(), p = w(Object.keys(c)), b = w(null), $ = (B) => {
1478
+ b.value.refreshList(B);
1479
+ };
1480
+ return (B, N) => (u(), V("div", na, [
1481
+ F("div", la, [
1482
+ D(aa, {
1483
+ "config-options": s(i),
1484
+ onOnSearch: $,
1485
+ onOnClear: $
1486
+ }, null, 8, ["config-options"]),
1487
+ D($e, {
1488
+ ref_key: "BSGOAL_BASE_TABLE_REF",
1489
+ ref: b,
1490
+ operationWidth: a.operationWidth,
1491
+ "config-options": s(l),
1492
+ data: a.tableData,
1493
+ selection: a.selection,
1494
+ operation: a.operation,
1495
+ fetch: a.fetch,
1496
+ call: a.call
1497
+ }, Re({ _: 2 }, [
1498
+ X(p.value, (C) => ({
1499
+ name: C,
1500
+ fn: A(({ row: R = {} }) => [
1501
+ de(B.$slots, C, { row: R }, void 0, !0)
1502
+ ])
1503
+ }))
1504
+ ]), 1032, ["operationWidth", "config-options", "data", "selection", "operation", "fetch", "call"])
1505
+ ])
1506
+ ]));
1507
+ }
1508
+ }), sa = /* @__PURE__ */ W(ua, [["__scopeId", "data-v-9ec9045a"]]);
1509
+ const ca = { class: "bsgoal-base-tree-fold" }, ra = {
1510
+ name: "BsgoalBaseTreeFold"
1511
+ }, _a = /* @__PURE__ */ Object.assign(ra, {
1512
+ props: ["modelValue"],
1513
+ emits: ["update:modelValue"],
1514
+ setup(a, { emit: r }) {
1515
+ let o = w(!0);
1516
+ const d = () => {
1517
+ o.value = !o.value, r("update:modelValue", o.value);
1518
+ };
1519
+ return (i, l) => {
1520
+ const c = g("el-icon");
1521
+ return u(), V("div", ca, [
1522
+ F("div", {
1523
+ class: he(["base_tree_fold", { "base_tree_fold--hide": !s(o) }]),
1524
+ onClick: d
1525
+ }, [
1526
+ D(c, { color: "#fff" }, {
1527
+ default: A(() => [
1528
+ G(D(s(Vt), null, null, 512), [
1529
+ [Z, s(o)]
1530
+ ]),
1531
+ G(D(s(Bt), null, null, 512), [
1532
+ [Z, !s(o)]
1533
+ ])
1534
+ ]),
1535
+ _: 1
1536
+ })
1537
+ ], 2)
1538
+ ]);
1539
+ };
1540
+ }
1541
+ }), da = /* @__PURE__ */ W(_a, [["__scopeId", "data-v-b5171812"]]);
1542
+ const ia = { class: "bsgoal-base-tree" }, ma = { class: "base_tree" }, va = { class: "base_tree_main" }, fa = {
1543
+ name: "BsgoalBaseTree"
1544
+ }, ga = /* @__PURE__ */ Object.assign(fa, {
1545
+ props: {
1546
+ /**
1547
+ * 树结构 的下边距
1548
+ */
1549
+ gasket: {
1550
+ type: [String, Number],
1551
+ default: 10
1552
+ },
1553
+ /**
1554
+ * 数据
1555
+ */
1556
+ data: {
1557
+ type: [Object, Array],
1558
+ default: () => []
1559
+ },
1560
+ /**
1561
+ * 配置
1562
+ */
1563
+ treeProps: {
1564
+ type: [Object],
1565
+ default: () => ({
1566
+ label: "label",
1567
+ children: "children",
1568
+ disabled: "disabled",
1569
+ isLeaf: "isLeaf",
1570
+ class: "class"
1571
+ })
1572
+ },
1573
+ /**
1574
+ * 懒加载数据方法
1575
+ * () => {
1576
+ * return Promise(resolve => resolve([]))
1577
+ * }
1578
+ */
1579
+ lazyLoad: {
1580
+ type: [Function],
1581
+ default: () => {
1582
+ }
1583
+ },
1584
+ /**
1585
+ * 初始化树节点
1586
+ * () => {
1587
+ * return Promise(resolve => resolve([]))
1588
+ * }
1589
+ */
1590
+ initNode: {
1591
+ type: [Function],
1592
+ default: () => {
1593
+ }
1594
+ }
1595
+ },
1596
+ emits: ["on-click"],
1597
+ setup(a, { emit: r }) {
1598
+ const o = a, d = Ee.height, i = w(""), l = w(null);
1599
+ se(i, (B) => {
1600
+ l.value.filter(B);
1601
+ });
1602
+ const c = (B, N) => B ? N.label.includes(B) : !0, p = w(!0), b = (B, N, C, R) => {
1603
+ r("on-click", B, N, C, R);
1604
+ }, $ = async (B, N, C) => {
1605
+ if (B.level === 0) {
1606
+ const R = await C.initNode(B);
1607
+ return N(R || []);
1608
+ } else {
1609
+ const R = await C.lazyLoad(B);
1610
+ N(R || []);
1611
+ }
1612
+ };
1613
+ return (B, N) => {
1614
+ const C = g("el-input"), R = g("el-tree");
1615
+ return u(), V("div", ia, [
1616
+ G((u(), V("div", ma, [
1617
+ G(F("div", va, [
1618
+ D(C, {
1619
+ modelValue: i.value,
1620
+ "onUpdate:modelValue": N[0] || (N[0] = (h) => i.value = h),
1621
+ class: "base_tree_main_input",
1622
+ placeholder: "输入关键字过滤"
1623
+ }, null, 8, ["modelValue"]),
1624
+ D(R, {
1625
+ ref_key: "EL_TREE_REF",
1626
+ ref: l,
1627
+ lazy: "",
1628
+ "highlight-current": "",
1629
+ "empty-text": "暂无数据",
1630
+ load: (h, f) => $(h, f, o),
1631
+ "expand-on-click-node": !1,
1632
+ props: a.treeProps,
1633
+ "filter-node-method": c,
1634
+ onNodeClick: b
1635
+ }, null, 8, ["load", "props"])
1636
+ ], 512), [
1637
+ [Z, p.value]
1638
+ ]),
1639
+ G(D(Te, { vertical: "" }, null, 512), [
1640
+ [Z, p.value]
1641
+ ]),
1642
+ D(da, {
1643
+ modelValue: p.value,
1644
+ "onUpdate:modelValue": N[1] || (N[1] = (h) => p.value = h)
1645
+ }, null, 8, ["modelValue"])
1646
+ ])), [
1647
+ [s(d), a.gasket]
1648
+ ])
1649
+ ]);
1650
+ };
1651
+ }
1652
+ }), ha = /* @__PURE__ */ W(ga, [["__scopeId", "data-v-35fba25c"]]);
1653
+ const pa = { class: "bsgoal-base-dialog" }, Ea = { class: "base_dialog" }, ba = { class: "base_dialog_header" }, Ta = { class: "base_dialog_content" }, Va = { class: "base_dialog_footer" }, Aa = {
1654
+ name: "BsgoalBaseDialog"
1655
+ }, ya = /* @__PURE__ */ Object.assign(Aa, {
1656
+ props: {
1657
+ /**
1658
+ * 弹窗状态
1659
+ */
1660
+ modelValue: {
1661
+ type: [Boolean],
1662
+ default: !1
1663
+ },
1664
+ /**
1665
+ * 标题
1666
+ */
1667
+ title: {
1668
+ type: [String],
1669
+ default: "标题"
1670
+ },
1671
+ /**
1672
+ * 取消的文本
1673
+ */
1674
+ cancelTxt: {
1675
+ type: [String],
1676
+ default: "取消"
1677
+ },
1678
+ /**
1679
+ * 确定的文本
1680
+ */
1681
+ confirmTxt: {
1682
+ type: [String],
1683
+ default: "确定"
1684
+ }
1685
+ },
1686
+ emits: ["update:modelValue", "on-confirm"],
1687
+ setup(a, { emit: r }) {
1688
+ const o = a, d = w(o.modelValue.value), i = () => {
1689
+ d.value = !1;
1690
+ }, l = () => {
1691
+ d.value = !1, r("on-confirm");
1692
+ };
1693
+ return se(
1694
+ () => o.modelValue,
1695
+ (c) => {
1696
+ d.value = c;
1697
+ }
1698
+ ), se(d, (c) => {
1699
+ r("update:modelValue", c);
1700
+ }), (c, p) => {
1701
+ const b = g("el-button"), $ = g("el-dialog");
1702
+ return u(), V("div", pa, [
1703
+ F("div", Ea, [
1704
+ D($, {
1705
+ modelValue: d.value,
1706
+ "onUpdate:modelValue": p[0] || (p[0] = (B) => d.value = B),
1707
+ "custom-class": "bsgoal_base_dialog_main"
1708
+ }, {
1709
+ header: A(() => [
1710
+ F("div", ba, j(a.title), 1)
1711
+ ]),
1712
+ footer: A(() => [
1713
+ F("span", Va, [
1714
+ D(b, { onClick: i }, {
1715
+ default: A(() => [
1716
+ q(j(a.cancelTxt), 1)
1717
+ ]),
1718
+ _: 1
1719
+ }),
1720
+ D(b, {
1721
+ type: "primary",
1722
+ onClick: l
1723
+ }, {
1724
+ default: A(() => [
1725
+ q(j(a.confirmTxt), 1)
1726
+ ]),
1727
+ _: 1
1728
+ })
1729
+ ])
1730
+ ]),
1731
+ default: A(() => [
1732
+ F("div", Ta, [
1733
+ de(c.$slots, "default", {}, void 0, !0)
1734
+ ])
1735
+ ]),
1736
+ _: 3
1737
+ }, 8, ["modelValue"])
1738
+ ])
1739
+ ]);
1740
+ };
1741
+ }
1742
+ }), xa = /* @__PURE__ */ W(ya, [["__scopeId", "data-v-435caf75"]]), wa = e, Da = be, ka = {
1743
+ install(a, r = {}) {
1744
+ const { exclude: o = [] } = r, d = {
1745
+ BsgoalBaseForm: Ye,
1746
+ BsgoalBaseTable: $e,
1747
+ BsgoalBaseLine: Te,
1748
+ BsgoalBaseSearchTable: sa,
1749
+ BsgoalBaseTree: ha,
1750
+ BsgoalBaseDialog: xa
1751
+ };
1752
+ for (const [i, l] of Object.entries(d))
1753
+ o.includes(i) || a.component(i, l);
1754
+ },
1755
+ enumType: e,
1756
+ useFetch: be
1757
+ };
1758
+ export {
1759
+ wa as EnumType,
1760
+ ka as default,
1761
+ Da as useFetchApi
1762
+ };
1763
+ //# sourceMappingURL=index.mjs.map