@indfnd/common 0.1.33 → 0.1.35

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.35](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.34...v0.1.35) (2024-04-11)
6
+
7
+
8
+ ### Features
9
+
10
+ * 表格去掉小数位;列展现设置bug修复 ([e9e2a7e](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/e9e2a7e178a927742a50f9e0470ee79b59872613))
11
+
12
+ ### [0.1.34](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.33...v0.1.34) (2024-04-10)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * 功能说明点确认关闭 ([a358e28](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/a358e2833b0d0efd77bcddc4f8b78121df74ff40))
18
+ * pinnedTopRowData参与单位切换 ([eaa0556](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/eaa0556653b31df16be4f1272153c688803068c3))
19
+
5
20
  ### [0.1.33](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.32...v0.1.33) (2024-04-09)
6
21
 
7
22
 
@@ -1,8 +1,8 @@
1
1
  import { Button as Button$1, ButtonGroup as ButtonGroup$1, Input, Drawer as Drawer$1, Dropdown as Dropdown$1, Modal as Modal$1, Form, FormItem, Select as Select$1, Option, Row, Col, Menu, MenuItem, Badge, DropdownMenu, DropdownItem, Submenu, Tag, Header, Layout, Content, Spin, Poptip as Poptip$1, CheckboxGroup, Checkbox, RadioGroup, Radio, Card, Message, LoadingBar } from "view-design";
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";
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.32";
5
+ const version = "0.1.34";
6
6
  const author = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -48363,6 +48363,7 @@ var FormImpl = {
48363
48363
  formType: { type: String, default: "form" },
48364
48364
  searchLoading: Boolean,
48365
48365
  queryBtn: { type: Boolean, default: true },
48366
+ resetBtn: { type: Boolean, default: true },
48366
48367
  formCacheList: Array,
48367
48368
  curCacheId: String,
48368
48369
  formEnumData: Object
@@ -48985,6 +48986,7 @@ var FormImpl = {
48985
48986
  {
48986
48987
  props: { bizType: "reset" },
48987
48988
  attrs: { loading: this.searchLoading },
48989
+ style: { display: this.resetBtn ? "block" : "none" },
48988
48990
  on: {
48989
48991
  click: () => {
48990
48992
  this.$emit("reset");
@@ -50242,14 +50244,14 @@ var render$X = function() {
50242
50244
  var _c = _vm._self._c || _h;
50243
50245
  return _c("div", { staticClass: "index-manager" }, [_c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": _vm.manageIndex } }, [_vm._v(" \u5217\u7B5B\u9009 ")]), _c("IndDrawer", { staticClass: "index-manager", attrs: { "width": "800", "title": "\u9884\u7F6E\u5217\u7BA1\u7406", "lazyRender": false }, model: { value: _vm.showManager, callback: function($$v) {
50244
50246
  _vm.showManager = $$v;
50245
- }, expression: "showManager" } }, [_c("div", { staticClass: "ind-flex-column height100" }, [_c("IndTable", { ref: "mangeTable", staticStyle: { "padding": "0" }, attrs: { "columns": _vm.manageColumns, "disablePage": "", "showTableOption": false, "isIndexManageTable": "", "rowKey": "headerName" }, model: { value: _vm.curIndex.columnList, callback: function($$v) {
50247
+ }, expression: "showManager" } }, [_c("div", { staticClass: "ind-flex-column height100" }, [_c("IndTable", { ref: "mangeTable", staticStyle: { "padding": "0" }, attrs: { "columns": _vm.manageColumns, "disablePage": "", "showTableOption": false, "isIndexManageTable": "", "rowKey": "uuid" }, model: { value: _vm.curIndex.columnList, callback: function($$v) {
50246
50248
  _vm.$set(_vm.curIndex, "columnList", $$v);
50247
50249
  }, expression: "curIndex.columnList" } })], 1), _c("IndButtonGroup", { attrs: { "slot": "footer", "split": "", "right": "" }, slot: "footer" }, [_c("IndButton", { attrs: { "bizType": "save", "loading": _vm.saving }, on: { "click": _vm.apply } }, [_vm._v(" \u786E\u8BA4 ")]), _c("IndButton", { attrs: { "bizType": "save", "ghost": "", "loading": _vm.saving }, on: { "click": function($event) {
50248
50250
  _vm.showManager = false;
50249
50251
  } } }, [_vm._v(" \u53D6\u6D88 ")])], 1)], 1)], 1);
50250
50252
  };
50251
50253
  var staticRenderFns$X = [];
50252
- function deepEach$4(parentNode, list, callback) {
50254
+ function deepEach$5(parentNode, list, callback) {
50253
50255
  if (Array.isArray(list) && list.length) {
50254
50256
  _.forEach(list, (node, idx) => {
50255
50257
  let breakDeep = false;
@@ -50264,7 +50266,7 @@ function deepEach$4(parentNode, list, callback) {
50264
50266
  }
50265
50267
  }
50266
50268
  if (!breakDeep) {
50267
- deepEach$4(node, node.children, callback);
50269
+ deepEach$5(node, node.children, callback);
50268
50270
  }
50269
50271
  });
50270
50272
  }
@@ -50314,7 +50316,7 @@ const __vue2_script$15 = {
50314
50316
  if (cacheData) {
50315
50317
  let cacheList = JSON.parse(cacheData);
50316
50318
  cacheList.forEach((d) => {
50317
- deepEach$4(null, d.columnList, (dd) => {
50319
+ deepEach$5(null, d.columnList, (dd) => {
50318
50320
  dd.checked = dd.checked == "1";
50319
50321
  dd.pinned = dd.pinned || "none";
50320
50322
  });
@@ -50329,7 +50331,7 @@ const __vue2_script$15 = {
50329
50331
  async syncToStorage() {
50330
50332
  let dataToCache = _.cloneDeep(this.indexCacheList);
50331
50333
  dataToCache.forEach((d) => {
50332
- deepEach$4(null, d.columnList, (dd) => {
50334
+ deepEach$5(null, d.columnList, (dd) => {
50333
50335
  dd.checked = dd.checked ? "1" : "0";
50334
50336
  if (dd.pinned == "none") {
50335
50337
  delete dd.pinned;
@@ -50436,7 +50438,7 @@ const __vue2_script$15 = {
50436
50438
  apply() {
50437
50439
  let curIndexClone = _.cloneDeep(this.curIndex);
50438
50440
  let checkRows = this.$refs.mangeTable.getSelection();
50439
- deepEach$4(null, curIndexClone.columnList, (dd) => {
50441
+ deepEach$5(null, curIndexClone.columnList, (dd) => {
50440
50442
  dd.checked = _.some(checkRows, { field: dd.field });
50441
50443
  });
50442
50444
  this.$emit("resetColumns", _.cloneDeep(curIndexClone.columnList));
@@ -50472,10 +50474,13 @@ const __vue2_script$15 = {
50472
50474
  let cloneData = _.cloneDeep(this.curIndex);
50473
50475
  if (!cloneData.id) {
50474
50476
  let columns = _.cloneDeep(this.tableRef.columns);
50475
- deepEach$4(null, columns, (dd) => {
50477
+ deepEach$5(null, columns, (dd) => {
50478
+ var _a;
50476
50479
  dd.field = dd.field || dd.key;
50477
50480
  dd.headerName = dd.headerName || dd.title;
50478
- dd.checked = !dd.hide;
50481
+ if (!((_a = dd.children) == null ? void 0 : _a.length)) {
50482
+ dd.checked = !dd.hide;
50483
+ }
50479
50484
  dd.pinned = dd.fixed || dd.pinned || "none";
50480
50485
  });
50481
50486
  cloneData.columnList = columns;
@@ -50497,7 +50502,7 @@ const __vue2_script$15 = {
50497
50502
  async setTableSelected() {
50498
50503
  setTimeout(() => {
50499
50504
  let initSelected = [];
50500
- deepEach$4(null, this.curIndex.columnList, (dd) => {
50505
+ deepEach$5(null, this.curIndex.columnList, (dd) => {
50501
50506
  if (dd.checked) {
50502
50507
  initSelected.push(dd);
50503
50508
  }
@@ -51780,6 +51785,70 @@ function addCalcRuleMap(ruleMap = {}, calcRule, columnField) {
51780
51785
  });
51781
51786
  }
51782
51787
  }
51788
+ function deepEach$4(parentNode, list, callback) {
51789
+ if (Array.isArray(list) && list.length) {
51790
+ _.forEach(list, (node, idx) => {
51791
+ let breakDeep = false;
51792
+ if (typeof callback === "function") {
51793
+ try {
51794
+ const callbackResult = callback(node, parentNode, idx);
51795
+ if (typeof callbackResult === "boolean") {
51796
+ breakDeep = callbackResult;
51797
+ }
51798
+ } catch (error) {
51799
+ console.error(error);
51800
+ }
51801
+ }
51802
+ if (!breakDeep) {
51803
+ deepEach$4(node, node.children, callback);
51804
+ }
51805
+ });
51806
+ }
51807
+ }
51808
+ function addNodeToTree$1(tree, node) {
51809
+ function addNodeToTreeInner(subTree, path2) {
51810
+ if (!(path2 == null ? void 0 : path2.length)) {
51811
+ return;
51812
+ }
51813
+ let midPathNode = path2.shift();
51814
+ let midNode = _.find(subTree, { uuid: midPathNode });
51815
+ if (!midNode) {
51816
+ if (path2.length == 0) {
51817
+ midNode = {
51818
+ ...node,
51819
+ children: []
51820
+ };
51821
+ } else {
51822
+ midNode = {
51823
+ ...node,
51824
+ children: node.children || []
51825
+ };
51826
+ }
51827
+ subTree.push(midNode);
51828
+ }
51829
+ addNodeToTreeInner(midNode.children, path2);
51830
+ }
51831
+ let path = _.cloneDeep(node.path);
51832
+ addNodeToTreeInner(tree, path);
51833
+ }
51834
+ function generateTreeByNodes$1(nodes) {
51835
+ deepEach$4({}, nodes, (d) => {
51836
+ var _a;
51837
+ if ((_a = d.children) == null ? void 0 : _a.length) {
51838
+ delete d.children;
51839
+ }
51840
+ });
51841
+ let rlt = [];
51842
+ nodes.forEach((d) => addNodeToTree$1(rlt, d));
51843
+ rlt = _.orderBy(rlt, ["seq"], ["asc"]);
51844
+ deepEach$4({}, rlt, (d) => {
51845
+ var _a;
51846
+ if ((_a = d.children) == null ? void 0 : _a.length) {
51847
+ d.children = _.orderBy(d.children, ["seq"], ["asc"]);
51848
+ }
51849
+ });
51850
+ return rlt;
51851
+ }
51783
51852
  var render$V = function() {
51784
51853
  var _vm = this;
51785
51854
  var _h = _vm.$createElement;
@@ -52021,11 +52090,11 @@ const __vue2_script$W = {
52021
52090
  },
52022
52091
  xScale: {
52023
52092
  type: Number,
52024
- default: 4
52093
+ default: null
52025
52094
  },
52026
52095
  wzScale: {
52027
52096
  type: Number,
52028
- default: 4
52097
+ default: null
52029
52098
  },
52030
52099
  funId: String,
52031
52100
  groupDefaultExpanded: {
@@ -52089,6 +52158,7 @@ const __vue2_script$W = {
52089
52158
  showUnitSwitch: false,
52090
52159
  switchCols: [],
52091
52160
  unitType: this.defaultTableUnitType || this.defaultUnitType || "X",
52161
+ pinnedTopRowDataWithUnit: this.pinnedTopRowData || null,
52092
52162
  topRows: this.pinnedTopRowData || null,
52093
52163
  treeData: false,
52094
52164
  getDataPath: (data) => {
@@ -52195,6 +52265,7 @@ const __vue2_script$W = {
52195
52265
  watch: {
52196
52266
  pinnedTopRowData: {
52197
52267
  handler: function() {
52268
+ this.pinnedTopRowDataWithUnit = _.cloneDeep(this.pinnedTopRowData);
52198
52269
  this.renderSumRow();
52199
52270
  },
52200
52271
  deep: true
@@ -52205,22 +52276,36 @@ const __vue2_script$W = {
52205
52276
  datasTmp.forEach((d) => {
52206
52277
  this.switchCols.forEach((dd) => {
52207
52278
  let t2 = _.round(parseFloat(d[dd]), 6);
52208
- d[dd] = isNaN(t2) ? null : t2 / 5;
52279
+ d[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
52209
52280
  });
52210
52281
  });
52211
52282
  } else if (val == "WZ") {
52212
52283
  datasTmp.forEach((d) => {
52213
52284
  this.switchCols.forEach((dd) => {
52214
52285
  let t2 = _.round(parseFloat(d[dd]), 6);
52215
- d[dd] = isNaN(t2) ? null : t2 * 5;
52286
+ d[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
52216
52287
  });
52217
52288
  });
52218
52289
  }
52219
- if (this.dataApi) {
52220
- this.tableData = datasTmp;
52221
- } else {
52222
- this.$emit("input", datasTmp);
52290
+ 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);
52297
+ });
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);
52304
+ });
52305
+ });
52223
52306
  }
52307
+ this.pinnedTopRowDataWithUnit = pinnedTopRowDataWithUnitTmp;
52308
+ this.renderSumRow();
52224
52309
  },
52225
52310
  getTheme() {
52226
52311
  this.gridApi.resetRowHeights();
@@ -52270,7 +52355,15 @@ const __vue2_script$W = {
52270
52355
  this.overlayNoRowsTemplate = '<span style="padding: 10px;">\u6570\u636E\u4E3A\u7A7A</span>';
52271
52356
  this.updating = true;
52272
52357
  this.renderSumRow();
52273
- this.$emit("input", _.cloneDeep(val));
52358
+ let isTreeTable = _.some(this.columns, { tree: true });
52359
+ if (isTreeTable) {
52360
+ let treeDataClone = _.cloneDeep(val);
52361
+ let rlt = generateTreeByNodes$1(treeDataClone);
52362
+ console.log("treedatarendered is", rlt);
52363
+ this.$emit("input", rlt);
52364
+ } else {
52365
+ this.$emit("input", _.cloneDeep(val));
52366
+ }
52274
52367
  this.$nextTick(() => {
52275
52368
  this.updating = false;
52276
52369
  });
@@ -52405,14 +52498,14 @@ const __vue2_script$W = {
52405
52498
  resetColumns(columns) {
52406
52499
  const columnDataMap = {};
52407
52500
  deepEach$3(null, this.columns || [], (item2) => {
52408
- let field = item2.field || item2.key || item2.type;
52501
+ let field = item2.field || item2.key || item2.type || item2.headerName || item2.title;
52409
52502
  Object.assign(columnDataMap, { [field]: item2 });
52410
52503
  });
52411
- deepEach$3(null, columns, (d) => {
52412
- let srcColumn = columnDataMap[d.field || d.key || d.type];
52504
+ deepEach$3(null, columns, (d, p) => {
52505
+ let srcColumn = columnDataMap[d.field || d.key || d.type || d.headerName || d.title];
52413
52506
  srcColumn.hide = !d.checked;
52414
- if (d.pinned) {
52415
- srcColumn.pinned = d.pinned;
52507
+ if (d.pinned && d.pinned != "none" || (p == null ? void 0 : p.pinned) && (p == null ? void 0 : p.pinned) != "none") {
52508
+ srcColumn.pinned = d.pinned == "none" ? (p == null ? void 0 : p.pinned) == "none" ? void 0 : p == null ? void 0 : p.pinned : d.pinned;
52416
52509
  } else {
52417
52510
  delete srcColumn.pinned;
52418
52511
  }
@@ -52552,7 +52645,7 @@ const __vue2_script$W = {
52552
52645
  return column.cellRendererParams.scale;
52553
52646
  if (column.isSwitchUnit) {
52554
52647
  const unitType = this.unitType.toLowerCase();
52555
- return this[`${unitType}Scale`] || 4;
52648
+ return this[`${unitType}Scale`] || null;
52556
52649
  }
52557
52650
  return null;
52558
52651
  },
@@ -52973,7 +53066,6 @@ const __vue2_script$W = {
52973
53066
  let sumCols = _.filter(this.flatColumns, (item2) => item2.isSum);
52974
53067
  let sumCalcCols = _.remove(sumCols, (item2) => isString(item2.isSum));
52975
53068
  let sumFuncCols = _.remove(sumCols, (item2) => item2.isSum instanceof Function);
52976
- console.log("sumCols", sumCols, "sumFuncCols", sumFuncCols);
52977
53069
  const sumCalcRuleMap = {};
52978
53070
  _.forEach(sumCalcCols, (col) => {
52979
53071
  addCalcRuleMap(sumCalcRuleMap, col.isSum, col.field || col.key);
@@ -53034,9 +53126,9 @@ const __vue2_script$W = {
53034
53126
  });
53035
53127
  let options = { calcRules: rules };
53036
53128
  calcDatas(sumRows, options);
53037
- this.topRows = this.pinnedTopRowData ? _.concat(this.pinnedTopRowData, sumRows) : sumRows;
53129
+ this.topRows = this.pinnedTopRowDataWithUnit ? _.concat(this.pinnedTopRowDataWithUnit, sumRows) : sumRows;
53038
53130
  } else {
53039
- this.topRows = this.pinnedTopRowData;
53131
+ this.topRows = this.pinnedTopRowDataWithUnit;
53040
53132
  }
53041
53133
  },
53042
53134
  async renderTreeData(val) {
@@ -53047,11 +53139,13 @@ const __vue2_script$W = {
53047
53139
  if (this.treeData) {
53048
53140
  this.renderTreeFlag(val);
53049
53141
  let rlt = [];
53050
- deepEach$3(null, val, (d) => {
53142
+ deepEach$3(null, val, (d, p, idx) => {
53143
+ d.seq = idx;
53051
53144
  rlt.push(d);
53052
53145
  });
53053
53146
  val = rlt;
53054
53147
  }
53148
+ console.log("renderTreeData is", val);
53055
53149
  return val;
53056
53150
  },
53057
53151
  renderTreeFlag(datas) {
@@ -53060,9 +53154,20 @@ const __vue2_script$W = {
53060
53154
  return;
53061
53155
  }
53062
53156
  let treeCol = (treeColDef == null ? void 0 : treeColDef.field) || (treeColDef == null ? void 0 : treeColDef.key);
53157
+ deepEach$3(null, datas, (d, parentNode, idx) => {
53158
+ d.uuid = d.uuid || uuid();
53159
+ });
53063
53160
  deepEach$3(null, datas, (d, parentNode, idx) => {
53064
53161
  d.treeLevelFlag = parentNode ? [...parentNode.treeLevelFlag, d[treeCol]] : [d[treeCol]];
53162
+ if (parentNode) {
53163
+ let pPath = parentNode.path ? _.cloneDeep(parentNode.path) : [parentNode.uuid];
53164
+ pPath.push(d.uuid);
53165
+ d.path = pPath;
53166
+ } else {
53167
+ d.path = [d.uuid];
53168
+ }
53065
53169
  });
53170
+ console.log("renderTreeFlag datas", datas);
53066
53171
  },
53067
53172
  tableRefresh: _.debounce(function(noQuery) {
53068
53173
  var _a;
@@ -53097,14 +53202,14 @@ const __vue2_script$W = {
53097
53202
  data.forEach((d) => {
53098
53203
  this.switchCols.forEach((dd) => {
53099
53204
  let t2 = _.round(parseFloat(d[dd]), 6);
53100
- d[dd] = isNaN(t2) ? null : t2 * 5;
53205
+ d[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
53101
53206
  });
53102
53207
  });
53103
53208
  } else {
53104
53209
  data.forEach((d) => {
53105
53210
  this.switchCols.forEach((dd) => {
53106
53211
  let t2 = _.round(parseFloat(d[dd]), 6);
53107
- d[dd] = isNaN(t2) ? null : t2 / 5;
53212
+ d[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
53108
53213
  });
53109
53214
  });
53110
53215
  }
@@ -53129,20 +53234,40 @@ const __vue2_script$W = {
53129
53234
  },
53130
53235
  toggleUnitIfNeeded: _.debounce(async function toggleUnitIfNeeded() {
53131
53236
  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);
53244
+ });
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);
53251
+ });
53252
+ });
53253
+ }
53254
+ }
53255
+ this.pinnedTopRowDataWithUnit = pinnedTopRowDataWithUnitTmp;
53256
+ this.renderSumRow();
53132
53257
  let datasTmp = _.cloneDeep(this.tableData);
53133
53258
  if (this.unitType != this.defaultUnitType) {
53134
53259
  if (this.unitType == "WZ") {
53135
53260
  datasTmp.forEach((d) => {
53136
53261
  this.switchCols.forEach((dd) => {
53137
53262
  let t2 = parseFloat(d[dd]);
53138
- d[dd] = isNaN(t2) ? null : t2 * 5;
53263
+ d[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
53139
53264
  });
53140
53265
  });
53141
53266
  } else {
53142
53267
  datasTmp.forEach((d) => {
53143
53268
  this.switchCols.forEach((dd) => {
53144
53269
  let t2 = parseFloat(d[dd]);
53145
- d[dd] = isNaN(t2) ? null : t2 / 5;
53270
+ d[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
53146
53271
  });
53147
53272
  });
53148
53273
  }
@@ -53185,7 +53310,7 @@ const __vue2_script$W = {
53185
53310
  datasTmp.forEach((d) => {
53186
53311
  this.switchCols.forEach((dd) => {
53187
53312
  let t2 = _.round(parseFloat(d[dd]), 6);
53188
- d[dd] = isNaN(t2) ? null : t2 / 5;
53313
+ d[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
53189
53314
  });
53190
53315
  });
53191
53316
  return datasTmp;
@@ -53199,7 +53324,7 @@ const __vue2_script$W = {
53199
53324
  datasTmp.forEach((d) => {
53200
53325
  this.switchCols.forEach((dd) => {
53201
53326
  let t2 = _.round(parseFloat(d[dd]), 6);
53202
- d[dd] = isNaN(t2) ? null : t2 * 5;
53327
+ d[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
53203
53328
  });
53204
53329
  });
53205
53330
  return datasTmp;
@@ -53213,7 +53338,7 @@ const __vue2_script$W = {
53213
53338
  datasTmp.forEach((d) => {
53214
53339
  this.switchCols.forEach((dd) => {
53215
53340
  let t2 = _.round(parseFloat(d[dd]), 6);
53216
- d[dd] = isNaN(t2) ? null : t2 / 5;
53341
+ d[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
53217
53342
  });
53218
53343
  });
53219
53344
  return datasTmp;
@@ -53227,7 +53352,7 @@ const __vue2_script$W = {
53227
53352
  datasTmp.forEach((d) => {
53228
53353
  this.switchCols.forEach((dd) => {
53229
53354
  let t2 = _.round(parseFloat(d[dd]), 6);
53230
- d[dd] = isNaN(t2) ? null : t2 * 5;
53355
+ d[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
53231
53356
  });
53232
53357
  });
53233
53358
  return datasTmp;
@@ -57028,6 +57153,8 @@ var render$w = function() {
57028
57153
  _vm.show = true;
57029
57154
  } } }), _c("IndModal", { attrs: { "lazyRender": false, "title": _vm.title, "mask-closable": true, "width": _vm.width, "transfer": "" }, on: { "on-cancel": function($event) {
57030
57155
  _vm.show = false;
57156
+ }, "on-ok": function($event) {
57157
+ _vm.show = false;
57031
57158
  } }, model: { value: _vm.show, callback: function($$v) {
57032
57159
  _vm.show = $$v;
57033
57160
  }, 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) {
@@ -57064,8 +57191,12 @@ const __vue2_script$x = {
57064
57191
  permissions = sessionStorage.getItem("ibp-sc-permission");
57065
57192
  }
57066
57193
  permissions = JSON.parse(permissions);
57067
- let curPermission = _.find(permissions, { permissionId: this.$route.meta.permissionId });
57068
- this.menuInfo = JSON.parse(curPermission.extendProps) || {};
57194
+ let curPermission = _.find(permissions, { permissionId: this.$route.meta.permissionId }) || {};
57195
+ try {
57196
+ this.menuInfo = JSON.parse(curPermission.extendProps) || {};
57197
+ } catch (e) {
57198
+ console.log("\u672A\u53D6\u5230\u6570\u636E");
57199
+ }
57069
57200
  console.log("this.menuInfo is", this.menuInfo);
57070
57201
  }
57071
57202
  }