fix: 关于实体搜索的处理都移入parser.js,方便统一整理

This commit is contained in:
刘洪洪
2023-09-08 11:11:56 +08:00
parent b25d1d4619
commit f3cf542bef
5 changed files with 642 additions and 673 deletions

View File

@@ -36,7 +36,7 @@ import { toRaw } from 'vue'
import _ from 'lodash'
import { columnType } from '@/components/advancedSearch/meta/meta'
import { handleErrorTip } from '@/components/advancedSearch/meta/error'
import { comparedEntityKey, handleEntityTypeByStr, overwriteUrl, urlParamsHandler } from '@/utils/tools'
import { overwriteUrl, urlParamsHandler } from '@/utils/tools'
export default {
name: 'TextMode',
@@ -96,7 +96,7 @@ export default {
const str = this.codeMirror.getValue().trim()
if (str) {
const parser = new Parser(this.columnList)
const keyInfo = comparedEntityKey(handleEntityTypeByStr(str))
const keyInfo = parser.comparedEntityKey(parser.handleEntityTypeByStr(str))
if (keyInfo.isKey) {
const errorList = parser.validateStr(keyInfo.key)
if (_.isEmpty(errorList)) {