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