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