Merge branch 'dev' of https://git.mesalab.cn/cyber-narrator/cn-ui into dev
This commit is contained in:
@@ -23,10 +23,18 @@
|
||||
v-for="(c, i) in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:key="i"
|
||||
:prop="c"
|
||||
:label="c.label"
|
||||
:prop="c.prop"
|
||||
>
|
||||
<template #header>{{c}}</template>
|
||||
<template #default="{ row }">{{row[c]}}</template>
|
||||
<template #header>{{c.label}}</template>
|
||||
<template #default="{ row }">{{}}
|
||||
<span v-if="c.prop === 'bytes' || c.prop === 'packets' || c.prop === 'sessions'" >
|
||||
{{shortFormatter(row[c.prop])}}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{row[c.prop]}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
@@ -37,11 +45,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { shortFormatter } from '@/components/charts/chartFormatter'
|
||||
export default {
|
||||
name: 'ChartTable',
|
||||
props: {
|
||||
tableColumns: Array,
|
||||
tableData: Array
|
||||
},
|
||||
methods: {
|
||||
shortFormatter: shortFormatter
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
74
src/components/charts/chartTableTitle.js
Normal file
74
src/components/charts/chartTableTitle.js
Normal file
@@ -0,0 +1,74 @@
|
||||
export const allTableTitle = {
|
||||
tableTitles10: [
|
||||
{
|
||||
label: 'clientIp',
|
||||
prop: 'clientIp'
|
||||
},
|
||||
{
|
||||
label: 'bytes',
|
||||
prop: 'bytes'
|
||||
},
|
||||
{
|
||||
label: 'packets',
|
||||
prop: 'packets'
|
||||
},
|
||||
{
|
||||
label: 'sessions',
|
||||
prop: 'sessions'
|
||||
}
|
||||
],
|
||||
tableTitles13: [
|
||||
{
|
||||
label: 'serverIp',
|
||||
prop: 'serverIp'
|
||||
},
|
||||
{
|
||||
label: 'bytes',
|
||||
prop: 'bytes'
|
||||
},
|
||||
{
|
||||
label: 'packets',
|
||||
prop: 'packets'
|
||||
},
|
||||
{
|
||||
label: 'sessions',
|
||||
prop: 'sessions'
|
||||
}
|
||||
],
|
||||
tableTitles14: [
|
||||
{
|
||||
label: 'domain',
|
||||
prop: 'domain'
|
||||
},
|
||||
{
|
||||
label: 'bytes',
|
||||
prop: 'bytes'
|
||||
},
|
||||
{
|
||||
label: 'packets',
|
||||
prop: 'packets'
|
||||
},
|
||||
{
|
||||
label: 'sessions',
|
||||
prop: 'sessions'
|
||||
}
|
||||
],
|
||||
tableTitles15: [
|
||||
{
|
||||
label: 'appName',
|
||||
prop: 'appName'
|
||||
},
|
||||
{
|
||||
label: 'bytes',
|
||||
prop: 'bytes'
|
||||
},
|
||||
{
|
||||
label: 'packets',
|
||||
prop: 'packets'
|
||||
},
|
||||
{
|
||||
label: 'sessions',
|
||||
prop: 'sessions'
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user