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

@@ -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) {