@ecan-bi/datav 1.0.75 → 1.0.77

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,4 +1,4 @@
1
- /*! @ecan-bi/datav@1.0.75 */
1
+ /*! @ecan-bi/datav@1.0.77 */
2
2
  var _a, _b, _c;
3
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";
4
4
  import { throttle, init, use, registerMap } from "echarts/core";
@@ -2795,7 +2795,7 @@ const _sfc_main$l = defineComponent({
2795
2795
  if (usedVariable >= 0) {
2796
2796
  text = text.replace(variable, `<span style="color:#ED6643;font-size:${props2.variableFontSize}"><img style="width: ${props2.variableFontSize}" src="${goUp}"/>${usedVariable}%</span>`);
2797
2797
  } else {
2798
- text = text.replace(variable, `<span style="color: #6ACB97;font-size:${props2.variableFontSize}"><img style="width: ${props2.variableFontSize}" src="${goDown}"/>${usedVariable}%</span>`);
2798
+ text = text.replace(variable, `<span style="color: #6ACB97;font-size:${props2.variableFontSize}"><img style="width: ${props2.variableFontSize}" src="${goDown}"/>${Math.abs(usedVariable)}%</span>`);
2799
2799
  }
2800
2800
  } else {
2801
2801
  text = text.replace(variable, `<span style="color:${props2.variableColor};font-size:${props2.variableFontSize}">${0}%</span>`);
@@ -2877,7 +2877,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
2877
2877
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.click && _ctx.click(...args))
2878
2878
  }, null, 12, _hoisted_1$7));
2879
2879
  }
2880
- const Text = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-2c15326b"]]);
2880
+ const Text = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-04fdee06"]]);
2881
2881
  const EcanText = withInstall(Text);
2882
2882
  const ScrollText_vue_vue_type_style_index_0_scoped_true_lang = "";
2883
2883
  const _sfc_main$k = defineComponent({
@@ -3195,7 +3195,7 @@ const proportionProps = {
3195
3195
  data: {
3196
3196
  percent: 0.3
3197
3197
  },
3198
- text: "",
3198
+ text: "{percent}%",
3199
3199
  fontSize: "26px",
3200
3200
  color: "#4091f7",
3201
3201
  strokeWidth: 6,
@@ -6362,15 +6362,18 @@ const _sfc_main$1 = defineComponent({
6362
6362
  return;
6363
6363
  dataSource.value = data;
6364
6364
  });
6365
+ const orderCondition = ref(void 0);
6365
6366
  const requestData = useRequestData(props2);
6366
6367
  const loading = ref(false);
6367
- const handleRequestData = async () => {
6368
+ const handleRequestData = async (isUseLoading = true) => {
6368
6369
  var _a2;
6369
6370
  try {
6370
- loading.value = true;
6371
+ if (isUseLoading)
6372
+ loading.value = true;
6371
6373
  const res = await requestData({
6372
6374
  pageNum: unref(pageNum),
6373
- pageSize: unref(pageSize)
6375
+ pageSize: unref(pageSize),
6376
+ orderCondition: unref(orderCondition)
6374
6377
  });
6375
6378
  const { rows = [], total: tableTotal = 0 } = ((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.data) || {};
6376
6379
  total.value = tableTotal;
@@ -6381,8 +6384,21 @@ const _sfc_main$1 = defineComponent({
6381
6384
  loading.value = false;
6382
6385
  }
6383
6386
  };
6384
- const tableChange = ({ current }, _filters, _sorter) => {
6387
+ const tableChange = ({ current }, _filters, sorter) => {
6385
6388
  pageNum.value = current;
6389
+ if (sorter && Object.keys(sorter).length > 0) {
6390
+ const { field, order } = sorter;
6391
+ const map = {
6392
+ ascend: "asc",
6393
+ descend: "desc"
6394
+ };
6395
+ const fieldOrder = map[order];
6396
+ if (field != null && fieldOrder != null) {
6397
+ orderCondition.value = field + " " + fieldOrder;
6398
+ pageNum.value = 1;
6399
+ }
6400
+ }
6401
+ refreshData(false);
6386
6402
  };
6387
6403
  const pagination = computed(() => {
6388
6404
  const simple = props2.simple;
@@ -6461,12 +6477,12 @@ const _sfc_main$1 = defineComponent({
6461
6477
  setGlobalModel(id, { ...modal, RECORD: record });
6462
6478
  })
6463
6479
  });
6464
- const refreshData = () => {
6480
+ const refreshData = (isUseLoading = true) => {
6465
6481
  if (unref(pageMode) === "design")
6466
6482
  return;
6467
6483
  switch (props2.dataType) {
6468
6484
  case "request":
6469
- handleRequestData();
6485
+ handleRequestData(isUseLoading);
6470
6486
  break;
6471
6487
  case "indicator":
6472
6488
  handleIndicatorData();
@@ -6666,7 +6682,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
6666
6682
  }, 8, ["loading"])
6667
6683
  ], 4);
6668
6684
  }
6669
- const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-56012732"]]);
6685
+ const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-34b40a0f"]]);
6670
6686
  const EcanTable = withInstall(Table);
6671
6687
  const mapProps = {
6672
6688
  ...props,