@indfnd/common 0.1.102 → 1.0.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,39 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [1.0.0](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.107...v1.0.0) (2024-06-15)
6
+
7
+ ### [0.1.107](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.106...v0.1.107) (2024-06-15)
8
+
9
+
10
+ ### Features
11
+
12
+ * 树高度;树间距;表格性能优化 ([e7d2650](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/e7d2650c0f5e183fbf5ddb71e270b51cf9e39893))
13
+
14
+ ### [0.1.106](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.105...v0.1.106) (2024-06-14)
15
+
16
+ ### [0.1.105](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.104...v0.1.105) (2024-06-14)
17
+
18
+ ### [0.1.104](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.103...v0.1.104) (2024-06-14)
19
+
20
+ ### [0.1.103](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.102...v0.1.103) (2024-06-14)
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * 标题 ([4ed05c8](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/4ed05c89b52a5e401aed64bd8c6cc23d75c8be27))
26
+ * 标题 ([0d2eb72](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/0d2eb722e6087aa701003dc5c454b02683e7a54d))
27
+ * 导出excel报错修复 ([b08565e](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/b08565e78a98cb7479cec915e3cc5f82c31f593d))
28
+
29
+ ## [0.2.0](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.102...v0.2.0) (2024-06-14)
30
+
31
+
32
+ ### Bug Fixes
33
+
34
+ * 标题 ([4ed05c8](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/4ed05c89b52a5e401aed64bd8c6cc23d75c8be27))
35
+ * 标题 ([0d2eb72](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/0d2eb722e6087aa701003dc5c454b02683e7a54d))
36
+ * 导出excel报错修复 ([b08565e](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/b08565e78a98cb7479cec915e3cc5f82c31f593d))
37
+
5
38
  ### [0.1.102](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.101...v0.1.102) (2024-06-14)
6
39
 
7
40
  ### [0.1.101](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.100...v0.1.101) (2024-06-14)
@@ -2,7 +2,7 @@ import { Button as Button$1, ButtonGroup as ButtonGroup$1, Input, Drawer as Draw
2
2
  import { isNil, formatDate as formatDate$1, useConfig, getQuarterNum, formatQuarter, str2Date, isDate, isArray, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios, isFunction, isString, uuid, exportJsonToExcel as exportJsonToExcel$1, importJsonFromExcel, on, off, deleteMenuHistoryApi, deleteMenuCollectApi, getMenuHistoryApi, getMenuCollectApi, getPermissionCache, listItemTreeApi, getPriceInfo, MIME_TYPE, base64ToBlob, putOssFileApi, isEqual, getCaptchaURL, getLocalStorage, guid, setLocalStorage, removeLocalStorage, clearSessionStorage, cryptor, getToken, putOssFileUrl, getOssFileUrl, responseInterceptors, config as config$1, setToken, loginApi, clearUserInfoCache, clearPermissionCache, logoutApi, getUserInfoCache, getUserInfoApi, setUserInfoCache, getSessionStorage, setSessionStorage, getAppListApi, getPermissionApi, setPermissionCache, menuHistoryApi, addMenuCollectApi, removeMenuCollectApi, getIndexDescCache, listIndexDescApi, setIndexDescCache } from "@indfnd/utils";
3
3
  import Vue$1 from "vue";
4
4
  const name$1 = "@indfnd/common";
5
- const version = "0.1.101";
5
+ const version = "0.1.107";
6
6
  const author = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -46,7 +46,7 @@ const scripts = {
46
46
  build: "yarn build:prod && yarn build:style",
47
47
  "type-check": "vue-tsc --noEmit -p tsconfig.check.json --composite false",
48
48
  dts: "vue-tsc -p tsconfig.types.json",
49
- release: "node build/auto-build.js && yarn release-patch && git push --follow-tags && yarn re-publish",
49
+ release: "node build/auto-build.js && yarn release-major && git push --follow-tags && yarn re-publish",
50
50
  "release-major": "standard-version --release-as major",
51
51
  "release-minor": "standard-version --release-as minor",
52
52
  "release-patch": "standard-version --release-as patch",
@@ -52504,9 +52504,10 @@ const __vue2_script$Z = {
52504
52504
  return (mergeIndex == null ? void 0 : mergeIndex.key) || (mergeIndex == null ? void 0 : mergeIndex.field);
52505
52505
  },
52506
52506
  mergeColumns() {
52507
- return _.filter(this.columns, (d) => {
52507
+ let rlt = _.filter(this.columns, (d) => {
52508
52508
  return !!d.autoMergeRow;
52509
52509
  }).map((d) => d.key || d.field);
52510
+ return (rlt == null ? void 0 : rlt.length) ? rlt : void 0;
52510
52511
  },
52511
52512
  paramRightUnit() {
52512
52513
  return _.some(this.flatColumns, (d) => {
@@ -52573,6 +52574,7 @@ const __vue2_script$Z = {
52573
52574
  },
52574
52575
  tableRowSpanMergeIndexMap() {
52575
52576
  const map = {};
52577
+ console.time("calcMerge");
52576
52578
  this.tableSpanMergeColumns.forEach((column) => {
52577
52579
  let mergeInfo = /autoMergeRow-([^\s]*)/.exec(column.cellClass);
52578
52580
  let autoMergeRow = mergeInfo[1] != "undefined" && mergeInfo[1] != "null";
@@ -52597,6 +52599,7 @@ const __vue2_script$Z = {
52597
52599
  map[column.field] = columnRowSpan;
52598
52600
  }
52599
52601
  });
52602
+ console.timeEnd("calcMerge");
52600
52603
  return map;
52601
52604
  },
52602
52605
  rowDataFiltered() {
@@ -53345,19 +53348,8 @@ const __vue2_script$Z = {
53345
53348
  agColumn.cellClass = agColumn.cellClass + (column.align == "right" ? " ag-right-aligned-cell" : column.align == "center" ? " ag-center-aligned-cell" : "");
53346
53349
  }
53347
53350
  }
53348
- if (column.autoMergeRow) {
53349
- agColumn.rowSpan = (params) => {
53350
- if (params.node.rowPinned) {
53351
- return 0;
53352
- }
53353
- return this.tableRowSpanMergeIndexMap[params.colDef.field] ? this.tableRowSpanMergeIndexMap[params.colDef.field][params.node.rowIndex + ""] || 0 : 0;
53354
- };
53355
- agColumn.cellClassRules = {
53356
- "cell-span": (params) => {
53357
- return this.tableRowSpanMergeIndexMap[params.colDef.field] && this.tableRowSpanMergeIndexMap[params.colDef.field][params.node.rowIndex + ""];
53358
- }
53359
- };
53360
- }
53351
+ if (column.autoMergeRow)
53352
+ ;
53361
53353
  agColumn.cellClass = agColumn.cellClass + " " + column.type + " autoMergeRow-" + column.autoMergeRow;
53362
53354
  if (column.cellClassRules) {
53363
53355
  if (agColumn.cellClassRules) {
@@ -53519,10 +53511,17 @@ const __vue2_script$Z = {
53519
53511
  this.hackReset = true;
53520
53512
  });
53521
53513
  },
53522
- renderSumRow() {
53514
+ renderSumRow: _.debounce(async function() {
53523
53515
  var _a;
53524
53516
  let hasSumRow = _.some(this.flatColumns, (item2) => item2.isSum);
53525
53517
  if (hasSumRow) {
53518
+ console.time("calcSum");
53519
+ this.tableLoading = true;
53520
+ await new Promise((resolve) => {
53521
+ setTimeout(() => {
53522
+ resolve();
53523
+ }, 1);
53524
+ });
53526
53525
  let sumCols = _.filter(this.flatColumns, (item2) => item2.isSum);
53527
53526
  let sumCalcCols = _.remove(sumCols, (item2) => isString(item2.isSum));
53528
53527
  let sumFuncCols = _.remove(sumCols, (item2) => item2.isSum instanceof Function);
@@ -53587,10 +53586,17 @@ const __vue2_script$Z = {
53587
53586
  let options = { calcRules: rules };
53588
53587
  calcDatas(sumRows, options);
53589
53588
  this.topRows = this.pinnedTopRowDataWithUnit ? _.concat(this.pinnedTopRowDataWithUnit, sumRows) : sumRows;
53589
+ console.timeEnd("calcSum");
53590
+ await new Promise((resolve) => {
53591
+ setTimeout(() => {
53592
+ resolve();
53593
+ }, 1);
53594
+ });
53595
+ this.tableLoading = false;
53590
53596
  } else {
53591
53597
  this.topRows = this.pinnedTopRowDataWithUnit;
53592
53598
  }
53593
- },
53599
+ }, 5),
53594
53600
  async renderTreeData(val) {
53595
53601
  this.treeData = _.some(val, (d) => {
53596
53602
  var _a, _b;
@@ -53679,7 +53685,7 @@ const __vue2_script$Z = {
53679
53685
  setUnitType(unitType) {
53680
53686
  this.unitType = unitType;
53681
53687
  },
53682
- toggleUnitIfNeeded: _.debounce(async function toggleUnitIfNeeded() {
53688
+ toggleUnitIfNeeded: _.debounce(async function() {
53683
53689
  setTimeout(() => {
53684
53690
  if (this.pinnedTopRowDataWithUnit && this.pinnedTopRowDataWithUnit.length) {
53685
53691
  let pinnedTopRowDataWithUnitTmp = _.cloneDeep(this.pinnedTopRowDataWithUnit);
@@ -53689,9 +53695,9 @@ const __vue2_script$Z = {
53689
53695
  changeCellUnit(this.defaultUnitType, this.unitType, d, dd);
53690
53696
  });
53691
53697
  });
53698
+ this.pinnedTopRowDataWithUnit = pinnedTopRowDataWithUnitTmp;
53699
+ this.renderSumRow();
53692
53700
  }
53693
- this.pinnedTopRowDataWithUnit = pinnedTopRowDataWithUnitTmp;
53694
- this.renderSumRow();
53695
53701
  }
53696
53702
  let datasTmp = _.cloneDeep(this.tableData);
53697
53703
  if (this.unitType != this.defaultUnitType) {
@@ -53700,8 +53706,8 @@ const __vue2_script$Z = {
53700
53706
  changeCellUnit(this.defaultUnitType, this.unitType, d, dd);
53701
53707
  });
53702
53708
  });
53709
+ this.$emit("input", datasTmp);
53703
53710
  }
53704
- this.$emit("input", datasTmp);
53705
53711
  }, 10);
53706
53712
  }, 1),
53707
53713
  getSelection() {
@@ -57521,11 +57527,7 @@ const __vue2_script$B = {
57521
57527
  },
57522
57528
  computed: {
57523
57529
  title() {
57524
- if (top == self) {
57525
- return this.$route.meta.title;
57526
- } else {
57527
- return top.document.getElementsByClassName("pro-layout-tabs-wrapper")[0].getElementsByClassName("ivu-tag-primary")[0].textContent.replace(/\s/g, "");
57528
- }
57530
+ return this.$route.meta.title;
57529
57531
  }
57530
57532
  },
57531
57533
  methods: {
@@ -57860,7 +57862,9 @@ var render$u = function() {
57860
57862
  var _vm = this;
57861
57863
  var _h = _vm.$createElement;
57862
57864
  var _c = _vm._self._c || _h;
57863
- return _c("div", { staticClass: "tree-select-poptip" }, [_vm.loading ? _c("Spin", { attrs: { "fix": "" } }) : _vm._e(), _c("Input", { staticClass: "selected-input", class: { readonly: _vm.readonly }, attrs: { "value": _vm.selectedTitles, "title": _vm.selectedTitles, "icon": _vm.readonly ? "" : _vm.inputIcon, "clearable": !_vm.readonly, "disabled": _vm.readonly, "placeholder": "\u8BF7\u9009\u62E9", "readonly": "" }, on: { "on-clear": _vm.clearSelected, "on-focus": function($event) {
57865
+ return _c("div", { staticClass: "tree-select-poptip" }, [_vm.loading ? _c("Spin", { attrs: { "fix": "" } }) : _vm._e(), _c("Input", { staticClass: "selected-input", class: { readonly: _vm.readonly }, attrs: { "value": _vm.selectedTitles, "title": _vm.selectedTitles, "icon": _vm.readonly ? "" : "md-arrow-dropdown", "clearable": !_vm.readonly, "disabled": _vm.readonly, "placeholder": "\u8BF7\u9009\u62E9", "readonly": "" }, on: { "on-clear": _vm.clearSelected, "on-focus": function($event) {
57866
+ _vm.visible = true;
57867
+ }, "on-click": function($event) {
57864
57868
  _vm.visible = true;
57865
57869
  } } }), _c("Modal", { staticClass: "ind-modal", attrs: { "value": _vm.visible, "title": _vm.selectTitle, "footerHide": _vm.footerHide }, on: { "on-visible-change": _vm.visibleChange, "on-ok": function($event) {
57866
57870
  _vm.visible = false;
@@ -57868,7 +57872,7 @@ var render$u = function() {
57868
57872
  _vm.visible = false;
57869
57873
  } } }, [_c("div", { ref: "treeWrapper", staticClass: "tree-select-wrapper" }, [_c("Input", { staticClass: "tree-select-input", attrs: { "placeholder": "\u591A\u4E2A\u7528\u7A7A\u683C\u5206\u9694,\u56DE\u8F66\u952E\u641C\u7D22", "clearable": "", "search": "" }, on: { "on-clear": _vm.clearHighlightNodes, "on-change": _vm.onSearchChange, "on-search": _vm.search }, model: { value: _vm.searchValue, callback: function($$v) {
57870
57874
  _vm.searchValue = typeof $$v === "string" ? $$v.trim() : $$v;
57871
- }, expression: "searchValue" } }), _vm.searchNum > 0 ? _c("div", { staticClass: "global-desc-text" }, [_vm._v(_vm._s(_vm.searchNum) + "\u4E2A\u7ED3\u679C")]) : _vm._e(), _c("Tree", _vm._b({ ref: "tree", attrs: { "height": "400px", "defaultValue": _vm.value || _vm.defaultValue, "expandAll": _vm.expandAll, "defaultExpandLevel": _vm.defaultExpandLevel, "expandNode": _vm.expandNode, "singleSel": _vm.singleSel, "isShowHeader": false, "show-checkbox": _vm.showCheckbox, "is-show-search": false, "check-directly": "" }, on: { "on-select-change": _vm.onSelectChange, "on-check-change": _vm.onCheckChange, "on-load": _vm.initSelectedTitles, "on-default-change": _vm.onCheckChange } }, "Tree", _vm.$attrs, false))], 1)])], 1);
57875
+ }, expression: "searchValue" } }), _vm.searchNum > 0 ? _c("div", { staticClass: "global-desc-text" }, [_vm._v(_vm._s(_vm.searchNum) + "\u4E2A\u7ED3\u679C")]) : _vm._e(), _c("Tree", _vm._b({ ref: "tree", attrs: { "height": "calc( 100vh - 190px )", "defaultValue": _vm.value || _vm.defaultValue, "expandAll": _vm.expandAll, "defaultExpandLevel": _vm.defaultExpandLevel, "expandNode": _vm.expandNode, "singleSel": _vm.singleSel, "isShowHeader": false, "show-checkbox": _vm.showCheckbox, "is-show-search": false, "check-directly": "" }, on: { "on-select-change": _vm.onSelectChange, "on-check-change": _vm.onCheckChange, "on-load": _vm.initSelectedTitles, "on-default-change": _vm.onCheckChange } }, "Tree", _vm.$attrs, false))], 1)])], 1);
57872
57876
  };
57873
57877
  var staticRenderFns$u = [];
57874
57878
  var treeSelect_vue_vue_type_style_index_0_scoped_true_lang = "";
@@ -58002,7 +58006,7 @@ var __component__$v = /* @__PURE__ */ normalizeComponent(
58002
58006
  staticRenderFns$u,
58003
58007
  false,
58004
58008
  __vue2_injectStyles$v,
58005
- "2ba3c6d8",
58009
+ "146ba17c",
58006
58010
  null,
58007
58011
  null
58008
58012
  );