@indfnd/common 0.1.32 → 0.1.34

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,26 @@
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
+ ### [0.1.34](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.33...v0.1.34) (2024-04-10)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * 功能说明点确认关闭 ([a358e28](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/a358e2833b0d0efd77bcddc4f8b78121df74ff40))
11
+ * pinnedTopRowData参与单位切换 ([eaa0556](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/eaa0556653b31df16be4f1272153c688803068c3))
12
+
13
+ ### [0.1.33](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.32...v0.1.33) (2024-04-09)
14
+
15
+
16
+ ### Features
17
+
18
+ * 计算合计传递列定义参数 ([3246f66](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/3246f66d2a94c7a036ada7375f98400e49e02564))
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * **panel:** 返回顶部按钮右移 ([6df9080](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/6df9080f78f00353f20748167e488406559e98f5))
24
+
5
25
  ### [0.1.32](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.31...v0.1.32) (2024-04-09)
6
26
 
7
27
 
@@ -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, getLocalStorage, getQuarterNum, formatQuarter, str2Date, isDate, isArray, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios, isFunction, isString, exportJsonToExcel as exportJsonToExcel$1, importJsonFromExcel, on, off, deleteMenuHistoryApi, deleteMenuCollectApi, getMenuHistoryApi, getMenuCollectApi, listItemTreeApi, getPriceInfo, MIME_TYPE, base64ToBlob, putOssFileApi, isEqual, getCaptchaURL, guid, setLocalStorage, removeLocalStorage, clearSessionStorage, cryptor, getToken, putOssFileUrl, getOssFileUrl, responseInterceptors, config as config$1, setToken, loginApi, clearUserInfoCache, clearPermissionCache, logoutApi, getUserInfoCache, getUserInfoApi, setUserInfoCache, getSessionStorage, setSessionStorage, getAppListApi, getPermissionCache, 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.31";
5
+ const version = "0.1.33";
6
6
  const author = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -52089,6 +52089,7 @@ const __vue2_script$W = {
52089
52089
  showUnitSwitch: false,
52090
52090
  switchCols: [],
52091
52091
  unitType: this.defaultTableUnitType || this.defaultUnitType || "X",
52092
+ pinnedTopRowDataWithUnit: this.pinnedTopRowData || null,
52092
52093
  topRows: this.pinnedTopRowData || null,
52093
52094
  treeData: false,
52094
52095
  getDataPath: (data) => {
@@ -52195,6 +52196,7 @@ const __vue2_script$W = {
52195
52196
  watch: {
52196
52197
  pinnedTopRowData: {
52197
52198
  handler: function() {
52199
+ this.pinnedTopRowDataWithUnit = _.cloneDeep(this.pinnedTopRowData);
52198
52200
  this.renderSumRow();
52199
52201
  },
52200
52202
  deep: true
@@ -52216,11 +52218,25 @@ const __vue2_script$W = {
52216
52218
  });
52217
52219
  });
52218
52220
  }
52219
- if (this.dataApi) {
52220
- this.tableData = datasTmp;
52221
- } else {
52222
- this.$emit("input", datasTmp);
52221
+ this.tableData = datasTmp;
52222
+ let pinnedTopRowDataWithUnitTmp = _.cloneDeep(this.pinnedTopRowDataWithUnit);
52223
+ if (val == "X") {
52224
+ pinnedTopRowDataWithUnitTmp.forEach((d) => {
52225
+ this.switchCols.forEach((dd) => {
52226
+ let t2 = _.round(parseFloat(d[dd]), 6);
52227
+ d[dd] = isNaN(t2) ? null : t2 / 5;
52228
+ });
52229
+ });
52230
+ } else if (val == "WZ") {
52231
+ pinnedTopRowDataWithUnitTmp.forEach((d) => {
52232
+ this.switchCols.forEach((dd) => {
52233
+ let t2 = _.round(parseFloat(d[dd]), 6);
52234
+ d[dd] = isNaN(t2) ? null : t2 * 5;
52235
+ });
52236
+ });
52223
52237
  }
52238
+ this.pinnedTopRowDataWithUnit = pinnedTopRowDataWithUnitTmp;
52239
+ this.renderSumRow();
52224
52240
  },
52225
52241
  getTheme() {
52226
52242
  this.gridApi.resetRowHeights();
@@ -52973,7 +52989,6 @@ const __vue2_script$W = {
52973
52989
  let sumCols = _.filter(this.flatColumns, (item2) => item2.isSum);
52974
52990
  let sumCalcCols = _.remove(sumCols, (item2) => isString(item2.isSum));
52975
52991
  let sumFuncCols = _.remove(sumCols, (item2) => item2.isSum instanceof Function);
52976
- console.log("sumCols", sumCols, "sumFuncCols", sumFuncCols);
52977
52992
  const sumCalcRuleMap = {};
52978
52993
  _.forEach(sumCalcCols, (col) => {
52979
52994
  addCalcRuleMap(sumCalcRuleMap, col.isSum, col.field || col.key);
@@ -53012,7 +53027,7 @@ const __vue2_script$W = {
53012
53027
  sumData
53013
53028
  );
53014
53029
  _.forEach(sumFuncCols, (d) => {
53015
- sumData[d.field || d.key] = d.isSum(this.tableData);
53030
+ sumData[d.field || d.key] = d.isSum(this.tableData, d);
53016
53031
  });
53017
53032
  let sumRows = [sumData];
53018
53033
  let calcRules = {};
@@ -53034,9 +53049,9 @@ const __vue2_script$W = {
53034
53049
  });
53035
53050
  let options = { calcRules: rules };
53036
53051
  calcDatas(sumRows, options);
53037
- this.topRows = this.pinnedTopRowData ? _.concat(this.pinnedTopRowData, sumRows) : sumRows;
53052
+ this.topRows = this.pinnedTopRowDataWithUnit ? _.concat(this.pinnedTopRowDataWithUnit, sumRows) : sumRows;
53038
53053
  } else {
53039
- this.topRows = this.pinnedTopRowData;
53054
+ this.topRows = this.pinnedTopRowDataWithUnit;
53040
53055
  }
53041
53056
  },
53042
53057
  async renderTreeData(val) {
@@ -53129,6 +53144,26 @@ const __vue2_script$W = {
53129
53144
  },
53130
53145
  toggleUnitIfNeeded: _.debounce(async function toggleUnitIfNeeded() {
53131
53146
  setTimeout(() => {
53147
+ let pinnedTopRowDataWithUnitTmp = _.cloneDeep(this.pinnedTopRowDataWithUnit);
53148
+ if (this.unitType != this.defaultUnitType) {
53149
+ if (this.unitType == "X") {
53150
+ pinnedTopRowDataWithUnitTmp.forEach((d) => {
53151
+ this.switchCols.forEach((dd) => {
53152
+ let t2 = _.round(parseFloat(d[dd]), 6);
53153
+ d[dd] = isNaN(t2) ? null : t2 / 5;
53154
+ });
53155
+ });
53156
+ } else if (this.unitType == "WZ") {
53157
+ pinnedTopRowDataWithUnitTmp.forEach((d) => {
53158
+ this.switchCols.forEach((dd) => {
53159
+ let t2 = _.round(parseFloat(d[dd]), 6);
53160
+ d[dd] = isNaN(t2) ? null : t2 * 5;
53161
+ });
53162
+ });
53163
+ }
53164
+ }
53165
+ this.pinnedTopRowDataWithUnit = pinnedTopRowDataWithUnitTmp;
53166
+ this.renderSumRow();
53132
53167
  let datasTmp = _.cloneDeep(this.tableData);
53133
53168
  if (this.unitType != this.defaultUnitType) {
53134
53169
  if (this.unitType == "WZ") {
@@ -54900,7 +54935,7 @@ const __vue2_script$O = {
54900
54935
  props: {
54901
54936
  offsetTop: { type: Number, default: 100 },
54902
54937
  bottom: { type: Number, default: 80 },
54903
- right: { type: Number, default: 50 },
54938
+ right: { type: Number, default: 20 },
54904
54939
  duration: { type: Number, default: 1e3 },
54905
54940
  container: { type: [String, HTMLElement], default: null }
54906
54941
  },
@@ -57028,6 +57063,8 @@ var render$w = function() {
57028
57063
  _vm.show = true;
57029
57064
  } } }), _c("IndModal", { attrs: { "lazyRender": false, "title": _vm.title, "mask-closable": true, "width": _vm.width, "transfer": "" }, on: { "on-cancel": function($event) {
57030
57065
  _vm.show = false;
57066
+ }, "on-ok": function($event) {
57067
+ _vm.show = false;
57031
57068
  } }, model: { value: _vm.show, callback: function($$v) {
57032
57069
  _vm.show = $$v;
57033
57070
  }, expression: "show" } }, [_vm.menuInfo.menuDesc ? [_c("div", { staticClass: "ind-menu-help-panel" }, [_c("div", { staticClass: "ind-flex" }, [_c("div", { staticClass: "ind-menu-title" }, [_vm._v("\u529F\u80FD\u8BF4\u660E\uFF1A")]), _c("div", { staticClass: "ind-menu-title-content" }, [_vm._v(" " + _vm._s(_vm.menuInfo.menuDesc) + " ")])]), _c("div", { staticClass: "ind-menu-title" }, [_vm._v("\u6307\u6807\u5B9A\u4E49\uFF1A")]), _vm._l(_vm.menuInfo.indexList, function(item2, idx) {