@xjw_/vue3-npm-system 1.0.1 → 1.0.3

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.
Files changed (44) hide show
  1. package/dist/index.es.js +2385 -694
  2. package/dist/index.es.js.map +1 -1
  3. package/dist/index.umd.js +2385 -694
  4. package/dist/index.umd.js.map +1 -1
  5. package/dist/types/components/SvgIcon.vue.d.ts +23 -0
  6. package/dist/types/components/SvgIcon.vue.d.ts.map +1 -0
  7. package/dist/types/components/XBusinessLog.vue.d.ts +83 -0
  8. package/dist/types/components/XBusinessLog.vue.d.ts.map +1 -0
  9. package/dist/types/components/XDatePicker.vue.d.ts +93 -0
  10. package/dist/types/components/XDatePicker.vue.d.ts.map +1 -0
  11. package/dist/types/components/XElForm.vue.d.ts +166 -0
  12. package/dist/types/components/XElForm.vue.d.ts.map +1 -0
  13. package/dist/types/components/XElFormItem.vue.d.ts +114 -0
  14. package/dist/types/components/XElFormItem.vue.d.ts.map +1 -0
  15. package/dist/types/components/XElOption.vue.d.ts +42 -0
  16. package/dist/types/components/XElOption.vue.d.ts.map +1 -0
  17. package/dist/types/components/XElSelect.vue.d.ts +108 -0
  18. package/dist/types/components/XElSelect.vue.d.ts.map +1 -0
  19. package/dist/types/components/XPagination.vue.d.ts +55 -0
  20. package/dist/types/components/XPagination.vue.d.ts.map +1 -0
  21. package/dist/types/components/XReportTable.vue.d.ts +323 -0
  22. package/dist/types/components/XReportTable.vue.d.ts.map +1 -0
  23. package/dist/types/components/XSearchBar.vue.d.ts +152 -0
  24. package/dist/types/components/XSearchBar.vue.d.ts.map +1 -0
  25. package/dist/types/components/XSplitLayout.vue.d.ts +239 -0
  26. package/dist/types/components/XSplitLayout.vue.d.ts.map +1 -0
  27. package/dist/types/components/XVxeColumn.vue.d.ts +121 -0
  28. package/dist/types/components/XVxeColumn.vue.d.ts.map +1 -0
  29. package/dist/types/components/XVxeTable.vue.d.ts +347 -0
  30. package/dist/types/components/XVxeTable.vue.d.ts.map +1 -0
  31. package/dist/types/utils/index.d.ts +2 -0
  32. package/dist/types/utils/index.d.ts.map +1 -1
  33. package/dist/vue3-npm-system.css +4476 -14
  34. package/package.json +8 -6
  35. package/dist/types/components/JcButton/index.vue.d.ts +0 -64
  36. package/dist/types/components/JcButton/index.vue.d.ts.map +0 -1
  37. package/dist/types/components/JcDialog/index.vue.d.ts +0 -96
  38. package/dist/types/components/JcDialog/index.vue.d.ts.map +0 -1
  39. package/dist/types/components/JcForm/index.vue.d.ts +0 -97
  40. package/dist/types/components/JcForm/index.vue.d.ts.map +0 -1
  41. package/dist/types/components/JcTable/index.vue.d.ts +0 -144
  42. package/dist/types/components/JcTable/index.vue.d.ts.map +0 -1
  43. package/dist/types/components/JcUpload/index.vue.d.ts +0 -76
  44. package/dist/types/components/JcUpload/index.vue.d.ts.map +0 -1
package/dist/index.es.js CHANGED
@@ -1,683 +1,5 @@
1
- import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createElementBlock, createElementVNode, ref, computed, resolveDirective, createVNode, createCommentVNode, unref, withDirectives, Fragment, renderList, mergeProps, createSlots, resolveDynamicComponent } from "vue";
2
- import { ElInput, ElCheckboxGroup, ElRadioGroup, ElDatePicker, ElSelect, ElMessage } from "element-plus";
3
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4
- ...{
5
- name: "JcButton"
6
- },
7
- __name: "index",
8
- props: {
9
- type: { default: "primary" },
10
- size: { default: "default" },
11
- disabled: { type: Boolean, default: false },
12
- loading: { type: Boolean, default: false },
13
- text: { default: "" },
14
- autoLoading: { type: Boolean, default: false }
15
- },
16
- emits: ["click"],
17
- setup(__props, { emit: __emit }) {
18
- const props = __props;
19
- const emit = __emit;
20
- const handleClick = (e) => {
21
- if (props.disabled || props.autoLoading && props.loading) return;
22
- emit("click", e);
23
- };
24
- return (_ctx, _cache) => {
25
- const _component_el_button = resolveComponent("el-button");
26
- return openBlock(), createBlock(_component_el_button, {
27
- type: _ctx.type,
28
- size: _ctx.size,
29
- disabled: _ctx.disabled,
30
- loading: _ctx.loading,
31
- onClick: handleClick
32
- }, {
33
- default: withCtx(() => [
34
- renderSlot(_ctx.$slots, "default", {}, () => [
35
- createTextVNode(toDisplayString(_ctx.text), 1)
36
- ], true)
37
- ]),
38
- _: 3
39
- }, 8, ["type", "size", "disabled", "loading"]);
40
- };
41
- }
42
- });
43
- const _export_sfc = (sfc, props) => {
44
- const target = sfc.__vccOpts || sfc;
45
- for (const [key, val] of props) {
46
- target[key] = val;
47
- }
48
- return target;
49
- };
50
- const JcButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-1d880bdc"]]);
51
- /*! Element Plus Icons Vue v2.3.1 */
52
- var download_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
53
- name: "Download",
54
- __name: "download",
55
- setup(__props) {
56
- return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
57
- xmlns: "http://www.w3.org/2000/svg",
58
- viewBox: "0 0 1024 1024"
59
- }, [
60
- createElementVNode("path", {
61
- fill: "currentColor",
62
- d: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"
63
- })
64
- ]));
65
- }
66
- });
67
- var download_default = download_vue_vue_type_script_setup_true_lang_default;
68
- var refresh_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
69
- name: "Refresh",
70
- __name: "refresh",
71
- setup(__props) {
72
- return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
73
- xmlns: "http://www.w3.org/2000/svg",
74
- viewBox: "0 0 1024 1024"
75
- }, [
76
- createElementVNode("path", {
77
- fill: "currentColor",
78
- d: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"
79
- })
80
- ]));
81
- }
82
- });
83
- var refresh_default = refresh_vue_vue_type_script_setup_true_lang_default;
84
- var upload_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
85
- name: "Upload",
86
- __name: "upload",
87
- setup(__props) {
88
- return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
89
- xmlns: "http://www.w3.org/2000/svg",
90
- viewBox: "0 0 1024 1024"
91
- }, [
92
- createElementVNode("path", {
93
- fill: "currentColor",
94
- d: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248z"
95
- })
96
- ]));
97
- }
98
- });
99
- var upload_default = upload_vue_vue_type_script_setup_true_lang_default;
100
- const _hoisted_1$2 = { class: "jc-table-wrapper" };
101
- const _hoisted_2 = {
102
- key: 0,
103
- class: "jc-table-toolbar"
104
- };
105
- const _hoisted_3 = {
106
- key: 1,
107
- class: "jc-table-pagination"
108
- };
109
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
110
- ...{
111
- name: "JcTable"
112
- },
113
- __name: "index",
114
- props: {
115
- data: { default: () => [] },
116
- columns: { default: () => [] },
117
- loading: { type: Boolean, default: false },
118
- border: { type: Boolean, default: true },
119
- stripe: { type: Boolean, default: false },
120
- height: {},
121
- maxHeight: {},
122
- rowKey: {},
123
- showToolbar: { type: Boolean, default: true },
124
- searchable: { type: Boolean, default: true },
125
- showSelection: { type: Boolean, default: false },
126
- showIndex: { type: Boolean, default: false },
127
- showOperation: { type: Boolean, default: false },
128
- operationWidth: { default: 150 },
129
- showPagination: { type: Boolean, default: true },
130
- total: { default: 0 },
131
- pageSizes: { default: () => [10, 20, 50, 100] },
132
- currentPage: { default: 1 },
133
- pageSize: { default: 10 }
134
- },
135
- emits: ["update:currentPage", "update:pageSize", "selection-change", "sort-change", "refresh", "export", "search"],
136
- setup(__props, { emit: __emit }) {
137
- const props = __props;
138
- const emit = __emit;
139
- const searchText = ref("");
140
- const tableData = computed(() => props.data);
141
- const currentPage = computed({
142
- get: () => props.currentPage,
143
- set: (val) => emit("update:currentPage", val)
144
- });
145
- const pageSize = computed({
146
- get: () => props.pageSize,
147
- set: (val) => emit("update:pageSize", val)
148
- });
149
- const getCellValue = (row, prop) => {
150
- const keys = prop.split(".");
151
- let value = row;
152
- for (const key of keys) {
153
- value = value == null ? void 0 : value[key];
154
- }
155
- return value;
156
- };
157
- const handleSelectionChange = (selection) => {
158
- emit("selection-change", selection);
159
- };
160
- const handleSortChange = ({ prop, order }) => {
161
- emit("sort-change", { prop, order });
162
- };
163
- const handleSizeChange = (size) => {
164
- emit("update:pageSize", size);
165
- };
166
- const handleCurrentChange = (page) => {
167
- emit("update:currentPage", page);
168
- };
169
- const handleSearch = () => {
170
- emit("search", searchText.value);
171
- };
172
- const handleRefresh = () => {
173
- emit("refresh");
174
- };
175
- const handleExport = () => {
176
- emit("export");
177
- };
178
- return (_ctx, _cache) => {
179
- const _component_el_input = resolveComponent("el-input");
180
- const _component_el_button = resolveComponent("el-button");
181
- const _component_el_space = resolveComponent("el-space");
182
- const _component_el_table_column = resolveComponent("el-table-column");
183
- const _component_el_table = resolveComponent("el-table");
184
- const _component_el_pagination = resolveComponent("el-pagination");
185
- const _directive_loading = resolveDirective("loading");
186
- return openBlock(), createElementBlock("div", _hoisted_1$2, [
187
- _ctx.showToolbar ? (openBlock(), createElementBlock("div", _hoisted_2, [
188
- renderSlot(_ctx.$slots, "toolbar", {}, () => [
189
- createVNode(_component_el_space, null, {
190
- default: withCtx(() => [
191
- _ctx.searchable ? (openBlock(), createBlock(_component_el_input, {
192
- key: 0,
193
- modelValue: searchText.value,
194
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchText.value = $event),
195
- placeholder: "搜索...",
196
- clearable: "",
197
- style: { "width": "200px" },
198
- onInput: handleSearch
199
- }, null, 8, ["modelValue"])) : createCommentVNode("", true),
200
- createVNode(_component_el_button, {
201
- type: "primary",
202
- icon: unref(refresh_default),
203
- onClick: handleRefresh
204
- }, {
205
- default: withCtx(() => _cache[3] || (_cache[3] = [
206
- createTextVNode(" 刷新 ")
207
- ])),
208
- _: 1,
209
- __: [3]
210
- }, 8, ["icon"]),
211
- createVNode(_component_el_button, {
212
- type: "success",
213
- icon: unref(download_default),
214
- onClick: handleExport
215
- }, {
216
- default: withCtx(() => _cache[4] || (_cache[4] = [
217
- createTextVNode(" 导出 ")
218
- ])),
219
- _: 1,
220
- __: [4]
221
- }, 8, ["icon"])
222
- ]),
223
- _: 1
224
- })
225
- ], true)
226
- ])) : createCommentVNode("", true),
227
- withDirectives((openBlock(), createBlock(_component_el_table, {
228
- data: tableData.value,
229
- border: _ctx.border,
230
- stripe: _ctx.stripe,
231
- height: _ctx.height,
232
- "max-height": _ctx.maxHeight,
233
- "row-key": _ctx.rowKey,
234
- onSelectionChange: handleSelectionChange,
235
- onSortChange: handleSortChange
236
- }, {
237
- default: withCtx(() => [
238
- _ctx.showSelection ? (openBlock(), createBlock(_component_el_table_column, {
239
- key: 0,
240
- type: "selection",
241
- width: "55",
242
- align: "center"
243
- })) : createCommentVNode("", true),
244
- _ctx.showIndex ? (openBlock(), createBlock(_component_el_table_column, {
245
- key: 1,
246
- type: "index",
247
- label: "序号",
248
- width: "60",
249
- align: "center"
250
- })) : createCommentVNode("", true),
251
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (column) => {
252
- return openBlock(), createBlock(_component_el_table_column, mergeProps({
253
- key: column.prop
254
- }, { ref_for: true }, column, {
255
- prop: column.prop,
256
- label: column.label,
257
- width: column.width,
258
- "min-width": column.minWidth,
259
- fixed: column.fixed,
260
- sortable: column.sortable,
261
- align: column.align || "center"
262
- }), createSlots({ _: 2 }, [
263
- column.slot ? {
264
- name: "default",
265
- fn: withCtx(({ row, column: col, $index }) => [
266
- renderSlot(_ctx.$slots, column.slot, {
267
- row,
268
- column: col,
269
- $index
270
- }, () => [
271
- createTextVNode(toDisplayString(getCellValue(row, column.prop)), 1)
272
- ], true)
273
- ]),
274
- key: "0"
275
- } : {
276
- name: "default",
277
- fn: withCtx(({ row }) => [
278
- createTextVNode(toDisplayString(getCellValue(row, column.prop)), 1)
279
- ]),
280
- key: "1"
281
- }
282
- ]), 1040, ["prop", "label", "width", "min-width", "fixed", "sortable", "align"]);
283
- }), 128)),
284
- _ctx.showOperation ? (openBlock(), createBlock(_component_el_table_column, {
285
- key: 2,
286
- label: "操作",
287
- width: _ctx.operationWidth,
288
- fixed: "right",
289
- align: "center"
290
- }, {
291
- default: withCtx(({ row, $index }) => [
292
- renderSlot(_ctx.$slots, "operation", {
293
- row,
294
- $index
295
- }, void 0, true)
296
- ]),
297
- _: 3
298
- }, 8, ["width"])) : createCommentVNode("", true)
299
- ]),
300
- _: 3
301
- }, 8, ["data", "border", "stripe", "height", "max-height", "row-key"])), [
302
- [_directive_loading, _ctx.loading]
303
- ]),
304
- _ctx.showPagination ? (openBlock(), createElementBlock("div", _hoisted_3, [
305
- createVNode(_component_el_pagination, {
306
- "current-page": currentPage.value,
307
- "onUpdate:currentPage": _cache[1] || (_cache[1] = ($event) => currentPage.value = $event),
308
- "page-size": pageSize.value,
309
- "onUpdate:pageSize": _cache[2] || (_cache[2] = ($event) => pageSize.value = $event),
310
- total: _ctx.total,
311
- "page-sizes": _ctx.pageSizes,
312
- layout: "total, sizes, prev, pager, next, jumper",
313
- onSizeChange: handleSizeChange,
314
- onCurrentChange: handleCurrentChange
315
- }, null, 8, ["current-page", "page-size", "total", "page-sizes"])
316
- ])) : createCommentVNode("", true)
317
- ]);
318
- };
319
- }
320
- });
321
- const JcTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-66db1a15"]]);
322
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
323
- ...{
324
- name: "JcForm"
325
- },
326
- __name: "index",
327
- props: {
328
- modelValue: {},
329
- items: { default: () => [] },
330
- span: { default: 12 },
331
- gutter: { default: 20 },
332
- inline: { type: Boolean, default: false },
333
- labelPosition: { default: "right" },
334
- labelWidth: { default: "80px" },
335
- rules: { default: () => ({}) }
336
- },
337
- emits: ["update:modelValue", "submit", "reset"],
338
- setup(__props, { expose: __expose, emit: __emit }) {
339
- const props = __props;
340
- const emit = __emit;
341
- const formRef = ref();
342
- const formProps = {
343
- inline: props.inline,
344
- labelPosition: props.labelPosition,
345
- labelWidth: props.labelWidth
346
- };
347
- const getComponent = (type) => {
348
- const componentMap = {
349
- input: ElInput,
350
- select: ElSelect,
351
- date: ElDatePicker,
352
- radio: ElRadioGroup,
353
- checkbox: ElCheckboxGroup,
354
- textarea: ElInput
355
- };
356
- return componentMap[type] || ElInput;
357
- };
358
- const handleSubmit = async () => {
359
- if (!formRef.value) return;
360
- await formRef.value.validate((valid) => {
361
- if (valid) {
362
- emit("submit", props.modelValue);
363
- }
364
- });
365
- };
366
- const handleReset = () => {
367
- if (!formRef.value) return;
368
- formRef.value.resetFields();
369
- emit("reset");
370
- };
371
- __expose({
372
- validate: () => {
373
- var _a;
374
- return (_a = formRef.value) == null ? void 0 : _a.validate();
375
- },
376
- resetFields: () => {
377
- var _a;
378
- return (_a = formRef.value) == null ? void 0 : _a.resetFields();
379
- },
380
- validateField: (prop) => {
381
- var _a;
382
- return (_a = formRef.value) == null ? void 0 : _a.validateField(prop);
383
- }
384
- });
385
- return (_ctx, _cache) => {
386
- const _component_el_form_item = resolveComponent("el-form-item");
387
- const _component_el_col = resolveComponent("el-col");
388
- const _component_el_row = resolveComponent("el-row");
389
- const _component_el_button = resolveComponent("el-button");
390
- const _component_el_space = resolveComponent("el-space");
391
- const _component_el_form = resolveComponent("el-form");
392
- return openBlock(), createBlock(_component_el_form, mergeProps({
393
- ref_key: "formRef",
394
- ref: formRef
395
- }, formProps, {
396
- model: _ctx.modelValue,
397
- rules: _ctx.rules,
398
- class: "jc-form"
399
- }), {
400
- default: withCtx(() => [
401
- createVNode(_component_el_row, { gutter: _ctx.gutter }, {
402
- default: withCtx(() => [
403
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item) => {
404
- return openBlock(), createBlock(_component_el_col, {
405
- key: item.prop,
406
- span: item.span || _ctx.span,
407
- offset: item.offset || 0,
408
- xs: item.xs,
409
- sm: item.sm,
410
- md: item.md,
411
- lg: item.lg,
412
- xl: item.xl
413
- }, {
414
- default: withCtx(() => [
415
- createVNode(_component_el_form_item, {
416
- label: item.label,
417
- prop: item.prop,
418
- required: item.required,
419
- rules: item.rules
420
- }, {
421
- default: withCtx(() => [
422
- (openBlock(), createBlock(resolveDynamicComponent(getComponent(item.type)), mergeProps({
423
- modelValue: _ctx.modelValue[item.prop],
424
- "onUpdate:modelValue": ($event) => _ctx.modelValue[item.prop] = $event
425
- }, { ref_for: true }, item.props, {
426
- placeholder: item.placeholder || `请输入${item.label}`,
427
- clearable: ""
428
- }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"]))
429
- ]),
430
- _: 2
431
- }, 1032, ["label", "prop", "required", "rules"])
432
- ]),
433
- _: 2
434
- }, 1032, ["span", "offset", "xs", "sm", "md", "lg", "xl"]);
435
- }), 128))
436
- ]),
437
- _: 1
438
- }, 8, ["gutter"]),
439
- createVNode(_component_el_form_item, null, {
440
- default: withCtx(() => [
441
- createVNode(_component_el_space, null, {
442
- default: withCtx(() => [
443
- renderSlot(_ctx.$slots, "actions", {}, () => [
444
- createVNode(_component_el_button, {
445
- type: "primary",
446
- onClick: handleSubmit
447
- }, {
448
- default: withCtx(() => _cache[0] || (_cache[0] = [
449
- createTextVNode(" 提交 ")
450
- ])),
451
- _: 1,
452
- __: [0]
453
- }),
454
- createVNode(_component_el_button, { onClick: handleReset }, {
455
- default: withCtx(() => _cache[1] || (_cache[1] = [
456
- createTextVNode(" 重置 ")
457
- ])),
458
- _: 1,
459
- __: [1]
460
- })
461
- ], true)
462
- ]),
463
- _: 3
464
- })
465
- ]),
466
- _: 3
467
- })
468
- ]),
469
- _: 3
470
- }, 16, ["model", "rules"]);
471
- };
472
- }
473
- });
474
- const JcForm = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-2731deb4"]]);
475
- const _hoisted_1$1 = { class: "jc-dialog-content" };
476
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
477
- ...{
478
- name: "JcDialog"
479
- },
480
- __name: "index",
481
- props: {
482
- modelValue: { type: Boolean, default: false },
483
- title: { default: "" },
484
- content: { default: "" },
485
- width: { default: "50%" },
486
- closeOnClickModal: { type: Boolean, default: true },
487
- closeOnPressEscape: { type: Boolean, default: true },
488
- showClose: { type: Boolean, default: true },
489
- center: { type: Boolean, default: false },
490
- fullscreen: { type: Boolean, default: false },
491
- destroyOnClose: { type: Boolean, default: false },
492
- confirmLoading: { type: Boolean, default: false }
493
- },
494
- emits: ["update:modelValue", "open", "opened", "close", "closed", "confirm", "cancel"],
495
- setup(__props, { emit: __emit }) {
496
- const props = __props;
497
- const emit = __emit;
498
- const visible = computed({
499
- get: () => props.modelValue,
500
- set: (val) => emit("update:modelValue", val)
501
- });
502
- const handleOpen = () => emit("open");
503
- const handleOpened = () => emit("opened");
504
- const handleClose = () => emit("close");
505
- const handleClosed = () => emit("closed");
506
- const handleConfirm = () => {
507
- emit("confirm");
508
- };
509
- const handleCancel = () => {
510
- visible.value = false;
511
- emit("cancel");
512
- };
513
- return (_ctx, _cache) => {
514
- const _component_el_button = resolveComponent("el-button");
515
- const _component_el_space = resolveComponent("el-space");
516
- const _component_el_dialog = resolveComponent("el-dialog");
517
- return openBlock(), createBlock(_component_el_dialog, {
518
- modelValue: visible.value,
519
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => visible.value = $event),
520
- title: _ctx.title,
521
- width: _ctx.width,
522
- "close-on-click-modal": _ctx.closeOnClickModal,
523
- "close-on-press-escape": _ctx.closeOnPressEscape,
524
- "show-close": _ctx.showClose,
525
- center: _ctx.center,
526
- fullscreen: _ctx.fullscreen,
527
- "destroy-on-close": _ctx.destroyOnClose,
528
- onOpen: handleOpen,
529
- onOpened: handleOpened,
530
- onClose: handleClose,
531
- onClosed: handleClosed
532
- }, {
533
- header: withCtx(() => [
534
- renderSlot(_ctx.$slots, "header", {}, () => [
535
- createElementVNode("span", null, toDisplayString(_ctx.title), 1)
536
- ], true)
537
- ]),
538
- footer: withCtx(() => [
539
- renderSlot(_ctx.$slots, "footer", {}, () => [
540
- createVNode(_component_el_space, null, {
541
- default: withCtx(() => [
542
- createVNode(_component_el_button, { onClick: handleCancel }, {
543
- default: withCtx(() => _cache[1] || (_cache[1] = [
544
- createTextVNode(" 取消 ")
545
- ])),
546
- _: 1,
547
- __: [1]
548
- }),
549
- createVNode(_component_el_button, {
550
- type: "primary",
551
- loading: _ctx.confirmLoading,
552
- onClick: handleConfirm
553
- }, {
554
- default: withCtx(() => _cache[2] || (_cache[2] = [
555
- createTextVNode(" 确定 ")
556
- ])),
557
- _: 1,
558
- __: [2]
559
- }, 8, ["loading"])
560
- ]),
561
- _: 1
562
- })
563
- ], true)
564
- ]),
565
- default: withCtx(() => [
566
- createElementVNode("div", _hoisted_1$1, [
567
- renderSlot(_ctx.$slots, "default", {}, () => [
568
- createElementVNode("p", null, toDisplayString(_ctx.content), 1)
569
- ], true)
570
- ])
571
- ]),
572
- _: 3
573
- }, 8, ["modelValue", "title", "width", "close-on-click-modal", "close-on-press-escape", "show-close", "center", "fullscreen", "destroy-on-close"]);
574
- };
575
- }
576
- });
577
- const JcDialog = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-6f2dc19f"]]);
578
- const _hoisted_1 = { class: "el-upload__tip" };
579
- const _sfc_main = /* @__PURE__ */ defineComponent({
580
- ...{
581
- name: "JcUpload"
582
- },
583
- __name: "index",
584
- props: {
585
- action: { default: "/api/upload" },
586
- headers: {},
587
- data: {},
588
- multiple: { type: Boolean, default: false },
589
- limit: { default: 3 },
590
- accept: {},
591
- fileList: {},
592
- maxSize: { default: 10 },
593
- autoUpload: { type: Boolean, default: true }
594
- },
595
- emits: ["success", "error", "change", "remove", "exceed"],
596
- setup(__props, { expose: __expose, emit: __emit }) {
597
- const props = __props;
598
- const emit = __emit;
599
- const uploadRef = ref();
600
- const uploadProps = computed(() => ({
601
- autoUpload: props.autoUpload,
602
- showFileList: true
603
- }));
604
- const beforeUpload = (file) => {
605
- const isLimit = file.size / 1024 / 1024 < props.maxSize;
606
- if (!isLimit) {
607
- ElMessage.error(`文件大小不能超过 ${props.maxSize}MB!`);
608
- }
609
- return isLimit;
610
- };
611
- const handleSuccess = (response, file, fileList) => {
612
- emit("success", response, file, fileList);
613
- };
614
- const handleError = (error, file, fileList) => {
615
- emit("error", error, file, fileList);
616
- };
617
- const handleExceed = (files, fileList) => {
618
- emit("exceed", files, fileList);
619
- };
620
- const handleRemove = (file, fileList) => {
621
- emit("remove", file, fileList);
622
- };
623
- __expose({
624
- submit: () => {
625
- var _a;
626
- return (_a = uploadRef.value) == null ? void 0 : _a.submit();
627
- },
628
- clearFiles: () => {
629
- var _a;
630
- return (_a = uploadRef.value) == null ? void 0 : _a.clearFiles();
631
- }
632
- });
633
- return (_ctx, _cache) => {
634
- const _component_el_icon = resolveComponent("el-icon");
635
- const _component_el_button = resolveComponent("el-button");
636
- const _component_el_upload = resolveComponent("el-upload");
637
- return openBlock(), createBlock(_component_el_upload, mergeProps({
638
- ref_key: "uploadRef",
639
- ref: uploadRef
640
- }, uploadProps.value, {
641
- action: _ctx.action,
642
- headers: _ctx.headers,
643
- data: _ctx.data,
644
- multiple: _ctx.multiple,
645
- limit: _ctx.limit,
646
- accept: _ctx.accept,
647
- "file-list": _ctx.fileList,
648
- "on-success": handleSuccess,
649
- "on-error": handleError,
650
- "on-exceed": handleExceed,
651
- "before-upload": beforeUpload,
652
- "on-remove": handleRemove
653
- }), {
654
- tip: withCtx(() => [
655
- renderSlot(_ctx.$slots, "tip", {}, () => [
656
- createElementVNode("div", _hoisted_1, " 只能上传 " + toDisplayString(_ctx.accept || "jpg/png") + " 文件,且不超过 " + toDisplayString(_ctx.maxSize) + "MB ", 1)
657
- ])
658
- ]),
659
- default: withCtx(() => [
660
- renderSlot(_ctx.$slots, "default", {}, () => [
661
- createVNode(_component_el_button, { type: "primary" }, {
662
- default: withCtx(() => [
663
- createVNode(_component_el_icon, null, {
664
- default: withCtx(() => [
665
- createVNode(unref(upload_default))
666
- ]),
667
- _: 1
668
- }),
669
- _cache[0] || (_cache[0] = createTextVNode(" 点击上传 "))
670
- ]),
671
- _: 1,
672
- __: [0]
673
- })
674
- ])
675
- ]),
676
- _: 3
677
- }, 16, ["action", "headers", "data", "multiple", "limit", "accept", "file-list"]);
678
- };
679
- }
680
- });
1
+ import { ElMessage } from "element-plus";
2
+ import { defineComponent, computed, openBlock, createElementBlock, mergeProps, createElementVNode, ref, provide, resolveComponent, createBlock, withCtx, createVNode, normalizeStyle, renderSlot, inject, useSlots, createCommentVNode, withKeys, normalizeClass, unref, toDisplayString, createTextVNode, withDirectives, vShow, nextTick, watch, Fragment, renderList, createSlots, reactive, onMounted, getCurrentInstance, normalizeProps, guardReactiveProps } from "vue";
681
3
  /*! js-cookie v3.0.5 | MIT */
682
4
  function assign(target) {
683
5
  for (var i = 1; i < arguments.length; i++) {
@@ -3413,6 +2735,49 @@ function createRequest(config) {
3413
2735
  );
3414
2736
  return instance;
3415
2737
  }
2738
+ function isExternal(path) {
2739
+ return /^(https?:|mailto:|tel:|www\.)/.test(path);
2740
+ }
2741
+ function parseTime(time, pattern) {
2742
+ if (arguments.length === 0 || !time) {
2743
+ return null;
2744
+ }
2745
+ const format = pattern || "{y}-{m}-{d} {h}:{i}:{s}";
2746
+ let date;
2747
+ if (typeof time === "object") {
2748
+ date = time;
2749
+ } else {
2750
+ if (typeof time === "string" && /^[0-9]+$/.test(time)) {
2751
+ time = parseInt(time);
2752
+ } else if (typeof time === "string") {
2753
+ time = time.replace(/-/gm, "/");
2754
+ }
2755
+ if (typeof time === "number" && time.toString().length === 10) {
2756
+ time = time * 1e3;
2757
+ }
2758
+ date = new Date(time);
2759
+ }
2760
+ const formatObj = {
2761
+ y: date.getFullYear(),
2762
+ m: date.getMonth() + 1,
2763
+ d: date.getDate(),
2764
+ h: date.getHours(),
2765
+ i: date.getMinutes(),
2766
+ s: date.getSeconds(),
2767
+ a: date.getDay()
2768
+ };
2769
+ const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (_result, key) => {
2770
+ let value = formatObj[key];
2771
+ if (key === "a") {
2772
+ return ["日", "一", "二", "三", "四", "五", "六"][value];
2773
+ }
2774
+ if (value < 10) {
2775
+ value = Number("0" + value);
2776
+ }
2777
+ return String(value || 0);
2778
+ });
2779
+ return time_str;
2780
+ }
3416
2781
  const validator = {
3417
2782
  isEmail(value) {
3418
2783
  return /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(value);
@@ -3434,6 +2799,8 @@ const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
3434
2799
  debounce: debounce$1,
3435
2800
  deepClone,
3436
2801
  formatDate,
2802
+ isExternal,
2803
+ parseTime,
3437
2804
  storage,
3438
2805
  throttle: throttle$1,
3439
2806
  validator
@@ -3539,16 +2906,2332 @@ const directives = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
3539
2906
  registerDirectives,
3540
2907
  throttle
3541
2908
  }, Symbol.toStringTag, { value: "Module" }));
3542
- const components = [
3543
- JcButton,
3544
- JcTable,
3545
- JcForm,
3546
- JcDialog,
3547
- _sfc_main
3548
- ];
2909
+ const _hoisted_1$5 = ["href", "xlink:href"];
2910
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2911
+ __name: "SvgIcon",
2912
+ props: {
2913
+ iconClass: {
2914
+ type: String,
2915
+ required: true
2916
+ },
2917
+ className: {
2918
+ type: String,
2919
+ default: ""
2920
+ }
2921
+ },
2922
+ setup(__props) {
2923
+ const props = __props;
2924
+ const isExternalIcon = computed(() => isExternal(props.iconClass));
2925
+ const iconName = computed(() => `#icon-${props.iconClass}`);
2926
+ const svgClass = computed(() => {
2927
+ if (props.className) {
2928
+ return "svg-icon " + props.className;
2929
+ }
2930
+ return "svg-icon svg-icon-default";
2931
+ });
2932
+ const styleExternalIcon = computed(() => ({
2933
+ mask: `url(${props.iconClass}) no-repeat 50% 50%`,
2934
+ "-webkit-mask": `url(${props.iconClass}) no-repeat 50% 50%`
2935
+ }));
2936
+ return (_ctx, _cache) => {
2937
+ return isExternalIcon.value ? (openBlock(), createElementBlock("div", mergeProps({
2938
+ key: 0,
2939
+ style: styleExternalIcon.value,
2940
+ class: "svg-external-icon svg-icon"
2941
+ }, _ctx.$attrs), null, 16)) : (openBlock(), createElementBlock("svg", mergeProps({
2942
+ key: 1,
2943
+ class: svgClass.value,
2944
+ "aria-hidden": "true",
2945
+ xmlns: "http://www.w3.org/2000/svg",
2946
+ "xmlns:xlink": "http://www.w3.org/1999/xlink"
2947
+ }, _ctx.$attrs), [
2948
+ createElementVNode("use", {
2949
+ href: iconName.value,
2950
+ "xlink:href": iconName.value
2951
+ }, null, 8, _hoisted_1$5)
2952
+ ], 16));
2953
+ };
2954
+ }
2955
+ });
2956
+ const _export_sfc = (sfc, props) => {
2957
+ const target = sfc.__vccOpts || sfc;
2958
+ for (const [key, val] of props) {
2959
+ target[key] = val;
2960
+ }
2961
+ return target;
2962
+ };
2963
+ const SvgIcon = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-bc56d70e"]]);
2964
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2965
+ __name: "XElForm",
2966
+ props: {
2967
+ model: {
2968
+ type: Object,
2969
+ default: () => ({})
2970
+ },
2971
+ rules: {
2972
+ type: Object,
2973
+ default: () => ({})
2974
+ },
2975
+ inline: {
2976
+ type: Boolean,
2977
+ default: false
2978
+ },
2979
+ labelWidth: {
2980
+ type: String,
2981
+ default: "120px"
2982
+ },
2983
+ labelPosition: {
2984
+ type: String,
2985
+ default: "right",
2986
+ validator: (val) => ["left", "right", "top"].includes(val)
2987
+ },
2988
+ size: {
2989
+ type: String,
2990
+ default: void 0
2991
+ },
2992
+ disabled: {
2993
+ type: Boolean,
2994
+ default: false
2995
+ },
2996
+ showMessage: {
2997
+ type: Boolean,
2998
+ default: true
2999
+ },
3000
+ inlineMessage: {
3001
+ type: Boolean,
3002
+ default: false
3003
+ },
3004
+ statusIcon: {
3005
+ type: Boolean,
3006
+ default: false
3007
+ },
3008
+ validateOnRuleChange: {
3009
+ type: Boolean,
3010
+ default: true
3011
+ },
3012
+ hideRequiredAsterisk: {
3013
+ type: Boolean,
3014
+ default: false
3015
+ },
3016
+ requireAsteriskPosition: {
3017
+ type: String,
3018
+ default: "left",
3019
+ validator: (val) => ["left", "right"].includes(val)
3020
+ },
3021
+ span: {
3022
+ type: Number,
3023
+ default: 24
3024
+ },
3025
+ gutter: {
3026
+ type: Number,
3027
+ default: 20
3028
+ }
3029
+ },
3030
+ setup(__props, { expose: __expose }) {
3031
+ const props = __props;
3032
+ const formRef = ref();
3033
+ const rowStyle = computed(() => ({
3034
+ marginLeft: 0,
3035
+ marginRight: 0
3036
+ }));
3037
+ provide("formItemSpan", props.span);
3038
+ provide("formGutter", props.gutter);
3039
+ function validate(callback) {
3040
+ var _a;
3041
+ return (_a = formRef.value) == null ? void 0 : _a.validate(callback);
3042
+ }
3043
+ function validateField(props2, callback) {
3044
+ var _a;
3045
+ return (_a = formRef.value) == null ? void 0 : _a.validateField(props2, callback);
3046
+ }
3047
+ function resetFields() {
3048
+ var _a;
3049
+ return (_a = formRef.value) == null ? void 0 : _a.resetFields();
3050
+ }
3051
+ function clearValidate(props2) {
3052
+ var _a;
3053
+ return (_a = formRef.value) == null ? void 0 : _a.clearValidate(props2);
3054
+ }
3055
+ function scrollToField(prop) {
3056
+ var _a;
3057
+ return (_a = formRef.value) == null ? void 0 : _a.scrollToField(prop);
3058
+ }
3059
+ __expose({
3060
+ validate,
3061
+ validateField,
3062
+ resetFields,
3063
+ clearValidate,
3064
+ scrollToField,
3065
+ formRef
3066
+ });
3067
+ return (_ctx, _cache) => {
3068
+ const _component_el_row = resolveComponent("el-row");
3069
+ const _component_el_form = resolveComponent("el-form");
3070
+ return openBlock(), createBlock(_component_el_form, mergeProps({
3071
+ ref_key: "formRef",
3072
+ ref: formRef
3073
+ }, _ctx.$attrs, {
3074
+ model: __props.model,
3075
+ rules: __props.rules,
3076
+ inline: __props.inline,
3077
+ "label-width": __props.labelWidth,
3078
+ "label-position": __props.labelPosition,
3079
+ size: __props.size,
3080
+ disabled: __props.disabled,
3081
+ "show-message": __props.showMessage,
3082
+ "inline-message": __props.inlineMessage,
3083
+ "status-icon": __props.statusIcon,
3084
+ "validate-on-rule-change": __props.validateOnRuleChange,
3085
+ "hide-required-asterisk": __props.hideRequiredAsterisk,
3086
+ "require-asterisk-position": __props.requireAsteriskPosition,
3087
+ style: { "width": "100%" }
3088
+ }), {
3089
+ default: withCtx(() => [
3090
+ createVNode(_component_el_row, {
3091
+ gutter: __props.gutter,
3092
+ style: normalizeStyle(rowStyle.value)
3093
+ }, {
3094
+ default: withCtx(() => [
3095
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
3096
+ ]),
3097
+ _: 3
3098
+ }, 8, ["gutter", "style"])
3099
+ ]),
3100
+ _: 3
3101
+ }, 16, ["model", "rules", "inline", "label-width", "label-position", "size", "disabled", "show-message", "inline-message", "status-icon", "validate-on-rule-change", "hide-required-asterisk", "require-asterisk-position"]);
3102
+ };
3103
+ }
3104
+ });
3105
+ const XElForm = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-0f2af261"]]);
3106
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3107
+ __name: "XElFormItem",
3108
+ props: {
3109
+ label: {
3110
+ type: String,
3111
+ default: void 0
3112
+ },
3113
+ prop: {
3114
+ type: String,
3115
+ default: void 0
3116
+ },
3117
+ labelWidth: {
3118
+ type: [String, Number],
3119
+ default: void 0
3120
+ },
3121
+ required: {
3122
+ type: Boolean,
3123
+ default: false
3124
+ },
3125
+ rules: {
3126
+ type: [Object, Array],
3127
+ default: void 0
3128
+ },
3129
+ error: {
3130
+ type: String,
3131
+ default: void 0
3132
+ },
3133
+ validateStatus: {
3134
+ type: String,
3135
+ default: void 0
3136
+ },
3137
+ showMessage: {
3138
+ type: Boolean,
3139
+ default: true
3140
+ },
3141
+ inlineMessage: {
3142
+ type: Boolean,
3143
+ default: false
3144
+ },
3145
+ size: {
3146
+ type: String,
3147
+ default: void 0
3148
+ },
3149
+ span: {
3150
+ type: Number,
3151
+ default: null
3152
+ }
3153
+ },
3154
+ setup(__props) {
3155
+ const props = __props;
3156
+ const formItemSpan = inject("formItemSpan", 24);
3157
+ inject("formGutter", 0);
3158
+ const currentSpan = computed(() => {
3159
+ return props.span !== null ? props.span : formItemSpan;
3160
+ });
3161
+ return (_ctx, _cache) => {
3162
+ const _component_el_form_item = resolveComponent("el-form-item");
3163
+ const _component_el_col = resolveComponent("el-col");
3164
+ return openBlock(), createBlock(_component_el_col, { span: currentSpan.value }, {
3165
+ default: withCtx(() => [
3166
+ createVNode(_component_el_form_item, mergeProps(_ctx.$attrs, {
3167
+ label: __props.label,
3168
+ prop: __props.prop,
3169
+ "label-width": __props.labelWidth,
3170
+ required: __props.required,
3171
+ rules: __props.rules,
3172
+ error: __props.error,
3173
+ "validate-status": __props.validateStatus,
3174
+ "show-message": __props.showMessage,
3175
+ "inline-message": __props.inlineMessage,
3176
+ size: __props.size
3177
+ }), {
3178
+ default: withCtx(() => [
3179
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
3180
+ ]),
3181
+ _: 3
3182
+ }, 16, ["label", "prop", "label-width", "required", "rules", "error", "validate-status", "show-message", "inline-message", "size"])
3183
+ ]),
3184
+ _: 3
3185
+ }, 8, ["span"]);
3186
+ };
3187
+ }
3188
+ });
3189
+ const XElFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-e63b6d61"]]);
3190
+ const _hoisted_1$4 = {
3191
+ key: 0,
3192
+ class: "search-top"
3193
+ };
3194
+ const _hoisted_2$2 = { class: "search-top__inner" };
3195
+ const _hoisted_3$2 = { class: "search-top__row" };
3196
+ const _hoisted_4$2 = {
3197
+ key: 0,
3198
+ class: "search-top__label"
3199
+ };
3200
+ const _hoisted_5$2 = {
3201
+ key: 1,
3202
+ class: "search-top-input"
3203
+ };
3204
+ const _hoisted_6$2 = {
3205
+ key: 0,
3206
+ class: "search-top-extra-item"
3207
+ };
3208
+ const _hoisted_7$2 = {
3209
+ key: 0,
3210
+ class: "search-top-extra-label"
3211
+ };
3212
+ const _hoisted_8$2 = { class: "search-top-extra-content" };
3213
+ const _hoisted_9$1 = {
3214
+ key: 1,
3215
+ class: "search-top-extra-item"
3216
+ };
3217
+ const _hoisted_10$1 = {
3218
+ key: 0,
3219
+ class: "search-top-extra-label"
3220
+ };
3221
+ const _hoisted_11$1 = { class: "search-top-extra-content" };
3222
+ const _hoisted_12$1 = {
3223
+ key: 2,
3224
+ class: "search-top-extra-item"
3225
+ };
3226
+ const _hoisted_13$1 = {
3227
+ key: 0,
3228
+ class: "search-top-extra-label"
3229
+ };
3230
+ const _hoisted_14$1 = { class: "search-top-extra-content" };
3231
+ const _hoisted_15$1 = { class: "search-top__actions" };
3232
+ const _hoisted_16$1 = { class: "search-form__buttons" };
3233
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3234
+ __name: "XSearchBar",
3235
+ props: {
3236
+ modelValue: {
3237
+ type: [String, Number],
3238
+ default: void 0
3239
+ },
3240
+ placeholder: {
3241
+ type: String,
3242
+ default: "可输入户号/户名/联系电话"
3243
+ },
3244
+ queryForm: {
3245
+ type: Object,
3246
+ required: true,
3247
+ default: () => ({})
3248
+ },
3249
+ rules: {
3250
+ type: Object,
3251
+ default: () => ({})
3252
+ },
3253
+ titleWidth: {
3254
+ type: String,
3255
+ default: "100px"
3256
+ },
3257
+ columns: {
3258
+ type: Number,
3259
+ default: 4
3260
+ },
3261
+ paddingBottom: {
3262
+ type: String,
3263
+ default: "16px"
3264
+ },
3265
+ showInput: {
3266
+ type: Boolean,
3267
+ default: true
3268
+ },
3269
+ showMoreBottom: {
3270
+ type: Boolean,
3271
+ default: true
3272
+ },
3273
+ showSearch: {
3274
+ type: Boolean,
3275
+ default: true
3276
+ },
3277
+ text1: {
3278
+ type: String,
3279
+ default: ""
3280
+ },
3281
+ text2: {
3282
+ type: String,
3283
+ default: ""
3284
+ },
3285
+ text3: {
3286
+ type: String,
3287
+ default: ""
3288
+ }
3289
+ },
3290
+ emits: ["update:modelValue", "update:queryForm", "list-update", "data-reset"],
3291
+ setup(__props, { expose: __expose, emit: __emit }) {
3292
+ const props = __props;
3293
+ const emit = __emit;
3294
+ const slots = useSlots();
3295
+ const showMore = ref(false);
3296
+ const queryFormRef = ref();
3297
+ const vxeFormRef = ref();
3298
+ const combinedQueries = computed({
3299
+ get() {
3300
+ if (props.modelValue !== void 0 && props.modelValue !== null) {
3301
+ return props.modelValue;
3302
+ }
3303
+ return props.queryForm.combinedQueries || "";
3304
+ },
3305
+ set(val) {
3306
+ if (props.modelValue !== void 0 && props.modelValue !== null) {
3307
+ emit("update:modelValue", val);
3308
+ } else {
3309
+ props.queryForm.combinedQueries = val;
3310
+ }
3311
+ }
3312
+ });
3313
+ const hasFormSlot = computed(() => !!slots.form);
3314
+ const hasVxeFormSlot = computed(() => !!slots.vxeForm);
3315
+ const vxeFormSpan = computed(() => Math.floor(24 / props.columns));
3316
+ const formContainerStyle = computed(() => ({
3317
+ "--form-columns": props.columns
3318
+ }));
3319
+ const buttonItemSpan = computed(() => {
3320
+ return 24;
3321
+ });
3322
+ function reset() {
3323
+ combinedQueries.value = "";
3324
+ if (props.modelValue !== void 0 && props.modelValue !== null) {
3325
+ emit("update:modelValue", "");
3326
+ }
3327
+ if (hasFormSlot.value && queryFormRef.value && typeof queryFormRef.value.resetFields === "function") {
3328
+ nextTick(() => {
3329
+ queryFormRef.value.resetFields();
3330
+ });
3331
+ }
3332
+ if (hasVxeFormSlot.value && vxeFormRef.value && typeof vxeFormRef.value.reset === "function") {
3333
+ vxeFormRef.value.reset();
3334
+ }
3335
+ if (props.queryForm && Object.keys(props.queryForm).length > 0) {
3336
+ const emptyForm = {};
3337
+ Object.keys(props.queryForm).forEach((key) => {
3338
+ const value = props.queryForm[key];
3339
+ if (Array.isArray(value)) {
3340
+ emptyForm[key] = [];
3341
+ } else if (value !== null && typeof value === "object") {
3342
+ emptyForm[key] = {};
3343
+ } else {
3344
+ emptyForm[key] = "";
3345
+ }
3346
+ });
3347
+ emit("update:queryForm", emptyForm);
3348
+ }
3349
+ showMore.value = false;
3350
+ emit("data-reset");
3351
+ }
3352
+ function searchParentList() {
3353
+ if (props.rules && Object.keys(props.rules).length > 0) {
3354
+ if (hasVxeFormSlot.value && vxeFormRef.value) {
3355
+ return new Promise((resolve, reject) => {
3356
+ if (typeof vxeFormRef.value.validate === "function") {
3357
+ vxeFormRef.value.validate((valid) => {
3358
+ if (valid) {
3359
+ showMore.value = true;
3360
+ reject(false);
3361
+ } else {
3362
+ showMore.value = false;
3363
+ emit("list-update", 1);
3364
+ resolve(true);
3365
+ }
3366
+ });
3367
+ } else {
3368
+ emit("list-update", 1);
3369
+ resolve(true);
3370
+ }
3371
+ });
3372
+ }
3373
+ if (hasFormSlot.value && queryFormRef.value && typeof queryFormRef.value.validate === "function") {
3374
+ return new Promise((resolve, reject) => {
3375
+ queryFormRef.value.validate((valid) => {
3376
+ if (valid) {
3377
+ showMore.value = false;
3378
+ emit("list-update", 1);
3379
+ resolve(true);
3380
+ } else {
3381
+ showMore.value = true;
3382
+ reject(false);
3383
+ }
3384
+ });
3385
+ });
3386
+ }
3387
+ } else {
3388
+ showMore.value = false;
3389
+ emit("list-update", 1);
3390
+ return Promise.resolve(true);
3391
+ }
3392
+ }
3393
+ __expose({
3394
+ queryFormRef,
3395
+ vxeFormRef
3396
+ });
3397
+ return (_ctx, _cache) => {
3398
+ const _component_el_input = resolveComponent("el-input");
3399
+ const _component_el_button = resolveComponent("el-button");
3400
+ const _component_vxe_form_item = resolveComponent("vxe-form-item");
3401
+ const _component_vxe_form = resolveComponent("vxe-form");
3402
+ return openBlock(), createElementBlock("div", {
3403
+ class: "search",
3404
+ style: normalizeStyle({ paddingBottom: __props.paddingBottom })
3405
+ }, [
3406
+ __props.showSearch ? (openBlock(), createElementBlock("div", _hoisted_1$4, [
3407
+ createElementVNode("div", _hoisted_2$2, [
3408
+ createElementVNode("div", _hoisted_3$2, [
3409
+ __props.showInput ? (openBlock(), createElementBlock("span", _hoisted_4$2, "快捷搜索 ")) : createCommentVNode("", true),
3410
+ __props.showInput ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
3411
+ createVNode(_component_el_input, {
3412
+ type: "text",
3413
+ onKeyup: withKeys(searchParentList, ["enter"]),
3414
+ modelValue: combinedQueries.value,
3415
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => combinedQueries.value = $event),
3416
+ placeholder: __props.placeholder,
3417
+ clearable: ""
3418
+ }, {
3419
+ prefix: withCtx(() => [
3420
+ createVNode(SvgIcon, {
3421
+ "icon-class": "search",
3422
+ "class-name": "svg-icon-22"
3423
+ })
3424
+ ]),
3425
+ _: 1
3426
+ }, 8, ["modelValue", "placeholder"])
3427
+ ])) : createCommentVNode("", true),
3428
+ __props.showMoreBottom ? (openBlock(), createElementBlock("div", {
3429
+ key: 2,
3430
+ class: "search-top-filter",
3431
+ onClick: _cache[1] || (_cache[1] = ($event) => showMore.value = !showMore.value)
3432
+ }, [
3433
+ createVNode(SvgIcon, {
3434
+ "icon-class": "filter",
3435
+ "class-name": "svg-icon-22 filter-icon"
3436
+ }),
3437
+ _cache[2] || (_cache[2] = createElementVNode("span", { class: "btn_more" }, "更多", -1))
3438
+ ])) : createCommentVNode("", true),
3439
+ createElementVNode("div", {
3440
+ class: normalizeClass([{ "search-top-extra--ml": __props.showInput }, "search-top-extra"])
3441
+ }, [
3442
+ renderSlot(_ctx.$slots, "default", {}, void 0, true),
3443
+ unref(slots).text1 ? (openBlock(), createElementBlock("div", _hoisted_6$2, [
3444
+ __props.text1 ? (openBlock(), createElementBlock("span", _hoisted_7$2, toDisplayString(__props.text1) + ":", 1)) : createCommentVNode("", true),
3445
+ createElementVNode("div", _hoisted_8$2, [
3446
+ renderSlot(_ctx.$slots, "text1", {}, void 0, true)
3447
+ ])
3448
+ ])) : createCommentVNode("", true),
3449
+ unref(slots).text2 ? (openBlock(), createElementBlock("div", _hoisted_9$1, [
3450
+ __props.text2 ? (openBlock(), createElementBlock("span", _hoisted_10$1, toDisplayString(__props.text2) + ":", 1)) : createCommentVNode("", true),
3451
+ createElementVNode("div", _hoisted_11$1, [
3452
+ renderSlot(_ctx.$slots, "text2", {}, void 0, true)
3453
+ ])
3454
+ ])) : createCommentVNode("", true),
3455
+ unref(slots).text3 ? (openBlock(), createElementBlock("div", _hoisted_12$1, [
3456
+ __props.text3 ? (openBlock(), createElementBlock("span", _hoisted_13$1, toDisplayString(__props.text3) + ":", 1)) : createCommentVNode("", true),
3457
+ createElementVNode("div", _hoisted_14$1, [
3458
+ renderSlot(_ctx.$slots, "text3", {}, void 0, true)
3459
+ ])
3460
+ ])) : createCommentVNode("", true)
3461
+ ], 2)
3462
+ ]),
3463
+ createElementVNode("div", _hoisted_15$1, [
3464
+ createVNode(_component_el_button, {
3465
+ plain: "",
3466
+ onClick: reset
3467
+ }, {
3468
+ default: withCtx(() => _cache[3] || (_cache[3] = [
3469
+ createTextVNode("重 置")
3470
+ ])),
3471
+ _: 1,
3472
+ __: [3]
3473
+ }),
3474
+ createVNode(_component_el_button, {
3475
+ type: "primary",
3476
+ onClick: searchParentList
3477
+ }, {
3478
+ default: withCtx(() => _cache[4] || (_cache[4] = [
3479
+ createTextVNode("查 询")
3480
+ ])),
3481
+ _: 1,
3482
+ __: [4]
3483
+ })
3484
+ ])
3485
+ ])
3486
+ ])) : createCommentVNode("", true),
3487
+ withDirectives(createElementVNode("div", {
3488
+ class: normalizeClass([{ "show_search": __props.showSearch }, "search-form"])
3489
+ }, [
3490
+ createElementVNode("div", {
3491
+ class: "search-form__inner",
3492
+ style: normalizeStyle(formContainerStyle.value)
3493
+ }, [
3494
+ hasFormSlot.value ? (openBlock(), createBlock(XElForm, {
3495
+ key: 0,
3496
+ "x-rules": __props.rules,
3497
+ "x-model": __props.queryForm,
3498
+ ref_key: "queryFormRef",
3499
+ ref: queryFormRef,
3500
+ "x-span": vxeFormSpan.value,
3501
+ "x-label-width": __props.titleWidth
3502
+ }, {
3503
+ default: withCtx(() => [
3504
+ renderSlot(_ctx.$slots, "form", {}, void 0, true),
3505
+ !__props.showSearch ? (openBlock(), createBlock(XElFormItem, {
3506
+ key: 0,
3507
+ label: "",
3508
+ "x-span": buttonItemSpan.value
3509
+ }, {
3510
+ default: withCtx(() => [
3511
+ createElementVNode("div", _hoisted_16$1, [
3512
+ createVNode(_component_el_button, {
3513
+ plain: "",
3514
+ onClick: reset
3515
+ }, {
3516
+ default: withCtx(() => _cache[5] || (_cache[5] = [
3517
+ createTextVNode("重 置")
3518
+ ])),
3519
+ _: 1,
3520
+ __: [5]
3521
+ }),
3522
+ createVNode(_component_el_button, {
3523
+ type: "primary",
3524
+ onClick: searchParentList
3525
+ }, {
3526
+ default: withCtx(() => _cache[6] || (_cache[6] = [
3527
+ createTextVNode("查 询")
3528
+ ])),
3529
+ _: 1,
3530
+ __: [6]
3531
+ })
3532
+ ])
3533
+ ]),
3534
+ _: 1
3535
+ }, 8, ["x-span"])) : createCommentVNode("", true)
3536
+ ]),
3537
+ _: 3
3538
+ }, 8, ["x-rules", "x-model", "x-span", "x-label-width"])) : createCommentVNode("", true),
3539
+ hasVxeFormSlot.value ? (openBlock(), createBlock(_component_vxe_form, {
3540
+ key: 1,
3541
+ data: __props.queryForm,
3542
+ rules: __props.rules,
3543
+ span: vxeFormSpan.value,
3544
+ titleColon: "",
3545
+ vertical: "",
3546
+ "title-align": "right",
3547
+ "title-width": __props.titleWidth,
3548
+ ref_key: "vxeFormRef",
3549
+ ref: vxeFormRef
3550
+ }, {
3551
+ default: withCtx(() => [
3552
+ renderSlot(_ctx.$slots, "vxeForm", {}, void 0, true),
3553
+ !__props.showSearch ? (openBlock(), createBlock(_component_vxe_form_item, {
3554
+ key: 0,
3555
+ span: buttonItemSpan.value,
3556
+ align: "right"
3557
+ }, {
3558
+ default: withCtx(() => [
3559
+ createVNode(_component_el_button, {
3560
+ plain: "",
3561
+ onClick: reset
3562
+ }, {
3563
+ default: withCtx(() => _cache[7] || (_cache[7] = [
3564
+ createTextVNode("重 置")
3565
+ ])),
3566
+ _: 1,
3567
+ __: [7]
3568
+ }),
3569
+ createVNode(_component_el_button, {
3570
+ type: "primary",
3571
+ onClick: searchParentList
3572
+ }, {
3573
+ default: withCtx(() => _cache[8] || (_cache[8] = [
3574
+ createTextVNode("查 询")
3575
+ ])),
3576
+ _: 1,
3577
+ __: [8]
3578
+ })
3579
+ ]),
3580
+ _: 1
3581
+ }, 8, ["span"])) : createCommentVNode("", true)
3582
+ ]),
3583
+ _: 3
3584
+ }, 8, ["data", "rules", "span", "title-width"])) : createCommentVNode("", true)
3585
+ ], 4)
3586
+ ], 2), [
3587
+ [vShow, showMore.value || !__props.showSearch]
3588
+ ])
3589
+ ], 4);
3590
+ };
3591
+ }
3592
+ });
3593
+ const XSearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-0a5c5917"]]);
3594
+ const _hoisted_1$3 = { class: "x-pagination" };
3595
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3596
+ __name: "XPagination",
3597
+ props: {
3598
+ currentPage: {
3599
+ type: Number,
3600
+ default: 1
3601
+ },
3602
+ pageSize: {
3603
+ type: Number,
3604
+ default: 20
3605
+ },
3606
+ total: {
3607
+ type: Number,
3608
+ default: 0
3609
+ },
3610
+ pageSizes: {
3611
+ type: Array,
3612
+ default: () => [20, 50, 100, 200, 500, 1e3]
3613
+ },
3614
+ layouts: {
3615
+ type: Array,
3616
+ default: () => ["total", "sizes", "prev", "pager", "next", "jumper"]
3617
+ }
3618
+ },
3619
+ emits: ["update-page"],
3620
+ setup(__props, { emit: __emit }) {
3621
+ const props = __props;
3622
+ const emit = __emit;
3623
+ const internalCurrentPage = ref(props.currentPage);
3624
+ const internalPageSize = ref(props.pageSize);
3625
+ const pagerLayout = computed(() => {
3626
+ if (!props.layouts || !Array.isArray(props.layouts)) {
3627
+ return "total, sizes, prev, pager, next, jumper";
3628
+ }
3629
+ return props.layouts.map((item) => {
3630
+ if (typeof item === "string") {
3631
+ return item.toLowerCase();
3632
+ }
3633
+ return item;
3634
+ }).join(", ");
3635
+ });
3636
+ watch(() => props.currentPage, (val) => {
3637
+ internalCurrentPage.value = val;
3638
+ });
3639
+ watch(() => props.pageSize, (val) => {
3640
+ internalPageSize.value = val;
3641
+ });
3642
+ function handleCurrentChange(page) {
3643
+ internalCurrentPage.value = page;
3644
+ emit("update-page", internalCurrentPage.value, internalPageSize.value);
3645
+ }
3646
+ function handleSizeChange(size) {
3647
+ internalPageSize.value = size;
3648
+ internalCurrentPage.value = 1;
3649
+ emit("update-page", internalCurrentPage.value, internalPageSize.value);
3650
+ }
3651
+ return (_ctx, _cache) => {
3652
+ const _component_el_pagination = resolveComponent("el-pagination");
3653
+ return openBlock(), createElementBlock("div", _hoisted_1$3, [
3654
+ createVNode(_component_el_pagination, {
3655
+ "current-page": internalCurrentPage.value,
3656
+ "page-size": internalPageSize.value,
3657
+ total: __props.total,
3658
+ "page-sizes": __props.pageSizes,
3659
+ layout: pagerLayout.value,
3660
+ onCurrentChange: handleCurrentChange,
3661
+ onSizeChange: handleSizeChange
3662
+ }, null, 8, ["current-page", "page-size", "total", "page-sizes", "layout"])
3663
+ ]);
3664
+ };
3665
+ }
3666
+ });
3667
+ const XPagination = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-bd405b6e"]]);
3668
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3669
+ __name: "XVxeTable",
3670
+ props: {
3671
+ tableData: { type: Array, default: () => [] },
3672
+ isShowBg: { type: Boolean, default: true },
3673
+ size: { type: String, default: void 0 },
3674
+ stripe: { type: Boolean, default: false },
3675
+ subHeight: { type: String, default: "200px" },
3676
+ maxHeight: { type: [Number, String], default: null },
3677
+ showHeader: { type: Boolean, default: true },
3678
+ showOverflow: { type: Boolean, default: true },
3679
+ headerCellClassName: { type: [String, Function], default: "" },
3680
+ cellClassName: { type: [String, Function], default: "" },
3681
+ rowClassName: { type: [String, Function], default: "" },
3682
+ isCheckbox: { type: Boolean, default: false },
3683
+ showFooter: { type: Boolean, default: false },
3684
+ showFooterText: { type: String, default: "" },
3685
+ footerMethod: { type: Function, default: null },
3686
+ footerCellClassName: { type: [String, Function], default: "" },
3687
+ sortConfig: { type: Object, default: () => ({}) },
3688
+ filterConfig: { type: Object, default: () => ({}) },
3689
+ checkboxConfig: { type: Object, default: () => ({}) },
3690
+ radioConfig: { type: Object, default: () => ({}) },
3691
+ proxyConfig: { type: Object, default: null },
3692
+ loading: { type: Boolean, default: false },
3693
+ emptyText: { type: String, default: "暂无数据" },
3694
+ showIndex: { type: Boolean, default: true },
3695
+ showPagination: { type: Boolean, default: true },
3696
+ pageSize: { type: Number, default: 20 },
3697
+ currentPage: { type: Number, default: 1 },
3698
+ total: { type: Number, default: 0 },
3699
+ footerData: { type: Array, default: () => [] },
3700
+ showToolbar: { type: Boolean, default: true },
3701
+ subToolbarHeight: { type: Number, default: 46 },
3702
+ subPaginationHeight: { type: Number, default: 46 },
3703
+ columns: { type: Array, default: () => [] }
3704
+ },
3705
+ emits: ["checkbox-change", "radio-change", "sort-change", "current-change", "edit-closed", "edit-actived", "change-page"],
3706
+ setup(__props, { expose: __expose, emit: __emit }) {
3707
+ const props = __props;
3708
+ const emit = __emit;
3709
+ const vxeTableRef = ref();
3710
+ const xToolbarRef = ref();
3711
+ const internalCurrentPage = ref(props.currentPage);
3712
+ const internalPageSize = ref(props.pageSize);
3713
+ const calcHeight = computed(() => {
3714
+ const baseHeight = props.isShowBg ? 19 : 0;
3715
+ const toolbarHeight = props.showToolbar ? props.subToolbarHeight : 0;
3716
+ const paginationHeight = props.showPagination ? props.subPaginationHeight : 0;
3717
+ const totalHeight = baseHeight + toolbarHeight + paginationHeight;
3718
+ return `calc(100% - ${totalHeight}px)`;
3719
+ });
3720
+ watch(() => props.currentPage, (val) => {
3721
+ internalCurrentPage.value = val;
3722
+ });
3723
+ watch(() => props.pageSize, (val) => {
3724
+ internalPageSize.value = val;
3725
+ });
3726
+ function getTableInstance() {
3727
+ return vxeTableRef.value;
3728
+ }
3729
+ function getList() {
3730
+ handlePageChange(1, props.pageSize);
3731
+ }
3732
+ function handleCheckboxChange({ records }) {
3733
+ emit("checkbox-change", records);
3734
+ }
3735
+ function getCheckboxRecords() {
3736
+ var _a;
3737
+ return (_a = vxeTableRef.value) == null ? void 0 : _a.getCheckboxRecords();
3738
+ }
3739
+ function setCheckboxRow(row, checked) {
3740
+ var _a;
3741
+ (_a = vxeTableRef.value) == null ? void 0 : _a.setCheckboxRow(row, checked);
3742
+ }
3743
+ function toggleCheckboxRow(row) {
3744
+ var _a;
3745
+ (_a = vxeTableRef.value) == null ? void 0 : _a.toggleCheckboxRow(row);
3746
+ }
3747
+ function clearCheckbox() {
3748
+ var _a;
3749
+ (_a = vxeTableRef.value) == null ? void 0 : _a.clearCheckbox();
3750
+ }
3751
+ function handleRadioChange(params) {
3752
+ emit("radio-change", params);
3753
+ }
3754
+ function handleSortChange(params) {
3755
+ emit("sort-change", params);
3756
+ }
3757
+ function handleCurrentChange(params) {
3758
+ emit("current-change", params);
3759
+ }
3760
+ function handleEditClosed(params) {
3761
+ emit("edit-closed", params);
3762
+ }
3763
+ function handleEditActived(params) {
3764
+ emit("edit-actived", params);
3765
+ }
3766
+ function handlePageChange(page, size) {
3767
+ internalCurrentPage.value = page;
3768
+ internalPageSize.value = size;
3769
+ emit("change-page", internalCurrentPage.value, internalPageSize.value);
3770
+ }
3771
+ function clearSort() {
3772
+ var _a;
3773
+ (_a = vxeTableRef.value) == null ? void 0 : _a.clearSort();
3774
+ }
3775
+ function scrollTo(row) {
3776
+ var _a;
3777
+ (_a = vxeTableRef.value) == null ? void 0 : _a.scrollTo(row);
3778
+ }
3779
+ function setCurrentRow(row) {
3780
+ var _a;
3781
+ (_a = vxeTableRef.value) == null ? void 0 : _a.setCurrentRow(row);
3782
+ }
3783
+ function internalFooterMethod({ columns }) {
3784
+ if (props.footerData.length > 0) {
3785
+ return props.footerData;
3786
+ }
3787
+ const data = props.tableData;
3788
+ if (data && data.length > 0) {
3789
+ const lastRow = data[data.length - 1];
3790
+ const footerRow = columns.map((column, index2) => {
3791
+ if (index2 === 0) {
3792
+ return props.showFooterText ? props.showFooterText : "合计";
3793
+ }
3794
+ if (column.property) {
3795
+ return lastRow[column.property] || "";
3796
+ }
3797
+ return "";
3798
+ });
3799
+ return [footerRow];
3800
+ }
3801
+ return [];
3802
+ }
3803
+ __expose({
3804
+ getTableInstance,
3805
+ getCheckboxRecords,
3806
+ setCheckboxRow,
3807
+ toggleCheckboxRow,
3808
+ clearCheckbox,
3809
+ clearSort,
3810
+ scrollTo,
3811
+ setCurrentRow,
3812
+ vxeTableRef
3813
+ });
3814
+ return (_ctx, _cache) => {
3815
+ const _component_vxe_toolbar = resolveComponent("vxe-toolbar");
3816
+ const _component_vxe_column = resolveComponent("vxe-column");
3817
+ const _component_vxe_table = resolveComponent("vxe-table");
3818
+ return openBlock(), createElementBlock("div", {
3819
+ class: normalizeClass([{ "x-vxe-table-bg": __props.isShowBg }, "x-vxe-table"]),
3820
+ style: normalizeStyle({ height: `calc(100vh - ${__props.subHeight})` })
3821
+ }, [
3822
+ __props.showToolbar ? (openBlock(), createBlock(_component_vxe_toolbar, {
3823
+ key: 0,
3824
+ ref_key: "xToolbarRef",
3825
+ ref: xToolbarRef,
3826
+ class: "h-plr-12",
3827
+ refresh: { query: getList },
3828
+ perfect: "",
3829
+ export: "",
3830
+ print: "",
3831
+ custom: ""
3832
+ }, {
3833
+ buttons: withCtx(() => [
3834
+ renderSlot(_ctx.$slots, "buttons", {}, void 0, true)
3835
+ ]),
3836
+ _: 3
3837
+ }, 8, ["refresh"])) : createCommentVNode("", true),
3838
+ createElementVNode("div", {
3839
+ style: normalizeStyle({ height: calcHeight.value })
3840
+ }, [
3841
+ createVNode(_component_vxe_table, {
3842
+ ref_key: "vxeTableRef",
3843
+ ref: vxeTableRef,
3844
+ "print-config": {},
3845
+ "export-config": {
3846
+ type: "xlsx",
3847
+ types: ["xlsx", "csv", "html", "xml", "txt"]
3848
+ },
3849
+ data: __props.showFooter && __props.footerData.length < 1 ? __props.tableData.slice(0, -1) : __props.tableData,
3850
+ border: "",
3851
+ size: __props.size || void 0,
3852
+ stripe: __props.stripe,
3853
+ height: "100%",
3854
+ align: "center",
3855
+ resizable: "",
3856
+ "max-height": __props.maxHeight,
3857
+ "show-header": __props.showHeader,
3858
+ "show-overflow": __props.showOverflow === true ? "title" : __props.showOverflow,
3859
+ "custom-config": {},
3860
+ "header-cell-class-name": __props.headerCellClassName,
3861
+ "cell-class-name": __props.cellClassName,
3862
+ "row-class-name": __props.rowClassName,
3863
+ "show-footer": __props.showFooter,
3864
+ "footer-cell-class-name": __props.footerCellClassName,
3865
+ "sort-config": __props.sortConfig,
3866
+ "filter-config": __props.filterConfig,
3867
+ "checkbox-config": __props.checkboxConfig,
3868
+ "radio-config": __props.radioConfig,
3869
+ "proxy-config": __props.proxyConfig,
3870
+ loading: __props.loading,
3871
+ "empty-text": __props.emptyText,
3872
+ "footer-method": internalFooterMethod,
3873
+ onCheckboxChange: handleCheckboxChange,
3874
+ onCheckboxAll: handleCheckboxChange,
3875
+ onRadioChange: handleRadioChange,
3876
+ onSortChange: handleSortChange,
3877
+ onCurrentChange: handleCurrentChange,
3878
+ onEditClosed: handleEditClosed,
3879
+ onEditActived: handleEditActived
3880
+ }, {
3881
+ default: withCtx(() => [
3882
+ __props.isCheckbox ? (openBlock(), createBlock(_component_vxe_column, {
3883
+ key: 0,
3884
+ type: "checkbox",
3885
+ width: "55",
3886
+ fixed: "left"
3887
+ })) : createCommentVNode("", true),
3888
+ __props.showIndex ? (openBlock(), createBlock(_component_vxe_column, {
3889
+ key: 1,
3890
+ type: "seq",
3891
+ fixed: "left",
3892
+ title: "序号",
3893
+ width: "60"
3894
+ })) : createCommentVNode("", true),
3895
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (col, index2) => {
3896
+ return openBlock(), createBlock(_component_vxe_column, mergeProps({
3897
+ key: col.field || index2
3898
+ }, { ref_for: true }, col), createSlots({ _: 2 }, [
3899
+ col.slots && col.slots.default ? {
3900
+ name: "default",
3901
+ fn: withCtx((slotData) => [
3902
+ renderSlot(_ctx.$slots, col.slots.default, mergeProps({ ref_for: true }, slotData), void 0, true)
3903
+ ]),
3904
+ key: "0"
3905
+ } : void 0,
3906
+ col.slots && col.slots.header ? {
3907
+ name: "header",
3908
+ fn: withCtx((slotData) => [
3909
+ renderSlot(_ctx.$slots, col.slots.header, mergeProps({ ref_for: true }, slotData), void 0, true)
3910
+ ]),
3911
+ key: "1"
3912
+ } : void 0
3913
+ ]), 1040);
3914
+ }), 128)),
3915
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
3916
+ ]),
3917
+ _: 3
3918
+ }, 8, ["data", "size", "stripe", "max-height", "show-header", "show-overflow", "header-cell-class-name", "cell-class-name", "row-class-name", "show-footer", "footer-cell-class-name", "sort-config", "filter-config", "checkbox-config", "radio-config", "proxy-config", "loading", "empty-text"]),
3919
+ __props.showPagination ? (openBlock(), createBlock(XPagination, {
3920
+ key: 0,
3921
+ class: "x-pagination",
3922
+ onUpdatePage: handlePageChange,
3923
+ "page-size": __props.pageSize,
3924
+ "current-page": internalCurrentPage.value,
3925
+ total: __props.total
3926
+ }, null, 8, ["page-size", "current-page", "total"])) : createCommentVNode("", true)
3927
+ ], 4)
3928
+ ], 6);
3929
+ };
3930
+ }
3931
+ });
3932
+ const XVxeTable = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-cbc056d7"]]);
3933
+ const _hoisted_1$2 = { class: "x-business-log" };
3934
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3935
+ __name: "XBusinessLog",
3936
+ props: {
3937
+ url: { type: String, default: "" },
3938
+ baseUrl: { type: String, default: "" },
3939
+ tokenCookieName: { type: String, default: "Authorization" },
3940
+ withCredentials: { type: Boolean, default: false },
3941
+ method: { type: String, default: "post" },
3942
+ tableData: { type: Array, default: () => [] },
3943
+ pageSize: { type: Number, default: 10 },
3944
+ subHeight: { type: String, default: "294px" }
3945
+ },
3946
+ setup(__props, { expose: __expose }) {
3947
+ const props = __props;
3948
+ const vxeTableRef = ref();
3949
+ const loading = ref(false);
3950
+ const tableData = ref([]);
3951
+ const pageNum = ref(1);
3952
+ const total = ref(0);
3953
+ let requestInstance = null;
3954
+ const queryForm = reactive({
3955
+ content: "",
3956
+ module: "",
3957
+ createUserName: "",
3958
+ beginTime: "",
3959
+ endTime: "",
3960
+ createTimeRange: [],
3961
+ combinedQueries: ""
3962
+ });
3963
+ const displayData = computed(() => {
3964
+ if (props.tableData && props.tableData.length > 0) {
3965
+ return props.tableData;
3966
+ }
3967
+ return tableData.value;
3968
+ });
3969
+ onMounted(() => {
3970
+ if (!props.tableData || props.tableData.length === 0) {
3971
+ getList();
3972
+ }
3973
+ });
3974
+ function getList() {
3975
+ if (props.tableData && props.tableData.length > 0) return;
3976
+ if (!props.url) {
3977
+ console.warn("XBusinessLog: 请提供 url 属性");
3978
+ return;
3979
+ }
3980
+ if (!requestInstance) {
3981
+ requestInstance = createRequest({
3982
+ baseURL: props.baseUrl || "",
3983
+ withCredentials: props.withCredentials,
3984
+ timeout: 3e4
3985
+ });
3986
+ }
3987
+ loading.value = true;
3988
+ const params = { ...queryForm };
3989
+ requestInstance({
3990
+ url: props.url,
3991
+ method: props.method,
3992
+ data: {
3993
+ ...params,
3994
+ pageSize: props.pageSize,
3995
+ pageNum: pageNum.value
3996
+ }
3997
+ }).then((response) => {
3998
+ tableData.value = response.rows || [];
3999
+ total.value = response.total || 0;
4000
+ loading.value = false;
4001
+ }).catch(() => {
4002
+ loading.value = false;
4003
+ });
4004
+ }
4005
+ function handleSearch(type) {
4006
+ if (type) {
4007
+ pageNum.value = 1;
4008
+ }
4009
+ getList();
4010
+ }
4011
+ function handlePageChange(page, size) {
4012
+ pageNum.value = page;
4013
+ props.pageSize = size;
4014
+ getList();
4015
+ }
4016
+ function handleCreateTimeChange(value) {
4017
+ if (value && value.length) {
4018
+ queryForm.beginTime = value[0] || "";
4019
+ queryForm.endTime = value[1] || "";
4020
+ } else {
4021
+ queryForm.beginTime = "";
4022
+ queryForm.endTime = "";
4023
+ }
4024
+ }
4025
+ function resetForm() {
4026
+ Object.assign(queryForm, {
4027
+ content: "",
4028
+ module: "",
4029
+ createUserName: "",
4030
+ beginTime: "",
4031
+ endTime: "",
4032
+ createTimeRange: [],
4033
+ combinedQueries: ""
4034
+ });
4035
+ pageNum.value = 1;
4036
+ getList();
4037
+ }
4038
+ function refresh() {
4039
+ getList();
4040
+ }
4041
+ __expose({
4042
+ resetForm,
4043
+ refresh
4044
+ });
4045
+ return (_ctx, _cache) => {
4046
+ const _component_el_date_picker = resolveComponent("el-date-picker");
4047
+ const _component_vxe_form_item = resolveComponent("vxe-form-item");
4048
+ const _component_el_input = resolveComponent("el-input");
4049
+ const _component_vxe_table_column = resolveComponent("vxe-table-column");
4050
+ return openBlock(), createElementBlock("div", _hoisted_1$2, [
4051
+ createVNode(XSearchBar, {
4052
+ modelValue: queryForm.combinedQueries,
4053
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => queryForm.combinedQueries = $event),
4054
+ "show-search": false,
4055
+ "query-form": queryForm,
4056
+ "title-width": "78px",
4057
+ onListUpdate: _cache[5] || (_cache[5] = ($event) => handleSearch(1))
4058
+ }, {
4059
+ vxeForm: withCtx(() => [
4060
+ createVNode(_component_vxe_form_item, {
4061
+ title: "选择时间",
4062
+ field: "createTimeRange"
4063
+ }, {
4064
+ default: withCtx(() => [
4065
+ createVNode(_component_el_date_picker, {
4066
+ modelValue: queryForm.createTimeRange,
4067
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => queryForm.createTimeRange = $event),
4068
+ type: "datetimerange",
4069
+ "range-separator": "至",
4070
+ "value-format": "YYYY-MM-DD HH:mm:ss",
4071
+ "start-placeholder": "开始时间",
4072
+ "end-placeholder": "结束时间",
4073
+ size: "small",
4074
+ style: { "width": "100%" },
4075
+ onChange: handleCreateTimeChange
4076
+ }, null, 8, ["modelValue"])
4077
+ ]),
4078
+ _: 1
4079
+ }),
4080
+ createVNode(_component_vxe_form_item, {
4081
+ title: "内容",
4082
+ field: "content"
4083
+ }, {
4084
+ default: withCtx(() => [
4085
+ createVNode(_component_el_input, {
4086
+ modelValue: queryForm.content,
4087
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => queryForm.content = $event),
4088
+ placeholder: "请输入内容",
4089
+ clearable: "",
4090
+ size: "small",
4091
+ onKeyup: withKeys(handleSearch, ["enter"])
4092
+ }, null, 8, ["modelValue"])
4093
+ ]),
4094
+ _: 1
4095
+ }),
4096
+ createVNode(_component_vxe_form_item, {
4097
+ title: "模块",
4098
+ field: "module"
4099
+ }, {
4100
+ default: withCtx(() => [
4101
+ createVNode(_component_el_input, {
4102
+ modelValue: queryForm.module,
4103
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => queryForm.module = $event),
4104
+ placeholder: "请输入模块",
4105
+ clearable: "",
4106
+ size: "small",
4107
+ onKeyup: withKeys(handleSearch, ["enter"])
4108
+ }, null, 8, ["modelValue"])
4109
+ ]),
4110
+ _: 1
4111
+ }),
4112
+ createVNode(_component_vxe_form_item, {
4113
+ title: "操作人员",
4114
+ field: "createUserName"
4115
+ }, {
4116
+ default: withCtx(() => [
4117
+ createVNode(_component_el_input, {
4118
+ modelValue: queryForm.createUserName,
4119
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => queryForm.createUserName = $event),
4120
+ placeholder: "请输入操作人员",
4121
+ clearable: "",
4122
+ size: "small",
4123
+ onKeyup: withKeys(handleSearch, ["enter"])
4124
+ }, null, 8, ["modelValue"])
4125
+ ]),
4126
+ _: 1
4127
+ })
4128
+ ]),
4129
+ _: 1
4130
+ }, 8, ["modelValue", "query-form"]),
4131
+ createVNode(XVxeTable, {
4132
+ ref_key: "vxeTableRef",
4133
+ ref: vxeTableRef,
4134
+ "sub-height": __props.subHeight,
4135
+ "table-data": displayData.value,
4136
+ loading: loading.value,
4137
+ "current-page": pageNum.value,
4138
+ "page-size": __props.pageSize,
4139
+ total: total.value,
4140
+ onChangePage: handlePageChange
4141
+ }, {
4142
+ default: withCtx(() => [
4143
+ createVNode(_component_vxe_table_column, {
4144
+ title: "操作员账号",
4145
+ field: "createUserName",
4146
+ "min-width": "100",
4147
+ "show-overflow": "title"
4148
+ }),
4149
+ createVNode(_component_vxe_table_column, {
4150
+ title: "日志时间",
4151
+ field: "createTime",
4152
+ width: "150"
4153
+ }, {
4154
+ default: withCtx(({ row }) => [
4155
+ createElementVNode("span", null, toDisplayString(unref(parseTime)(row.createTime)), 1)
4156
+ ]),
4157
+ _: 1
4158
+ }),
4159
+ createVNode(_component_vxe_table_column, {
4160
+ title: "日志类型",
4161
+ field: "type",
4162
+ "min-width": "100"
4163
+ }),
4164
+ createVNode(_component_vxe_table_column, {
4165
+ title: "终端IP",
4166
+ field: "terminalIp",
4167
+ "min-width": "100"
4168
+ }),
4169
+ createVNode(_component_vxe_table_column, {
4170
+ title: "日志内容",
4171
+ field: "content",
4172
+ "min-width": "150",
4173
+ "show-overflow": "tooltip"
4174
+ })
4175
+ ]),
4176
+ _: 1
4177
+ }, 8, ["sub-height", "table-data", "loading", "current-page", "page-size", "total"])
4178
+ ]);
4179
+ };
4180
+ }
4181
+ });
4182
+ const XBusinessLog = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-3869b470"]]);
4183
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4184
+ __name: "XDatePicker",
4185
+ props: {
4186
+ type: {
4187
+ type: String,
4188
+ default: "date",
4189
+ validator: (val) => [
4190
+ "year",
4191
+ "years",
4192
+ "month",
4193
+ "months",
4194
+ "date",
4195
+ "dates",
4196
+ "datetime",
4197
+ "week",
4198
+ "datetimerange",
4199
+ "daterange",
4200
+ "monthrange",
4201
+ "yearrange"
4202
+ ].includes(val)
4203
+ },
4204
+ valueFormat: {
4205
+ type: String,
4206
+ default: null
4207
+ },
4208
+ placeholder: {
4209
+ type: String,
4210
+ default: null
4211
+ },
4212
+ startPlaceholder: {
4213
+ type: String,
4214
+ default: null
4215
+ },
4216
+ endPlaceholder: {
4217
+ type: String,
4218
+ default: null
4219
+ },
4220
+ rangeSeparator: {
4221
+ type: String,
4222
+ default: "至"
4223
+ },
4224
+ defaultTime: {
4225
+ type: [String, Array],
4226
+ default: null
4227
+ },
4228
+ isEndTime: {
4229
+ type: Boolean,
4230
+ default: false
4231
+ },
4232
+ modelValue: {
4233
+ type: [String, Number, Array, Date],
4234
+ default: ""
4235
+ }
4236
+ },
4237
+ emits: ["update:modelValue"],
4238
+ setup(__props, { emit: __emit }) {
4239
+ const props = __props;
4240
+ const emit = __emit;
4241
+ const internalValue = ref(props.modelValue);
4242
+ function toDayjsFormat(format) {
4243
+ return format.replace(/yyyy/g, "YYYY").replace(/dd/g, "DD");
4244
+ }
4245
+ function getDefaultFormat(type) {
4246
+ const formatMap = {
4247
+ "year": "YYYY",
4248
+ "years": "YYYY",
4249
+ "month": "YYYY-MM",
4250
+ "months": "YYYY-MM",
4251
+ "date": "YYYY-MM-DD",
4252
+ "dates": "YYYY-MM-DD",
4253
+ "datetime": "YYYY-MM-DD HH:mm:ss",
4254
+ "week": "YYYY-MM-DD",
4255
+ "datetimerange": "YYYY-MM-DD HH:mm:ss",
4256
+ "daterange": "YYYY-MM-DD",
4257
+ "monthrange": "YYYY-MM",
4258
+ "yearrange": "YYYY"
4259
+ };
4260
+ return formatMap[type] || "YYYY-MM-DD";
4261
+ }
4262
+ function getDefaultPlaceholder(type) {
4263
+ const isRange = type.includes("range");
4264
+ const hasTime = type.includes("time");
4265
+ if (isRange) {
4266
+ return {
4267
+ start: hasTime ? "开始日期时间" : "开始日期",
4268
+ end: hasTime ? "结束日期时间" : "结束日期"
4269
+ };
4270
+ } else {
4271
+ if (type === "year" || type === "years") return "选择年";
4272
+ if (type === "month" || type === "months") return "选择月";
4273
+ if (type === "week") return "选择周";
4274
+ if (hasTime) return "选择日期时间";
4275
+ return "选择日期";
4276
+ }
4277
+ }
4278
+ const currentPlaceholder = computed(() => {
4279
+ if (props.placeholder !== null) return props.placeholder;
4280
+ const isRange = props.type.includes("range");
4281
+ if (isRange) return void 0;
4282
+ return getDefaultPlaceholder(props.type);
4283
+ });
4284
+ const currentStartPlaceholder = computed(() => {
4285
+ if (props.startPlaceholder !== null) return props.startPlaceholder;
4286
+ const isRange = props.type.includes("range");
4287
+ if (!isRange) return void 0;
4288
+ const defaults2 = getDefaultPlaceholder(props.type);
4289
+ return defaults2.start;
4290
+ });
4291
+ const currentEndPlaceholder = computed(() => {
4292
+ if (props.endPlaceholder !== null) return props.endPlaceholder;
4293
+ const isRange = props.type.includes("range");
4294
+ if (!isRange) return void 0;
4295
+ const defaults2 = getDefaultPlaceholder(props.type);
4296
+ return defaults2.end;
4297
+ });
4298
+ const currentValueFormat = computed(() => {
4299
+ if (props.valueFormat !== null && props.valueFormat !== void 0) {
4300
+ return toDayjsFormat(props.valueFormat);
4301
+ }
4302
+ return getDefaultFormat(props.type);
4303
+ });
4304
+ const currentDefaultTime = computed(() => {
4305
+ if (props.defaultTime !== null && props.defaultTime !== void 0) {
4306
+ return props.defaultTime;
4307
+ }
4308
+ if (props.isEndTime && props.type === "datetimerange") {
4309
+ return [new Date(2e3, 0, 1, 0, 0, 0), new Date(2e3, 0, 1, 23, 59, 59)];
4310
+ }
4311
+ if (props.isEndTime && props.type === "datetime") {
4312
+ return new Date(2e3, 0, 1, 23, 59, 59);
4313
+ }
4314
+ return void 0;
4315
+ });
4316
+ function applyEndTime(value) {
4317
+ const startTime = "00:00:00";
4318
+ const endTime = "23:59:59";
4319
+ if (props.type === "datetimerange" && Array.isArray(value) && value.length === 2) {
4320
+ let startVal = value[0];
4321
+ let endVal = value[1];
4322
+ if (startVal instanceof Date) {
4323
+ const newStart = new Date(startVal);
4324
+ newStart.setHours(0, 0, 0, 0);
4325
+ startVal = newStart;
4326
+ } else if (typeof startVal === "string" && startVal) {
4327
+ const datePart = startVal.substring(0, 10);
4328
+ startVal = datePart + " " + startTime;
4329
+ }
4330
+ if (endVal instanceof Date) {
4331
+ const newEnd = new Date(endVal);
4332
+ newEnd.setHours(23, 59, 59, 0);
4333
+ endVal = newEnd;
4334
+ } else if (typeof endVal === "string" && endVal) {
4335
+ const datePart = endVal.substring(0, 10);
4336
+ endVal = datePart + " " + endTime;
4337
+ }
4338
+ return [startVal, endVal];
4339
+ }
4340
+ if (props.type === "datetime" && value) {
4341
+ if (value instanceof Date) {
4342
+ if (value.getHours() === 0 && value.getMinutes() === 0 && value.getSeconds() === 0) {
4343
+ const newDate = new Date(value);
4344
+ newDate.setHours(23, 59, 59, 0);
4345
+ return newDate;
4346
+ }
4347
+ return value;
4348
+ }
4349
+ if (typeof value === "string") {
4350
+ const timePart = value.length > 10 ? value.substring(11) : "";
4351
+ if (!timePart) {
4352
+ const datePart = value.substring(0, 10);
4353
+ return datePart + " " + endTime;
4354
+ }
4355
+ }
4356
+ }
4357
+ return value;
4358
+ }
4359
+ watch(() => props.modelValue, (newVal) => {
4360
+ let result = newVal;
4361
+ if (props.isEndTime && newVal) {
4362
+ result = applyEndTime(newVal);
4363
+ }
4364
+ internalValue.value = result;
4365
+ });
4366
+ function handleUpdate(value) {
4367
+ internalValue.value = value;
4368
+ emit("update:modelValue", value);
4369
+ }
4370
+ return (_ctx, _cache) => {
4371
+ const _component_el_date_picker = resolveComponent("el-date-picker");
4372
+ return openBlock(), createBlock(_component_el_date_picker, mergeProps({
4373
+ "model-value": internalValue.value,
4374
+ type: __props.type,
4375
+ placeholder: currentPlaceholder.value,
4376
+ "start-placeholder": currentStartPlaceholder.value,
4377
+ "end-placeholder": currentEndPlaceholder.value,
4378
+ "range-separator": __props.rangeSeparator,
4379
+ "value-format": currentValueFormat.value,
4380
+ "default-time": currentDefaultTime.value
4381
+ }, _ctx.$attrs, { "onUpdate:modelValue": handleUpdate }), null, 16, ["model-value", "type", "placeholder", "start-placeholder", "end-placeholder", "range-separator", "value-format", "default-time"]);
4382
+ };
4383
+ }
4384
+ });
4385
+ const XDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-1111160a"]]);
4386
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4387
+ __name: "XElOption",
4388
+ props: {
4389
+ label: {
4390
+ type: [String, Number],
4391
+ default: void 0
4392
+ },
4393
+ value: {
4394
+ type: [String, Number],
4395
+ default: void 0
4396
+ },
4397
+ disabled: {
4398
+ type: Boolean,
4399
+ default: false
4400
+ }
4401
+ },
4402
+ setup(__props) {
4403
+ const props = __props;
4404
+ const elSelectModelValue = inject("elSelectModelValue", null);
4405
+ const computedValue = computed(() => {
4406
+ const propValue = props.value;
4407
+ if (!elSelectModelValue || !elSelectModelValue.value) {
4408
+ return propValue;
4409
+ }
4410
+ const modelVal = elSelectModelValue.value;
4411
+ if (Array.isArray(modelVal) && modelVal.length > 0) {
4412
+ const firstValueType = typeof modelVal[0];
4413
+ if (firstValueType === "number" && typeof propValue === "string") {
4414
+ return Number(propValue);
4415
+ }
4416
+ if (firstValueType === "string" && typeof propValue === "number") {
4417
+ return String(propValue);
4418
+ }
4419
+ }
4420
+ if (!Array.isArray(modelVal)) {
4421
+ const parentType = typeof modelVal;
4422
+ if (parentType === "number" && typeof propValue === "string") {
4423
+ return Number(propValue);
4424
+ }
4425
+ if (parentType === "string" && typeof propValue === "number") {
4426
+ return String(propValue);
4427
+ }
4428
+ }
4429
+ return propValue;
4430
+ });
4431
+ const computedLabel = computed(() => props.label);
4432
+ return (_ctx, _cache) => {
4433
+ const _component_el_option = resolveComponent("el-option");
4434
+ return openBlock(), createBlock(_component_el_option, mergeProps(_ctx.$attrs, {
4435
+ label: computedLabel.value,
4436
+ value: computedValue.value
4437
+ }), {
4438
+ default: withCtx(() => [
4439
+ renderSlot(_ctx.$slots, "default")
4440
+ ]),
4441
+ _: 3
4442
+ }, 16, ["label", "value"]);
4443
+ };
4444
+ }
4445
+ });
4446
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
4447
+ __name: "XElSelect",
4448
+ props: {
4449
+ modelValue: {
4450
+ type: [String, Number, Array],
4451
+ default: void 0
4452
+ },
4453
+ width: {
4454
+ type: [String, Number],
4455
+ default: "100%"
4456
+ },
4457
+ multiple: {
4458
+ type: Boolean,
4459
+ default: false
4460
+ },
4461
+ typeConvert: {
4462
+ type: Boolean,
4463
+ default: true
4464
+ },
4465
+ separator: {
4466
+ type: String,
4467
+ default: ""
4468
+ },
4469
+ targetType: {
4470
+ type: String,
4471
+ default: "auto",
4472
+ validator: (value) => ["string", "number", "auto"].includes(value)
4473
+ },
4474
+ clearable: {
4475
+ type: Boolean,
4476
+ default: true
4477
+ },
4478
+ filterable: {
4479
+ type: Boolean,
4480
+ default: true
4481
+ },
4482
+ placeholder: {
4483
+ type: String,
4484
+ default: void 0
4485
+ }
4486
+ },
4487
+ emits: ["update:modelValue", "change"],
4488
+ setup(__props, { expose: __expose, emit: __emit }) {
4489
+ const props = __props;
4490
+ const emit = __emit;
4491
+ const selectRef = ref();
4492
+ const localValue = ref(props.modelValue);
4493
+ const modelValueRef = ref(null);
4494
+ provide("elSelectModelValue", modelValueRef);
4495
+ const computedLocalValue = computed(() => {
4496
+ const val = localValue.value;
4497
+ if (!props.typeConvert || val === null || val === void 0) {
4498
+ return val;
4499
+ }
4500
+ if (props.multiple && props.separator) {
4501
+ if (typeof val === "string" && val.includes(props.separator)) {
4502
+ const values = val.split(props.separator);
4503
+ if (props.targetType === "number") {
4504
+ return values.map((v) => Number(v));
4505
+ }
4506
+ return values;
4507
+ }
4508
+ if (Array.isArray(val)) {
4509
+ return val;
4510
+ }
4511
+ if (val === "" || val === null || val === void 0) {
4512
+ return [];
4513
+ }
4514
+ return [val];
4515
+ }
4516
+ return val;
4517
+ });
4518
+ watch(() => props.modelValue, (newVal) => {
4519
+ localValue.value = newVal;
4520
+ });
4521
+ watch(computedLocalValue, (newVal) => {
4522
+ modelValueRef.value = newVal;
4523
+ }, { immediate: true });
4524
+ function handleLocalUpdate(val) {
4525
+ localValue.value = val;
4526
+ if (props.multiple && props.separator) {
4527
+ const arr = Array.isArray(val) ? val : [val];
4528
+ emit("update:modelValue", arr.join(props.separator));
4529
+ } else {
4530
+ emit("update:modelValue", val);
4531
+ }
4532
+ }
4533
+ function handleChange(val) {
4534
+ emit("change", val);
4535
+ }
4536
+ __expose({
4537
+ selectRef
4538
+ });
4539
+ return (_ctx, _cache) => {
4540
+ const _component_el_select = resolveComponent("el-select");
4541
+ return openBlock(), createBlock(_component_el_select, mergeProps({
4542
+ ref_key: "selectRef",
4543
+ ref: selectRef,
4544
+ multiple: __props.multiple,
4545
+ "model-value": computedLocalValue.value,
4546
+ "onUpdate:modelValue": handleLocalUpdate,
4547
+ onChange: handleChange
4548
+ }, _ctx.$attrs, {
4549
+ clearable: __props.clearable,
4550
+ filterable: __props.filterable,
4551
+ placeholder: __props.placeholder,
4552
+ style: {
4553
+ width: __props.width
4554
+ }
4555
+ }), {
4556
+ default: withCtx(() => [
4557
+ renderSlot(_ctx.$slots, "default")
4558
+ ]),
4559
+ _: 3
4560
+ }, 16, ["multiple", "model-value", "clearable", "filterable", "placeholder", "style"]);
4561
+ };
4562
+ }
4563
+ });
4564
+ const _hoisted_1$1 = { class: "x-report-table" };
4565
+ const _hoisted_2$1 = { class: "report-header" };
4566
+ const _hoisted_3$1 = { class: "report-title" };
4567
+ const _hoisted_4$1 = { class: "report-actions" };
4568
+ const _hoisted_5$1 = ["onClick"];
4569
+ const _hoisted_6$1 = { class: "h-t-primary" };
4570
+ const _hoisted_7$1 = { class: "h-t-primary" };
4571
+ const _hoisted_8$1 = { class: "h-t-primary" };
4572
+ const _hoisted_9 = { class: "h-flex h-justify-between" };
4573
+ const _hoisted_10 = { class: "" };
4574
+ const _hoisted_11 = { class: "" };
4575
+ const _hoisted_12 = { key: 0 };
4576
+ const _hoisted_13 = { class: "" };
4577
+ const _hoisted_14 = { class: "" };
4578
+ const _hoisted_15 = { key: 1 };
4579
+ const _hoisted_16 = { class: "" };
4580
+ const _hoisted_17 = { class: "" };
4581
+ const _hoisted_18 = { class: "" };
4582
+ const _hoisted_19 = { class: "" };
4583
+ const _hoisted_20 = { class: "report-body" };
4584
+ const _hoisted_21 = { class: "h-flex h-justify-between" };
4585
+ const _hoisted_22 = { class: "" };
4586
+ const _hoisted_23 = { class: "" };
4587
+ const _hoisted_24 = { key: 0 };
4588
+ const _hoisted_25 = { class: "" };
4589
+ const _hoisted_26 = { class: "" };
4590
+ const _hoisted_27 = { class: "" };
4591
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
4592
+ __name: "XReportTable",
4593
+ props: {
4594
+ tableData: { type: Array, default: () => [] },
4595
+ columns: { type: Array, default: () => [] },
4596
+ showFooter: { type: Boolean, default: false },
4597
+ reportTitle: { type: String, default: "" },
4598
+ organizationName: { type: String, default: "" },
4599
+ dateRange: { type: [String, Array], default: "" },
4600
+ customHeader1: { type: String, default: "" },
4601
+ customHeader1Label: { type: String, default: "" },
4602
+ customHeader2: { type: String, default: "" },
4603
+ customHeader2Label: { type: String, default: "" },
4604
+ customHeader3: { type: String, default: "" },
4605
+ customHeader3Label: { type: String, default: "" },
4606
+ auditorName: { type: String, default: "" },
4607
+ creatorName: { type: String, default: "" },
4608
+ customFooterField: { type: String, default: "" },
4609
+ customFooterFieldLabel: { type: String, default: "" },
4610
+ printDate: { type: String, default: "" },
4611
+ showPrint: { type: Boolean, default: true },
4612
+ showExport: { type: Boolean, default: true },
4613
+ subHeight: { type: String, default: "343px" },
4614
+ showToolbar: { type: Boolean, default: false },
4615
+ showPagination: { type: Boolean, default: true },
4616
+ pageSize: { type: Number, default: 20 },
4617
+ total: { type: Number, default: 0 },
4618
+ footerData: { type: Array, default: () => [] },
4619
+ currentPage: { type: Number, default: 1 },
4620
+ loading: { type: Boolean, default: false },
4621
+ printCallback: { type: Boolean, default: false },
4622
+ exportCallback: { type: Boolean, default: false },
4623
+ printText: { type: String, default: "打印" },
4624
+ printText1: { type: String, default: "" },
4625
+ customButtons: { type: Array, default: () => [] }
4626
+ },
4627
+ emits: ["change-page", "customBtn", "printReport", "export"],
4628
+ setup(__props, { expose: __expose, emit: __emit }) {
4629
+ const props = __props;
4630
+ const emit = __emit;
4631
+ const instance = getCurrentInstance();
4632
+ const repVxeTableRef = ref();
4633
+ const reportHeaderRef = ref();
4634
+ const reportFooterRef = ref();
4635
+ const organizationNameDisplay = computed(() => {
4636
+ var _a, _b, _c, _d, _e;
4637
+ if (props.organizationName) return props.organizationName;
4638
+ const store = (_c = (_b = (_a = instance == null ? void 0 : instance.appContext) == null ? void 0 : _a.config) == null ? void 0 : _b.globalProperties) == null ? void 0 : _c.$store;
4639
+ if ((_e = (_d = store == null ? void 0 : store.getters) == null ? void 0 : _d.tenantInfo) == null ? void 0 : _e.tenantName) {
4640
+ return store.getters.tenantInfo.tenantName;
4641
+ }
4642
+ return "";
4643
+ });
4644
+ const reportTitle = computed(() => {
4645
+ var _a, _b, _c, _d;
4646
+ if (props.reportTitle) return props.reportTitle;
4647
+ const route = (_c = (_b = (_a = instance == null ? void 0 : instance.appContext) == null ? void 0 : _a.config) == null ? void 0 : _b.globalProperties) == null ? void 0 : _c.$route;
4648
+ if ((_d = route == null ? void 0 : route.meta) == null ? void 0 : _d.title) return route.meta.title;
4649
+ return "";
4650
+ });
4651
+ const creatorNameDisplay = computed(() => {
4652
+ var _a, _b, _c, _d;
4653
+ if (props.creatorName) return props.creatorName;
4654
+ const store = (_c = (_b = (_a = instance == null ? void 0 : instance.appContext) == null ? void 0 : _a.config) == null ? void 0 : _b.globalProperties) == null ? void 0 : _c.$store;
4655
+ if ((_d = store == null ? void 0 : store.getters) == null ? void 0 : _d.name) return store.getters.name;
4656
+ return "";
4657
+ });
4658
+ const formattedPrintDate = computed(() => {
4659
+ if (props.printDate) return props.printDate;
4660
+ const now = /* @__PURE__ */ new Date();
4661
+ const year = now.getFullYear();
4662
+ const month = String(now.getMonth() + 1).padStart(2, "0");
4663
+ const day = String(now.getDate()).padStart(2, "0");
4664
+ return `${year}-${month}-${day}`;
4665
+ });
4666
+ const dateRangeDisplay = computed(() => {
4667
+ if (!props.dateRange) return "";
4668
+ if (Array.isArray(props.dateRange)) {
4669
+ return props.dateRange[0] + "至" + props.dateRange[1];
4670
+ }
4671
+ return props.dateRange;
4672
+ });
4673
+ function handlePageChange(page, size) {
4674
+ emit("change-page", page, size);
4675
+ }
4676
+ function handleCustomBtn(index2, btn) {
4677
+ emit("customBtn", index2, btn);
4678
+ }
4679
+ function printReport(type) {
4680
+ if (type === 2) {
4681
+ emit("printReport", type);
4682
+ } else if (props.printCallback) {
4683
+ emit("printReport", type);
4684
+ } else {
4685
+ handlePrint();
4686
+ }
4687
+ }
4688
+ function getTableInstance() {
4689
+ if (repVxeTableRef.value) {
4690
+ return repVxeTableRef.value.vxeTableRef;
4691
+ }
4692
+ return null;
4693
+ }
4694
+ function handlePrint(printData) {
4695
+ const tableEl = getTableInstance();
4696
+ if (!tableEl) {
4697
+ console.error("VXE Table instance not found");
4698
+ ElMessage.error("表格组件未加载完成,请稍后再试");
4699
+ return;
4700
+ }
4701
+ const headerEl = reportHeaderRef.value;
4702
+ const footerEl = reportFooterRef.value;
4703
+ if (!headerEl || !footerEl) {
4704
+ console.error("Report header or footer element not found");
4705
+ ElMessage.error("报表元素未加载完成,请稍后再试");
4706
+ return;
4707
+ }
4708
+ const headerHtml = headerEl.innerHTML;
4709
+ const footerHtml = footerEl.innerHTML;
4710
+ if (typeof tableEl.print === "function") {
4711
+ tableEl.print({
4712
+ sheetName: props.reportTitle || "报表",
4713
+ data: printData || props.tableData,
4714
+ style: `
4715
+ table td, table th {
4716
+ border: 1px solid #000!important;
4717
+ }
4718
+ .table-head{
4719
+ text-align: center;
4720
+ font-size: 20px;
4721
+ line-height: 40px;
4722
+ font-weight: bold;
4723
+ }
4724
+ .table-head-2{
4725
+ width: 33%;
4726
+ }
4727
+ .table-head-1{
4728
+ display: flex;
4729
+ line-height: 25px;
4730
+ }
4731
+ .btn-print{
4732
+ text-align: center;
4733
+ margin-top: 10px;
4734
+ }
4735
+ .x-t-4-14-22 {
4736
+ font-weight: 400;
4737
+ font-size: 14px;
4738
+ color: #333333;
4739
+ line-height: 22px;
4740
+ }
4741
+ .h-flex {
4742
+ display: flex;
4743
+ }
4744
+ .h-justify-between {
4745
+ justify-content: space-between;
4746
+ }
4747
+ .h-pb-12 {
4748
+ padding-bottom: 12px;
4749
+ }
4750
+ .h-pt-12 {
4751
+ padding-top: 12px;
4752
+ }`,
4753
+ beforePrintMethod: ({ content }) => {
4754
+ if (reportTitle.value) {
4755
+ return `<div class="table-head">${reportTitle.value}</div>` + headerHtml + content + footerHtml;
4756
+ }
4757
+ return headerHtml + content + footerHtml;
4758
+ }
4759
+ });
4760
+ } else {
4761
+ console.error("VXE Table print method not found");
4762
+ ElMessage.error("打印功能暂不可用");
4763
+ }
4764
+ }
4765
+ function handleExport() {
4766
+ if (props.exportCallback) {
4767
+ emit("export");
4768
+ } else {
4769
+ const tableInstance = getTableInstance();
4770
+ if (tableInstance) {
4771
+ tableInstance.exportData({
4772
+ filename: `${reportTitle.value}`,
4773
+ sheetName: "Sheet1",
4774
+ type: "xlsx"
4775
+ });
4776
+ }
4777
+ }
4778
+ }
4779
+ function clearCheckbox() {
4780
+ var _a;
4781
+ (_a = repVxeTableRef.value) == null ? void 0 : _a.clearCheckbox();
4782
+ }
4783
+ function clearSort() {
4784
+ var _a;
4785
+ (_a = repVxeTableRef.value) == null ? void 0 : _a.clearSort();
4786
+ }
4787
+ __expose({
4788
+ clearCheckbox,
4789
+ clearSort,
4790
+ handlePrint,
4791
+ getTableInstance
4792
+ });
4793
+ return (_ctx, _cache) => {
4794
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [
4795
+ createElementVNode("div", _hoisted_2$1, [
4796
+ createElementVNode("h2", _hoisted_3$1, toDisplayString(reportTitle.value), 1),
4797
+ createElementVNode("div", _hoisted_4$1, [
4798
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.customButtons, (btn, index2) => {
4799
+ return openBlock(), createElementBlock("div", {
4800
+ key: index2,
4801
+ class: "action-item h-cursor-pointer",
4802
+ onClick: ($event) => handleCustomBtn(index2, btn)
4803
+ }, [
4804
+ createElementVNode("span", _hoisted_6$1, toDisplayString(btn), 1)
4805
+ ], 8, _hoisted_5$1);
4806
+ }), 128)),
4807
+ createElementVNode("div", {
4808
+ class: "action-item h-cursor-pointer",
4809
+ onClick: _cache[0] || (_cache[0] = ($event) => printReport(1))
4810
+ }, [
4811
+ createElementVNode("span", _hoisted_7$1, toDisplayString(__props.printText), 1)
4812
+ ]),
4813
+ __props.printText1 ? (openBlock(), createElementBlock("div", {
4814
+ key: 0,
4815
+ class: "action-item h-cursor-pointer",
4816
+ onClick: _cache[1] || (_cache[1] = ($event) => printReport(2))
4817
+ }, [
4818
+ createElementVNode("span", _hoisted_8$1, toDisplayString(__props.printText1), 1)
4819
+ ])) : createCommentVNode("", true),
4820
+ createElementVNode("div", {
4821
+ class: "action-item h-cursor-pointer",
4822
+ onClick: handleExport
4823
+ }, _cache[2] || (_cache[2] = [
4824
+ createElementVNode("span", { class: "h-t-primary" }, "导出", -1)
4825
+ ]))
4826
+ ])
4827
+ ]),
4828
+ createElementVNode("div", {
4829
+ class: "x-t-4-14-22 h-pb-12",
4830
+ ref_key: "reportHeaderRef",
4831
+ ref: reportHeaderRef
4832
+ }, [
4833
+ createElementVNode("div", _hoisted_9, [
4834
+ createElementVNode("div", null, [
4835
+ _cache[3] || (_cache[3] = createElementVNode("span", { class: "" }, "制表单位:", -1)),
4836
+ createElementVNode("span", _hoisted_10, toDisplayString(organizationNameDisplay.value), 1)
4837
+ ]),
4838
+ createElementVNode("div", null, [
4839
+ _cache[4] || (_cache[4] = createElementVNode("span", { class: "" }, "日期范围:", -1)),
4840
+ createElementVNode("span", _hoisted_11, toDisplayString(dateRangeDisplay.value), 1)
4841
+ ]),
4842
+ __props.customHeader1Label ? (openBlock(), createElementBlock("div", _hoisted_12, [
4843
+ createElementVNode("span", _hoisted_13, toDisplayString(__props.customHeader1Label) + ":", 1),
4844
+ createElementVNode("span", _hoisted_14, toDisplayString(__props.customHeader1 || ""), 1)
4845
+ ])) : createCommentVNode("", true),
4846
+ __props.customHeader2Label ? (openBlock(), createElementBlock("div", _hoisted_15, [
4847
+ createElementVNode("span", _hoisted_16, toDisplayString(__props.customHeader2Label) + ":", 1),
4848
+ createElementVNode("span", _hoisted_17, toDisplayString(__props.customHeader2 || ""), 1)
4849
+ ])) : createCommentVNode("", true),
4850
+ createElementVNode("div", null, [
4851
+ createElementVNode("span", _hoisted_18, toDisplayString(__props.customHeader3Label) + toDisplayString(__props.customHeader3Label ? ":" : ""), 1),
4852
+ createElementVNode("span", _hoisted_19, toDisplayString(__props.customHeader3 || ""), 1)
4853
+ ])
4854
+ ])
4855
+ ], 512),
4856
+ createElementVNode("div", _hoisted_20, [
4857
+ createVNode(XVxeTable, {
4858
+ ref_key: "repVxeTableRef",
4859
+ ref: repVxeTableRef,
4860
+ "table-data": __props.tableData,
4861
+ "sub-height": __props.subHeight,
4862
+ "show-toolbar": __props.showToolbar,
4863
+ "show-pagination": __props.showPagination,
4864
+ loading: __props.loading,
4865
+ "is-show-bg": false,
4866
+ "page-size": __props.pageSize,
4867
+ "current-page": __props.currentPage,
4868
+ total: __props.total,
4869
+ "show-footer": __props.showFooter,
4870
+ "footer-data": __props.footerData,
4871
+ columns: __props.columns,
4872
+ onChangePage: handlePageChange
4873
+ }, {
4874
+ buttons: withCtx(() => [
4875
+ renderSlot(_ctx.$slots, "buttons", {}, void 0, true)
4876
+ ]),
4877
+ default: withCtx(() => [
4878
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
4879
+ ]),
4880
+ _: 3
4881
+ }, 8, ["table-data", "sub-height", "show-toolbar", "show-pagination", "loading", "page-size", "current-page", "total", "show-footer", "footer-data", "columns"])
4882
+ ]),
4883
+ createElementVNode("div", {
4884
+ class: "x-t-4-14-22 h-pt-12",
4885
+ ref_key: "reportFooterRef",
4886
+ ref: reportFooterRef
4887
+ }, [
4888
+ createElementVNode("div", _hoisted_21, [
4889
+ createElementVNode("div", null, [
4890
+ _cache[5] || (_cache[5] = createElementVNode("span", { class: "" }, "审核人员:", -1)),
4891
+ createElementVNode("span", _hoisted_22, toDisplayString(__props.auditorName || ""), 1)
4892
+ ]),
4893
+ createElementVNode("div", null, [
4894
+ _cache[6] || (_cache[6] = createElementVNode("span", { class: "" }, "制表人员:", -1)),
4895
+ createElementVNode("span", _hoisted_23, toDisplayString(creatorNameDisplay.value), 1)
4896
+ ]),
4897
+ __props.customFooterFieldLabel ? (openBlock(), createElementBlock("div", _hoisted_24, [
4898
+ createElementVNode("span", _hoisted_25, toDisplayString(__props.customFooterFieldLabel) + ":", 1),
4899
+ createElementVNode("span", _hoisted_26, toDisplayString(__props.customFooterField || ""), 1)
4900
+ ])) : createCommentVNode("", true),
4901
+ createElementVNode("div", null, [
4902
+ _cache[7] || (_cache[7] = createElementVNode("span", { class: "" }, "打印日期:", -1)),
4903
+ createElementVNode("span", _hoisted_27, toDisplayString(formattedPrintDate.value), 1)
4904
+ ])
4905
+ ])
4906
+ ], 512)
4907
+ ]);
4908
+ };
4909
+ }
4910
+ });
4911
+ const XReportTable = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-f5ce1d04"]]);
4912
+ const _hoisted_1 = { class: "x-split-layout__sidebar-menu" };
4913
+ const _hoisted_2 = ["onClick"];
4914
+ const _hoisted_3 = { class: "x-split-layout__menu-icon" };
4915
+ const _hoisted_4 = { class: "x-split-layout__menu-label" };
4916
+ const _hoisted_5 = { class: "x-split-layout__content" };
4917
+ const _hoisted_6 = {
4918
+ key: 0,
4919
+ class: "x-split-layout__content-header"
4920
+ };
4921
+ const _hoisted_7 = { class: "x-split-layout__content-title" };
4922
+ const _hoisted_8 = {
4923
+ key: 1,
4924
+ class: "x-split-layout__content-footer"
4925
+ };
4926
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4927
+ __name: "XSplitLayout",
4928
+ props: {
4929
+ height: { type: String, default: "100%" },
4930
+ sidebarWidth: { type: String, default: "240px" },
4931
+ menuItems: { type: Array, default: () => [] },
4932
+ menuLabelKey: { type: String, default: "label" },
4933
+ activeIndex: { type: Number, default: 0 },
4934
+ contentAlign: {
4935
+ type: String,
4936
+ default: "center",
4937
+ validator: (val) => ["center", "left", "right"].includes(val)
4938
+ },
4939
+ contentMaxWidth: { type: String, default: "800px" },
4940
+ showContentHeader: { type: Boolean, default: true },
4941
+ showActions: { type: Boolean, default: true },
4942
+ sidebarHeader: { type: Array, default: () => [] },
4943
+ showSidebarHeader: { type: Boolean, default: true },
4944
+ sidebarHeaderStyle: { type: Object, default: () => ({}) },
4945
+ sidebarHeaderLabelStyle: { type: Object, default: () => ({ color: "#409EFF", fontWeight: "500" }) },
4946
+ sidebarHeaderValueStyle: { type: Object, default: () => ({ color: "#303133" }) },
4947
+ sidebarHeaderItemGap: { type: String, default: "8px" },
4948
+ sidebarHeaderPadding: { type: String, default: "16px" },
4949
+ sidebarHeaderBorderBottom: { type: String, default: "1px solid #EAEFFE" },
4950
+ customBtnText: { type: String, default: "" },
4951
+ customBtnType: { type: String, default: "success" }
4952
+ },
4953
+ emits: ["menu-click", "update:activeIndex", "cancel", "save", "custom-btn"],
4954
+ setup(__props, { emit: __emit }) {
4955
+ const props = __props;
4956
+ const emit = __emit;
4957
+ const slots = useSlots();
4958
+ const activeIndex = ref(props.activeIndex);
4959
+ const activeItem = ref(null);
4960
+ const showSidebarHeader = computed(() => {
4961
+ return props.showSidebarHeader && (slots["sidebar-header"] || props.sidebarHeader.length > 0);
4962
+ });
4963
+ const showContentHeader = computed(() => props.showContentHeader);
4964
+ const showActions = computed(() => props.showActions);
4965
+ const currentContentTitle = computed(() => {
4966
+ if (activeItem.value && activeItem.value.title) {
4967
+ return activeItem.value.title;
4968
+ }
4969
+ return "";
4970
+ });
4971
+ const contentAlignClass = computed(() => `x-split-layout__content--${props.contentAlign}`);
4972
+ const sidebarHeaderContainerStyle = computed(() => ({
4973
+ ...props.sidebarHeaderStyle,
4974
+ padding: props.sidebarHeaderPadding,
4975
+ borderBottom: props.sidebarHeaderBorderBottom
4976
+ }));
4977
+ const contentMaxWidthStyle = computed(() => {
4978
+ if (props.contentAlign === "center" || props.contentAlign === "right") {
4979
+ return { maxWidth: props.contentMaxWidth };
4980
+ }
4981
+ return {};
4982
+ });
4983
+ watch(() => props.activeIndex, (newVal) => {
4984
+ activeIndex.value = newVal;
4985
+ });
4986
+ function updateActiveItem() {
4987
+ if (props.menuItems.length > 0 && activeIndex.value >= 0 && activeIndex.value < props.menuItems.length) {
4988
+ activeItem.value = props.menuItems[activeIndex.value];
4989
+ }
4990
+ }
4991
+ function handleMenuClick(index2, item) {
4992
+ activeIndex.value = index2;
4993
+ activeItem.value = item;
4994
+ emit("menu-click", index2, item);
4995
+ emit("update:activeIndex", index2);
4996
+ }
4997
+ function handleCancel() {
4998
+ emit("cancel");
4999
+ }
5000
+ function handleSave() {
5001
+ emit("save", { index: activeIndex.value, item: activeItem.value });
5002
+ }
5003
+ function handleCustomBtn() {
5004
+ emit("custom-btn", { index: activeIndex.value, item: activeItem.value });
5005
+ }
5006
+ onMounted(() => {
5007
+ updateActiveItem();
5008
+ });
5009
+ return (_ctx, _cache) => {
5010
+ const _component_el_button = resolveComponent("el-button");
5011
+ return openBlock(), createElementBlock("div", {
5012
+ class: "x-split-layout",
5013
+ style: normalizeStyle({ height: __props.height })
5014
+ }, [
5015
+ createElementVNode("div", {
5016
+ class: "x-split-layout__sidebar",
5017
+ style: normalizeStyle({ width: __props.sidebarWidth })
5018
+ }, [
5019
+ showSidebarHeader.value ? (openBlock(), createElementBlock("div", {
5020
+ key: 0,
5021
+ class: "x-split-layout__sidebar-header",
5022
+ style: normalizeStyle(sidebarHeaderContainerStyle.value)
5023
+ }, [
5024
+ renderSlot(_ctx.$slots, "sidebar-header", {}, () => [
5025
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.sidebarHeader, (item, index2) => {
5026
+ return openBlock(), createElementBlock("div", {
5027
+ key: index2,
5028
+ class: "x-split-layout__header-item",
5029
+ style: normalizeStyle({ marginBottom: index2 < __props.sidebarHeader.length - 1 ? __props.sidebarHeaderItemGap : "0" })
5030
+ }, [
5031
+ createElementVNode("span", {
5032
+ class: "x-split-layout__header-label",
5033
+ style: normalizeStyle(__props.sidebarHeaderLabelStyle)
5034
+ }, toDisplayString(item.label) + ":", 5),
5035
+ createElementVNode("span", {
5036
+ class: "x-split-layout__header-value",
5037
+ style: normalizeStyle(__props.sidebarHeaderValueStyle)
5038
+ }, toDisplayString(item.value), 5)
5039
+ ], 4);
5040
+ }), 128))
5041
+ ], true)
5042
+ ], 4)) : createCommentVNode("", true),
5043
+ createElementVNode("div", _hoisted_1, [
5044
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.menuItems, (item, index2) => {
5045
+ return openBlock(), createElementBlock("div", {
5046
+ key: index2,
5047
+ class: normalizeClass(["x-split-layout__menu-item", { "is-active": activeIndex.value === index2 }]),
5048
+ onClick: ($event) => handleMenuClick(index2, item)
5049
+ }, [
5050
+ renderSlot(_ctx.$slots, "menu-item", {
5051
+ item,
5052
+ index: index2,
5053
+ active: activeIndex.value === index2
5054
+ }, () => [
5055
+ createElementVNode("span", _hoisted_3, [
5056
+ createElementVNode("span", {
5057
+ class: normalizeClass(["x-split-layout__menu-dot", { "is-active-dot": activeIndex.value === index2 }])
5058
+ }, null, 2)
5059
+ ]),
5060
+ createElementVNode("span", _hoisted_4, toDisplayString(item[__props.menuLabelKey]), 1)
5061
+ ], true),
5062
+ renderSlot(_ctx.$slots, "menu-item-right", {
5063
+ item,
5064
+ index: index2,
5065
+ active: activeIndex.value === index2
5066
+ }, void 0, true)
5067
+ ], 10, _hoisted_2);
5068
+ }), 128))
5069
+ ]),
5070
+ renderSlot(_ctx.$slots, "sidebar-right", {}, void 0, true)
5071
+ ], 4),
5072
+ createElementVNode("div", _hoisted_5, [
5073
+ showContentHeader.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
5074
+ createElementVNode("div", _hoisted_7, [
5075
+ renderSlot(_ctx.$slots, "content-title", {}, () => [
5076
+ createElementVNode("span", null, toDisplayString(currentContentTitle.value), 1)
5077
+ ], true)
5078
+ ])
5079
+ ])) : createCommentVNode("", true),
5080
+ createElementVNode("div", {
5081
+ class: normalizeClass(["x-split-layout__content-scroll", contentAlignClass.value])
5082
+ }, [
5083
+ createElementVNode("div", {
5084
+ class: "x-split-layout__content-body",
5085
+ style: normalizeStyle(contentMaxWidthStyle.value)
5086
+ }, [
5087
+ renderSlot(_ctx.$slots, "default", {
5088
+ activeItem: activeItem.value,
5089
+ activeIndex: activeIndex.value
5090
+ }, void 0, true)
5091
+ ], 4)
5092
+ ], 2),
5093
+ showActions.value ? (openBlock(), createElementBlock("div", _hoisted_8, [
5094
+ renderSlot(_ctx.$slots, "actions", {}, () => [
5095
+ createVNode(_component_el_button, { onClick: handleCancel }, {
5096
+ default: withCtx(() => _cache[0] || (_cache[0] = [
5097
+ createTextVNode("取消")
5098
+ ])),
5099
+ _: 1,
5100
+ __: [0]
5101
+ }),
5102
+ createVNode(_component_el_button, {
5103
+ type: "primary",
5104
+ onClick: handleSave
5105
+ }, {
5106
+ default: withCtx(() => _cache[1] || (_cache[1] = [
5107
+ createTextVNode("保存")
5108
+ ])),
5109
+ _: 1,
5110
+ __: [1]
5111
+ }),
5112
+ __props.customBtnText ? (openBlock(), createBlock(_component_el_button, {
5113
+ key: 0,
5114
+ type: __props.customBtnType,
5115
+ onClick: handleCustomBtn
5116
+ }, {
5117
+ default: withCtx(() => [
5118
+ createTextVNode(toDisplayString(__props.customBtnText), 1)
5119
+ ]),
5120
+ _: 1
5121
+ }, 8, ["type"])) : createCommentVNode("", true)
5122
+ ], true)
5123
+ ])) : createCommentVNode("", true)
5124
+ ])
5125
+ ], 4);
5126
+ };
5127
+ }
5128
+ });
5129
+ const XSplitLayout = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-c57f39a8"]]);
5130
+ const _sfc_main = /* @__PURE__ */ defineComponent({
5131
+ __name: "XVxeColumn",
5132
+ props: {
5133
+ title: {
5134
+ type: String,
5135
+ default: void 0
5136
+ },
5137
+ field: {
5138
+ type: String,
5139
+ default: void 0
5140
+ },
5141
+ width: {
5142
+ type: [String, Number],
5143
+ default: void 0
5144
+ },
5145
+ minWidth: {
5146
+ type: [String, Number],
5147
+ default: void 0
5148
+ },
5149
+ fixed: {
5150
+ type: [Boolean, String],
5151
+ default: void 0
5152
+ },
5153
+ align: {
5154
+ type: String,
5155
+ default: void 0
5156
+ },
5157
+ showOverflowTooltip: {
5158
+ type: Boolean,
5159
+ default: void 0
5160
+ },
5161
+ sortable: {
5162
+ type: [Boolean, String],
5163
+ default: void 0
5164
+ },
5165
+ resizable: {
5166
+ type: Boolean,
5167
+ default: void 0
5168
+ },
5169
+ type: {
5170
+ type: String,
5171
+ default: void 0
5172
+ },
5173
+ cellType: {
5174
+ type: String,
5175
+ default: void 0
5176
+ },
5177
+ formatter: {
5178
+ type: [Function, String],
5179
+ default: void 0
5180
+ }
5181
+ },
5182
+ setup(__props) {
5183
+ const props = __props;
5184
+ const slots = useSlots();
5185
+ const columnAttrs = computed(() => {
5186
+ const attrs = {};
5187
+ if (props.title !== void 0) attrs.title = props.title;
5188
+ if (props.field !== void 0) attrs.field = props.field;
5189
+ if (props.width !== void 0) attrs.width = props.width;
5190
+ attrs["min-width"] = props.minWidth || 120;
5191
+ if (props.fixed !== void 0) attrs.fixed = props.fixed;
5192
+ if (props.align !== void 0) attrs.align = props.align;
5193
+ if (props.showOverflowTooltip !== void 0) attrs["show-overflow-tooltip"] = props.showOverflowTooltip;
5194
+ if (props.sortable !== void 0) attrs.sortable = props.sortable;
5195
+ if (props.resizable !== void 0) attrs.resizable = props.resizable;
5196
+ if (props.type !== void 0) attrs.type = props.type;
5197
+ if (props.cellType !== void 0) attrs["cell-type"] = props.cellType;
5198
+ if (props.formatter !== void 0) attrs.formatter = props.formatter;
5199
+ return attrs;
5200
+ });
5201
+ return (_ctx, _cache) => {
5202
+ const _component_vxe_column = resolveComponent("vxe-column");
5203
+ return openBlock(), createBlock(_component_vxe_column, normalizeProps(guardReactiveProps(columnAttrs.value)), createSlots({ _: 2 }, [
5204
+ renderList(unref(slots), (_, name) => {
5205
+ return {
5206
+ name,
5207
+ fn: withCtx((slotData) => [
5208
+ renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotData || {})))
5209
+ ])
5210
+ };
5211
+ })
5212
+ ]), 1040);
5213
+ };
5214
+ }
5215
+ });
5216
+ const components = {
5217
+ SvgIcon,
5218
+ XBusinessLog,
5219
+ XDatePicker,
5220
+ XElForm,
5221
+ XElFormItem,
5222
+ XElOption: _sfc_main$4,
5223
+ XElSelect: _sfc_main$3,
5224
+ XPagination,
5225
+ XReportTable,
5226
+ XSearchBar,
5227
+ XSplitLayout,
5228
+ XVxeColumn: _sfc_main,
5229
+ XVxeTable
5230
+ };
3549
5231
  const install = (app) => {
3550
- components.forEach((component) => {
3551
- app.component(component.name, component);
5232
+ Object.keys(components).forEach((key) => {
5233
+ const component = components[key];
5234
+ app.component(component.name || key, component);
3552
5235
  });
3553
5236
  const directiveKeys = Object.keys(directives);
3554
5237
  directiveKeys.forEach((key) => {
@@ -3561,11 +5244,19 @@ const index = {
3561
5244
  install
3562
5245
  };
3563
5246
  export {
3564
- JcButton,
3565
- JcDialog,
3566
- JcForm,
3567
- JcTable,
3568
- _sfc_main as JcUpload,
5247
+ SvgIcon,
5248
+ XBusinessLog,
5249
+ XDatePicker,
5250
+ XElForm,
5251
+ XElFormItem,
5252
+ _sfc_main$4 as XElOption,
5253
+ _sfc_main$3 as XElSelect,
5254
+ XPagination,
5255
+ XReportTable,
5256
+ XSearchBar,
5257
+ XSplitLayout,
5258
+ _sfc_main as XVxeColumn,
5259
+ XVxeTable,
3569
5260
  index as default,
3570
5261
  directives,
3571
5262
  index$2 as utils