@ecan-bi/datav 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,6 +1,6 @@
1
- /*! @ecan-bi/datav@1.1.0 */
1
+ /*! @ecan-bi/datav@1.1.2 */
2
2
  var _a, _b, _c, _d;
3
- import { watch, inject, computed, unref, watchEffect, defineComponent, shallowRef, toRefs, onMounted, onUnmounted, h, nextTick, createVNode, resolveComponent, openBlock, createElementBlock, createBlock, renderSlot, withCtx, ref, normalizeStyle, createCommentVNode, provide, toDisplayString, Fragment, renderList, createElementVNode, normalizeClass, pushScopeId, popScopeId, createSlots, resolveDynamicComponent, mergeProps, withModifiers, withDirectives, vShow } from "vue";
3
+ import { watch, inject, computed, unref, watchEffect, defineComponent, shallowRef, toRefs, onMounted, onUnmounted, h, nextTick, createVNode, resolveComponent, openBlock, createElementBlock, createBlock, renderSlot, withCtx, ref, normalizeStyle, createCommentVNode, provide, onBeforeUnmount, toDisplayString, Fragment, renderList, createElementVNode, normalizeClass, pushScopeId, popScopeId, createSlots, resolveDynamicComponent, mergeProps, withModifiers, withDirectives, vShow } from "vue";
4
4
  import { throttle, init, use, registerMap } from "echarts/core";
5
5
  import { addListener, removeListener } from "resize-detector";
6
6
  import { Spin as Spin$1, Skeleton as Skeleton$1, message, Progress, Input as Input$1, DatePicker as DatePicker$1, Select as Select$1, RangePicker as RangePicker$1, Button as Button$1, CheckboxGroup, Modal as Modal$1, Table as Table$1, TableSummary, TableSummaryRow, TableSummaryCell } from "ant-design-vue";
@@ -1564,9 +1564,6 @@ const useOnEvent = (props2, events) => {
1564
1564
  onEvent: (i, e) => void 0,
1565
1565
  offEvent: (i) => void 0
1566
1566
  });
1567
- if (oldId != null && oldId !== "") {
1568
- eventBus.offEvent(oldId);
1569
- }
1570
1567
  if (id != null && id !== "") {
1571
1568
  eventBus.onEvent(id, events);
1572
1569
  }
@@ -1679,8 +1676,6 @@ const useVariablesInText = (formatter = "", data = {}, { useNewline = false, use
1679
1676
  const usedVariable = data[textVariable];
1680
1677
  if (usedVariable != null) {
1681
1678
  statement = statement.replace(textVariable, usedVariable);
1682
- } else {
1683
- statement = statement.replace(textVariable, "");
1684
1679
  }
1685
1680
  }
1686
1681
  try {
@@ -2640,11 +2635,16 @@ const _sfc_main$o = defineComponent({
2640
2635
  setGlobalModel
2641
2636
  });
2642
2637
  const eventBus = mitt();
2638
+ const eventBusKeySet = /* @__PURE__ */ new Set();
2643
2639
  const onEvent = (key, events) => {
2640
+ if (eventBusKeySet.has(key)) {
2641
+ eventBus.off(key);
2642
+ }
2644
2643
  eventBus.on(key, (k) => {
2644
+ eventBusKeySet.add(key);
2645
2645
  return Object.prototype.toString.call(events[k]) === "[object Function]" && events[k]();
2646
2646
  });
2647
- onUnmounted(() => {
2647
+ onBeforeUnmount(() => {
2648
2648
  eventBus.off(key);
2649
2649
  });
2650
2650
  };
@@ -2667,14 +2667,16 @@ const _sfc_main$o = defineComponent({
2667
2667
  requestToken
2668
2668
  });
2669
2669
  const requestModel = /* @__PURE__ */ new Map();
2670
- const setRequest = (requestFn = () => {
2671
- }, sortNum = 0) => {
2670
+ const requestMap = /* @__PURE__ */ new Map();
2671
+ const setRequest = ({ requestFn = () => {
2672
+ }, sortNum = 0, id = "" }) => {
2672
2673
  if (requestModel.has(sortNum)) {
2673
2674
  const requestFnList = requestModel.get(sortNum);
2674
2675
  requestFnList == null ? void 0 : requestFnList.push(requestFn);
2675
2676
  } else {
2676
2677
  requestModel.set(sortNum, [requestFn]);
2677
2678
  }
2679
+ requestMap.set(id, requestFn);
2678
2680
  };
2679
2681
  const handleRequestFnList = (requestFnList) => {
2680
2682
  return new Promise((resolve, reject) => {
@@ -2696,22 +2698,29 @@ const _sfc_main$o = defineComponent({
2696
2698
  });
2697
2699
  config.indicatorToken = (_a2 = res.data.data) == null ? void 0 : _a2.token;
2698
2700
  };
2699
- const touchRequest = async () => {
2700
- const requestModelArr = Array.from(requestModel);
2701
- requestModelArr.sort((a, b) => b[0] - a[0]);
2702
- const len = requestModelArr.length;
2703
- try {
2704
- if (props2.pageMode !== "design" && unref(tokenNum) > 0) {
2705
- await queryUserToken();
2701
+ const touchRequest = async (id) => {
2702
+ if (!id) {
2703
+ const requestModelArr = Array.from(requestModel);
2704
+ requestModelArr.sort((a, b) => b[0] - a[0]);
2705
+ const len = requestModelArr.length;
2706
+ try {
2707
+ if (props2.pageMode !== "design" && unref(tokenNum) > 0) {
2708
+ await queryUserToken();
2709
+ }
2710
+ for (let i = 0; i < len; i++) {
2711
+ const requestFnList = requestModelArr[i][1];
2712
+ await handleRequestFnList(requestFnList);
2713
+ }
2714
+ } catch (e) {
2715
+ console.error(e);
2716
+ } finally {
2717
+ requestModel.clear();
2706
2718
  }
2707
- for (let i = 0; i < len; i++) {
2708
- const requestFnList = requestModelArr[i][1];
2709
- await handleRequestFnList(requestFnList);
2719
+ } else if (typeof id === "string") {
2720
+ const requestFn = requestMap.get(id);
2721
+ if (typeof requestFn === "function") {
2722
+ requestFn();
2710
2723
  }
2711
- } catch (e) {
2712
- console.error(e);
2713
- } finally {
2714
- requestModel.clear();
2715
2724
  }
2716
2725
  };
2717
2726
  provide(REQUEST_MODEL, {
@@ -2730,6 +2739,10 @@ const _sfc_main$o = defineComponent({
2730
2739
  eventBus.off(REFRESH_PAGE);
2731
2740
  });
2732
2741
  };
2742
+ onBeforeUnmount(() => {
2743
+ requestModel == null ? void 0 : requestModel.clear();
2744
+ requestMap == null ? void 0 : requestMap.clear();
2745
+ });
2733
2746
  expose({
2734
2747
  touchRequest,
2735
2748
  getGlobalModel,
@@ -2864,9 +2877,13 @@ const _sfc_main$n = defineComponent({
2864
2877
  refreshData
2865
2878
  });
2866
2879
  const { setRequest } = inject(REQUEST_MODEL, {
2867
- setRequest: (requestFn, sortNum) => void 0
2880
+ setRequest: ({ id, sortNum, requestFn }) => void 0
2881
+ });
2882
+ setRequest({
2883
+ id: props2.id,
2884
+ requestFn: refreshData,
2885
+ sortNum: props2.requestSort
2868
2886
  });
2869
- setRequest(refreshData, props2.requestSort);
2870
2887
  useOnEvent(props2, {
2871
2888
  refreshData
2872
2889
  });
@@ -2899,7 +2916,7 @@ const _sfc_main$n = defineComponent({
2899
2916
  };
2900
2917
  }
2901
2918
  });
2902
- const Text_vue_vue_type_style_index_0_scoped_8e727e41_lang = "";
2919
+ const Text_vue_vue_type_style_index_0_scoped_860fa6ea_lang = "";
2903
2920
  const _hoisted_1$8 = ["innerHTML"];
2904
2921
  function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
2905
2922
  const _component_skeleton = resolveComponent("skeleton");
@@ -2917,7 +2934,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
2917
2934
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.click && _ctx.click(...args))
2918
2935
  }, null, 12, _hoisted_1$8));
2919
2936
  }
2920
- const Text = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-8e727e41"]]);
2937
+ const Text = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-860fa6ea"]]);
2921
2938
  const EcanText = withInstall(Text);
2922
2939
  const _sfc_main$m = defineComponent({
2923
2940
  name: "EcanScrollText",
@@ -3101,9 +3118,13 @@ const _sfc_main$k = defineComponent({
3101
3118
  refreshData
3102
3119
  });
3103
3120
  const { setRequest } = inject(REQUEST_MODEL, {
3104
- setRequest: (requestFn, sortNum) => void 0
3121
+ setRequest: ({ id, sortNum, requestFn }) => void 0
3122
+ });
3123
+ setRequest({
3124
+ id: props2.id,
3125
+ requestFn: handleRequestData,
3126
+ sortNum: props2.requestSort
3105
3127
  });
3106
- setRequest(handleRequestData, props2.requestSort);
3107
3128
  return {
3108
3129
  style: style2,
3109
3130
  formatFn,
@@ -3115,9 +3136,9 @@ const _sfc_main$k = defineComponent({
3115
3136
  };
3116
3137
  }
3117
3138
  });
3118
- const List_vue_vue_type_style_index_0_scoped_73ca0d93_lang = "";
3139
+ const List_vue_vue_type_style_index_0_scoped_baf2ff0c_lang = "";
3119
3140
  const List_vue_vue_type_style_index_1_lang = "";
3120
- const _withScopeId$1 = (n) => (pushScopeId("data-v-73ca0d93"), n = n(), popScopeId(), n);
3141
+ const _withScopeId$1 = (n) => (pushScopeId("data-v-baf2ff0c"), n = n(), popScopeId(), n);
3121
3142
  const _hoisted_1$6 = {
3122
3143
  key: 0,
3123
3144
  class: "title"
@@ -3126,7 +3147,7 @@ const _hoisted_2$2 = {
3126
3147
  key: 0,
3127
3148
  class: "ranking"
3128
3149
  };
3129
- const _hoisted_3$1 = {
3150
+ const _hoisted_3$2 = {
3130
3151
  key: 1,
3131
3152
  class: "ecan-list-content"
3132
3153
  };
@@ -3174,7 +3195,7 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
3174
3195
  ], 4);
3175
3196
  }), 128))
3176
3197
  ])) : createCommentVNode("", true),
3177
- _ctx.dataSource.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
3198
+ _ctx.dataSource.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
3178
3199
  _ctx.useTitle ? (openBlock(), createElementBlock("div", {
3179
3200
  key: 0,
3180
3201
  class: "title-placeholder",
@@ -3219,7 +3240,7 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
3219
3240
  }, 8, ["loading"])
3220
3241
  ], 4);
3221
3242
  }
3222
- const List = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$k], ["__scopeId", "data-v-73ca0d93"]]);
3243
+ const List = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$k], ["__scopeId", "data-v-baf2ff0c"]]);
3223
3244
  const EcanList = withInstall(List);
3224
3245
  const proportionProps = {
3225
3246
  ...props,
@@ -3374,9 +3395,13 @@ const _sfc_main$j = defineComponent({
3374
3395
  const click = emitEvent("click", () => {
3375
3396
  });
3376
3397
  const { setRequest } = inject(REQUEST_MODEL, {
3377
- setRequest: (requestFn, sortNum) => void 0
3398
+ setRequest: ({ id, sortNum, requestFn }) => void 0
3399
+ });
3400
+ setRequest({
3401
+ id: props2.id,
3402
+ requestFn: handleRequestData,
3403
+ sortNum: props2.requestSort
3378
3404
  });
3379
- setRequest(handleRequestData, props2.requestSort);
3380
3405
  return {
3381
3406
  style: style2,
3382
3407
  myWidth,
@@ -3387,7 +3412,7 @@ const _sfc_main$j = defineComponent({
3387
3412
  };
3388
3413
  }
3389
3414
  });
3390
- const Proportion_vue_vue_type_style_index_0_scoped_c6114322_lang = "";
3415
+ const Proportion_vue_vue_type_style_index_0_scoped_304d430d_lang = "";
3391
3416
  function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
3392
3417
  const _component_skeleton = resolveComponent("skeleton");
3393
3418
  const _component_a_progress = resolveComponent("a-progress");
@@ -3427,7 +3452,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
3427
3452
  }, 8, ["percent", "width", "type", "strokeColor", "strokeLinecap", "trailColor", "strokeWidth", "gapDegree", "onClick"])
3428
3453
  ], 4);
3429
3454
  }
3430
- const Proportion = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-c6114322"]]);
3455
+ const Proportion = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-304d430d"]]);
3431
3456
  const EcanProportion = withInstall(Proportion);
3432
3457
  const inputProps = {
3433
3458
  ...props,
@@ -3674,9 +3699,13 @@ const _sfc_main$g = defineComponent({
3674
3699
  selectChange
3675
3700
  });
3676
3701
  const { setRequest } = inject(REQUEST_MODEL, {
3677
- setRequest: (requestFn, sortNum) => void 0
3702
+ setRequest: ({ id, sortNum, requestFn }) => void 0
3703
+ });
3704
+ setRequest({
3705
+ id: props2.id,
3706
+ requestFn: handleRequestData,
3707
+ sortNum: props2.requestSort
3678
3708
  });
3679
- setRequest(handleRequestData, props2.requestSort);
3680
3709
  return {
3681
3710
  style: style2,
3682
3711
  getPopupContainer,
@@ -3688,7 +3717,7 @@ const _sfc_main$g = defineComponent({
3688
3717
  };
3689
3718
  }
3690
3719
  });
3691
- const Select_vue_vue_type_style_index_0_scoped_3e94d5e8_lang = "";
3720
+ const Select_vue_vue_type_style_index_0_scoped_dd2bcf63_lang = "";
3692
3721
  const Select_vue_vue_type_style_index_1_lang = "";
3693
3722
  function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
3694
3723
  const _component_a_select = resolveComponent("a-select");
@@ -3712,7 +3741,7 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
3712
3741
  }, null, 8, ["value", "options", "mode", "getPopupContainer", "field-names", "maxTagCount", "filter-option", "onChange", "loading"])
3713
3742
  ], 4);
3714
3743
  }
3715
- const Select = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g], ["__scopeId", "data-v-3e94d5e8"]]);
3744
+ const Select = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g], ["__scopeId", "data-v-dd2bcf63"]]);
3716
3745
  const EcanSelect = withInstall(Select);
3717
3746
  const rangePickerProps = {
3718
3747
  ...props,
@@ -3966,9 +3995,13 @@ const _sfc_main$d = defineComponent({
3966
3995
  setGlobalModel(id, { ...modal, RECORD: myValue });
3967
3996
  });
3968
3997
  const { setRequest } = inject(REQUEST_MODEL, {
3969
- setRequest: (requestFn, sortNum) => void 0
3998
+ setRequest: ({ id: id2, sortNum, requestFn }) => void 0
3999
+ });
4000
+ setRequest({
4001
+ id: props2.id,
4002
+ requestFn: handleRequestData,
4003
+ sortNum: props2.requestSort
3970
4004
  });
3971
- setRequest(handleRequestData, props2.requestSort);
3972
4005
  return {
3973
4006
  myOption,
3974
4007
  style: style2,
@@ -4315,9 +4348,13 @@ const _sfc_main$c = defineComponent({
4315
4348
  click
4316
4349
  });
4317
4350
  const { setRequest } = inject(REQUEST_MODEL, {
4318
- setRequest: (requestFn, sortNum) => void 0
4351
+ setRequest: ({ id, sortNum, requestFn }) => void 0
4352
+ });
4353
+ setRequest({
4354
+ id: props2.id,
4355
+ requestFn: chooseRequestOrDiagram,
4356
+ sortNum: props2.requestSort
4319
4357
  });
4320
- setRequest(chooseRequestOrDiagram, props2.requestSort);
4321
4358
  return {
4322
4359
  option,
4323
4360
  style: style2,
@@ -4725,9 +4762,13 @@ const _sfc_main$b = defineComponent({
4725
4762
  click
4726
4763
  });
4727
4764
  const { setRequest } = inject(REQUEST_MODEL, {
4728
- setRequest: (requestFn, sortNum) => void 0
4765
+ setRequest: ({ id, sortNum, requestFn }) => void 0
4766
+ });
4767
+ setRequest({
4768
+ id: props2.id,
4769
+ requestFn: chooseRequestOrDiagram,
4770
+ sortNum: props2.requestSort
4729
4771
  });
4730
- setRequest(chooseRequestOrDiagram, props2.requestSort);
4731
4772
  return {
4732
4773
  option,
4733
4774
  style: style2,
@@ -5170,9 +5211,13 @@ const _sfc_main$a = defineComponent({
5170
5211
  setGlobalModel(id, { ...modal, RECORD: e.data });
5171
5212
  });
5172
5213
  const { setRequest } = inject(REQUEST_MODEL, {
5173
- setRequest: (requestFn, sortNum) => void 0
5214
+ setRequest: ({ id, sortNum, requestFn }) => void 0
5215
+ });
5216
+ setRequest({
5217
+ id: props2.id,
5218
+ requestFn: refreshData,
5219
+ sortNum: props2.requestSort
5174
5220
  });
5175
- setRequest(refreshData, props2.requestSort);
5176
5221
  useOnEvent(props2, {
5177
5222
  refreshData,
5178
5223
  click
@@ -5494,9 +5539,13 @@ const _sfc_main$9 = defineComponent({
5494
5539
  click
5495
5540
  });
5496
5541
  const { setRequest } = inject(REQUEST_MODEL, {
5497
- setRequest: (requestFn, sortNum) => void 0
5542
+ setRequest: ({ id, sortNum, requestFn }) => void 0
5543
+ });
5544
+ setRequest({
5545
+ id: props2.id,
5546
+ requestFn: handleRequestData,
5547
+ sortNum: props2.requestSort
5498
5548
  });
5499
- setRequest(handleRequestData, props2.requestSort);
5500
5549
  return {
5501
5550
  option,
5502
5551
  style: style2,
@@ -6021,9 +6070,13 @@ const _sfc_main$7 = defineComponent({
6021
6070
  setGlobalModel(id, { ...modal, RECORD: e == null ? void 0 : e.data });
6022
6071
  });
6023
6072
  const { setRequest } = inject(REQUEST_MODEL, {
6024
- setRequest: (requestFn, sortNum) => void 0
6073
+ setRequest: ({ id, sortNum, requestFn }) => void 0
6074
+ });
6075
+ setRequest({
6076
+ id: props2.id,
6077
+ requestFn: chooseRequestOrDiagram,
6078
+ sortNum: props2.requestSort
6025
6079
  });
6026
- setRequest(chooseRequestOrDiagram, props2.requestSort);
6027
6080
  useOnEvent(props2, {
6028
6081
  refreshData,
6029
6082
  click
@@ -6157,7 +6210,7 @@ const Border_vue_vue_type_style_index_0_scoped_f3fc1305_lang = "";
6157
6210
  const _withScopeId = (n) => (pushScopeId("data-v-f3fc1305"), n = n(), popScopeId(), n);
6158
6211
  const _hoisted_1$5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "top-left border-item" }, null, -1));
6159
6212
  const _hoisted_2$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "top-right border-item" }, null, -1));
6160
- const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "bottom-left border-item" }, null, -1));
6213
+ const _hoisted_3$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "bottom-left border-item" }, null, -1));
6161
6214
  const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "bottom-right border-item" }, null, -1));
6162
6215
  const _hoisted_5 = { class: "title-item-wrapper" };
6163
6216
  const _hoisted_6 = { class: "title-item" };
@@ -6193,7 +6246,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
6193
6246
  _ctx.useBorderModify ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
6194
6247
  _hoisted_1$5,
6195
6248
  _hoisted_2$1,
6196
- _hoisted_3,
6249
+ _hoisted_3$1,
6197
6250
  _hoisted_4
6198
6251
  ], 64)) : createCommentVNode("", true)
6199
6252
  ], 4)) : createCommentVNode("", true),
@@ -6752,13 +6805,13 @@ const _sfc_main$1 = defineComponent({
6752
6805
  const x = computed(() => props2.scrollX);
6753
6806
  const y = computed(() => parseFloat(props2.height) - unref(splitY));
6754
6807
  const myColumns = ref([]);
6755
- const myDataSource = ref(props2.data);
6808
+ const myDataSource = ref([]);
6756
6809
  const tableColumns = ref([]);
6757
6810
  const tableDataSource = ref([]);
6758
6811
  const total = ref(0);
6759
6812
  const pageNum = ref(1);
6760
6813
  const pageSize = computed(() => props2.paginationPageSize);
6761
- const handleChildrenColumns = (_columns) => {
6814
+ const handleChildrenColumns = (_columns = []) => {
6762
6815
  if (Array.isArray(_columns) && _columns.length > 0) {
6763
6816
  const len = _columns.length;
6764
6817
  const columnsFixedNum = props2.columnsFixedNum;
@@ -6771,9 +6824,11 @@ const _sfc_main$1 = defineComponent({
6771
6824
  }
6772
6825
  const {
6773
6826
  cellAlign = "center",
6774
- cellColor
6827
+ cellColor,
6828
+ dataIndex,
6829
+ title
6775
6830
  } = column;
6776
- column.customCell = (_record, rowIndex) => ({
6831
+ column.customCell = (record, rowIndex) => ({
6777
6832
  style: {
6778
6833
  textAlign: cellAlign,
6779
6834
  color: cellColor,
@@ -6782,7 +6837,17 @@ const _sfc_main$1 = defineComponent({
6782
6837
  },
6783
6838
  class: {
6784
6839
  highlight: unref(useRowIndex) === rowIndex && props2.clickHighlight
6785
- }
6840
+ },
6841
+ onClick: emitEvent("click", () => {
6842
+ const id = props2.id;
6843
+ const modal = getGlobalModel(id);
6844
+ record = {
6845
+ dataIndex,
6846
+ title,
6847
+ ...record
6848
+ };
6849
+ setGlobalModel(id, { ...modal, RECORD: record });
6850
+ })
6786
6851
  });
6787
6852
  if (Array.isArray(column.children)) {
6788
6853
  handleChildrenColumns(column.children);
@@ -6791,25 +6856,22 @@ const _sfc_main$1 = defineComponent({
6791
6856
  }
6792
6857
  };
6793
6858
  const handleColumns = (columns = []) => {
6794
- let _columns = [];
6795
- const isUseSeq = props2.isUseSeq;
6796
- if (isUseSeq) {
6797
- _columns.push({
6859
+ if (props2.isUseSeq) {
6860
+ columns.unshift({
6798
6861
  title: "\u5E8F\u53F7",
6799
6862
  dataIndex: "SEQ",
6800
6863
  align: "center"
6801
6864
  });
6802
6865
  }
6803
- _columns = _columns.concat(cloneDeep(columns));
6804
6866
  if (props2.isUseAction) {
6805
- _columns.push({
6867
+ columns.push({
6806
6868
  title: "\u64CD\u4F5C",
6807
6869
  dataIndex: "ACTION",
6808
6870
  width: props2.actionColumnWidth
6809
6871
  });
6810
6872
  }
6811
- handleChildrenColumns(_columns);
6812
- myColumns.value = _columns;
6873
+ handleChildrenColumns(columns);
6874
+ return columns;
6813
6875
  };
6814
6876
  watch(() => [
6815
6877
  props2.columns,
@@ -6820,7 +6882,7 @@ const _sfc_main$1 = defineComponent({
6820
6882
  props2.cellBackgroundColor,
6821
6883
  props2.borderColor
6822
6884
  ], () => {
6823
- handleColumns(props2.columns);
6885
+ myColumns.value = handleColumns(cloneDeep(props2.columns));
6824
6886
  }, {
6825
6887
  immediate: true,
6826
6888
  deep: true
@@ -6829,6 +6891,21 @@ const _sfc_main$1 = defineComponent({
6829
6891
  if (dataType !== "static")
6830
6892
  return;
6831
6893
  myDataSource.value = data;
6894
+ }, {
6895
+ immediate: true
6896
+ });
6897
+ watch(() => [props2.isReverse, myColumns.value, myDataSource.value], () => {
6898
+ if (props2.isReverse) {
6899
+ const { columns, dataSource } = handleReverseTable(cloneDeep(unref(myColumns)), cloneDeep(unref(myDataSource)));
6900
+ tableColumns.value = columns;
6901
+ tableDataSource.value = dataSource;
6902
+ } else {
6903
+ tableColumns.value = unref(myColumns);
6904
+ tableDataSource.value = unref(myDataSource);
6905
+ }
6906
+ }, {
6907
+ immediate: true,
6908
+ flush: "post"
6832
6909
  });
6833
6910
  const handleReverseTable = (columns, dataSource) => {
6834
6911
  const firstColumns = columns[0];
@@ -6863,19 +6940,6 @@ const _sfc_main$1 = defineComponent({
6863
6940
  dataSource: _dataSource
6864
6941
  };
6865
6942
  };
6866
- watch(() => [props2.isReverse, myColumns.value, myDataSource.value], () => {
6867
- if (props2.isReverse) {
6868
- const { columns, dataSource } = handleReverseTable(unref(myColumns), unref(myDataSource));
6869
- tableColumns.value = columns;
6870
- tableDataSource.value = dataSource;
6871
- } else {
6872
- tableColumns.value = cloneDeep(unref(myColumns));
6873
- tableDataSource.value = cloneDeep(unref(myDataSource));
6874
- }
6875
- }, {
6876
- deep: true,
6877
- immediate: true
6878
- });
6879
6943
  const orderCondition = ref("");
6880
6944
  const requestData = useRequestData(props2);
6881
6945
  const loading = ref(false);
@@ -6976,7 +7040,8 @@ const _sfc_main$1 = defineComponent({
6976
7040
  });
6977
7041
  const handleIndicatorDataset = (dataColumns = [], dataRows = []) => {
6978
7042
  const _columns = dataColumns.map((column) => ({ title: column, dataIndex: column, key: column }));
6979
- handleColumns(_columns);
7043
+ const columns = handleColumns(_columns);
7044
+ myColumns.value = columns;
6980
7045
  myDataSource.value = dataRows;
6981
7046
  };
6982
7047
  const indicatorData = useIndicatorData(props2);
@@ -6994,7 +7059,7 @@ const _sfc_main$1 = defineComponent({
6994
7059
  };
6995
7060
  const useRowIndex = ref(-1);
6996
7061
  const customRow = (record, index2) => ({
6997
- onClick: emitEvent("click", () => {
7062
+ onClick: emitEvent("rowClick", () => {
6998
7063
  const id = props2.id;
6999
7064
  const modal = getGlobalModel(id);
7000
7065
  setGlobalModel(id, { ...modal, RECORD: record });
@@ -7018,16 +7083,17 @@ const _sfc_main$1 = defineComponent({
7018
7083
  });
7019
7084
  const summaryList = computed(() => {
7020
7085
  const columns = unref(tableColumns);
7021
- let summaryList2 = [];
7022
- if (props2.isUseSeq) {
7023
- columns.shift();
7024
- summaryList2 = [{ total: "\u5C0F\u8BA1" }];
7025
- }
7086
+ const summaryList2 = [];
7026
7087
  let calcTotalCount = 0;
7027
7088
  for (let i = 0; i < columns.length; i++) {
7028
7089
  const column = columns[i];
7029
7090
  const { isCalcTotal } = column;
7030
- if (isCalcTotal) {
7091
+ if (props2.isUseSeq && i === 0) {
7092
+ summaryList2.push({
7093
+ ...column,
7094
+ total: "\u5C0F\u8BA1"
7095
+ });
7096
+ } else if (isCalcTotal) {
7031
7097
  summaryList2.push({
7032
7098
  ...column,
7033
7099
  index: i,
@@ -7063,9 +7129,13 @@ const _sfc_main$1 = defineComponent({
7063
7129
  return summaryList2;
7064
7130
  });
7065
7131
  const { setRequest } = inject(REQUEST_MODEL, {
7066
- setRequest: (requestFn, sortNum) => void 0
7132
+ setRequest: ({ id, sortNum, requestFn }) => void 0
7133
+ });
7134
+ setRequest({
7135
+ id: props2.id,
7136
+ requestFn: refreshData,
7137
+ sortNum: props2.requestSort
7067
7138
  });
7068
- setRequest(refreshData, props2.requestSort);
7069
7139
  expose({
7070
7140
  refreshData
7071
7141
  });
@@ -7100,24 +7170,27 @@ const _sfc_main$1 = defineComponent({
7100
7170
  formatFn,
7101
7171
  contrastClass,
7102
7172
  tableChange,
7103
- tableDataSource,
7104
- tableColumns,
7173
+ myColumns,
7174
+ myDataSource,
7105
7175
  summaryList,
7106
7176
  loading,
7107
7177
  onTouchHrefEvent,
7108
7178
  handleHref,
7109
7179
  handleHrefTarget,
7110
- useRowIndex
7180
+ useRowIndex,
7181
+ tableColumns,
7182
+ tableDataSource
7111
7183
  };
7112
7184
  }
7113
7185
  });
7114
- const Table_vue_vue_type_style_index_0_scoped_33b428a2_lang = "";
7186
+ const Table_vue_vue_type_style_index_0_scoped_292c12ab_lang = "";
7115
7187
  const Table_vue_vue_type_style_index_1_lang = "";
7116
- const _hoisted_1$1 = {
7188
+ const _hoisted_1$1 = { key: 0 };
7189
+ const _hoisted_2 = {
7117
7190
  key: 1,
7118
7191
  class: "action-list"
7119
7192
  };
7120
- const _hoisted_2 = ["href", "target", "onClick"];
7193
+ const _hoisted_3 = ["href", "target", "onClick"];
7121
7194
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
7122
7195
  const _component_a_table_summary_cell = resolveComponent("a-table-summary-cell");
7123
7196
  const _component_a_table_summary_row = resolveComponent("a-table-summary-row");
@@ -7158,13 +7231,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
7158
7231
  }, toDisplayString(column.title), 5)
7159
7232
  ]),
7160
7233
  bodyCell: withCtx(({ column, index: index2, text, record }) => [
7161
- column.dataIndex === "SEQ" ? (openBlock(), createElementBlock("span", {
7162
- key: 0,
7163
- style: normalizeStyle({
7164
- fontSize: _ctx.fontSize,
7165
- fontWeight: _ctx.fontWeight
7166
- })
7167
- }, toDisplayString(index2 + 1), 5)) : column.dataIndex === "ACTION" ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
7234
+ column.dataIndex === "SEQ" ? (openBlock(), createElementBlock("span", _hoisted_1$1, toDisplayString(index2 + 1), 1)) : createCommentVNode("", true),
7235
+ column.dataIndex === "ACTION" ? (openBlock(), createElementBlock("div", _hoisted_2, [
7168
7236
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.actionList, (action, index22) => {
7169
7237
  return openBlock(), createElementBlock("div", {
7170
7238
  class: "action",
@@ -7179,7 +7247,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
7179
7247
  fontWeight: _ctx.fontWeight
7180
7248
  }),
7181
7249
  onClick: ($event) => _ctx.onTouchHrefEvent(action.target, _ctx.handleHref(action.href, record))
7182
- }, toDisplayString(action.title), 13, _hoisted_2)
7250
+ }, toDisplayString(action.title), 13, _hoisted_3)
7183
7251
  ]);
7184
7252
  }), 128))
7185
7253
  ])) : (openBlock(), createElementBlock("div", {
@@ -7189,7 +7257,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
7189
7257
  fontSize: _ctx.fontSize,
7190
7258
  fontWeight: _ctx.fontWeight
7191
7259
  })
7192
- }, toDisplayString((column.format != null || column.format !== "") && _ctx.formatFn(text, column.format)), 7))
7260
+ }, toDisplayString(column.format != null ? _ctx.formatFn(text, column.format) : text), 7))
7193
7261
  ]),
7194
7262
  summary: withCtx(() => [
7195
7263
  _ctx.summaryList.length > 0 ? (openBlock(), createBlock(_component_a_table_summary, { key: 0 }, {
@@ -7233,7 +7301,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
7233
7301
  }, 8, ["loading"])
7234
7302
  ], 4);
7235
7303
  }
7236
- const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-33b428a2"]]);
7304
+ const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-292c12ab"]]);
7237
7305
  const EcanTable = withInstall(Table);
7238
7306
  const mapProps = {
7239
7307
  ...props,