From 2e96db67d57928999d46894ae50c3d2adf6c6593 Mon Sep 17 00:00:00 2001 From: changcode Date: Fri, 30 Sep 2022 17:03:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dnpm=E9=83=A8=E5=88=86?= =?UTF-8?q?=E4=B8=8B=E9=92=BB=E5=8F=82=E6=95=B0=E5=A4=84=E7=90=86=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/charts2/charts/npm/NpmNetworkQuantity.vue | 11 +++++------ src/views/charts2/charts/npm/NpmTrafficLine.vue | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/views/charts2/charts/npm/NpmNetworkQuantity.vue b/src/views/charts2/charts/npm/NpmNetworkQuantity.vue index 2d8c0ff1..a9116970 100644 --- a/src/views/charts2/charts/npm/NpmNetworkQuantity.vue +++ b/src/views/charts2/charts/npm/NpmNetworkQuantity.vue @@ -60,7 +60,7 @@ export default { npmNetworkCycleQuery () { // const conditionStr = this.$route.query.queryCondition ? this.$route.query.queryCondition : '' let condition = '' - if (this.queryCondition.indexOf('OR') > -1) { + if (this.queryCondition.indexOf(' OR ') > -1) { condition = this.queryCondition.split(/["|'](.*?)["|']/) } else { condition = this.queryCondition @@ -127,15 +127,14 @@ export default { } }, npmNetworkLastCycleQuery () { - const conditionStr = this.$route.query.queryCondition ? this.$route.query.queryCondition : '' let condition = '' - if (conditionStr.indexOf('OR') > -1) { - condition = conditionStr.split(/["|'](.*?)["|']/) + if (this.queryCondition.indexOf(' OR ') > -1) { + condition = this.queryCondition.split(/["|'](.*?)["|']/) } else { - condition = conditionStr + condition = this.queryCondition } // const type = this.$store.getters.getDimensionType - const type = this.$route.query.dimensionType ? this.$route.query.dimensionType : '' + const type = this.dimensionType const params = { startTime: getSecond(this.timeFilter.startTime), endTime: getSecond(this.timeFilter.endTime), diff --git a/src/views/charts2/charts/npm/NpmTrafficLine.vue b/src/views/charts2/charts/npm/NpmTrafficLine.vue index 4073f0f8..e91fe02a 100644 --- a/src/views/charts2/charts/npm/NpmTrafficLine.vue +++ b/src/views/charts2/charts/npm/NpmTrafficLine.vue @@ -138,7 +138,7 @@ export default { // const conditionStr = this.$route.query.queryCondition ? this.$route.query.queryCondition : '' let condition = '' const type = this.dimensionType - if (this.queryCondition.indexOf('OR') > -1 && type !== 'protocolPort') { + if (this.queryCondition.indexOf(' OR ') > -1) { condition = this.queryCondition.split(/["|'](.*?)["|']/) } else { condition = this.queryCondition