Skip to content

Commit 4ad5e47

Browse files
author
汪鸣峰
committed
Merge branch 'hotfix/data_governance_unit' into 'develop'
Hotfix/data governance unit See merge request luban/dataspherestudio!256
2 parents 8e2eca7 + 4dd8243 commit 4ad5e47

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

web/src/apps/dataGovernance/module/dataGovernance/overview.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ export default {
210210
.then(data => {
211211
if (data.result) {
212212
data.result.forEach(item => {
213-
let tempLen = Math.floor(item.storage.length / 3)
213+
let tempLen = Math.floor(item.storage.length / 4)
214214
let len = tempLen > 2 ? 3 : tempLen
215-
item.storage = (item.storage / (1024 * (len + 1))).toFixed(2)
215+
item.storage = (item.storage / Math.pow(1024, len + 1)).toFixed(2)
216216
switch(len){
217217
case 0:
218218
item.storage = item.storage + 'KB'

web/src/apps/dataGovernance/view/assetsInfo/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,9 @@ export default {
305305
classifications
306306
} = data.result;
307307
if (parseInt(basic.store)) {
308-
let tempLen = Math.floor(basic.store.length / 3)
308+
let tempLen = Math.floor(basic.store.length / 4)
309309
let len = tempLen > 2 ? 3 : tempLen
310-
basic.store = (basic.store / (1024 * (len + 1))).toFixed(2)
310+
basic.store = (basic.store / Math.pow(1024, len + 1)).toFixed(2)
311311
switch(len){
312312
case 0:
313313
basic.store = basic.store + 'KB'

0 commit comments

Comments
 (0)