CN-53 perf: entity实体列表筛选功能完善
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getChartColor } from '@/components/charts/chart-options'
|
import { getChartColor } from '@/components/charts/chart-options'
|
||||||
import {chartColor} from "./chart-options";
|
import { chartColor } from './chart-options'
|
||||||
export default {
|
export default {
|
||||||
name: 'StatisticsLegend',
|
name: 'StatisticsLegend',
|
||||||
props: {
|
props: {
|
||||||
@@ -47,6 +47,7 @@ export default {
|
|||||||
border: 1px solid #E7EAED;
|
border: 1px solid #E7EAED;
|
||||||
color: #5f6368;
|
color: #5f6368;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
.chart__table-top {
|
.chart__table-top {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -11,11 +11,12 @@
|
|||||||
>
|
>
|
||||||
<el-tree
|
<el-tree
|
||||||
:data="f.data"
|
:data="f.data"
|
||||||
:load="(node, resolve) => f.loadFilter(node, resolve, f.filterType, f.childrenKey ? f.childrenKey : f.key)"
|
:load="(node, resolve) => f.loadFilter(node, resolve, f.filterType, f.childrenKey, f.key)"
|
||||||
:node-key="f.key"
|
:node-key="f.key"
|
||||||
:props="{ isLeaf: 'leaf' }"
|
:props="{ isLeaf: 'leaf' }"
|
||||||
:expand-on-click-node="false"
|
:expand-on-click-node="false"
|
||||||
:lazy="i === 0"
|
:lazy="i === 0"
|
||||||
|
highlight-current
|
||||||
:show-checkbox="i === 1"
|
:show-checkbox="i === 1"
|
||||||
@node-click="nodeClick"
|
@node-click="nodeClick"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import { createI18n } from 'vue-i18n'
|
|||||||
import { storageKey } from '@/utils/constants'
|
import { storageKey } from '@/utils/constants'
|
||||||
import { getI18n } from '@/utils/api'
|
import { getI18n } from '@/utils/api'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import cn from './cn'
|
// import cn from './cn'
|
||||||
import en from './en'
|
// import en from './en'
|
||||||
|
|
||||||
const i18n = createI18n({
|
const i18n = createI18n({
|
||||||
locale: localStorage.getItem(storageKey.language) || 'en'
|
locale: localStorage.getItem(storageKey.language) || 'en'
|
||||||
|
|||||||
@@ -241,12 +241,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const loadFilter = (node, resolve, filterType, key) => {
|
const loadFilter = (node, resolve, filterType, key, parentKey) => {
|
||||||
if (node.level === 0) {
|
if (node.level === 0) {
|
||||||
resolve(node.data)
|
resolve(node.data)
|
||||||
} else {
|
} else {
|
||||||
const param = { type: key }
|
const param = { type: key }
|
||||||
param[key] = (node.data)[key]
|
param[parentKey] = (node.data)[parentKey]
|
||||||
let req = null
|
let req = null
|
||||||
switch (filterType) {
|
switch (filterType) {
|
||||||
case 'ip': {
|
case 'ip': {
|
||||||
|
|||||||
Reference in New Issue
Block a user