CN-1592 fix: tag页面增加isbuiltin过滤条件
This commit is contained in:
@@ -155,7 +155,7 @@ export default {
|
||||
label: this.$t('tag.category'),
|
||||
prop: 'category',
|
||||
show: true,
|
||||
width: 100
|
||||
width: 150
|
||||
}, {
|
||||
label: this.$t('tag.entityType'),
|
||||
prop: 'indicatorType',
|
||||
|
||||
@@ -362,6 +362,17 @@ export const tagCategoryOptions = [
|
||||
}
|
||||
]
|
||||
|
||||
export const tagSourceOptions = [
|
||||
{
|
||||
value: 1,
|
||||
label: 'tag.builtInTag'
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
label: 'tag.userDefined'
|
||||
}
|
||||
]
|
||||
|
||||
export const metricType = {
|
||||
Bits: 'Bits/s',
|
||||
Packets: 'Packets/s',
|
||||
|
||||
@@ -26,25 +26,11 @@
|
||||
<i class="cn-icon-delete cn-icon"></i>
|
||||
<span>{{$t('overall.delete')}}</span>
|
||||
</button>
|
||||
<el-select
|
||||
key="intentSelect"
|
||||
v-model="intent"
|
||||
:teleported="false"
|
||||
style="width: 160px; margin-right:10px;"
|
||||
clearable
|
||||
placeholder="All"
|
||||
@change="intentChange"
|
||||
>
|
||||
<template #prefix>
|
||||
<span class="select-prefix">{{$t('tag.intent')}}:</span>
|
||||
</template>
|
||||
<el-option v-for="item in tagIntentOptions" :key="item.value" :label="$t(item.label)" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
key="categorySelect"
|
||||
v-model="category"
|
||||
:teleported="false"
|
||||
style="width: 190px; margin-right:10px;"
|
||||
style="width: 210px; margin-right:10px;"
|
||||
clearable
|
||||
placeholder="All"
|
||||
@change="categoryChange"
|
||||
@@ -54,6 +40,34 @@
|
||||
</template>
|
||||
<el-option v-for="item in tagCategoryOptions" :key="item.value" :label="$t(item.label)" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
key="intentSelect"
|
||||
v-model="intent"
|
||||
:teleported="false"
|
||||
style="width: 180px; margin-right:10px;"
|
||||
clearable
|
||||
placeholder="All"
|
||||
@change="intentChange"
|
||||
>
|
||||
<template #prefix>
|
||||
<span class="select-prefix">{{$t('tag.intention')}}:</span>
|
||||
</template>
|
||||
<el-option v-for="item in tagIntentOptions" :key="item.value" :label="$t(item.label)" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
key="sourceSelect"
|
||||
v-model="source"
|
||||
:teleported="false"
|
||||
style="width: 190px; margin-right:10px;"
|
||||
clearable
|
||||
placeholder="All"
|
||||
@change="sourceChange"
|
||||
>
|
||||
<template #prefix>
|
||||
<span class="select-prefix">{{$t('tag.source')}}:</span>
|
||||
</template>
|
||||
<el-option v-for="item in tagSourceOptions" :key="item.value" :label="$t(item.label)" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #default>
|
||||
<loading :loading="loading"></loading>
|
||||
@@ -86,7 +100,7 @@ import TagTable from '@/components/table/tag/TagTable'
|
||||
import cnDataList from '@/components/table/CnDataList'
|
||||
import dataListMixin from '@/mixins/data-list'
|
||||
import { api } from '@/utils/api'
|
||||
import { tagIntentOptions, tagCategoryOptions } from '@/utils/constants'
|
||||
import { tagIntentOptions, tagCategoryOptions, tagSourceOptions } from '@/utils/constants'
|
||||
import { urlParamsHandler, overwriteUrl } from '@/utils/tools'
|
||||
import Loading from '@/components/common/Loading'
|
||||
import { ref } from 'vue'
|
||||
@@ -100,11 +114,13 @@ export default {
|
||||
url: api.tagList,
|
||||
tagIntentOptions,
|
||||
tagCategoryOptions,
|
||||
tagSourceOptions,
|
||||
tableId: 'tagTable',
|
||||
builtinLeftLoading: false,
|
||||
isInit: true,
|
||||
intent: '',
|
||||
category: '',
|
||||
source: '',
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
@@ -144,6 +160,9 @@ export default {
|
||||
if (this.name) {
|
||||
params = { ...params, name: this.name }
|
||||
}
|
||||
if (this.source || this.source === 0) {
|
||||
params = { ...params, name: this.source }
|
||||
}
|
||||
this.getTableData(params)
|
||||
},
|
||||
categoryChange (value) {
|
||||
@@ -157,6 +176,25 @@ export default {
|
||||
if (this.name) {
|
||||
params = { ...params, name: this.name }
|
||||
}
|
||||
if (this.source || this.source === 0) {
|
||||
params = { ...params, name: this.source }
|
||||
}
|
||||
this.getTableData(params)
|
||||
},
|
||||
sourceChange (value) {
|
||||
let params = {}
|
||||
if (value || value === 0) {
|
||||
params = { isBuiltIn: value }
|
||||
}
|
||||
if (this.category) {
|
||||
params = { ...params, category: this.category }
|
||||
}
|
||||
if (this.intent) {
|
||||
params = { ...params, intent: this.intent }
|
||||
}
|
||||
if (this.name) {
|
||||
params = { ...params, name: this.name }
|
||||
}
|
||||
this.getTableData(params)
|
||||
},
|
||||
search (params) {
|
||||
|
||||
Reference in New Issue
Block a user