CN-834 fix: 修复npm下钻ip过滤未生效的问题

This commit is contained in:
chenjinsong
2022-12-29 21:43:13 +08:00
parent 823da09f69
commit 5714e3b97a
3 changed files with 48 additions and 12 deletions

View File

@@ -145,7 +145,7 @@ export default {
}
// const conditionStr = this.$route.query.queryCondition ? this.$route.query.queryCondition : ''
let condition = ''
const type = this.dimensionType
let type = this.dimensionType
if (this.queryCondition.indexOf(' OR ') > -1) {
condition = this.queryCondition.split(/["|'](.*?)["|']/)
} else {
@@ -161,13 +161,19 @@ export default {
endTime: getSecond(this.timeFilter.endTime)
}
if (type) {
if (type === 'clientIp' || type === 'serverIp') {
if (parseFloat(this.tabIndex) === 0) {
type = 'clientIp'
} else if (parseFloat(this.tabIndex) === 1) {
type = 'serverIp'
}
params.q = `ip='${condition.split(/'(.*?)'/)[1]}'`
}
params.type = type
}
if (condition && (typeof condition !== 'object') && type) {
if (type === 'clientIp') {
params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='client'`
} else if (type === 'serverIp') {
params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='server'`
if (type === 'clientIp' || type === 'serverIp') {
params.q = `ip='${condition.split(/'(.*?)'/)[1]}'`
} else if (type === 'clientCity') {
params.q = `client_city='${condition.split(/'(.*?)'/)[1]}'`
} else if (type === 'serverCity') {