CN-799 部分接口param参数内容本身带逗号时查询不准确的问题

This commit is contained in:
hyx
2022-11-16 16:59:52 +08:00
parent 8416060fc4
commit c30f6e642a
3 changed files with 59 additions and 8 deletions

View File

@@ -510,13 +510,10 @@ export default {
}
this.curTabProp = this.$route.query.dimensionType ? this.$route.query.dimensionType : null
document.getElementById('breadcrumbValue').innerText = value
// document.getElementById('breadcrumbButton').setAttribute('title', valName)
document.getElementById(this.valueMenuId).setAttribute('title', valName)
document.getElementById('breadcrumbButton').click()
// const columnName = this.$store.getters.getBreadcrumbColumnName
const columnName = this.getUrlParam(this.curTabState.thirdMenu, '')
// const tabObjGroup = networkOverviewTabList.filter(item => item.label == columnName)
const curTab = this.getCurTabByLabel()
const curTab = this.getCurTabByLabel(columnName)
if (curTab) {
const queryCondition = []
const searchProps = curTab.dillDownProp

View File

@@ -748,6 +748,22 @@ export const networkOverviewTabList = [
checked: false,
disabled: false,
panelId: drillDownPanelTypeMapping.networkOverview
}, {
label: 'network.clientAsns',
prop: 'clientAsn',
queryCycleTotalProp: 'clientAsns',
dillDownProp: ['client_asn'],
checked: false,
disabled: false,
panelId: drillDownPanelTypeMapping.networkOverview
}, {
label: 'network.serverAsns',
prop: 'serverAsn',
queryCycleTotalProp: 'serverAsns',
dillDownProp: ['server_asn'],
checked: false,
disabled: false,
panelId: drillDownPanelTypeMapping.networkOverview
}
]
@@ -976,6 +992,22 @@ export const networkAppPerformanceTabList = [
checked: false,
disabled: false,
panelId: drillDownPanelTypeMapping.npmOverviewCommon
}, {
label: 'network.clientAsns',
prop: 'clientAsn',
queryCycleTotalProp: 'clientAsns',
dillDownProp: ['client_asn'],
checked: false,
disabled: false,
panelId: drillDownPanelTypeMapping.npmOverviewCommon
}, {
label: 'network.serverAsns',
prop: 'serverAsn',
queryCycleTotalProp: 'serverAsns',
dillDownProp: ['server_asn'],
checked: false,
disabled: false,
panelId: drillDownPanelTypeMapping.npmOverviewCommon
}
]
export const linkMonitorTabList = [
@@ -1203,6 +1235,22 @@ export const linkMonitorTabList = [
checked: false,
disabled: false,
panelId: drillDownPanelTypeMapping.linkMonitor
}, {
label: 'network.clientAsns',
prop: 'clientAsn',
queryCycleTotalProp: 'clientAsns',
dillDownProp: ['client_asn'],
checked: false,
disabled: false,
panelId: drillDownPanelTypeMapping.linkMonitor
}, {
label: 'network.serverAsns',
prop: 'serverAsn',
queryCycleTotalProp: 'serverAsns',
dillDownProp: ['server_asn'],
checked: false,
disabled: false,
panelId: drillDownPanelTypeMapping.linkMonitor
}
]
export const dnsServiceInsightsTabList = [

View File

@@ -613,8 +613,14 @@ export default {
endTime: getSecond(this.timeFilter.endTime)
}
if (tabList.length > 0) {
const conditionStr = tabList.filter(item => item != '')
queryParams.params = conditionStr.toString().replaceAll("'", "\\\\'")
let conditionGroup = tabList.filter(item => item != '')
let conditionHandleRlt = []
conditionGroup.forEach(condition => {
condition = condition.replaceAll("'", "\\\\'")
condition = "'"+condition+ "'"
conditionHandleRlt.push(condition)
})
queryParams.params = conditionHandleRlt.join(",")
queryParams.type = curTab.prop
}
@@ -1079,7 +1085,7 @@ export default {
} else {
if (tab.queryCondition) {
tab.queryCondition.forEach(item => {
queryCondition.push(item.replace('$param', value))
queryCondition.push(item.replaceAll('$param', value))
})
} else {
if (tab.dillDownProp) {
@@ -1237,7 +1243,7 @@ export default {
} else {
if (curTab.queryCondition) {
curTab.queryCondition.forEach(item => {
queryCondition.push(item.replace('$param', columnValue))
queryCondition.push(item.replaceAll('$param', columnValue))
})
} else {
if (curTab.dillDownProp) {