fix: 修复npm部分下钻参数处理问题

This commit is contained in:
changcode
2022-09-30 17:03:12 +08:00
parent 834eef9c52
commit 2e96db67d5
2 changed files with 6 additions and 7 deletions

View File

@@ -60,7 +60,7 @@ export default {
npmNetworkCycleQuery () { npmNetworkCycleQuery () {
// const conditionStr = this.$route.query.queryCondition ? this.$route.query.queryCondition : '' // const conditionStr = this.$route.query.queryCondition ? this.$route.query.queryCondition : ''
let condition = '' let condition = ''
if (this.queryCondition.indexOf('OR') > -1) { if (this.queryCondition.indexOf(' OR ') > -1) {
condition = this.queryCondition.split(/["|'](.*?)["|']/) condition = this.queryCondition.split(/["|'](.*?)["|']/)
} else { } else {
condition = this.queryCondition condition = this.queryCondition
@@ -127,15 +127,14 @@ export default {
} }
}, },
npmNetworkLastCycleQuery () { npmNetworkLastCycleQuery () {
const conditionStr = this.$route.query.queryCondition ? this.$route.query.queryCondition : ''
let condition = '' let condition = ''
if (conditionStr.indexOf('OR') > -1) { if (this.queryCondition.indexOf(' OR ') > -1) {
condition = conditionStr.split(/["|'](.*?)["|']/) condition = this.queryCondition.split(/["|'](.*?)["|']/)
} else { } else {
condition = conditionStr condition = this.queryCondition
} }
// const type = this.$store.getters.getDimensionType // const type = this.$store.getters.getDimensionType
const type = this.$route.query.dimensionType ? this.$route.query.dimensionType : '' const type = this.dimensionType
const params = { const params = {
startTime: getSecond(this.timeFilter.startTime), startTime: getSecond(this.timeFilter.startTime),
endTime: getSecond(this.timeFilter.endTime), endTime: getSecond(this.timeFilter.endTime),

View File

@@ -138,7 +138,7 @@ export default {
// const conditionStr = this.$route.query.queryCondition ? this.$route.query.queryCondition : '' // const conditionStr = this.$route.query.queryCondition ? this.$route.query.queryCondition : ''
let condition = '' let condition = ''
const type = this.dimensionType const type = this.dimensionType
if (this.queryCondition.indexOf('OR') > -1 && type !== 'protocolPort') { if (this.queryCondition.indexOf(' OR ') > -1) {
condition = this.queryCondition.split(/["|'](.*?)["|']/) condition = this.queryCondition.split(/["|'](.*?)["|']/)
} else { } else {
condition = this.queryCondition condition = this.queryCondition