CN-1479 fix: 搜索组件补全模糊搜索与tag模式关于枚举in操作的处理

This commit is contained in:
刘洪洪
2023-12-12 10:06:21 +08:00
parent e1a26b60ae
commit 3d5c69d87b
7 changed files with 202 additions and 47 deletions

View File

@@ -178,9 +178,13 @@ export default {
}
})
if (keyInfo.isKey) {
const errorList = parser.validateStr(keyInfo.key)
// 检查是否包含枚举字段,包含的话进行替换
const enumKey = parser.conversionEnum(keyInfo.key)
const errorList = parser.validateStr(newKey)
if (_.isEmpty(errorList)) {
this.$emit('search', { ...parser.parseStr(keyInfo.key), str: str, keywordList: keywordList })
// 补全模糊搜索
toRaw(this.codeMirror).setValue(parser.handleEntityTypeByStr(str))
this.$emit('search', { ...parser.parseStr(enumKey), str: parser.handleEntityTypeByStr(str), keywordList: keywordList })
} else {
this.$message.error(handleErrorTip(errorList[0]))
}