fix: link-monitor 折线图,桑基图下钻 根据文档增加下钻参数接收
This commit is contained in:
@@ -48,6 +48,7 @@ export default {
|
||||
setup () {
|
||||
const { query } = useRoute()
|
||||
const tab = ref(query.tabIndex || 0)
|
||||
// const d = `egress_link_direction='${256}' AND ingress_link_direction='${256}' `
|
||||
const queryCondition = ref(query.queryCondition || '')
|
||||
return {
|
||||
tab,
|
||||
|
||||
@@ -73,12 +73,12 @@ export default {
|
||||
const { query } = useRoute()
|
||||
const lineMetric = ref(query.lineMetric || 'Bits/s')
|
||||
const lineTab = ref(query.lineTab || '')
|
||||
const d = `common_egress_link_id='${246}' AND common_ingress_link_id='${246}'`
|
||||
const linkId = ref(query.linkId || d)
|
||||
// const d = `common_egress_link_id='${246}' AND common_ingress_link_id='${246}'`
|
||||
const queryCondition = ref(query.queryCondition || '')
|
||||
return {
|
||||
lineMetric,
|
||||
lineTab,
|
||||
linkId,
|
||||
queryCondition,
|
||||
myChart: shallowRef(null)
|
||||
}
|
||||
},
|
||||
@@ -154,9 +154,9 @@ export default {
|
||||
endTime: getSecond(this.timeFilter.endTime)
|
||||
}
|
||||
// const condition = this.$store.getters.getQueryCondition
|
||||
// if (this.linkId) {
|
||||
// params.q = this.linkId
|
||||
// }
|
||||
if (this.queryCondition) {
|
||||
params.q = this.queryCondition
|
||||
}
|
||||
this.toggleLoading(true)
|
||||
get(api.linkMonitor.totalTrafficAnalysis, params).then((res) => {
|
||||
if (res.code === 200) {
|
||||
|
||||
@@ -46,16 +46,17 @@ import { ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { getSecond } from '@/utils/date-util'
|
||||
import { computeScore } from '@/utils/tools'
|
||||
import Login from '@/Login'
|
||||
|
||||
export default {
|
||||
name: 'linkTrafficList',
|
||||
mixins: [chartMixin],
|
||||
setup () {
|
||||
const { query } = useRoute()
|
||||
const d = `common_egress_link_id='${246}' AND common_ingress_link_id='${246}'`
|
||||
const linkId = ref(query.linkId || '256')
|
||||
// const d = `common_egress_link_id='${256}' AND common_ingress_link_id='${256}'`
|
||||
const queryCondition = ref(query.queryCondition || '')
|
||||
return {
|
||||
linkId
|
||||
queryCondition
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@@ -74,9 +75,9 @@ export default {
|
||||
startTime: getSecond(this.timeFilter.startTime),
|
||||
endTime: getSecond(this.timeFilter.endTime)
|
||||
}
|
||||
// if (this.linkId) {
|
||||
// params.q = this.linkId
|
||||
// }
|
||||
if (this.queryCondition) {
|
||||
params.q = this.queryCondition
|
||||
}
|
||||
this.toggleLoading(true)
|
||||
get(api.linkMonitor.networkAnalysis, params).then(res => {
|
||||
if (res.code === 200) {
|
||||
@@ -92,8 +93,14 @@ export default {
|
||||
if (this.linkTrafficListData.npmScore > 6) {
|
||||
this.linkTrafficListData.npmScore = 6
|
||||
}
|
||||
let condition = ''
|
||||
if (this.queryCondition.indexOf('AND') > -1) {
|
||||
condition = this.queryCondition.split(/["|'](.*?)["|']/)
|
||||
} else {
|
||||
condition = this.queryCondition
|
||||
}
|
||||
this.cnLinkInfo.forEach(e => {
|
||||
if (this.linkId === e.originalLinkId) {
|
||||
if (condition.length > 1 && condition[1] === e.originalLinkId) {
|
||||
this.bandWidth = e.bandwidth
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user