CN-1238: 实体查询语法逻辑
This commit is contained in:
@@ -168,7 +168,13 @@ import { getNowTime, getSecond } from '@/utils/date-util'
|
||||
import { ref } from 'vue'
|
||||
import _ from 'lodash'
|
||||
import Loading from '@/components/common/Loading'
|
||||
import { overwriteUrl, urlParamsHandler, numberWithCommas, comparedEntityKey } from '@/utils/tools'
|
||||
import {
|
||||
overwriteUrl,
|
||||
urlParamsHandler,
|
||||
numberWithCommas,
|
||||
comparedEntityKey,
|
||||
handleEntityTypeByStr
|
||||
} from '@/utils/tools'
|
||||
import Parser from '@/components/advancedSearch/meta/parser'
|
||||
import { handleErrorTip } from '@/components/advancedSearch/meta/error'
|
||||
import { columnList } from '@/utils/static-data'
|
||||
@@ -863,7 +869,7 @@ export default {
|
||||
}
|
||||
}
|
||||
const parser = new Parser(columnList)
|
||||
const keyInfo = comparedEntityKey(str)
|
||||
const keyInfo = comparedEntityKey(handleEntityTypeByStr(str))
|
||||
if (keyInfo.isKey) {
|
||||
const errorList = parser.validateStr(keyInfo.key)
|
||||
if (_.isEmpty(errorList)) {
|
||||
@@ -872,7 +878,7 @@ export default {
|
||||
this.$message.error(handleErrorTip(errorList[0]))
|
||||
}
|
||||
} else {
|
||||
this.$message.error(this.$t('tip.invalidQueryField') + keyInfo.key)
|
||||
this.$message.error(this.$t('tip.invalidQueryField') + ' ' + keyInfo.key)
|
||||
}
|
||||
} else {
|
||||
this.search({ q: '', str: '', metaList: [] })
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</div>
|
||||
<div class="basic-info__item">
|
||||
<i class="cn-icon cn-icon-position"></i>
|
||||
<span class="row-item-label">{{ $t('overall.region') }} : </span>
|
||||
<span class="row-item-label">{{ $t('overall.city') }} : </span>
|
||||
<span class="row-item-value">{{ entityData.location ? ipLocationRegion(entityData.location) : '-' }}</span>
|
||||
</div>
|
||||
<div class="basic-info__item">
|
||||
|
||||
@@ -74,11 +74,11 @@ export default {
|
||||
{
|
||||
value: 'AND',
|
||||
label: 'AND'
|
||||
},
|
||||
{
|
||||
value: 'OR',
|
||||
label: 'OR'
|
||||
}
|
||||
// {
|
||||
// value: 'OR',
|
||||
// label: 'OR'
|
||||
// }
|
||||
],
|
||||
showHistory: false,
|
||||
history: []
|
||||
|
||||
Reference in New Issue
Block a user