fix: 修复库表重构后npm下钻左上角分数报错的问题

This commit is contained in:
chenjinsong
2023-09-12 14:23:06 +08:00
parent f3316fceda
commit 285c5d546d

View File

@@ -126,7 +126,7 @@ export default {
// } // }
timeFilter: { timeFilter: {
handler () { handler () {
if (this.$route.path === '/panel/networkAppPerformance' && (this.queryCondition || this.networkOverviewBeforeTab)) { if (this.$route.path === '/panel/networkAppPerformance' && (this.lineQueryCondition || this.networkOverviewBeforeTab)) {
this.scoreCalculation() this.scoreCalculation()
} }
} }
@@ -212,7 +212,7 @@ export default {
return chart return chart
}) })
}) })
if (this.$route.path === '/panel/networkAppPerformance' && (this.queryCondition || this.networkOverviewBeforeTab)) { if (this.$route.path === '/panel/networkAppPerformance' && (this.lineQueryCondition || this.networkOverviewBeforeTab)) {
this.scoreCalculation() this.scoreCalculation()
} }
}, },
@@ -303,7 +303,7 @@ export default {
const metric = ref(query.metric || 'Bits/s') const metric = ref(query.metric || 'Bits/s')
const queryCondition = ref(query.queryCondition || '') const lineQueryCondition = ref(query.lineQueryCondition || '')
const dimensionType = ref(query.dimensionType || '') const dimensionType = ref(query.dimensionType || '')
// 三级菜单判断 // 三级菜单判断
const tabOperationType = ref(query.tabOperationType) const tabOperationType = ref(query.tabOperationType)
@@ -315,7 +315,7 @@ export default {
showScore, showScore,
metric, metric,
path, path,
queryCondition, lineQueryCondition,
dimensionType, dimensionType,
tabOperationType, tabOperationType,
networkOverviewBeforeTab, networkOverviewBeforeTab,
@@ -399,12 +399,12 @@ export default {
scoreCalculation () { scoreCalculation () {
let condition = '' let condition = ''
let url = '' let url = ''
if (this.queryCondition.indexOf(' OR ') > -1) { if (this.lineQueryCondition.indexOf(' OR ') > -1) {
condition = this.queryCondition.split(/["|'](.*?)["|']/) condition = this.lineQueryCondition.split(/["|'](.*?)["|']/)
} else if (this.queryCondition.indexOf('+OR+') > -1) { } else if (this.lineQueryCondition.indexOf('+OR+') > -1) {
condition = this.queryCondition.replace(/\+/g, ' ').split(/["|'](.*?)["|']/) condition = this.lineQueryCondition.replace(/\+/g, ' ').split(/["|'](.*?)["|']/)
} else { } else {
condition = this.queryCondition condition = this.lineQueryCondition
} }
const type = this.dimensionType || this.networkOverviewBeforeTab const type = this.dimensionType || this.networkOverviewBeforeTab
const params = { const params = {
@@ -432,9 +432,6 @@ export default {
if (type === 'country' || type === 'asn' || type === 'province' || type === 'city' || type === 'isp') { if (type === 'country' || type === 'asn' || type === 'province' || type === 'city' || type === 'isp') {
params.q = `${type}='${condition[1]}'` params.q = `${type}='${condition[1]}'`
params.type = type params.type = type
} else if (type === 'idcRenter') {
params.q = `idc_renter='${condition[1]}'`
params.type = type
} else { } else {
params.q = `${condition[0]}'${condition[1]}'` params.q = `${condition[0]}'${condition[1]}'`
params.type = type params.type = type