fix: 修复实体搜索包含非连接符的and,由text转换到tag失败的问题
This commit is contained in:
@@ -456,7 +456,7 @@ export default {
|
||||
// 如果地址栏包含参数q,则匹配出metaList到搜索栏回显使用
|
||||
let { q } = this.$route.query
|
||||
if (q) {
|
||||
q = comparedEntityKey(q).key
|
||||
q = comparedEntityKey(handleEntityTypeByStr(q)).key
|
||||
const parser = new Parser(this.columnList)
|
||||
this.metaList = parser.parseStr(q).metaList
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ export default {
|
||||
changeMode () {
|
||||
let str = this.codeMirror.getValue().trim()
|
||||
if (str) {
|
||||
str = comparedEntityKey(str).key
|
||||
str = comparedEntityKey(handleEntityTypeByStr(str)).key
|
||||
const parser = new Parser(this.columnList)
|
||||
const errorList = parser.validateStr(str)
|
||||
if (_.isEmpty(errorList)) {
|
||||
|
||||
@@ -792,7 +792,7 @@ export function handleOperatorSpace (operator) {
|
||||
export function handleMetaListToStr (metaList) {
|
||||
// 将模糊搜索的值,转换为对应类型,如1.1.1.1,则添加操作符,类型等,以便于后面的操作
|
||||
metaList.forEach(item => {
|
||||
if (item.column.type === 'fullText') {
|
||||
if (item.column && item.column.type === 'fullText') {
|
||||
item.operator.value = '='
|
||||
item.value.value = item.column.label
|
||||
item.value.label = item.column.label
|
||||
|
||||
Reference in New Issue
Block a user