CN-1265 fix: 修复实体搜索时的一些问题

This commit is contained in:
刘洪洪
2023-09-05 18:37:56 +08:00
parent 48c3df2b00
commit 8d25b2ecfb
6 changed files with 303 additions and 123 deletions

View File

@@ -115,9 +115,8 @@ export default {
this.codeMirror.focus()
},
changeMode () {
let str = this.codeMirror.getValue().trim()
const str = this.codeMirror.getValue().trim()
if (str) {
str = comparedEntityKey(handleEntityTypeByStr(str)).key
const parser = new Parser(this.columnList)
const errorList = parser.validateStr(str)
if (_.isEmpty(errorList)) {
@@ -221,6 +220,9 @@ export default {
let { q } = this.$route.query
this.initCodeMirror()
if (q) {
if (q.indexOf('%20') > -1) {
q = decodeURI(q)
}
// 为避免地址栏任意输入导致全查询的q带QUERY解析时不识别导致的语法错误
// 如地址栏输入116.178.222.171此时的q很长刷新界面时需要把q里的116.178.222.171拿出来进行搜索
if (q.indexOf('QUERY') > -1) {