network overview 表格增加千进制单位转换
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
<template #default="scope" :column="item">
|
||||
<template v-if="item.prop === 'total'" >
|
||||
<div class="data-total" >
|
||||
{{scope.row[item.prop]}}
|
||||
{{scope.row[item.prop] ? unitConvert(scope.row[item.prop], unitTypes.number).join(' ') : '-'}}
|
||||
<div v-if="scope.row['trend'] === 'up'" class="data-total-trend data-total-trend-red">
|
||||
<i class="cn-icon-rise1 cn-icon"></i>{{scope.row['trendValue']}}
|
||||
</div>
|
||||
@@ -55,7 +55,7 @@
|
||||
<div v-else >{{scope.row['tab']}}</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{scope.row[item.prop]}}
|
||||
{{scope.row[item.prop] ? unitConvert(scope.row[item.prop], unitTypes.number).join(' ') : '-'}}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -146,8 +146,9 @@
|
||||
</template>
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
import { networkOverviewTabs, networkOverviewTabList, operationType, networkOverviewSearchUrl } from '@/utils/constants'
|
||||
import { networkOverviewTabs, networkOverviewTabList, operationType, networkOverviewSearchUrl, unitTypes } from '@/utils/constants'
|
||||
import { get } from '@/utils/http'
|
||||
import unitConvert from '@/utils/unit-convert'
|
||||
|
||||
export default {
|
||||
name: 'NetworkOverviewTabs',
|
||||
@@ -156,6 +157,8 @@ export default {
|
||||
metric: 'Bits/s',
|
||||
orderBy: 'bytesTotal',
|
||||
tab: 'ip',
|
||||
unitConvert,
|
||||
unitTypes,
|
||||
options: [
|
||||
{
|
||||
value: 'Bits/s',
|
||||
|
||||
Reference in New Issue
Block a user