@xjw_/vue3-npm-system 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import Cookies from "js-cookie";
2
2
  import axios from "axios";
3
3
  import { ElMessage } from "element-plus";
4
- 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";
4
+ import { defineComponent, computed, openBlock, createElementBlock, mergeProps, createElementVNode, ref, watch, resolveComponent, createBlock, provide, withCtx, createVNode, normalizeStyle, renderSlot, inject, normalizeClass, createCommentVNode, Fragment, renderList, createSlots, getCurrentInstance, toDisplayString, useSlots, withKeys, unref, createTextVNode, withDirectives, vShow, nextTick, onMounted, normalizeProps, guardReactiveProps } from "vue";
5
5
  function debounce$1(func, wait) {
6
6
  let timeout = null;
7
7
  return function(...args) {
@@ -282,8 +282,8 @@ const directives = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
282
282
  registerDirectives,
283
283
  throttle
284
284
  }, Symbol.toStringTag, { value: "Module" }));
285
- const _hoisted_1$5 = ["href", "xlink:href"];
286
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
285
+ const _hoisted_1$4 = ["href", "xlink:href"];
286
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
287
287
  __name: "SvgIcon",
288
288
  props: {
289
289
  iconClass: {
@@ -324,7 +324,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
324
324
  createElementVNode("use", {
325
325
  href: iconName.value,
326
326
  "xlink:href": iconName.value
327
- }, null, 8, _hoisted_1$5)
327
+ }, null, 8, _hoisted_1$4)
328
328
  ], 16));
329
329
  };
330
330
  }
@@ -336,8 +336,216 @@ const _export_sfc = (sfc, props) => {
336
336
  }
337
337
  return target;
338
338
  };
339
- const SvgIcon = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-bc56d70e"]]);
340
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
339
+ const SvgIcon = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-bc56d70e"]]);
340
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
341
+ __name: "XDatePicker",
342
+ props: {
343
+ type: {
344
+ type: String,
345
+ default: "date",
346
+ validator: (val) => [
347
+ "year",
348
+ "years",
349
+ "month",
350
+ "months",
351
+ "date",
352
+ "dates",
353
+ "datetime",
354
+ "week",
355
+ "datetimerange",
356
+ "daterange",
357
+ "monthrange",
358
+ "yearrange"
359
+ ].includes(val)
360
+ },
361
+ valueFormat: {
362
+ type: String,
363
+ default: null
364
+ },
365
+ placeholder: {
366
+ type: String,
367
+ default: null
368
+ },
369
+ startPlaceholder: {
370
+ type: String,
371
+ default: null
372
+ },
373
+ endPlaceholder: {
374
+ type: String,
375
+ default: null
376
+ },
377
+ rangeSeparator: {
378
+ type: String,
379
+ default: "至"
380
+ },
381
+ defaultTime: {
382
+ type: [String, Array],
383
+ default: null
384
+ },
385
+ isEndTime: {
386
+ type: Boolean,
387
+ default: false
388
+ },
389
+ modelValue: {
390
+ type: [String, Number, Array, Date],
391
+ default: ""
392
+ },
393
+ size: {
394
+ type: String,
395
+ default: "default"
396
+ }
397
+ },
398
+ emits: ["update:modelValue"],
399
+ setup(__props, { emit: __emit }) {
400
+ const props = __props;
401
+ const emit = __emit;
402
+ const internalValue = ref(props.modelValue);
403
+ function toDayjsFormat(format) {
404
+ return format.replace(/yyyy/g, "YYYY").replace(/dd/g, "DD");
405
+ }
406
+ function getDefaultFormat(type) {
407
+ const formatMap = {
408
+ "year": "YYYY",
409
+ "years": "YYYY",
410
+ "month": "YYYY-MM",
411
+ "months": "YYYY-MM",
412
+ "date": "YYYY-MM-DD",
413
+ "dates": "YYYY-MM-DD",
414
+ "datetime": "YYYY-MM-DD HH:mm:ss",
415
+ "week": "YYYY-MM-DD",
416
+ "datetimerange": "YYYY-MM-DD HH:mm:ss",
417
+ "daterange": "YYYY-MM-DD",
418
+ "monthrange": "YYYY-MM",
419
+ "yearrange": "YYYY"
420
+ };
421
+ return formatMap[type] || "YYYY-MM-DD";
422
+ }
423
+ function getDefaultPlaceholder(type) {
424
+ const isRange = type.includes("range");
425
+ const hasTime = type.includes("time");
426
+ if (isRange) {
427
+ return {
428
+ start: hasTime ? "开始日期时间" : "开始日期",
429
+ end: hasTime ? "结束日期时间" : "结束日期"
430
+ };
431
+ } else {
432
+ if (type === "year" || type === "years") return "选择年";
433
+ if (type === "month" || type === "months") return "选择月";
434
+ if (type === "week") return "选择周";
435
+ if (hasTime) return "选择日期时间";
436
+ return "选择日期";
437
+ }
438
+ }
439
+ const currentPlaceholder = computed(() => {
440
+ if (props.placeholder !== null) return props.placeholder;
441
+ const isRange = props.type.includes("range");
442
+ if (isRange) return void 0;
443
+ return getDefaultPlaceholder(props.type);
444
+ });
445
+ const currentStartPlaceholder = computed(() => {
446
+ if (props.startPlaceholder !== null) return props.startPlaceholder;
447
+ const isRange = props.type.includes("range");
448
+ if (!isRange) return void 0;
449
+ const defaults = getDefaultPlaceholder(props.type);
450
+ return defaults.start;
451
+ });
452
+ const currentEndPlaceholder = computed(() => {
453
+ if (props.endPlaceholder !== null) return props.endPlaceholder;
454
+ const isRange = props.type.includes("range");
455
+ if (!isRange) return void 0;
456
+ const defaults = getDefaultPlaceholder(props.type);
457
+ return defaults.end;
458
+ });
459
+ const currentValueFormat = computed(() => {
460
+ if (props.valueFormat !== null && props.valueFormat !== void 0) {
461
+ return toDayjsFormat(props.valueFormat);
462
+ }
463
+ return getDefaultFormat(props.type);
464
+ });
465
+ const currentDefaultTime = computed(() => {
466
+ if (props.defaultTime !== null && props.defaultTime !== void 0) {
467
+ return props.defaultTime;
468
+ }
469
+ if (props.isEndTime && props.type === "datetimerange") {
470
+ return [new Date(2e3, 0, 1, 0, 0, 0), new Date(2e3, 0, 1, 23, 59, 59)];
471
+ }
472
+ if (props.isEndTime && props.type === "datetime") {
473
+ return new Date(2e3, 0, 1, 23, 59, 59);
474
+ }
475
+ return void 0;
476
+ });
477
+ function applyEndTime(value) {
478
+ const startTime = "00:00:00";
479
+ const endTime = "23:59:59";
480
+ if (props.type === "datetimerange" && Array.isArray(value) && value.length === 2) {
481
+ let startVal = value[0];
482
+ let endVal = value[1];
483
+ if (startVal instanceof Date) {
484
+ const newStart = new Date(startVal);
485
+ newStart.setHours(0, 0, 0, 0);
486
+ startVal = newStart;
487
+ } else if (typeof startVal === "string" && startVal) {
488
+ const datePart = startVal.substring(0, 10);
489
+ startVal = datePart + " " + startTime;
490
+ }
491
+ if (endVal instanceof Date) {
492
+ const newEnd = new Date(endVal);
493
+ newEnd.setHours(23, 59, 59, 0);
494
+ endVal = newEnd;
495
+ } else if (typeof endVal === "string" && endVal) {
496
+ const datePart = endVal.substring(0, 10);
497
+ endVal = datePart + " " + endTime;
498
+ }
499
+ return [startVal, endVal];
500
+ }
501
+ if (props.type === "datetime" && value) {
502
+ if (value instanceof Date) {
503
+ if (value.getHours() === 0 && value.getMinutes() === 0 && value.getSeconds() === 0) {
504
+ const newDate = new Date(value);
505
+ newDate.setHours(23, 59, 59, 0);
506
+ return newDate;
507
+ }
508
+ return value;
509
+ }
510
+ if (typeof value === "string") {
511
+ const timePart = value.length > 10 ? value.substring(11) : "";
512
+ if (!timePart) {
513
+ const datePart = value.substring(0, 10);
514
+ return datePart + " " + endTime;
515
+ }
516
+ }
517
+ }
518
+ return value;
519
+ }
520
+ watch(() => props.modelValue, (newVal) => {
521
+ let result = newVal;
522
+ if (props.isEndTime && newVal) {
523
+ result = applyEndTime(newVal);
524
+ }
525
+ internalValue.value = result;
526
+ });
527
+ function handleUpdate(value) {
528
+ internalValue.value = value;
529
+ emit("update:modelValue", value);
530
+ }
531
+ return (_ctx, _cache) => {
532
+ const _component_el_date_picker = resolveComponent("el-date-picker");
533
+ return openBlock(), createBlock(_component_el_date_picker, mergeProps({
534
+ "model-value": internalValue.value,
535
+ type: __props.type,
536
+ placeholder: currentPlaceholder.value,
537
+ "start-placeholder": currentStartPlaceholder.value,
538
+ "end-placeholder": currentEndPlaceholder.value,
539
+ "range-separator": __props.rangeSeparator,
540
+ "value-format": currentValueFormat.value,
541
+ "default-time": currentDefaultTime.value,
542
+ size: __props.size
543
+ }, _ctx.$attrs, { "onUpdate:modelValue": handleUpdate }), null, 16, ["model-value", "type", "placeholder", "start-placeholder", "end-placeholder", "range-separator", "value-format", "default-time", "size"]);
544
+ };
545
+ }
546
+ });
547
+ const XDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-264a8a79"]]);
548
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
341
549
  __name: "XElForm",
342
550
  props: {
343
551
  model: {
@@ -478,8 +686,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
478
686
  };
479
687
  }
480
688
  });
481
- const XElForm = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-441b419b"]]);
482
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
689
+ const XElForm = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-441b419b"]]);
690
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
483
691
  __name: "XElFormItem",
484
692
  props: {
485
693
  label: {
@@ -562,414 +770,192 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
562
770
  };
563
771
  }
564
772
  });
565
- const XElFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-50c1c717"]]);
566
- const _hoisted_1$4 = {
567
- key: 0,
568
- class: "search-top"
569
- };
570
- const _hoisted_2$2 = { class: "search-top__inner" };
571
- const _hoisted_3$2 = { class: "search-top__row" };
572
- const _hoisted_4$2 = {
573
- key: 0,
574
- class: "search-top__label"
575
- };
576
- const _hoisted_5$2 = {
577
- key: 1,
578
- class: "search-top-input"
579
- };
580
- const _hoisted_6$2 = {
581
- key: 0,
582
- class: "search-top-extra-item"
583
- };
584
- const _hoisted_7$2 = {
585
- key: 0,
586
- class: "search-top-extra-label"
587
- };
588
- const _hoisted_8$2 = { class: "search-top-extra-content" };
589
- const _hoisted_9$1 = {
590
- key: 1,
591
- class: "search-top-extra-item"
592
- };
593
- const _hoisted_10$1 = {
594
- key: 0,
595
- class: "search-top-extra-label"
596
- };
597
- const _hoisted_11$1 = { class: "search-top-extra-content" };
598
- const _hoisted_12$1 = {
599
- key: 2,
600
- class: "search-top-extra-item"
601
- };
602
- const _hoisted_13$1 = {
603
- key: 0,
604
- class: "search-top-extra-label"
605
- };
606
- const _hoisted_14$1 = { class: "search-top-extra-content" };
607
- const _hoisted_15$1 = { class: "search-top__actions" };
608
- const _hoisted_16$1 = { class: "search-form__buttons" };
609
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
610
- __name: "XSearchBar",
773
+ const XElFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-50c1c717"]]);
774
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
775
+ __name: "XElOption",
611
776
  props: {
612
- modelValue: {
777
+ label: {
613
778
  type: [String, Number],
614
779
  default: void 0
615
780
  },
616
- placeholder: {
617
- type: String,
618
- default: "请输入搜索关键词"
619
- },
620
- queryForm: {
621
- type: Object,
622
- required: true,
623
- default: () => ({})
781
+ value: {
782
+ type: [String, Number],
783
+ default: void 0
624
784
  },
625
- rules: {
626
- type: Object,
627
- default: () => ({})
628
- },
629
- titleWidth: {
630
- type: String,
631
- default: "100px"
785
+ disabled: {
786
+ type: Boolean,
787
+ default: false
788
+ }
789
+ },
790
+ setup(__props) {
791
+ const props = __props;
792
+ const elSelectModelValue = inject("elSelectModelValue", null);
793
+ const computedValue = computed(() => {
794
+ const propValue = props.value;
795
+ if (!elSelectModelValue || !elSelectModelValue.value) {
796
+ return propValue;
797
+ }
798
+ const modelVal = elSelectModelValue.value;
799
+ if (Array.isArray(modelVal) && modelVal.length > 0) {
800
+ const firstValueType = typeof modelVal[0];
801
+ if (firstValueType === "number" && typeof propValue === "string") {
802
+ return Number(propValue);
803
+ }
804
+ if (firstValueType === "string" && typeof propValue === "number") {
805
+ return String(propValue);
806
+ }
807
+ }
808
+ if (!Array.isArray(modelVal)) {
809
+ const parentType = typeof modelVal;
810
+ if (parentType === "number" && typeof propValue === "string") {
811
+ return Number(propValue);
812
+ }
813
+ if (parentType === "string" && typeof propValue === "number") {
814
+ return String(propValue);
815
+ }
816
+ }
817
+ return propValue;
818
+ });
819
+ const computedLabel = computed(() => props.label);
820
+ return (_ctx, _cache) => {
821
+ const _component_el_option = resolveComponent("el-option");
822
+ return openBlock(), createBlock(_component_el_option, mergeProps(_ctx.$attrs, {
823
+ label: computedLabel.value,
824
+ value: computedValue.value
825
+ }), {
826
+ default: withCtx(() => [
827
+ renderSlot(_ctx.$slots, "default")
828
+ ]),
829
+ _: 3
830
+ }, 16, ["label", "value"]);
831
+ };
832
+ }
833
+ });
834
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
835
+ __name: "XElSelect",
836
+ props: {
837
+ modelValue: {
838
+ type: [String, Number, Array],
839
+ default: void 0
632
840
  },
633
- columns: {
634
- type: Number,
635
- default: 4
841
+ width: {
842
+ type: [String, Number],
843
+ default: "100%"
636
844
  },
637
- paddingBottom: {
638
- type: String,
639
- default: "16px"
845
+ multiple: {
846
+ type: Boolean,
847
+ default: false
640
848
  },
641
- showInput: {
849
+ typeConvert: {
642
850
  type: Boolean,
643
851
  default: true
644
852
  },
645
- showMoreBottom: {
853
+ separator: {
854
+ type: String,
855
+ default: ""
856
+ },
857
+ targetType: {
858
+ type: String,
859
+ default: "auto",
860
+ validator: (value) => ["string", "number", "auto"].includes(value)
861
+ },
862
+ clearable: {
646
863
  type: Boolean,
647
864
  default: true
648
865
  },
649
- showSearch: {
866
+ filterable: {
650
867
  type: Boolean,
651
868
  default: true
652
869
  },
653
- text1: {
654
- type: String,
655
- default: ""
656
- },
657
- text2: {
870
+ placeholder: {
658
871
  type: String,
659
- default: ""
872
+ default: void 0
660
873
  },
661
- text3: {
874
+ size: {
662
875
  type: String,
663
- default: ""
876
+ default: "default"
664
877
  }
665
878
  },
666
- emits: ["update:modelValue", "update:queryForm", "list-update", "data-reset"],
879
+ emits: ["update:modelValue", "change"],
667
880
  setup(__props, { expose: __expose, emit: __emit }) {
668
881
  const props = __props;
669
882
  const emit = __emit;
670
- const slots = useSlots();
671
- const showMore = ref(false);
672
- const queryFormRef = ref();
673
- const vxeFormRef = ref();
674
- const combinedQueries = computed({
675
- get() {
676
- if (props.modelValue !== void 0 && props.modelValue !== null) {
677
- return props.modelValue;
883
+ const selectRef = ref();
884
+ const localValue = ref(props.modelValue);
885
+ const modelValueRef = ref(null);
886
+ provide("elSelectModelValue", modelValueRef);
887
+ const computedLocalValue = computed(() => {
888
+ const val = localValue.value;
889
+ if (!props.typeConvert || val === null || val === void 0) {
890
+ return val;
891
+ }
892
+ if (props.multiple && props.separator) {
893
+ if (typeof val === "string" && val.includes(props.separator)) {
894
+ const values = val.split(props.separator);
895
+ if (props.targetType === "number") {
896
+ return values.map((v) => Number(v));
897
+ }
898
+ return values;
678
899
  }
679
- return props.queryForm.combinedQueries || "";
680
- },
681
- set(val) {
682
- if (props.modelValue !== void 0 && props.modelValue !== null) {
683
- emit("update:modelValue", val);
684
- } else {
685
- props.queryForm.combinedQueries = val;
900
+ if (Array.isArray(val)) {
901
+ return val;
686
902
  }
903
+ if (val === "" || val === null || val === void 0) {
904
+ return [];
905
+ }
906
+ return [val];
687
907
  }
908
+ return val;
688
909
  });
689
- const hasFormSlot = computed(() => !!slots.form);
690
- const hasVxeFormSlot = computed(() => !!slots.vxeForm);
691
- const vxeFormSpan = computed(() => Math.floor(24 / props.columns));
692
- const formContainerStyle = computed(() => ({
693
- "--form-columns": props.columns
694
- }));
695
- const buttonItemSpan = computed(() => {
696
- return 24;
910
+ watch(() => props.modelValue, (newVal) => {
911
+ localValue.value = newVal;
697
912
  });
698
- function reset() {
699
- combinedQueries.value = "";
700
- if (props.modelValue !== void 0 && props.modelValue !== null) {
701
- emit("update:modelValue", "");
702
- }
703
- if (hasFormSlot.value && queryFormRef.value && typeof queryFormRef.value.resetFields === "function") {
704
- nextTick(() => {
705
- queryFormRef.value.resetFields();
706
- });
707
- }
708
- if (hasVxeFormSlot.value && vxeFormRef.value && typeof vxeFormRef.value.reset === "function") {
709
- vxeFormRef.value.reset();
710
- }
711
- if (props.queryForm && Object.keys(props.queryForm).length > 0) {
712
- const emptyForm = {};
713
- Object.keys(props.queryForm).forEach((key) => {
714
- const value = props.queryForm[key];
715
- if (Array.isArray(value)) {
716
- emptyForm[key] = [];
717
- } else if (value !== null && typeof value === "object") {
718
- emptyForm[key] = {};
719
- } else {
720
- emptyForm[key] = "";
721
- }
722
- });
723
- emit("update:queryForm", emptyForm);
724
- }
725
- showMore.value = false;
726
- emit("data-reset");
727
- }
728
- function searchParentList() {
729
- if (props.rules && Object.keys(props.rules).length > 0) {
730
- if (hasVxeFormSlot.value && vxeFormRef.value) {
731
- return new Promise((resolve, reject) => {
732
- if (typeof vxeFormRef.value.validate === "function") {
733
- vxeFormRef.value.validate((valid) => {
734
- if (valid) {
735
- showMore.value = true;
736
- reject(false);
737
- } else {
738
- showMore.value = false;
739
- emit("list-update", 1);
740
- resolve(true);
741
- }
742
- });
743
- } else {
744
- emit("list-update", 1);
745
- resolve(true);
746
- }
747
- });
748
- }
749
- if (hasFormSlot.value && queryFormRef.value && typeof queryFormRef.value.validate === "function") {
750
- return new Promise((resolve, reject) => {
751
- queryFormRef.value.validate((valid) => {
752
- if (valid) {
753
- showMore.value = false;
754
- emit("list-update", 1);
755
- resolve(true);
756
- } else {
757
- showMore.value = true;
758
- reject(false);
759
- }
760
- });
761
- });
762
- }
913
+ watch(computedLocalValue, (newVal) => {
914
+ modelValueRef.value = newVal;
915
+ }, { immediate: true });
916
+ function handleLocalUpdate(val) {
917
+ localValue.value = val;
918
+ if (props.multiple && props.separator) {
919
+ const arr = Array.isArray(val) ? val : [val];
920
+ emit("update:modelValue", arr.join(props.separator));
763
921
  } else {
764
- showMore.value = false;
765
- emit("list-update", 1);
766
- return Promise.resolve(true);
922
+ emit("update:modelValue", val);
767
923
  }
768
924
  }
925
+ function handleChange(val) {
926
+ emit("change", val);
927
+ }
769
928
  __expose({
770
- queryFormRef,
771
- vxeFormRef
929
+ selectRef
772
930
  });
773
931
  return (_ctx, _cache) => {
774
- const _component_el_input = resolveComponent("el-input");
775
- const _component_el_button = resolveComponent("el-button");
776
- const _component_vxe_form_item = resolveComponent("vxe-form-item");
777
- const _component_vxe_form = resolveComponent("vxe-form");
778
- return openBlock(), createElementBlock("div", {
779
- class: "search",
780
- style: normalizeStyle({ paddingBottom: __props.paddingBottom })
781
- }, [
782
- __props.showSearch ? (openBlock(), createElementBlock("div", _hoisted_1$4, [
783
- createElementVNode("div", _hoisted_2$2, [
784
- createElementVNode("div", _hoisted_3$2, [
785
- __props.showInput ? (openBlock(), createElementBlock("span", _hoisted_4$2, "快捷搜索 ")) : createCommentVNode("", true),
786
- __props.showInput ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
787
- createVNode(_component_el_input, {
788
- type: "text",
789
- onKeyup: withKeys(searchParentList, ["enter"]),
790
- modelValue: combinedQueries.value,
791
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => combinedQueries.value = $event),
792
- placeholder: __props.placeholder,
793
- clearable: ""
794
- }, {
795
- prefix: withCtx(() => [
796
- createVNode(SvgIcon, {
797
- "icon-class": "search",
798
- "class-name": "svg-icon-22"
799
- })
800
- ]),
801
- _: 1
802
- }, 8, ["modelValue", "placeholder"])
803
- ])) : createCommentVNode("", true),
804
- __props.showMoreBottom ? (openBlock(), createElementBlock("div", {
805
- key: 2,
806
- class: "search-top-filter",
807
- onClick: _cache[1] || (_cache[1] = ($event) => showMore.value = !showMore.value)
808
- }, [
809
- createVNode(SvgIcon, {
810
- "icon-class": "filter",
811
- "class-name": "svg-icon-22 filter-icon"
812
- }),
813
- _cache[2] || (_cache[2] = createElementVNode("span", { class: "btn_more" }, "更多", -1))
814
- ])) : createCommentVNode("", true),
815
- createElementVNode("div", {
816
- class: normalizeClass([{ "search-top-extra--ml": __props.showInput }, "search-top-extra"])
817
- }, [
818
- renderSlot(_ctx.$slots, "default", {}, void 0, true),
819
- unref(slots).text1 ? (openBlock(), createElementBlock("div", _hoisted_6$2, [
820
- __props.text1 ? (openBlock(), createElementBlock("span", _hoisted_7$2, toDisplayString(__props.text1) + ":", 1)) : createCommentVNode("", true),
821
- createElementVNode("div", _hoisted_8$2, [
822
- renderSlot(_ctx.$slots, "text1", {}, void 0, true)
823
- ])
824
- ])) : createCommentVNode("", true),
825
- unref(slots).text2 ? (openBlock(), createElementBlock("div", _hoisted_9$1, [
826
- __props.text2 ? (openBlock(), createElementBlock("span", _hoisted_10$1, toDisplayString(__props.text2) + ":", 1)) : createCommentVNode("", true),
827
- createElementVNode("div", _hoisted_11$1, [
828
- renderSlot(_ctx.$slots, "text2", {}, void 0, true)
829
- ])
830
- ])) : createCommentVNode("", true),
831
- unref(slots).text3 ? (openBlock(), createElementBlock("div", _hoisted_12$1, [
832
- __props.text3 ? (openBlock(), createElementBlock("span", _hoisted_13$1, toDisplayString(__props.text3) + ":", 1)) : createCommentVNode("", true),
833
- createElementVNode("div", _hoisted_14$1, [
834
- renderSlot(_ctx.$slots, "text3", {}, void 0, true)
835
- ])
836
- ])) : createCommentVNode("", true)
837
- ], 2)
838
- ]),
839
- createElementVNode("div", _hoisted_15$1, [
840
- createVNode(_component_el_button, {
841
- plain: "",
842
- onClick: reset
843
- }, {
844
- default: withCtx(() => _cache[3] || (_cache[3] = [
845
- createTextVNode("重 置")
846
- ])),
847
- _: 1,
848
- __: [3]
849
- }),
850
- createVNode(_component_el_button, {
851
- type: "primary",
852
- onClick: searchParentList
853
- }, {
854
- default: withCtx(() => _cache[4] || (_cache[4] = [
855
- createTextVNode("查 询")
856
- ])),
857
- _: 1,
858
- __: [4]
859
- })
860
- ])
861
- ])
862
- ])) : createCommentVNode("", true),
863
- withDirectives(createElementVNode("div", {
864
- class: normalizeClass([{ "show_search": __props.showSearch }, "search-form"])
865
- }, [
866
- createElementVNode("div", {
867
- class: "search-form__inner",
868
- style: normalizeStyle(formContainerStyle.value)
869
- }, [
870
- hasFormSlot.value ? (openBlock(), createBlock(XElForm, {
871
- key: 0,
872
- rules: __props.rules,
873
- model: __props.queryForm,
874
- ref_key: "queryFormRef",
875
- ref: queryFormRef,
876
- span: vxeFormSpan.value,
877
- "label-width": __props.titleWidth
878
- }, {
879
- default: withCtx(() => [
880
- renderSlot(_ctx.$slots, "form", {}, void 0, true),
881
- !__props.showSearch ? (openBlock(), createBlock(XElFormItem, {
882
- key: 0,
883
- label: "",
884
- span: buttonItemSpan.value
885
- }, {
886
- default: withCtx(() => [
887
- createElementVNode("div", _hoisted_16$1, [
888
- createVNode(_component_el_button, {
889
- plain: "",
890
- onClick: reset
891
- }, {
892
- default: withCtx(() => _cache[5] || (_cache[5] = [
893
- createTextVNode("重 置")
894
- ])),
895
- _: 1,
896
- __: [5]
897
- }),
898
- createVNode(_component_el_button, {
899
- type: "primary",
900
- onClick: searchParentList
901
- }, {
902
- default: withCtx(() => _cache[6] || (_cache[6] = [
903
- createTextVNode("查 询")
904
- ])),
905
- _: 1,
906
- __: [6]
907
- })
908
- ])
909
- ]),
910
- _: 1
911
- }, 8, ["span"])) : createCommentVNode("", true)
912
- ]),
913
- _: 3
914
- }, 8, ["rules", "model", "span", "label-width"])) : createCommentVNode("", true),
915
- hasVxeFormSlot.value ? (openBlock(), createBlock(_component_vxe_form, {
916
- key: 1,
917
- data: __props.queryForm,
918
- rules: __props.rules,
919
- span: vxeFormSpan.value,
920
- titleColon: "",
921
- vertical: "",
922
- "title-align": "right",
923
- "title-width": __props.titleWidth,
924
- size: "medium",
925
- ref_key: "vxeFormRef",
926
- ref: vxeFormRef
927
- }, {
928
- default: withCtx(() => [
929
- renderSlot(_ctx.$slots, "vxeForm", {}, void 0, true),
930
- !__props.showSearch ? (openBlock(), createBlock(_component_vxe_form_item, {
931
- key: 0,
932
- span: buttonItemSpan.value,
933
- align: "right"
934
- }, {
935
- default: withCtx(() => [
936
- createVNode(_component_el_button, {
937
- plain: "",
938
- onClick: reset
939
- }, {
940
- default: withCtx(() => _cache[7] || (_cache[7] = [
941
- createTextVNode("重 置")
942
- ])),
943
- _: 1,
944
- __: [7]
945
- }),
946
- createVNode(_component_el_button, {
947
- type: "primary",
948
- onClick: searchParentList
949
- }, {
950
- default: withCtx(() => _cache[8] || (_cache[8] = [
951
- createTextVNode("查 询")
952
- ])),
953
- _: 1,
954
- __: [8]
955
- })
956
- ]),
957
- _: 1
958
- }, 8, ["span"])) : createCommentVNode("", true)
959
- ]),
960
- _: 3
961
- }, 8, ["data", "rules", "span", "title-width"])) : createCommentVNode("", true)
962
- ], 4)
963
- ], 2), [
964
- [vShow, showMore.value || !__props.showSearch]
965
- ])
966
- ], 4);
932
+ const _component_el_select = resolveComponent("el-select");
933
+ return openBlock(), createBlock(_component_el_select, mergeProps({
934
+ ref_key: "selectRef",
935
+ ref: selectRef,
936
+ multiple: __props.multiple,
937
+ "model-value": computedLocalValue.value,
938
+ "onUpdate:modelValue": handleLocalUpdate,
939
+ onChange: handleChange
940
+ }, _ctx.$attrs, {
941
+ clearable: __props.clearable,
942
+ filterable: __props.filterable,
943
+ placeholder: __props.placeholder,
944
+ size: __props.size,
945
+ style: {
946
+ width: __props.width
947
+ }
948
+ }), {
949
+ default: withCtx(() => [
950
+ renderSlot(_ctx.$slots, "default")
951
+ ]),
952
+ _: 3
953
+ }, 16, ["multiple", "model-value", "clearable", "filterable", "placeholder", "size", "style"]);
967
954
  };
968
955
  }
969
956
  });
970
- const XSearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-39635b04"]]);
971
957
  const _hoisted_1$3 = { class: "x-pagination" };
972
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
958
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
973
959
  __name: "XPagination",
974
960
  props: {
975
961
  currentPage: {
@@ -1041,8 +1027,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1041
1027
  };
1042
1028
  }
1043
1029
  });
1044
- const XPagination = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-bd405b6e"]]);
1045
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1030
+ const XPagination = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-bd405b6e"]]);
1031
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1046
1032
  __name: "XVxeTable",
1047
1033
  props: {
1048
1034
  tableData: { type: Array, default: () => [] },
@@ -1306,1000 +1292,762 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1306
1292
  };
1307
1293
  }
1308
1294
  });
1309
- const XVxeTable = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-9111013e"]]);
1310
- const _hoisted_1$2 = { class: "x-business-log" };
1311
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1312
- __name: "XBusinessLog",
1295
+ const XVxeTable = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-9111013e"]]);
1296
+ const _hoisted_1$2 = { class: "x-report-table" };
1297
+ const _hoisted_2$2 = { class: "report-header" };
1298
+ const _hoisted_3$2 = { class: "report-title" };
1299
+ const _hoisted_4$2 = { class: "report-actions" };
1300
+ const _hoisted_5$2 = ["onClick"];
1301
+ const _hoisted_6$2 = { class: "report-text-primary" };
1302
+ const _hoisted_7$2 = { class: "report-text-primary" };
1303
+ const _hoisted_8$2 = { class: "report-text-primary" };
1304
+ const _hoisted_9$1 = { class: "report-flex report-justify-between" };
1305
+ const _hoisted_10$1 = { class: "" };
1306
+ const _hoisted_11$1 = { class: "" };
1307
+ const _hoisted_12$1 = { key: 0 };
1308
+ const _hoisted_13$1 = { class: "" };
1309
+ const _hoisted_14$1 = { class: "" };
1310
+ const _hoisted_15$1 = { key: 1 };
1311
+ const _hoisted_16$1 = { class: "" };
1312
+ const _hoisted_17 = { class: "" };
1313
+ const _hoisted_18 = { class: "" };
1314
+ const _hoisted_19 = { class: "" };
1315
+ const _hoisted_20 = { class: "report-body" };
1316
+ const _hoisted_21 = { class: "report-flex report-justify-between" };
1317
+ const _hoisted_22 = { class: "" };
1318
+ const _hoisted_23 = { class: "" };
1319
+ const _hoisted_24 = { key: 0 };
1320
+ const _hoisted_25 = { class: "" };
1321
+ const _hoisted_26 = { class: "" };
1322
+ const _hoisted_27 = { class: "" };
1323
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1324
+ __name: "XReportTable",
1313
1325
  props: {
1314
- url: { type: String, default: "" },
1315
- baseUrl: { type: String, default: "" },
1316
- tokenCookieName: { type: String, default: "Authorization" },
1317
- withCredentials: { type: Boolean, default: false },
1318
- method: { type: String, default: "post" },
1319
1326
  tableData: { type: Array, default: () => [] },
1320
- pageSize: { type: Number, default: 10 },
1321
- subHeight: { type: String, default: "294px" }
1327
+ columns: { type: Array, default: () => [] },
1328
+ showFooter: { type: Boolean, default: false },
1329
+ reportTitle: { type: String, default: "" },
1330
+ organizationName: { type: String, default: "" },
1331
+ dateRange: { type: [String, Array], default: "" },
1332
+ customHeader1: { type: String, default: "" },
1333
+ customHeader1Label: { type: String, default: "" },
1334
+ customHeader2: { type: String, default: "" },
1335
+ customHeader2Label: { type: String, default: "" },
1336
+ customHeader3: { type: String, default: "" },
1337
+ customHeader3Label: { type: String, default: "" },
1338
+ auditorName: { type: String, default: "" },
1339
+ creatorName: { type: String, default: "" },
1340
+ customFooterField: { type: String, default: "" },
1341
+ customFooterFieldLabel: { type: String, default: "" },
1342
+ printDate: { type: String, default: "" },
1343
+ showPrint: { type: Boolean, default: true },
1344
+ showExport: { type: Boolean, default: true },
1345
+ subHeight: { type: String, default: "343px" },
1346
+ showToolbar: { type: Boolean, default: false },
1347
+ showPagination: { type: Boolean, default: true },
1348
+ pageSize: { type: Number, default: 20 },
1349
+ total: { type: Number, default: 0 },
1350
+ footerData: { type: Array, default: () => [] },
1351
+ currentPage: { type: Number, default: 1 },
1352
+ loading: { type: Boolean, default: false },
1353
+ printCallback: { type: Boolean, default: false },
1354
+ exportCallback: { type: Boolean, default: false },
1355
+ printText: { type: String, default: "打印" },
1356
+ printText1: { type: String, default: "" },
1357
+ customButtons: { type: Array, default: () => [] }
1322
1358
  },
1323
- setup(__props, { expose: __expose }) {
1359
+ emits: ["change-page", "customBtn", "printReport", "export"],
1360
+ setup(__props, { expose: __expose, emit: __emit }) {
1324
1361
  const props = __props;
1325
- const vxeTableRef = ref();
1326
- const loading = ref(false);
1327
- const tableData = ref([]);
1328
- const pageNum = ref(1);
1329
- const internalPageSize = ref(props.pageSize);
1330
- const total = ref(0);
1331
- let requestInstance = null;
1332
- const queryForm = reactive({
1333
- content: "",
1334
- module: "",
1335
- createUserName: "",
1336
- beginTime: "",
1337
- endTime: "",
1338
- createTimeRange: [],
1339
- combinedQueries: ""
1340
- });
1341
- const displayData = computed(() => {
1342
- if (props.tableData && props.tableData.length > 0) {
1343
- return props.tableData;
1362
+ const emit = __emit;
1363
+ const instance = getCurrentInstance();
1364
+ const repVxeTableRef = ref();
1365
+ const reportHeaderRef = ref();
1366
+ const reportFooterRef = ref();
1367
+ const organizationNameDisplay = computed(() => {
1368
+ var _a, _b, _c, _d, _e;
1369
+ if (props.organizationName) return props.organizationName;
1370
+ 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;
1371
+ if ((_e = (_d = store == null ? void 0 : store.getters) == null ? void 0 : _d.tenantInfo) == null ? void 0 : _e.tenantName) {
1372
+ return store.getters.tenantInfo.tenantName;
1344
1373
  }
1345
- return tableData.value;
1374
+ return "";
1346
1375
  });
1347
- onMounted(() => {
1348
- if (!props.tableData || props.tableData.length === 0) {
1349
- getList();
1350
- }
1376
+ const displayTitle = computed(() => {
1377
+ var _a, _b, _c, _d;
1378
+ if (props.reportTitle) return props.reportTitle;
1379
+ 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;
1380
+ if ((_d = route == null ? void 0 : route.meta) == null ? void 0 : _d.title) return route.meta.title;
1381
+ return "";
1351
1382
  });
1352
- function getList() {
1353
- if (props.tableData && props.tableData.length > 0) return;
1354
- if (!props.url) {
1355
- console.warn("XBusinessLog: 请提供 url 属性");
1356
- return;
1357
- }
1358
- if (!requestInstance) {
1359
- requestInstance = createRequest({
1360
- baseURL: props.baseUrl || "",
1361
- withCredentials: props.withCredentials,
1362
- timeout: 3e4,
1363
- tokenCookieName: props.tokenCookieName
1364
- });
1383
+ const creatorNameDisplay = computed(() => {
1384
+ var _a, _b, _c, _d;
1385
+ if (props.creatorName) return props.creatorName;
1386
+ 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;
1387
+ if ((_d = store == null ? void 0 : store.getters) == null ? void 0 : _d.name) return store.getters.name;
1388
+ return "";
1389
+ });
1390
+ const formattedPrintDate = computed(() => {
1391
+ if (props.printDate) return props.printDate;
1392
+ const now = /* @__PURE__ */ new Date();
1393
+ const year = now.getFullYear();
1394
+ const month = String(now.getMonth() + 1).padStart(2, "0");
1395
+ const day = String(now.getDate()).padStart(2, "0");
1396
+ return `${year}-${month}-${day}`;
1397
+ });
1398
+ const dateRangeDisplay = computed(() => {
1399
+ if (!props.dateRange) return "";
1400
+ if (Array.isArray(props.dateRange)) {
1401
+ return props.dateRange[0] + "至" + props.dateRange[1];
1402
+ }
1403
+ return props.dateRange;
1404
+ });
1405
+ function handlePageChange(page, size) {
1406
+ emit("change-page", page, size);
1407
+ }
1408
+ function handleCustomBtn(index2, btn) {
1409
+ emit("customBtn", index2, btn);
1410
+ }
1411
+ function printReport(type) {
1412
+ if (type === 2) {
1413
+ emit("printReport", type);
1414
+ } else if (props.printCallback) {
1415
+ emit("printReport", type);
1416
+ } else {
1417
+ handlePrint();
1365
1418
  }
1366
- loading.value = true;
1367
- const params = { ...queryForm };
1368
- requestInstance({
1369
- url: props.url,
1370
- method: props.method,
1371
- data: {
1372
- ...params,
1373
- pageSize: internalPageSize.value,
1374
- pageNum: pageNum.value
1375
- }
1376
- }).then((response) => {
1377
- tableData.value = response.rows || [];
1378
- total.value = response.total || 0;
1379
- loading.value = false;
1380
- }).catch(() => {
1381
- loading.value = false;
1382
- });
1383
1419
  }
1384
- function handleSearch(type) {
1385
- if (type) {
1386
- pageNum.value = 1;
1420
+ function getTableInstance() {
1421
+ if (repVxeTableRef.value) {
1422
+ return repVxeTableRef.value.vxeTableRef;
1387
1423
  }
1388
- getList();
1424
+ return null;
1389
1425
  }
1390
- function handlePageChange(page, size) {
1391
- pageNum.value = page;
1392
- internalPageSize.value = size;
1393
- getList();
1426
+ function handlePrint(printData) {
1427
+ const tableEl = getTableInstance();
1428
+ if (!tableEl) {
1429
+ console.error("VXE Table instance not found");
1430
+ ElMessage.error("表格组件未加载完成,请稍后再试");
1431
+ return;
1432
+ }
1433
+ const headerEl = reportHeaderRef.value;
1434
+ const footerEl = reportFooterRef.value;
1435
+ if (!headerEl || !footerEl) {
1436
+ console.error("Report header or footer element not found");
1437
+ ElMessage.error("报表元素未加载完成,请稍后再试");
1438
+ return;
1439
+ }
1440
+ const headerHtml = headerEl.innerHTML;
1441
+ const footerHtml = footerEl.innerHTML;
1442
+ if (typeof tableEl.print === "function") {
1443
+ tableEl.print({
1444
+ sheetName: props.reportTitle || "报表",
1445
+ data: printData || props.tableData,
1446
+ style: `
1447
+ table td, table th {
1448
+ border: 1px solid #000!important;
1449
+ }
1450
+ .table-head{
1451
+ text-align: center;
1452
+ font-size: 20px;
1453
+ line-height: 40px;
1454
+ font-weight: bold;
1455
+ }
1456
+ .table-head-2{
1457
+ width: 33%;
1458
+ }
1459
+ .table-head-1{
1460
+ display: flex;
1461
+ line-height: 25px;
1462
+ }
1463
+ .btn-print{
1464
+ text-align: center;
1465
+ margin-top: 10px;
1466
+ }
1467
+ .report-info {
1468
+ font-weight: 400;
1469
+ font-size: 14px;
1470
+ color: #333333;
1471
+ line-height: 22px;
1472
+ }
1473
+ .report-flex {
1474
+ display: flex;
1475
+ }
1476
+ .report-justify-between {
1477
+ justify-content: space-between;
1478
+ }
1479
+ .report-pb-12 {
1480
+ padding-bottom: 12px;
1481
+ }
1482
+ .report-pt-12 {
1483
+ padding-top: 12px;
1484
+ }`,
1485
+ beforePrintMethod: ({ content }) => {
1486
+ if (displayTitle.value) {
1487
+ return `<div class="table-head">${displayTitle.value}</div>` + headerHtml + content + footerHtml;
1488
+ }
1489
+ return headerHtml + content + footerHtml;
1490
+ }
1491
+ });
1492
+ } else {
1493
+ console.error("VXE Table print method not found");
1494
+ ElMessage.error("打印功能暂不可用");
1495
+ }
1394
1496
  }
1395
- function handleCreateTimeChange(value) {
1396
- if (value && value.length) {
1397
- queryForm.beginTime = value[0] || "";
1398
- queryForm.endTime = value[1] || "";
1497
+ function handleExport() {
1498
+ if (props.exportCallback) {
1499
+ emit("export");
1399
1500
  } else {
1400
- queryForm.beginTime = "";
1401
- queryForm.endTime = "";
1501
+ const tableInstance = getTableInstance();
1502
+ if (tableInstance) {
1503
+ tableInstance.exportData({
1504
+ filename: `${displayTitle.value}`,
1505
+ sheetName: "Sheet1",
1506
+ type: "xlsx"
1507
+ });
1508
+ }
1402
1509
  }
1403
1510
  }
1404
- function resetForm() {
1405
- Object.assign(queryForm, {
1406
- content: "",
1407
- module: "",
1408
- createUserName: "",
1409
- beginTime: "",
1410
- endTime: "",
1411
- createTimeRange: [],
1412
- combinedQueries: ""
1413
- });
1414
- pageNum.value = 1;
1415
- getList();
1511
+ function clearCheckbox() {
1512
+ var _a;
1513
+ (_a = repVxeTableRef.value) == null ? void 0 : _a.clearCheckbox();
1416
1514
  }
1417
- function refresh() {
1418
- getList();
1515
+ function clearSort() {
1516
+ var _a;
1517
+ (_a = repVxeTableRef.value) == null ? void 0 : _a.clearSort();
1419
1518
  }
1420
1519
  __expose({
1421
- resetForm,
1422
- refresh
1520
+ clearCheckbox,
1521
+ clearSort,
1522
+ handlePrint,
1523
+ getTableInstance
1423
1524
  });
1424
1525
  return (_ctx, _cache) => {
1425
- const _component_el_date_picker = resolveComponent("el-date-picker");
1426
- const _component_vxe_form_item = resolveComponent("vxe-form-item");
1427
- const _component_el_input = resolveComponent("el-input");
1428
- const _component_vxe_column = resolveComponent("vxe-column");
1429
1526
  return openBlock(), createElementBlock("div", _hoisted_1$2, [
1430
- createVNode(XSearchBar, {
1431
- modelValue: queryForm.combinedQueries,
1432
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => queryForm.combinedQueries = $event),
1433
- "show-search": false,
1434
- "query-form": queryForm,
1435
- "title-width": "78px",
1436
- onListUpdate: _cache[5] || (_cache[5] = ($event) => handleSearch(1))
1437
- }, {
1438
- vxeForm: withCtx(() => [
1439
- createVNode(_component_vxe_form_item, {
1440
- title: "选择时间",
1441
- field: "createTimeRange"
1442
- }, {
1443
- default: withCtx(() => [
1444
- createVNode(_component_el_date_picker, {
1445
- modelValue: queryForm.createTimeRange,
1446
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => queryForm.createTimeRange = $event),
1447
- type: "datetimerange",
1448
- "range-separator": "",
1449
- "value-format": "YYYY-MM-DD HH:mm:ss",
1450
- "start-placeholder": "开始时间",
1451
- "end-placeholder": "结束时间",
1452
- size: "small",
1453
- style: { "width": "100%" },
1454
- onChange: handleCreateTimeChange
1455
- }, null, 8, ["modelValue"])
1456
- ]),
1457
- _: 1
1458
- }),
1459
- createVNode(_component_vxe_form_item, {
1460
- title: "内容",
1461
- field: "content"
1462
- }, {
1463
- default: withCtx(() => [
1464
- createVNode(_component_el_input, {
1465
- modelValue: queryForm.content,
1466
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => queryForm.content = $event),
1467
- placeholder: "请输入内容",
1468
- clearable: "",
1469
- size: "small",
1470
- onKeyup: withKeys(handleSearch, ["enter"])
1471
- }, null, 8, ["modelValue"])
1472
- ]),
1473
- _: 1
1474
- }),
1475
- createVNode(_component_vxe_form_item, {
1476
- title: "模块",
1477
- field: "module"
1478
- }, {
1479
- default: withCtx(() => [
1480
- createVNode(_component_el_input, {
1481
- modelValue: queryForm.module,
1482
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => queryForm.module = $event),
1483
- placeholder: "请输入模块",
1484
- clearable: "",
1485
- size: "small",
1486
- onKeyup: withKeys(handleSearch, ["enter"])
1487
- }, null, 8, ["modelValue"])
1488
- ]),
1489
- _: 1
1490
- }),
1491
- createVNode(_component_vxe_form_item, {
1492
- title: "操作人员",
1493
- field: "createUserName"
1494
- }, {
1495
- default: withCtx(() => [
1496
- createVNode(_component_el_input, {
1497
- modelValue: queryForm.createUserName,
1498
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => queryForm.createUserName = $event),
1499
- placeholder: "请输入操作人员",
1500
- clearable: "",
1501
- size: "small",
1502
- onKeyup: withKeys(handleSearch, ["enter"])
1503
- }, null, 8, ["modelValue"])
1504
- ]),
1505
- _: 1
1506
- })
1507
- ]),
1508
- _: 1
1509
- }, 8, ["modelValue", "query-form"]),
1510
- createVNode(XVxeTable, {
1511
- ref_key: "vxeTableRef",
1512
- ref: vxeTableRef,
1513
- "sub-height": __props.subHeight,
1514
- "table-data": displayData.value,
1515
- loading: loading.value,
1516
- "current-page": pageNum.value,
1517
- "page-size": __props.pageSize,
1518
- total: total.value,
1519
- onChangePage: handlePageChange
1520
- }, {
1521
- default: withCtx(() => [
1522
- createVNode(_component_vxe_column, {
1523
- title: "操作员账号",
1524
- field: "createUserName",
1525
- "min-width": "100",
1526
- "show-overflow": "title"
1527
- }),
1528
- createVNode(_component_vxe_column, {
1529
- title: "日志时间",
1530
- field: "createTime",
1531
- width: "150"
1532
- }, {
1533
- default: withCtx(({ row }) => [
1534
- createElementVNode("span", null, toDisplayString(unref(parseTime)(row.createTime)), 1)
1535
- ]),
1536
- _: 1
1537
- }),
1538
- createVNode(_component_vxe_column, {
1539
- title: "日志类型",
1540
- field: "type",
1541
- "min-width": "100"
1542
- }),
1543
- createVNode(_component_vxe_column, {
1544
- title: "终端IP",
1545
- field: "terminalIp",
1546
- "min-width": "100"
1547
- }),
1548
- createVNode(_component_vxe_column, {
1549
- title: "日志内容",
1550
- field: "content",
1551
- "min-width": "150",
1552
- "show-overflow": "tooltip"
1553
- })
1554
- ]),
1555
- _: 1
1556
- }, 8, ["sub-height", "table-data", "loading", "current-page", "page-size", "total"])
1557
- ]);
1558
- };
1559
- }
1560
- });
1561
- const XBusinessLog = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-244f5d5d"]]);
1562
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1563
- __name: "XDatePicker",
1564
- props: {
1565
- type: {
1566
- type: String,
1567
- default: "date",
1568
- validator: (val) => [
1569
- "year",
1570
- "years",
1571
- "month",
1572
- "months",
1573
- "date",
1574
- "dates",
1575
- "datetime",
1576
- "week",
1577
- "datetimerange",
1578
- "daterange",
1579
- "monthrange",
1580
- "yearrange"
1581
- ].includes(val)
1582
- },
1583
- valueFormat: {
1584
- type: String,
1585
- default: null
1586
- },
1587
- placeholder: {
1588
- type: String,
1589
- default: null
1590
- },
1591
- startPlaceholder: {
1592
- type: String,
1593
- default: null
1594
- },
1595
- endPlaceholder: {
1596
- type: String,
1597
- default: null
1598
- },
1599
- rangeSeparator: {
1600
- type: String,
1601
- default: "至"
1602
- },
1603
- defaultTime: {
1604
- type: [String, Array],
1605
- default: null
1606
- },
1607
- isEndTime: {
1608
- type: Boolean,
1609
- default: false
1610
- },
1611
- modelValue: {
1612
- type: [String, Number, Array, Date],
1613
- default: ""
1614
- },
1615
- size: {
1616
- type: String,
1617
- default: "default"
1618
- }
1619
- },
1620
- emits: ["update:modelValue"],
1621
- setup(__props, { emit: __emit }) {
1622
- const props = __props;
1623
- const emit = __emit;
1624
- const internalValue = ref(props.modelValue);
1625
- function toDayjsFormat(format) {
1626
- return format.replace(/yyyy/g, "YYYY").replace(/dd/g, "DD");
1627
- }
1628
- function getDefaultFormat(type) {
1629
- const formatMap = {
1630
- "year": "YYYY",
1631
- "years": "YYYY",
1632
- "month": "YYYY-MM",
1633
- "months": "YYYY-MM",
1634
- "date": "YYYY-MM-DD",
1635
- "dates": "YYYY-MM-DD",
1636
- "datetime": "YYYY-MM-DD HH:mm:ss",
1637
- "week": "YYYY-MM-DD",
1638
- "datetimerange": "YYYY-MM-DD HH:mm:ss",
1639
- "daterange": "YYYY-MM-DD",
1640
- "monthrange": "YYYY-MM",
1641
- "yearrange": "YYYY"
1642
- };
1643
- return formatMap[type] || "YYYY-MM-DD";
1644
- }
1645
- function getDefaultPlaceholder(type) {
1646
- const isRange = type.includes("range");
1647
- const hasTime = type.includes("time");
1648
- if (isRange) {
1649
- return {
1650
- start: hasTime ? "开始日期时间" : "开始日期",
1651
- end: hasTime ? "结束日期时间" : "结束日期"
1652
- };
1653
- } else {
1654
- if (type === "year" || type === "years") return "选择年";
1655
- if (type === "month" || type === "months") return "选择月";
1656
- if (type === "week") return "选择周";
1657
- if (hasTime) return "选择日期时间";
1658
- return "选择日期";
1659
- }
1660
- }
1661
- const currentPlaceholder = computed(() => {
1662
- if (props.placeholder !== null) return props.placeholder;
1663
- const isRange = props.type.includes("range");
1664
- if (isRange) return void 0;
1665
- return getDefaultPlaceholder(props.type);
1666
- });
1667
- const currentStartPlaceholder = computed(() => {
1668
- if (props.startPlaceholder !== null) return props.startPlaceholder;
1669
- const isRange = props.type.includes("range");
1670
- if (!isRange) return void 0;
1671
- const defaults = getDefaultPlaceholder(props.type);
1672
- return defaults.start;
1673
- });
1674
- const currentEndPlaceholder = computed(() => {
1675
- if (props.endPlaceholder !== null) return props.endPlaceholder;
1676
- const isRange = props.type.includes("range");
1677
- if (!isRange) return void 0;
1678
- const defaults = getDefaultPlaceholder(props.type);
1679
- return defaults.end;
1680
- });
1681
- const currentValueFormat = computed(() => {
1682
- if (props.valueFormat !== null && props.valueFormat !== void 0) {
1683
- return toDayjsFormat(props.valueFormat);
1684
- }
1685
- return getDefaultFormat(props.type);
1686
- });
1687
- const currentDefaultTime = computed(() => {
1688
- if (props.defaultTime !== null && props.defaultTime !== void 0) {
1689
- return props.defaultTime;
1690
- }
1691
- if (props.isEndTime && props.type === "datetimerange") {
1692
- return [new Date(2e3, 0, 1, 0, 0, 0), new Date(2e3, 0, 1, 23, 59, 59)];
1693
- }
1694
- if (props.isEndTime && props.type === "datetime") {
1695
- return new Date(2e3, 0, 1, 23, 59, 59);
1696
- }
1697
- return void 0;
1698
- });
1699
- function applyEndTime(value) {
1700
- const startTime = "00:00:00";
1701
- const endTime = "23:59:59";
1702
- if (props.type === "datetimerange" && Array.isArray(value) && value.length === 2) {
1703
- let startVal = value[0];
1704
- let endVal = value[1];
1705
- if (startVal instanceof Date) {
1706
- const newStart = new Date(startVal);
1707
- newStart.setHours(0, 0, 0, 0);
1708
- startVal = newStart;
1709
- } else if (typeof startVal === "string" && startVal) {
1710
- const datePart = startVal.substring(0, 10);
1711
- startVal = datePart + " " + startTime;
1712
- }
1713
- if (endVal instanceof Date) {
1714
- const newEnd = new Date(endVal);
1715
- newEnd.setHours(23, 59, 59, 0);
1716
- endVal = newEnd;
1717
- } else if (typeof endVal === "string" && endVal) {
1718
- const datePart = endVal.substring(0, 10);
1719
- endVal = datePart + " " + endTime;
1720
- }
1721
- return [startVal, endVal];
1722
- }
1723
- if (props.type === "datetime" && value) {
1724
- if (value instanceof Date) {
1725
- if (value.getHours() === 0 && value.getMinutes() === 0 && value.getSeconds() === 0) {
1726
- const newDate = new Date(value);
1727
- newDate.setHours(23, 59, 59, 0);
1728
- return newDate;
1729
- }
1730
- return value;
1731
- }
1732
- if (typeof value === "string") {
1733
- const timePart = value.length > 10 ? value.substring(11) : "";
1734
- if (!timePart) {
1735
- const datePart = value.substring(0, 10);
1736
- return datePart + " " + endTime;
1737
- }
1738
- }
1739
- }
1740
- return value;
1741
- }
1742
- watch(() => props.modelValue, (newVal) => {
1743
- let result = newVal;
1744
- if (props.isEndTime && newVal) {
1745
- result = applyEndTime(newVal);
1746
- }
1747
- internalValue.value = result;
1748
- });
1749
- function handleUpdate(value) {
1750
- internalValue.value = value;
1751
- emit("update:modelValue", value);
1752
- }
1753
- return (_ctx, _cache) => {
1754
- const _component_el_date_picker = resolveComponent("el-date-picker");
1755
- return openBlock(), createBlock(_component_el_date_picker, mergeProps({
1756
- "model-value": internalValue.value,
1757
- type: __props.type,
1758
- placeholder: currentPlaceholder.value,
1759
- "start-placeholder": currentStartPlaceholder.value,
1760
- "end-placeholder": currentEndPlaceholder.value,
1761
- "range-separator": __props.rangeSeparator,
1762
- "value-format": currentValueFormat.value,
1763
- "default-time": currentDefaultTime.value,
1764
- size: __props.size
1765
- }, _ctx.$attrs, { "onUpdate:modelValue": handleUpdate }), null, 16, ["model-value", "type", "placeholder", "start-placeholder", "end-placeholder", "range-separator", "value-format", "default-time", "size"]);
1527
+ createElementVNode("div", _hoisted_2$2, [
1528
+ createElementVNode("h2", _hoisted_3$2, toDisplayString(displayTitle.value), 1),
1529
+ createElementVNode("div", _hoisted_4$2, [
1530
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.customButtons, (btn, index2) => {
1531
+ return openBlock(), createElementBlock("div", {
1532
+ key: index2,
1533
+ class: "action-item report-cursor-pointer",
1534
+ onClick: ($event) => handleCustomBtn(index2, btn)
1535
+ }, [
1536
+ createElementVNode("span", _hoisted_6$2, toDisplayString(btn), 1)
1537
+ ], 8, _hoisted_5$2);
1538
+ }), 128)),
1539
+ __props.showPrint ? (openBlock(), createElementBlock("div", {
1540
+ key: 0,
1541
+ class: "action-item report-cursor-pointer",
1542
+ onClick: _cache[0] || (_cache[0] = ($event) => printReport(1))
1543
+ }, [
1544
+ createElementVNode("span", _hoisted_7$2, toDisplayString(__props.printText), 1)
1545
+ ])) : createCommentVNode("", true),
1546
+ __props.printText1 ? (openBlock(), createElementBlock("div", {
1547
+ key: 1,
1548
+ class: "action-item report-cursor-pointer",
1549
+ onClick: _cache[1] || (_cache[1] = ($event) => printReport(2))
1550
+ }, [
1551
+ createElementVNode("span", _hoisted_8$2, toDisplayString(__props.printText1), 1)
1552
+ ])) : createCommentVNode("", true),
1553
+ __props.showExport ? (openBlock(), createElementBlock("div", {
1554
+ key: 2,
1555
+ class: "action-item report-cursor-pointer",
1556
+ onClick: handleExport
1557
+ }, _cache[2] || (_cache[2] = [
1558
+ createElementVNode("span", { class: "report-text-primary" }, "导出", -1)
1559
+ ]))) : createCommentVNode("", true)
1560
+ ])
1561
+ ]),
1562
+ createElementVNode("div", {
1563
+ class: "report-info report-pb-12",
1564
+ ref_key: "reportHeaderRef",
1565
+ ref: reportHeaderRef
1566
+ }, [
1567
+ createElementVNode("div", _hoisted_9$1, [
1568
+ createElementVNode("div", null, [
1569
+ _cache[3] || (_cache[3] = createElementVNode("span", { class: "" }, "制表单位:", -1)),
1570
+ createElementVNode("span", _hoisted_10$1, toDisplayString(organizationNameDisplay.value), 1)
1571
+ ]),
1572
+ createElementVNode("div", null, [
1573
+ _cache[4] || (_cache[4] = createElementVNode("span", { class: "" }, "日期范围:", -1)),
1574
+ createElementVNode("span", _hoisted_11$1, toDisplayString(dateRangeDisplay.value), 1)
1575
+ ]),
1576
+ __props.customHeader1Label ? (openBlock(), createElementBlock("div", _hoisted_12$1, [
1577
+ createElementVNode("span", _hoisted_13$1, toDisplayString(__props.customHeader1Label) + ":", 1),
1578
+ createElementVNode("span", _hoisted_14$1, toDisplayString(__props.customHeader1 || ""), 1)
1579
+ ])) : createCommentVNode("", true),
1580
+ __props.customHeader2Label ? (openBlock(), createElementBlock("div", _hoisted_15$1, [
1581
+ createElementVNode("span", _hoisted_16$1, toDisplayString(__props.customHeader2Label) + "", 1),
1582
+ createElementVNode("span", _hoisted_17, toDisplayString(__props.customHeader2 || ""), 1)
1583
+ ])) : createCommentVNode("", true),
1584
+ createElementVNode("div", null, [
1585
+ createElementVNode("span", _hoisted_18, toDisplayString(__props.customHeader3Label) + toDisplayString(__props.customHeader3Label ? ":" : ""), 1),
1586
+ createElementVNode("span", _hoisted_19, toDisplayString(__props.customHeader3 || ""), 1)
1587
+ ])
1588
+ ])
1589
+ ], 512),
1590
+ createElementVNode("div", _hoisted_20, [
1591
+ createVNode(XVxeTable, {
1592
+ ref_key: "repVxeTableRef",
1593
+ ref: repVxeTableRef,
1594
+ "table-data": __props.tableData,
1595
+ "sub-height": __props.subHeight,
1596
+ "show-toolbar": __props.showToolbar,
1597
+ "show-pagination": __props.showPagination,
1598
+ loading: __props.loading,
1599
+ "is-show-bg": false,
1600
+ "page-size": __props.pageSize,
1601
+ "current-page": __props.currentPage,
1602
+ total: __props.total,
1603
+ "show-footer": __props.showFooter,
1604
+ "footer-data": __props.footerData,
1605
+ columns: __props.columns,
1606
+ onChangePage: handlePageChange
1607
+ }, {
1608
+ buttons: withCtx(() => [
1609
+ renderSlot(_ctx.$slots, "buttons", {}, void 0, true)
1610
+ ]),
1611
+ default: withCtx(() => [
1612
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
1613
+ ]),
1614
+ _: 3
1615
+ }, 8, ["table-data", "sub-height", "show-toolbar", "show-pagination", "loading", "page-size", "current-page", "total", "show-footer", "footer-data", "columns"])
1616
+ ]),
1617
+ createElementVNode("div", {
1618
+ class: "report-info report-pt-12",
1619
+ ref_key: "reportFooterRef",
1620
+ ref: reportFooterRef
1621
+ }, [
1622
+ createElementVNode("div", _hoisted_21, [
1623
+ createElementVNode("div", null, [
1624
+ _cache[5] || (_cache[5] = createElementVNode("span", { class: "" }, "审核人员:", -1)),
1625
+ createElementVNode("span", _hoisted_22, toDisplayString(__props.auditorName || ""), 1)
1626
+ ]),
1627
+ createElementVNode("div", null, [
1628
+ _cache[6] || (_cache[6] = createElementVNode("span", { class: "" }, "制表人员:", -1)),
1629
+ createElementVNode("span", _hoisted_23, toDisplayString(creatorNameDisplay.value), 1)
1630
+ ]),
1631
+ __props.customFooterFieldLabel ? (openBlock(), createElementBlock("div", _hoisted_24, [
1632
+ createElementVNode("span", _hoisted_25, toDisplayString(__props.customFooterFieldLabel) + ":", 1),
1633
+ createElementVNode("span", _hoisted_26, toDisplayString(__props.customFooterField || ""), 1)
1634
+ ])) : createCommentVNode("", true),
1635
+ createElementVNode("div", null, [
1636
+ _cache[7] || (_cache[7] = createElementVNode("span", { class: "" }, "打印日期:", -1)),
1637
+ createElementVNode("span", _hoisted_27, toDisplayString(formattedPrintDate.value), 1)
1638
+ ])
1639
+ ])
1640
+ ], 512)
1641
+ ]);
1766
1642
  };
1767
1643
  }
1768
1644
  });
1769
- const XDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-264a8a79"]]);
1770
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1771
- __name: "XElOption",
1645
+ const XReportTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-00481d7c"]]);
1646
+ const _hoisted_1$1 = {
1647
+ key: 0,
1648
+ class: "search-top"
1649
+ };
1650
+ const _hoisted_2$1 = { class: "search-top__inner" };
1651
+ const _hoisted_3$1 = { class: "search-top__row" };
1652
+ const _hoisted_4$1 = {
1653
+ key: 0,
1654
+ class: "search-top__label"
1655
+ };
1656
+ const _hoisted_5$1 = {
1657
+ key: 1,
1658
+ class: "search-top-input"
1659
+ };
1660
+ const _hoisted_6$1 = {
1661
+ key: 0,
1662
+ class: "search-top-extra-item"
1663
+ };
1664
+ const _hoisted_7$1 = {
1665
+ key: 0,
1666
+ class: "search-top-extra-label"
1667
+ };
1668
+ const _hoisted_8$1 = { class: "search-top-extra-content" };
1669
+ const _hoisted_9 = {
1670
+ key: 1,
1671
+ class: "search-top-extra-item"
1672
+ };
1673
+ const _hoisted_10 = {
1674
+ key: 0,
1675
+ class: "search-top-extra-label"
1676
+ };
1677
+ const _hoisted_11 = { class: "search-top-extra-content" };
1678
+ const _hoisted_12 = {
1679
+ key: 2,
1680
+ class: "search-top-extra-item"
1681
+ };
1682
+ const _hoisted_13 = {
1683
+ key: 0,
1684
+ class: "search-top-extra-label"
1685
+ };
1686
+ const _hoisted_14 = { class: "search-top-extra-content" };
1687
+ const _hoisted_15 = { class: "search-top__actions" };
1688
+ const _hoisted_16 = { class: "search-form__buttons" };
1689
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1690
+ __name: "XSearchBar",
1772
1691
  props: {
1773
- label: {
1692
+ modelValue: {
1774
1693
  type: [String, Number],
1775
1694
  default: void 0
1776
1695
  },
1777
- value: {
1778
- type: [String, Number],
1779
- default: void 0
1696
+ placeholder: {
1697
+ type: String,
1698
+ default: "请输入搜索关键词"
1780
1699
  },
1781
- disabled: {
1782
- type: Boolean,
1783
- default: false
1784
- }
1785
- },
1786
- setup(__props) {
1787
- const props = __props;
1788
- const elSelectModelValue = inject("elSelectModelValue", null);
1789
- const computedValue = computed(() => {
1790
- const propValue = props.value;
1791
- if (!elSelectModelValue || !elSelectModelValue.value) {
1792
- return propValue;
1793
- }
1794
- const modelVal = elSelectModelValue.value;
1795
- if (Array.isArray(modelVal) && modelVal.length > 0) {
1796
- const firstValueType = typeof modelVal[0];
1797
- if (firstValueType === "number" && typeof propValue === "string") {
1798
- return Number(propValue);
1799
- }
1800
- if (firstValueType === "string" && typeof propValue === "number") {
1801
- return String(propValue);
1802
- }
1803
- }
1804
- if (!Array.isArray(modelVal)) {
1805
- const parentType = typeof modelVal;
1806
- if (parentType === "number" && typeof propValue === "string") {
1807
- return Number(propValue);
1808
- }
1809
- if (parentType === "string" && typeof propValue === "number") {
1810
- return String(propValue);
1811
- }
1812
- }
1813
- return propValue;
1814
- });
1815
- const computedLabel = computed(() => props.label);
1816
- return (_ctx, _cache) => {
1817
- const _component_el_option = resolveComponent("el-option");
1818
- return openBlock(), createBlock(_component_el_option, mergeProps(_ctx.$attrs, {
1819
- label: computedLabel.value,
1820
- value: computedValue.value
1821
- }), {
1822
- default: withCtx(() => [
1823
- renderSlot(_ctx.$slots, "default")
1824
- ]),
1825
- _: 3
1826
- }, 16, ["label", "value"]);
1827
- };
1828
- }
1829
- });
1830
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1831
- __name: "XElSelect",
1832
- props: {
1833
- modelValue: {
1834
- type: [String, Number, Array],
1835
- default: void 0
1700
+ queryForm: {
1701
+ type: Object,
1702
+ required: true,
1703
+ default: () => ({})
1836
1704
  },
1837
- width: {
1838
- type: [String, Number],
1839
- default: "100%"
1705
+ rules: {
1706
+ type: Object,
1707
+ default: () => ({})
1840
1708
  },
1841
- multiple: {
1842
- type: Boolean,
1843
- default: false
1709
+ titleWidth: {
1710
+ type: String,
1711
+ default: "100px"
1844
1712
  },
1845
- typeConvert: {
1846
- type: Boolean,
1847
- default: true
1713
+ columns: {
1714
+ type: Number,
1715
+ default: 4
1848
1716
  },
1849
- separator: {
1717
+ paddingBottom: {
1850
1718
  type: String,
1851
- default: ""
1719
+ default: "16px"
1852
1720
  },
1853
- targetType: {
1854
- type: String,
1855
- default: "auto",
1856
- validator: (value) => ["string", "number", "auto"].includes(value)
1721
+ showInput: {
1722
+ type: Boolean,
1723
+ default: true
1857
1724
  },
1858
- clearable: {
1725
+ showMoreBottom: {
1859
1726
  type: Boolean,
1860
1727
  default: true
1861
1728
  },
1862
- filterable: {
1729
+ showSearch: {
1863
1730
  type: Boolean,
1864
1731
  default: true
1865
1732
  },
1866
- placeholder: {
1733
+ text1: {
1867
1734
  type: String,
1868
- default: void 0
1735
+ default: ""
1869
1736
  },
1870
- size: {
1737
+ text2: {
1871
1738
  type: String,
1872
- default: "default"
1739
+ default: ""
1740
+ },
1741
+ text3: {
1742
+ type: String,
1743
+ default: ""
1873
1744
  }
1874
1745
  },
1875
- emits: ["update:modelValue", "change"],
1746
+ emits: ["update:modelValue", "update:queryForm", "list-update", "data-reset"],
1876
1747
  setup(__props, { expose: __expose, emit: __emit }) {
1877
1748
  const props = __props;
1878
1749
  const emit = __emit;
1879
- const selectRef = ref();
1880
- const localValue = ref(props.modelValue);
1881
- const modelValueRef = ref(null);
1882
- provide("elSelectModelValue", modelValueRef);
1883
- const computedLocalValue = computed(() => {
1884
- const val = localValue.value;
1885
- if (!props.typeConvert || val === null || val === void 0) {
1886
- return val;
1887
- }
1888
- if (props.multiple && props.separator) {
1889
- if (typeof val === "string" && val.includes(props.separator)) {
1890
- const values = val.split(props.separator);
1891
- if (props.targetType === "number") {
1892
- return values.map((v) => Number(v));
1893
- }
1894
- return values;
1895
- }
1896
- if (Array.isArray(val)) {
1897
- return val;
1750
+ const slots = useSlots();
1751
+ const showMore = ref(false);
1752
+ const queryFormRef = ref();
1753
+ const vxeFormRef = ref();
1754
+ const combinedQueries = computed({
1755
+ get() {
1756
+ if (props.modelValue !== void 0 && props.modelValue !== null) {
1757
+ return props.modelValue;
1898
1758
  }
1899
- if (val === "" || val === null || val === void 0) {
1900
- return [];
1759
+ return props.queryForm.combinedQueries || "";
1760
+ },
1761
+ set(val) {
1762
+ if (props.modelValue !== void 0 && props.modelValue !== null) {
1763
+ emit("update:modelValue", val);
1764
+ } else {
1765
+ props.queryForm.combinedQueries = val;
1901
1766
  }
1902
- return [val];
1903
1767
  }
1904
- return val;
1905
1768
  });
1906
- watch(() => props.modelValue, (newVal) => {
1907
- localValue.value = newVal;
1769
+ const hasFormSlot = computed(() => !!slots.form);
1770
+ const hasVxeFormSlot = computed(() => !!slots.vxeForm);
1771
+ const vxeFormSpan = computed(() => Math.floor(24 / props.columns));
1772
+ const formContainerStyle = computed(() => ({
1773
+ "--form-columns": props.columns
1774
+ }));
1775
+ const buttonItemSpan = computed(() => {
1776
+ return 24;
1908
1777
  });
1909
- watch(computedLocalValue, (newVal) => {
1910
- modelValueRef.value = newVal;
1911
- }, { immediate: true });
1912
- function handleLocalUpdate(val) {
1913
- localValue.value = val;
1914
- if (props.multiple && props.separator) {
1915
- const arr = Array.isArray(val) ? val : [val];
1916
- emit("update:modelValue", arr.join(props.separator));
1917
- } else {
1918
- emit("update:modelValue", val);
1778
+ function reset() {
1779
+ combinedQueries.value = "";
1780
+ if (props.modelValue !== void 0 && props.modelValue !== null) {
1781
+ emit("update:modelValue", "");
1782
+ }
1783
+ if (hasFormSlot.value && queryFormRef.value && typeof queryFormRef.value.resetFields === "function") {
1784
+ nextTick(() => {
1785
+ queryFormRef.value.resetFields();
1786
+ });
1787
+ }
1788
+ if (hasVxeFormSlot.value && vxeFormRef.value && typeof vxeFormRef.value.reset === "function") {
1789
+ vxeFormRef.value.reset();
1790
+ }
1791
+ if (props.queryForm && Object.keys(props.queryForm).length > 0) {
1792
+ const emptyForm = {};
1793
+ Object.keys(props.queryForm).forEach((key) => {
1794
+ const value = props.queryForm[key];
1795
+ if (Array.isArray(value)) {
1796
+ emptyForm[key] = [];
1797
+ } else if (value !== null && typeof value === "object") {
1798
+ emptyForm[key] = {};
1799
+ } else {
1800
+ emptyForm[key] = "";
1801
+ }
1802
+ });
1803
+ emit("update:queryForm", emptyForm);
1919
1804
  }
1805
+ showMore.value = false;
1806
+ emit("data-reset");
1920
1807
  }
1921
- function handleChange(val) {
1922
- emit("change", val);
1808
+ function searchParentList() {
1809
+ if (props.rules && Object.keys(props.rules).length > 0) {
1810
+ if (hasVxeFormSlot.value && vxeFormRef.value) {
1811
+ return new Promise((resolve, reject) => {
1812
+ if (typeof vxeFormRef.value.validate === "function") {
1813
+ vxeFormRef.value.validate((valid) => {
1814
+ if (valid) {
1815
+ showMore.value = true;
1816
+ reject(false);
1817
+ } else {
1818
+ showMore.value = false;
1819
+ emit("list-update", 1);
1820
+ resolve(true);
1821
+ }
1822
+ });
1823
+ } else {
1824
+ emit("list-update", 1);
1825
+ resolve(true);
1826
+ }
1827
+ });
1828
+ }
1829
+ if (hasFormSlot.value && queryFormRef.value && typeof queryFormRef.value.validate === "function") {
1830
+ return new Promise((resolve, reject) => {
1831
+ queryFormRef.value.validate((valid) => {
1832
+ if (valid) {
1833
+ showMore.value = false;
1834
+ emit("list-update", 1);
1835
+ resolve(true);
1836
+ } else {
1837
+ showMore.value = true;
1838
+ reject(false);
1839
+ }
1840
+ });
1841
+ });
1842
+ }
1843
+ } else {
1844
+ showMore.value = false;
1845
+ emit("list-update", 1);
1846
+ return Promise.resolve(true);
1847
+ }
1923
1848
  }
1924
1849
  __expose({
1925
- selectRef
1850
+ queryFormRef,
1851
+ vxeFormRef
1926
1852
  });
1927
1853
  return (_ctx, _cache) => {
1928
- const _component_el_select = resolveComponent("el-select");
1929
- return openBlock(), createBlock(_component_el_select, mergeProps({
1930
- ref_key: "selectRef",
1931
- ref: selectRef,
1932
- multiple: __props.multiple,
1933
- "model-value": computedLocalValue.value,
1934
- "onUpdate:modelValue": handleLocalUpdate,
1935
- onChange: handleChange
1936
- }, _ctx.$attrs, {
1937
- clearable: __props.clearable,
1938
- filterable: __props.filterable,
1939
- placeholder: __props.placeholder,
1940
- size: __props.size,
1941
- style: {
1942
- width: __props.width
1943
- }
1944
- }), {
1945
- default: withCtx(() => [
1946
- renderSlot(_ctx.$slots, "default")
1947
- ]),
1948
- _: 3
1949
- }, 16, ["multiple", "model-value", "clearable", "filterable", "placeholder", "size", "style"]);
1950
- };
1951
- }
1952
- });
1953
- const _hoisted_1$1 = { class: "x-report-table" };
1954
- const _hoisted_2$1 = { class: "report-header" };
1955
- const _hoisted_3$1 = { class: "report-title" };
1956
- const _hoisted_4$1 = { class: "report-actions" };
1957
- const _hoisted_5$1 = ["onClick"];
1958
- const _hoisted_6$1 = { class: "report-text-primary" };
1959
- const _hoisted_7$1 = { class: "report-text-primary" };
1960
- const _hoisted_8$1 = { class: "report-text-primary" };
1961
- const _hoisted_9 = { class: "report-flex report-justify-between" };
1962
- const _hoisted_10 = { class: "" };
1963
- const _hoisted_11 = { class: "" };
1964
- const _hoisted_12 = { key: 0 };
1965
- const _hoisted_13 = { class: "" };
1966
- const _hoisted_14 = { class: "" };
1967
- const _hoisted_15 = { key: 1 };
1968
- const _hoisted_16 = { class: "" };
1969
- const _hoisted_17 = { class: "" };
1970
- const _hoisted_18 = { class: "" };
1971
- const _hoisted_19 = { class: "" };
1972
- const _hoisted_20 = { class: "report-body" };
1973
- const _hoisted_21 = { class: "report-flex report-justify-between" };
1974
- const _hoisted_22 = { class: "" };
1975
- const _hoisted_23 = { class: "" };
1976
- const _hoisted_24 = { key: 0 };
1977
- const _hoisted_25 = { class: "" };
1978
- const _hoisted_26 = { class: "" };
1979
- const _hoisted_27 = { class: "" };
1980
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1981
- __name: "XReportTable",
1982
- props: {
1983
- tableData: { type: Array, default: () => [] },
1984
- columns: { type: Array, default: () => [] },
1985
- showFooter: { type: Boolean, default: false },
1986
- reportTitle: { type: String, default: "" },
1987
- organizationName: { type: String, default: "" },
1988
- dateRange: { type: [String, Array], default: "" },
1989
- customHeader1: { type: String, default: "" },
1990
- customHeader1Label: { type: String, default: "" },
1991
- customHeader2: { type: String, default: "" },
1992
- customHeader2Label: { type: String, default: "" },
1993
- customHeader3: { type: String, default: "" },
1994
- customHeader3Label: { type: String, default: "" },
1995
- auditorName: { type: String, default: "" },
1996
- creatorName: { type: String, default: "" },
1997
- customFooterField: { type: String, default: "" },
1998
- customFooterFieldLabel: { type: String, default: "" },
1999
- printDate: { type: String, default: "" },
2000
- showPrint: { type: Boolean, default: true },
2001
- showExport: { type: Boolean, default: true },
2002
- subHeight: { type: String, default: "343px" },
2003
- showToolbar: { type: Boolean, default: false },
2004
- showPagination: { type: Boolean, default: true },
2005
- pageSize: { type: Number, default: 20 },
2006
- total: { type: Number, default: 0 },
2007
- footerData: { type: Array, default: () => [] },
2008
- currentPage: { type: Number, default: 1 },
2009
- loading: { type: Boolean, default: false },
2010
- printCallback: { type: Boolean, default: false },
2011
- exportCallback: { type: Boolean, default: false },
2012
- printText: { type: String, default: "打印" },
2013
- printText1: { type: String, default: "" },
2014
- customButtons: { type: Array, default: () => [] }
2015
- },
2016
- emits: ["change-page", "customBtn", "printReport", "export"],
2017
- setup(__props, { expose: __expose, emit: __emit }) {
2018
- const props = __props;
2019
- const emit = __emit;
2020
- const instance = getCurrentInstance();
2021
- const repVxeTableRef = ref();
2022
- const reportHeaderRef = ref();
2023
- const reportFooterRef = ref();
2024
- const organizationNameDisplay = computed(() => {
2025
- var _a, _b, _c, _d, _e;
2026
- if (props.organizationName) return props.organizationName;
2027
- 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;
2028
- if ((_e = (_d = store == null ? void 0 : store.getters) == null ? void 0 : _d.tenantInfo) == null ? void 0 : _e.tenantName) {
2029
- return store.getters.tenantInfo.tenantName;
2030
- }
2031
- return "";
2032
- });
2033
- const displayTitle = computed(() => {
2034
- var _a, _b, _c, _d;
2035
- if (props.reportTitle) return props.reportTitle;
2036
- 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;
2037
- if ((_d = route == null ? void 0 : route.meta) == null ? void 0 : _d.title) return route.meta.title;
2038
- return "";
2039
- });
2040
- const creatorNameDisplay = computed(() => {
2041
- var _a, _b, _c, _d;
2042
- if (props.creatorName) return props.creatorName;
2043
- 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;
2044
- if ((_d = store == null ? void 0 : store.getters) == null ? void 0 : _d.name) return store.getters.name;
2045
- return "";
2046
- });
2047
- const formattedPrintDate = computed(() => {
2048
- if (props.printDate) return props.printDate;
2049
- const now = /* @__PURE__ */ new Date();
2050
- const year = now.getFullYear();
2051
- const month = String(now.getMonth() + 1).padStart(2, "0");
2052
- const day = String(now.getDate()).padStart(2, "0");
2053
- return `${year}-${month}-${day}`;
2054
- });
2055
- const dateRangeDisplay = computed(() => {
2056
- if (!props.dateRange) return "";
2057
- if (Array.isArray(props.dateRange)) {
2058
- return props.dateRange[0] + "至" + props.dateRange[1];
2059
- }
2060
- return props.dateRange;
2061
- });
2062
- function handlePageChange(page, size) {
2063
- emit("change-page", page, size);
2064
- }
2065
- function handleCustomBtn(index2, btn) {
2066
- emit("customBtn", index2, btn);
2067
- }
2068
- function printReport(type) {
2069
- if (type === 2) {
2070
- emit("printReport", type);
2071
- } else if (props.printCallback) {
2072
- emit("printReport", type);
2073
- } else {
2074
- handlePrint();
2075
- }
2076
- }
2077
- function getTableInstance() {
2078
- if (repVxeTableRef.value) {
2079
- return repVxeTableRef.value.vxeTableRef;
2080
- }
2081
- return null;
2082
- }
2083
- function handlePrint(printData) {
2084
- const tableEl = getTableInstance();
2085
- if (!tableEl) {
2086
- console.error("VXE Table instance not found");
2087
- ElMessage.error("表格组件未加载完成,请稍后再试");
2088
- return;
2089
- }
2090
- const headerEl = reportHeaderRef.value;
2091
- const footerEl = reportFooterRef.value;
2092
- if (!headerEl || !footerEl) {
2093
- console.error("Report header or footer element not found");
2094
- ElMessage.error("报表元素未加载完成,请稍后再试");
2095
- return;
2096
- }
2097
- const headerHtml = headerEl.innerHTML;
2098
- const footerHtml = footerEl.innerHTML;
2099
- if (typeof tableEl.print === "function") {
2100
- tableEl.print({
2101
- sheetName: props.reportTitle || "报表",
2102
- data: printData || props.tableData,
2103
- style: `
2104
- table td, table th {
2105
- border: 1px solid #000!important;
2106
- }
2107
- .table-head{
2108
- text-align: center;
2109
- font-size: 20px;
2110
- line-height: 40px;
2111
- font-weight: bold;
2112
- }
2113
- .table-head-2{
2114
- width: 33%;
2115
- }
2116
- .table-head-1{
2117
- display: flex;
2118
- line-height: 25px;
2119
- }
2120
- .btn-print{
2121
- text-align: center;
2122
- margin-top: 10px;
2123
- }
2124
- .report-info {
2125
- font-weight: 400;
2126
- font-size: 14px;
2127
- color: #333333;
2128
- line-height: 22px;
2129
- }
2130
- .report-flex {
2131
- display: flex;
2132
- }
2133
- .report-justify-between {
2134
- justify-content: space-between;
2135
- }
2136
- .report-pb-12 {
2137
- padding-bottom: 12px;
2138
- }
2139
- .report-pt-12 {
2140
- padding-top: 12px;
2141
- }`,
2142
- beforePrintMethod: ({ content }) => {
2143
- if (displayTitle.value) {
2144
- return `<div class="table-head">${displayTitle.value}</div>` + headerHtml + content + footerHtml;
2145
- }
2146
- return headerHtml + content + footerHtml;
2147
- }
2148
- });
2149
- } else {
2150
- console.error("VXE Table print method not found");
2151
- ElMessage.error("打印功能暂不可用");
2152
- }
2153
- }
2154
- function handleExport() {
2155
- if (props.exportCallback) {
2156
- emit("export");
2157
- } else {
2158
- const tableInstance = getTableInstance();
2159
- if (tableInstance) {
2160
- tableInstance.exportData({
2161
- filename: `${displayTitle.value}`,
2162
- sheetName: "Sheet1",
2163
- type: "xlsx"
2164
- });
2165
- }
2166
- }
2167
- }
2168
- function clearCheckbox() {
2169
- var _a;
2170
- (_a = repVxeTableRef.value) == null ? void 0 : _a.clearCheckbox();
2171
- }
2172
- function clearSort() {
2173
- var _a;
2174
- (_a = repVxeTableRef.value) == null ? void 0 : _a.clearSort();
2175
- }
2176
- __expose({
2177
- clearCheckbox,
2178
- clearSort,
2179
- handlePrint,
2180
- getTableInstance
2181
- });
2182
- return (_ctx, _cache) => {
2183
- return openBlock(), createElementBlock("div", _hoisted_1$1, [
2184
- createElementVNode("div", _hoisted_2$1, [
2185
- createElementVNode("h2", _hoisted_3$1, toDisplayString(displayTitle.value), 1),
2186
- createElementVNode("div", _hoisted_4$1, [
2187
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.customButtons, (btn, index2) => {
2188
- return openBlock(), createElementBlock("div", {
2189
- key: index2,
2190
- class: "action-item report-cursor-pointer",
2191
- onClick: ($event) => handleCustomBtn(index2, btn)
1854
+ const _component_el_input = resolveComponent("el-input");
1855
+ const _component_el_button = resolveComponent("el-button");
1856
+ const _component_vxe_form_item = resolveComponent("vxe-form-item");
1857
+ const _component_vxe_form = resolveComponent("vxe-form");
1858
+ return openBlock(), createElementBlock("div", {
1859
+ class: "search",
1860
+ style: normalizeStyle({ paddingBottom: __props.paddingBottom })
1861
+ }, [
1862
+ __props.showSearch ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
1863
+ createElementVNode("div", _hoisted_2$1, [
1864
+ createElementVNode("div", _hoisted_3$1, [
1865
+ __props.showInput ? (openBlock(), createElementBlock("span", _hoisted_4$1, "快捷搜索 ")) : createCommentVNode("", true),
1866
+ __props.showInput ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
1867
+ createVNode(_component_el_input, {
1868
+ type: "text",
1869
+ onKeyup: withKeys(searchParentList, ["enter"]),
1870
+ modelValue: combinedQueries.value,
1871
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => combinedQueries.value = $event),
1872
+ placeholder: __props.placeholder,
1873
+ clearable: ""
1874
+ }, {
1875
+ prefix: withCtx(() => [
1876
+ createVNode(SvgIcon, {
1877
+ "icon-class": "search",
1878
+ "class-name": "svg-icon-22"
1879
+ })
1880
+ ]),
1881
+ _: 1
1882
+ }, 8, ["modelValue", "placeholder"])
1883
+ ])) : createCommentVNode("", true),
1884
+ __props.showMoreBottom ? (openBlock(), createElementBlock("div", {
1885
+ key: 2,
1886
+ class: "search-top-filter",
1887
+ onClick: _cache[1] || (_cache[1] = ($event) => showMore.value = !showMore.value)
2192
1888
  }, [
2193
- createElementVNode("span", _hoisted_6$1, toDisplayString(btn), 1)
2194
- ], 8, _hoisted_5$1);
2195
- }), 128)),
2196
- __props.showPrint ? (openBlock(), createElementBlock("div", {
2197
- key: 0,
2198
- class: "action-item report-cursor-pointer",
2199
- onClick: _cache[0] || (_cache[0] = ($event) => printReport(1))
2200
- }, [
2201
- createElementVNode("span", _hoisted_7$1, toDisplayString(__props.printText), 1)
2202
- ])) : createCommentVNode("", true),
2203
- __props.printText1 ? (openBlock(), createElementBlock("div", {
2204
- key: 1,
2205
- class: "action-item report-cursor-pointer",
2206
- onClick: _cache[1] || (_cache[1] = ($event) => printReport(2))
2207
- }, [
2208
- createElementVNode("span", _hoisted_8$1, toDisplayString(__props.printText1), 1)
2209
- ])) : createCommentVNode("", true),
2210
- __props.showExport ? (openBlock(), createElementBlock("div", {
2211
- key: 2,
2212
- class: "action-item report-cursor-pointer",
2213
- onClick: handleExport
2214
- }, _cache[2] || (_cache[2] = [
2215
- createElementVNode("span", { class: "report-text-primary" }, "导出", -1)
2216
- ]))) : createCommentVNode("", true)
2217
- ])
2218
- ]),
2219
- createElementVNode("div", {
2220
- class: "report-info report-pb-12",
2221
- ref_key: "reportHeaderRef",
2222
- ref: reportHeaderRef
2223
- }, [
2224
- createElementVNode("div", _hoisted_9, [
2225
- createElementVNode("div", null, [
2226
- _cache[3] || (_cache[3] = createElementVNode("span", { class: "" }, "制表单位:", -1)),
2227
- createElementVNode("span", _hoisted_10, toDisplayString(organizationNameDisplay.value), 1)
2228
- ]),
2229
- createElementVNode("div", null, [
2230
- _cache[4] || (_cache[4] = createElementVNode("span", { class: "" }, "日期范围:", -1)),
2231
- createElementVNode("span", _hoisted_11, toDisplayString(dateRangeDisplay.value), 1)
1889
+ createVNode(SvgIcon, {
1890
+ "icon-class": "filter",
1891
+ "class-name": "svg-icon-22 filter-icon"
1892
+ }),
1893
+ _cache[2] || (_cache[2] = createElementVNode("span", { class: "btn_more" }, "更多", -1))
1894
+ ])) : createCommentVNode("", true),
1895
+ createElementVNode("div", {
1896
+ class: normalizeClass([{ "search-top-extra--ml": __props.showInput }, "search-top-extra"])
1897
+ }, [
1898
+ renderSlot(_ctx.$slots, "default", {}, void 0, true),
1899
+ unref(slots).text1 ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
1900
+ __props.text1 ? (openBlock(), createElementBlock("span", _hoisted_7$1, toDisplayString(__props.text1) + ":", 1)) : createCommentVNode("", true),
1901
+ createElementVNode("div", _hoisted_8$1, [
1902
+ renderSlot(_ctx.$slots, "text1", {}, void 0, true)
1903
+ ])
1904
+ ])) : createCommentVNode("", true),
1905
+ unref(slots).text2 ? (openBlock(), createElementBlock("div", _hoisted_9, [
1906
+ __props.text2 ? (openBlock(), createElementBlock("span", _hoisted_10, toDisplayString(__props.text2) + ":", 1)) : createCommentVNode("", true),
1907
+ createElementVNode("div", _hoisted_11, [
1908
+ renderSlot(_ctx.$slots, "text2", {}, void 0, true)
1909
+ ])
1910
+ ])) : createCommentVNode("", true),
1911
+ unref(slots).text3 ? (openBlock(), createElementBlock("div", _hoisted_12, [
1912
+ __props.text3 ? (openBlock(), createElementBlock("span", _hoisted_13, toDisplayString(__props.text3) + ":", 1)) : createCommentVNode("", true),
1913
+ createElementVNode("div", _hoisted_14, [
1914
+ renderSlot(_ctx.$slots, "text3", {}, void 0, true)
1915
+ ])
1916
+ ])) : createCommentVNode("", true)
1917
+ ], 2)
2232
1918
  ]),
2233
- __props.customHeader1Label ? (openBlock(), createElementBlock("div", _hoisted_12, [
2234
- createElementVNode("span", _hoisted_13, toDisplayString(__props.customHeader1Label) + ":", 1),
2235
- createElementVNode("span", _hoisted_14, toDisplayString(__props.customHeader1 || ""), 1)
2236
- ])) : createCommentVNode("", true),
2237
- __props.customHeader2Label ? (openBlock(), createElementBlock("div", _hoisted_15, [
2238
- createElementVNode("span", _hoisted_16, toDisplayString(__props.customHeader2Label) + ":", 1),
2239
- createElementVNode("span", _hoisted_17, toDisplayString(__props.customHeader2 || ""), 1)
2240
- ])) : createCommentVNode("", true),
2241
- createElementVNode("div", null, [
2242
- createElementVNode("span", _hoisted_18, toDisplayString(__props.customHeader3Label) + toDisplayString(__props.customHeader3Label ? ":" : ""), 1),
2243
- createElementVNode("span", _hoisted_19, toDisplayString(__props.customHeader3 || ""), 1)
1919
+ createElementVNode("div", _hoisted_15, [
1920
+ createVNode(_component_el_button, {
1921
+ plain: "",
1922
+ onClick: reset
1923
+ }, {
1924
+ default: withCtx(() => _cache[3] || (_cache[3] = [
1925
+ createTextVNode(" ")
1926
+ ])),
1927
+ _: 1,
1928
+ __: [3]
1929
+ }),
1930
+ createVNode(_component_el_button, {
1931
+ type: "primary",
1932
+ onClick: searchParentList
1933
+ }, {
1934
+ default: withCtx(() => _cache[4] || (_cache[4] = [
1935
+ createTextVNode("查 询")
1936
+ ])),
1937
+ _: 1,
1938
+ __: [4]
1939
+ })
2244
1940
  ])
2245
1941
  ])
2246
- ], 512),
2247
- createElementVNode("div", _hoisted_20, [
2248
- createVNode(XVxeTable, {
2249
- ref_key: "repVxeTableRef",
2250
- ref: repVxeTableRef,
2251
- "table-data": __props.tableData,
2252
- "sub-height": __props.subHeight,
2253
- "show-toolbar": __props.showToolbar,
2254
- "show-pagination": __props.showPagination,
2255
- loading: __props.loading,
2256
- "is-show-bg": false,
2257
- "page-size": __props.pageSize,
2258
- "current-page": __props.currentPage,
2259
- total: __props.total,
2260
- "show-footer": __props.showFooter,
2261
- "footer-data": __props.footerData,
2262
- columns: __props.columns,
2263
- onChangePage: handlePageChange
2264
- }, {
2265
- buttons: withCtx(() => [
2266
- renderSlot(_ctx.$slots, "buttons", {}, void 0, true)
2267
- ]),
2268
- default: withCtx(() => [
2269
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
2270
- ]),
2271
- _: 3
2272
- }, 8, ["table-data", "sub-height", "show-toolbar", "show-pagination", "loading", "page-size", "current-page", "total", "show-footer", "footer-data", "columns"])
2273
- ]),
2274
- createElementVNode("div", {
2275
- class: "report-info report-pt-12",
2276
- ref_key: "reportFooterRef",
2277
- ref: reportFooterRef
1942
+ ])) : createCommentVNode("", true),
1943
+ withDirectives(createElementVNode("div", {
1944
+ class: normalizeClass([{ "show_search": __props.showSearch }, "search-form"])
2278
1945
  }, [
2279
- createElementVNode("div", _hoisted_21, [
2280
- createElementVNode("div", null, [
2281
- _cache[5] || (_cache[5] = createElementVNode("span", { class: "" }, "审核人员:", -1)),
2282
- createElementVNode("span", _hoisted_22, toDisplayString(__props.auditorName || ""), 1)
2283
- ]),
2284
- createElementVNode("div", null, [
2285
- _cache[6] || (_cache[6] = createElementVNode("span", { class: "" }, "制表人员:", -1)),
2286
- createElementVNode("span", _hoisted_23, toDisplayString(creatorNameDisplay.value), 1)
2287
- ]),
2288
- __props.customFooterFieldLabel ? (openBlock(), createElementBlock("div", _hoisted_24, [
2289
- createElementVNode("span", _hoisted_25, toDisplayString(__props.customFooterFieldLabel) + ":", 1),
2290
- createElementVNode("span", _hoisted_26, toDisplayString(__props.customFooterField || ""), 1)
2291
- ])) : createCommentVNode("", true),
2292
- createElementVNode("div", null, [
2293
- _cache[7] || (_cache[7] = createElementVNode("span", { class: "" }, "打印日期:", -1)),
2294
- createElementVNode("span", _hoisted_27, toDisplayString(formattedPrintDate.value), 1)
2295
- ])
2296
- ])
2297
- ], 512)
2298
- ]);
1946
+ createElementVNode("div", {
1947
+ class: "search-form__inner",
1948
+ style: normalizeStyle(formContainerStyle.value)
1949
+ }, [
1950
+ hasFormSlot.value ? (openBlock(), createBlock(XElForm, {
1951
+ key: 0,
1952
+ rules: __props.rules,
1953
+ model: __props.queryForm,
1954
+ ref_key: "queryFormRef",
1955
+ ref: queryFormRef,
1956
+ span: vxeFormSpan.value,
1957
+ "label-width": __props.titleWidth
1958
+ }, {
1959
+ default: withCtx(() => [
1960
+ renderSlot(_ctx.$slots, "form", {}, void 0, true),
1961
+ !__props.showSearch ? (openBlock(), createBlock(XElFormItem, {
1962
+ key: 0,
1963
+ label: "",
1964
+ span: buttonItemSpan.value
1965
+ }, {
1966
+ default: withCtx(() => [
1967
+ createElementVNode("div", _hoisted_16, [
1968
+ createVNode(_component_el_button, {
1969
+ plain: "",
1970
+ onClick: reset
1971
+ }, {
1972
+ default: withCtx(() => _cache[5] || (_cache[5] = [
1973
+ createTextVNode("重 置")
1974
+ ])),
1975
+ _: 1,
1976
+ __: [5]
1977
+ }),
1978
+ createVNode(_component_el_button, {
1979
+ type: "primary",
1980
+ onClick: searchParentList
1981
+ }, {
1982
+ default: withCtx(() => _cache[6] || (_cache[6] = [
1983
+ createTextVNode("查 询")
1984
+ ])),
1985
+ _: 1,
1986
+ __: [6]
1987
+ })
1988
+ ])
1989
+ ]),
1990
+ _: 1
1991
+ }, 8, ["span"])) : createCommentVNode("", true)
1992
+ ]),
1993
+ _: 3
1994
+ }, 8, ["rules", "model", "span", "label-width"])) : createCommentVNode("", true),
1995
+ hasVxeFormSlot.value ? (openBlock(), createBlock(_component_vxe_form, {
1996
+ key: 1,
1997
+ data: __props.queryForm,
1998
+ rules: __props.rules,
1999
+ span: vxeFormSpan.value,
2000
+ titleColon: "",
2001
+ vertical: "",
2002
+ "title-align": "right",
2003
+ "title-width": __props.titleWidth,
2004
+ size: "medium",
2005
+ ref_key: "vxeFormRef",
2006
+ ref: vxeFormRef
2007
+ }, {
2008
+ default: withCtx(() => [
2009
+ renderSlot(_ctx.$slots, "vxeForm", {}, void 0, true),
2010
+ !__props.showSearch ? (openBlock(), createBlock(_component_vxe_form_item, {
2011
+ key: 0,
2012
+ span: buttonItemSpan.value,
2013
+ align: "right"
2014
+ }, {
2015
+ default: withCtx(() => [
2016
+ createVNode(_component_el_button, {
2017
+ plain: "",
2018
+ onClick: reset
2019
+ }, {
2020
+ default: withCtx(() => _cache[7] || (_cache[7] = [
2021
+ createTextVNode("重 置")
2022
+ ])),
2023
+ _: 1,
2024
+ __: [7]
2025
+ }),
2026
+ createVNode(_component_el_button, {
2027
+ type: "primary",
2028
+ onClick: searchParentList
2029
+ }, {
2030
+ default: withCtx(() => _cache[8] || (_cache[8] = [
2031
+ createTextVNode("查 询")
2032
+ ])),
2033
+ _: 1,
2034
+ __: [8]
2035
+ })
2036
+ ]),
2037
+ _: 1
2038
+ }, 8, ["span"])) : createCommentVNode("", true)
2039
+ ]),
2040
+ _: 3
2041
+ }, 8, ["data", "rules", "span", "title-width"])) : createCommentVNode("", true)
2042
+ ], 4)
2043
+ ], 2), [
2044
+ [vShow, showMore.value || !__props.showSearch]
2045
+ ])
2046
+ ], 4);
2299
2047
  };
2300
2048
  }
2301
2049
  });
2302
- const XReportTable = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-00481d7c"]]);
2050
+ const XSearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-39635b04"]]);
2303
2051
  const _hoisted_1 = { class: "x-split-layout__sidebar-menu" };
2304
2052
  const _hoisted_2 = ["onClick"];
2305
2053
  const _hoisted_3 = { class: "x-split-layout__menu-icon" };
@@ -2605,12 +2353,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2605
2353
  }
2606
2354
  });
2607
2355
  const components = {
2608
- XBusinessLog,
2609
2356
  XDatePicker,
2610
2357
  XElForm,
2611
2358
  XElFormItem,
2612
- XElOption: _sfc_main$4,
2613
- XElSelect: _sfc_main$3,
2359
+ XElOption: _sfc_main$7,
2360
+ XElSelect: _sfc_main$6,
2614
2361
  XPagination,
2615
2362
  XReportTable,
2616
2363
  XSearchBar,
@@ -2635,12 +2382,11 @@ const index = {
2635
2382
  };
2636
2383
  export {
2637
2384
  SvgIcon,
2638
- XBusinessLog,
2639
2385
  XDatePicker,
2640
2386
  XElForm,
2641
2387
  XElFormItem,
2642
- _sfc_main$4 as XElOption,
2643
- _sfc_main$3 as XElSelect,
2388
+ _sfc_main$7 as XElOption,
2389
+ _sfc_main$6 as XElSelect,
2644
2390
  XPagination,
2645
2391
  XReportTable,
2646
2392
  XSearchBar,