@indfnd/common 0.1.36 → 0.1.38

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,21 @@
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.38](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.37...v0.1.38) (2024-04-12)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * 修复单位切换的bug ([0a17e56](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/0a17e56d9e06dbc407ad72994de68eef98982f7e))
11
+
12
+ ### [0.1.37](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.36...v0.1.37) (2024-04-12)
13
+
14
+
15
+ ### Features
16
+
17
+ * 再改小数位 ([ba1e069](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/ba1e0693775ca030eda0139476c9354cad34b536))
18
+ * form表单0不渲染 ([0430a50](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/0430a50ffde4bc99cd95747c1352e40f74626724))
19
+
5
20
  ### [0.1.36](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.35...v0.1.36) (2024-04-11)
6
21
 
7
22
 
@@ -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, uuid, 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.35";
5
+ const version = "0.1.37";
6
6
  const author = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -48910,7 +48910,7 @@ var FormImpl = {
48910
48910
  if (d.dateFormat) {
48911
48911
  text = formatDate$1(text);
48912
48912
  }
48913
- if (text) {
48913
+ if (text != null && text !== void 0) {
48914
48914
  itemInner = h("span", {}, [text]);
48915
48915
  } else {
48916
48916
  itemInner = h("span", {
@@ -50898,18 +50898,18 @@ const __vue2_script$12 = {
50898
50898
  const disabled = disabledDef instanceof Function ? disabledDef(data) : disabledDef;
50899
50899
  const isText = textCondition instanceof Function ? textCondition(data) : textCondition;
50900
50900
  let renderVal = value;
50901
- let scaledVal = value;
50902
50901
  const scale = scaleFn();
50903
50902
  if (scale === 0) {
50904
- scaledVal = value ? parseInt(value) : value;
50903
+ renderVal = value ? parseInt(value) : value;
50905
50904
  } else if (scale) {
50906
50905
  let cellV = _.round(parseFloat(value), 6);
50907
50906
  if (!isNaN(cellV)) {
50908
- scaledVal = cellV.toFixed(scale);
50907
+ renderVal = cellV.toFixed(scale);
50908
+ renderVal = parseFloat(renderVal);
50909
50909
  }
50910
50910
  }
50911
50911
  if (isText) {
50912
- return h("span", scaledVal);
50912
+ return h("span", renderVal);
50913
50913
  } else {
50914
50914
  return h("Input", {
50915
50915
  ref: "input",
@@ -51296,6 +51296,7 @@ const __vue2_script$X = {
51296
51296
  let cellV = parseFloat(value);
51297
51297
  if (!isNaN(cellV)) {
51298
51298
  renderVal = cellV.toFixed(scale);
51299
+ renderVal = parseFloat(renderVal);
51299
51300
  }
51300
51301
  }
51301
51302
  return h("span", renderVal);
@@ -52090,11 +52091,11 @@ const __vue2_script$W = {
52090
52091
  },
52091
52092
  xScale: {
52092
52093
  type: Number,
52093
- default: null
52094
+ default: 4
52094
52095
  },
52095
52096
  wzScale: {
52096
52097
  type: Number,
52097
- default: null
52098
+ default: 4
52098
52099
  },
52099
52100
  funId: String,
52100
52101
  groupDefaultExpanded: {
@@ -52288,24 +52289,26 @@ const __vue2_script$W = {
52288
52289
  });
52289
52290
  }
52290
52291
  this.tableData = datasTmp;
52291
- let pinnedTopRowDataWithUnitTmp = _.cloneDeep(this.pinnedTopRowDataWithUnit);
52292
- if (val == "X") {
52293
- pinnedTopRowDataWithUnitTmp.forEach((d) => {
52294
- this.switchCols.forEach((dd) => {
52295
- let t2 = _.round(parseFloat(d[dd]), 6);
52296
- d[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
52292
+ if (this.pinnedTopRowDataWithUnit && this.pinnedTopRowDataWithUnit.length) {
52293
+ let pinnedTopRowDataWithUnitTmp = _.cloneDeep(this.pinnedTopRowDataWithUnit);
52294
+ if (val == "X") {
52295
+ pinnedTopRowDataWithUnitTmp.forEach((d) => {
52296
+ this.switchCols.forEach((dd) => {
52297
+ let t2 = _.round(parseFloat(d[dd]), 6);
52298
+ d[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
52299
+ });
52297
52300
  });
52298
- });
52299
- } else if (val == "WZ") {
52300
- pinnedTopRowDataWithUnitTmp.forEach((d) => {
52301
- this.switchCols.forEach((dd) => {
52302
- let t2 = _.round(parseFloat(d[dd]), 6);
52303
- d[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
52301
+ } else if (val == "WZ") {
52302
+ pinnedTopRowDataWithUnitTmp.forEach((d) => {
52303
+ this.switchCols.forEach((dd) => {
52304
+ let t2 = _.round(parseFloat(d[dd]), 6);
52305
+ d[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
52306
+ });
52304
52307
  });
52305
- });
52308
+ }
52309
+ this.pinnedTopRowDataWithUnit = pinnedTopRowDataWithUnitTmp;
52310
+ this.renderSumRow();
52306
52311
  }
52307
- this.pinnedTopRowDataWithUnit = pinnedTopRowDataWithUnitTmp;
52308
- this.renderSumRow();
52309
52312
  },
52310
52313
  getTheme() {
52311
52314
  this.gridApi.resetRowHeights();
@@ -52645,7 +52648,7 @@ const __vue2_script$W = {
52645
52648
  return column.cellRendererParams.scale;
52646
52649
  if (column.isSwitchUnit) {
52647
52650
  const unitType = this.unitType.toLowerCase();
52648
- return this[`${unitType}Scale`] || null;
52651
+ return this[`${unitType}Scale`] || 4;
52649
52652
  }
52650
52653
  return null;
52651
52654
  },
@@ -53234,26 +53237,28 @@ const __vue2_script$W = {
53234
53237
  },
53235
53238
  toggleUnitIfNeeded: _.debounce(async function toggleUnitIfNeeded() {
53236
53239
  setTimeout(() => {
53237
- let pinnedTopRowDataWithUnitTmp = _.cloneDeep(this.pinnedTopRowDataWithUnit);
53238
- if (this.unitType != this.defaultUnitType) {
53239
- if (this.unitType == "X") {
53240
- pinnedTopRowDataWithUnitTmp.forEach((d) => {
53241
- this.switchCols.forEach((dd) => {
53242
- let t2 = _.round(parseFloat(d[dd]), 6);
53243
- d[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
53240
+ if (this.pinnedTopRowDataWithUnit && this.pinnedTopRowDataWithUnit.length) {
53241
+ let pinnedTopRowDataWithUnitTmp = _.cloneDeep(this.pinnedTopRowDataWithUnit);
53242
+ if (this.unitType != this.defaultUnitType) {
53243
+ if (this.unitType == "X") {
53244
+ pinnedTopRowDataWithUnitTmp.forEach((d) => {
53245
+ this.switchCols.forEach((dd) => {
53246
+ let t2 = _.round(parseFloat(d[dd]), 6);
53247
+ d[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
53248
+ });
53244
53249
  });
53245
- });
53246
- } else if (this.unitType == "WZ") {
53247
- pinnedTopRowDataWithUnitTmp.forEach((d) => {
53248
- this.switchCols.forEach((dd) => {
53249
- let t2 = _.round(parseFloat(d[dd]), 6);
53250
- d[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
53250
+ } else if (this.unitType == "WZ") {
53251
+ pinnedTopRowDataWithUnitTmp.forEach((d) => {
53252
+ this.switchCols.forEach((dd) => {
53253
+ let t2 = _.round(parseFloat(d[dd]), 6);
53254
+ d[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
53255
+ });
53251
53256
  });
53252
- });
53257
+ }
53253
53258
  }
53259
+ this.pinnedTopRowDataWithUnit = pinnedTopRowDataWithUnitTmp;
53260
+ this.renderSumRow();
53254
53261
  }
53255
- this.pinnedTopRowDataWithUnit = pinnedTopRowDataWithUnitTmp;
53256
- this.renderSumRow();
53257
53262
  let datasTmp = _.cloneDeep(this.tableData);
53258
53263
  if (this.unitType != this.defaultUnitType) {
53259
53264
  if (this.unitType == "WZ") {