fix: npm 下钻接口请求 side 参数根据 tabIndex 判断赋值
This commit is contained in:
@@ -25,9 +25,11 @@ export default {
|
|||||||
const { query } = useRoute()
|
const { query } = useRoute()
|
||||||
const queryCondition = ref(query.queryCondition || '')
|
const queryCondition = ref(query.queryCondition || '')
|
||||||
const dimensionType = ref(query.dimensionType || '')
|
const dimensionType = ref(query.dimensionType || '')
|
||||||
|
const tabIndex = ref(query.tabIndex)
|
||||||
return {
|
return {
|
||||||
queryCondition,
|
queryCondition,
|
||||||
dimensionType
|
dimensionType,
|
||||||
|
tabIndex
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
@@ -69,9 +71,9 @@ export default {
|
|||||||
endTime: getSecond(this.timeFilter.endTime),
|
endTime: getSecond(this.timeFilter.endTime),
|
||||||
cycle: 0
|
cycle: 0
|
||||||
}
|
}
|
||||||
if (this.chartData.name === 'npm-ip下钻-client-多单值') {
|
if (this.tabIndex == 0) {
|
||||||
this.side = 'client'
|
this.side = 'client'
|
||||||
} else if (this.chartData.name === 'npm-ip下钻-server-多单值') {
|
} else if (this.tabIndex == 1) {
|
||||||
this.side = 'server'
|
this.side = 'server'
|
||||||
}
|
}
|
||||||
if (condition && (typeof condition !== 'object') && type) {
|
if (condition && (typeof condition !== 'object') && type) {
|
||||||
@@ -135,9 +137,9 @@ export default {
|
|||||||
endTime: getSecond(this.timeFilter.endTime),
|
endTime: getSecond(this.timeFilter.endTime),
|
||||||
cycle: 1
|
cycle: 1
|
||||||
}
|
}
|
||||||
if (this.chartData.name === 'npm-ip下钻-client-多单值') {
|
if (this.tabIndex == 0) {
|
||||||
this.side = 'client'
|
this.side = 'client'
|
||||||
} else if (this.chartData.name === 'npm-ip下钻-server-多单值') {
|
} else if (this.tabIndex == 1) {
|
||||||
this.side = 'server'
|
this.side = 'server'
|
||||||
}
|
}
|
||||||
if (condition && (typeof condition !== 'object') && type) {
|
if (condition && (typeof condition !== 'object') && type) {
|
||||||
|
|||||||
@@ -51,10 +51,12 @@ export default {
|
|||||||
const metricFilter = ref(query.lineMetric || 'Bits/s')
|
const metricFilter = ref(query.lineMetric || 'Bits/s')
|
||||||
const queryCondition = ref(query.queryCondition || '')
|
const queryCondition = ref(query.queryCondition || '')
|
||||||
const dimensionType = ref(query.dimensionType || '')
|
const dimensionType = ref(query.dimensionType || '')
|
||||||
|
const tabIndex = ref(query.tabIndex)
|
||||||
return {
|
return {
|
||||||
metricFilter,
|
metricFilter,
|
||||||
queryCondition,
|
queryCondition,
|
||||||
dimensionType,
|
dimensionType,
|
||||||
|
tabIndex,
|
||||||
myChart: shallowRef(null)
|
myChart: shallowRef(null)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -142,10 +144,9 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
condition = this.queryCondition
|
condition = this.queryCondition
|
||||||
}
|
}
|
||||||
// const type = this.$store.getters.getDimensionType
|
if (this.tabIndex == 0) {
|
||||||
if (this.chartData.id === 24) {
|
|
||||||
this.side = 'client'
|
this.side = 'client'
|
||||||
} else if (this.chartData.id === 29) {
|
} else if (this.tabIndex == 1) {
|
||||||
this.side = 'server'
|
this.side = 'server'
|
||||||
}
|
}
|
||||||
const params = {
|
const params = {
|
||||||
|
|||||||
Reference in New Issue
Block a user