CN-754 下钻table的一些bug:城市单引号问题

This commit is contained in:
hyx
2022-10-21 21:26:39 +08:00
parent 2e27cd5add
commit 74cbcf0d46
2 changed files with 2 additions and 3 deletions

View File

@@ -429,7 +429,7 @@ export default {
this.urlChangeParams[this.curTabState.queryCondition] = queryCondition.join(' AND ') this.urlChangeParams[this.curTabState.queryCondition] = queryCondition.join(' AND ')
} else { } else {
searchProps.forEach(item => { searchProps.forEach(item => {
queryCondition.push(item + "='" + value + "'") queryCondition.push(item + "='" + value.replaceAll("'", "\\\\'") + "'")
}) })
this.urlChangeParams[this.curTabState.queryCondition] = queryCondition.join(' OR ') this.urlChangeParams[this.curTabState.queryCondition] = queryCondition.join(' OR ')
} }

View File

@@ -314,7 +314,6 @@ export default {
/* 参数 extraParams 额外请求参数 */ /* 参数 extraParams 额外请求参数 */
getChartData (extraParams = {}) { getChartData (extraParams = {}) {
this.initState() this.initState()
// const chartParams = this.chart.params
const queryParams = { const queryParams = {
...this.handleQueryParams(extraParams), ...this.handleQueryParams(extraParams),
startTime: getSecond(this.timeFilter.startTime), startTime: getSecond(this.timeFilter.startTime),
@@ -585,7 +584,7 @@ export default {
} }
if (tabList.length > 0) { if (tabList.length > 0) {
const conditionStr = tabList.filter(item => item != '') const conditionStr = tabList.filter(item => item != '')
queryParams.params = conditionStr.toString() queryParams.params = conditionStr.toString().replaceAll("'", "\\\\'")
queryParams.type = curTab.prop queryParams.type = curTab.prop
} }