@ecan-bi/datav 1.1.6 → 1.1.8

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.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @ecan-bi/datav@1.1.6 */
1
+ /*! @ecan-bi/datav@1.1.8 */
2
2
  (function(global, factory) {
3
3
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue"), require("echarts/core"), require("resize-detector"), require("ant-design-vue"), require("ant-design-vue/es/spin/style"), require("ant-design-vue/es/skeleton/style"), require("lodash-es"), require("axios"), require("mitt"), require("dayjs"), require("ant-design-vue/es/progress/style"), require("ant-design-vue/es/input/style"), require("ant-design-vue/es/date-picker/style"), require("ant-design-vue/es/date-picker/locale/zh_CN"), require("ant-design-vue/es/select/style"), require("ant-design-vue/es/button/style"), require("ant-design-vue/es/checkbox/style"), require("echarts/renderers"), require("echarts/charts"), require("echarts/components"), require("echarts"), require("ant-design-vue/es/modal/style"), require("ant-design-vue/es/table/style")) : typeof define === "function" && define.amd ? define(["exports", "vue", "echarts/core", "resize-detector", "ant-design-vue", "ant-design-vue/es/spin/style", "ant-design-vue/es/skeleton/style", "lodash-es", "axios", "mitt", "dayjs", "ant-design-vue/es/progress/style", "ant-design-vue/es/input/style", "ant-design-vue/es/date-picker/style", "ant-design-vue/es/date-picker/locale/zh_CN", "ant-design-vue/es/select/style", "ant-design-vue/es/button/style", "ant-design-vue/es/checkbox/style", "echarts/renderers", "echarts/charts", "echarts/components", "echarts", "ant-design-vue/es/modal/style", "ant-design-vue/es/table/style"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["@ecan/bi-datav"] = {}, global.vue, global["echarts/core"], global["resize-detector"], global["ant-design-vue"], null, null, global["lodash-es"], global.axios, global.mitt, global.dayjs, null, null, null, global["ant-design-vue/es/date-picker/locale/zh_CN"], null, null, null, global["echarts/renderers"], global["echarts/charts"], global["echarts/components"], global.echarts));
4
4
  })(this, function(exports2, vue, core, resizeDetector, antDesignVue, style$1, style$2, lodashEs, axios, mitt, dayjs, style$3, style$4, style$5, locale, style$6, style$7, style$8, renderers, charts, components$1, echarts) {
@@ -1498,7 +1498,7 @@
1498
1498
  isOpenRequestTimer: false,
1499
1499
  requestInterval: 1,
1500
1500
  requestSort: 0,
1501
- requestParams: [{ key: "", value: { id: "", prop: "" } }],
1501
+ requestParams: [{ key: null, value: {} }],
1502
1502
  events: [],
1503
1503
  dataType: "static"
1504
1504
  };
@@ -1724,21 +1724,34 @@
1724
1724
  return;
1725
1725
  let _params = {};
1726
1726
  requestParams.forEach((param) => {
1727
- var _a2;
1728
1727
  const { key, value } = param;
1729
1728
  if (typeof value === "object" && value.id) {
1730
1729
  let record = {};
1731
- const { id, prop, propKey } = value;
1730
+ const { id, prop, propKey, operate } = value;
1732
1731
  if (id === "THIS") {
1733
1732
  record = getGlobalModel(vue.unref(touchEventId)) || {};
1734
1733
  } else {
1735
1734
  record = getGlobalModel(id) || {};
1736
1735
  }
1737
1736
  const p = vue.unref(record[prop]);
1738
- let v = "";
1737
+ let v = null;
1739
1738
  const isNeedFormat = ["date", "range"].some((item) => lowerCaseIncludes(record == null ? void 0 : record.type, item));
1740
1739
  if (isNeedFormat) {
1741
- v = ((_a2 = vue.unref(p)) == null ? void 0 : _a2.format((propKey == null ? void 0 : propKey.trim()) || record.format)) || "";
1740
+ const { value: value2, type, mode } = operate || {};
1741
+ if (value2 && type && mode) {
1742
+ switch (type) {
1743
+ case "add":
1744
+ v = vue.unref(p).add(value2, mode);
1745
+ break;
1746
+ case "minus":
1747
+ v = vue.unref(p).subtract(value2, mode);
1748
+ break;
1749
+ }
1750
+ }
1751
+ if (v == null) {
1752
+ v = vue.unref(p);
1753
+ }
1754
+ v = (v == null ? void 0 : v.format((propKey == null ? void 0 : propKey.trim()) || record.format)) || "";
1742
1755
  } else {
1743
1756
  if (Object.prototype.toString.call(p) === "[object Object]") {
1744
1757
  v = p[propKey || "value"];
@@ -5867,13 +5880,16 @@
5867
5880
  if (tooltipFormatter === "") {
5868
5881
  tooltipFormatter = "{marker} {a} {c}";
5869
5882
  }
5883
+ const seriesTypes = props2.seriesTypes;
5870
5884
  for (let i = 0; i < len; i++) {
5885
+ const seriesType = seriesTypes[i];
5886
+ const { tooltipFormatter: _tooltipFormatter } = seriesType || {};
5871
5887
  const { marker, seriesName, name, value, data } = params[i] || {};
5872
5888
  if (i === 0) {
5873
5889
  formatter += `${name}<br/>`;
5874
5890
  }
5875
5891
  formatter += useVariablesInText(
5876
- tooltipFormatter,
5892
+ _tooltipFormatter || tooltipFormatter,
5877
5893
  {
5878
5894
  marker,
5879
5895
  name,
@@ -6844,7 +6860,9 @@
6844
6860
  cellColor,
6845
6861
  dataIndex,
6846
6862
  title,
6847
- tableFilter
6863
+ tableFilter,
6864
+ headerCellAlign,
6865
+ headerCellColor
6848
6866
  } = column;
6849
6867
  if (tableFilter) {
6850
6868
  filterDataIndexList.push(dataIndex);
@@ -6853,6 +6871,17 @@
6853
6871
  column.customFilterDropdown = true;
6854
6872
  column.onFilter = (value, record) => record[dataIndex].toString().toLowerCase().includes(value.toLowerCase());
6855
6873
  }
6874
+ column.customHeaderCell = () => ({
6875
+ style: {
6876
+ display: "table-cell",
6877
+ verticalAlign: "middle",
6878
+ fontSize: props2.headerFontSize,
6879
+ fontWeight: props2.headerFontWeight,
6880
+ textAlign: headerCellAlign || "center",
6881
+ color: headerCellColor,
6882
+ borderBottomColor: props2.borderColor
6883
+ }
6884
+ });
6856
6885
  column.customCell = (record, rowIndex) => ({
6857
6886
  style: {
6858
6887
  textAlign: cellAlign,
@@ -7236,7 +7265,7 @@
7236
7265
  const _inputValue = vue.unref(column.filterOptionsInputValue).trim();
7237
7266
  if (Array.isArray(filterOptions)) {
7238
7267
  filterOptions = filterOptions.filter((filterOption) => {
7239
- if (filterOption.label) {
7268
+ if (typeof filterOption.label === "string") {
7240
7269
  return filterOption.label.toLowerCase().includes(_inputValue.toLowerCase());
7241
7270
  }
7242
7271
  return true;
@@ -7271,7 +7300,7 @@
7271
7300
  };
7272
7301
  }
7273
7302
  });
7274
- const Table_vue_vue_type_style_index_0_scoped_915e7876_lang = "";
7303
+ const Table_vue_vue_type_style_index_0_scoped_2403ec91_lang = "";
7275
7304
  const Table_vue_vue_type_style_index_1_lang = "";
7276
7305
  const _hoisted_1$1 = /* @__PURE__ */ vue.createTextVNode(" \u641C\u7D22 ");
7277
7306
  const _hoisted_2 = /* @__PURE__ */ vue.createTextVNode(" \u91CD\u7F6E ");
@@ -7310,19 +7339,6 @@
7310
7339
  pagination: _ctx.pagination,
7311
7340
  onChange: _ctx.tableChange
7312
7341
  }, {
7313
- headerCell: vue.withCtx(({ column }) => [
7314
- vue.createElementVNode("div", {
7315
- style: vue.normalizeStyle({
7316
- fontSize: _ctx.headerFontSize,
7317
- fontWeight: _ctx.headerFontWeight,
7318
- width: "100%",
7319
- height: "100%",
7320
- textAlign: column.headerCellAlign || "center",
7321
- color: column.headerCellColor,
7322
- borderBottomColor: _ctx.borderColor
7323
- })
7324
- }, vue.toDisplayString(column.title), 5)
7325
- ]),
7326
7342
  customFilterDropdown: vue.withCtx(({ column, selectedKeys, setSelectedKeys, confirm, clearFilters }) => [
7327
7343
  vue.createElementVNode("div", {
7328
7344
  class: "ecan-table-filter",
@@ -7359,7 +7375,7 @@
7359
7375
  vue.createVNode(_component_a_button, {
7360
7376
  size: "small",
7361
7377
  style: { "width": "90px" },
7362
- onClick: ($event) => _ctx.onResetFilter(clearFilters)
7378
+ onClick: ($event) => _ctx.onResetFilter(clearFilters, column)
7363
7379
  }, {
7364
7380
  default: vue.withCtx(() => [
7365
7381
  _hoisted_2
@@ -7440,7 +7456,7 @@
7440
7456
  }, 8, ["loading"])
7441
7457
  ], 4);
7442
7458
  }
7443
- const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-915e7876"]]);
7459
+ const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-2403ec91"]]);
7444
7460
  const EcanTable = withInstall(Table);
7445
7461
  const mapProps = {
7446
7462
  ...props,