fix: 修复实体列表点击左侧filter的tag选项,不能匹配has函数,以及tag模式下模糊搜索,不显示操作符等问题
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
</div>
|
||||
<span v-else @click="valueClick(meta)">{{meta.value.label}}</span>
|
||||
</div>
|
||||
<div class="condition__value" v-if="meta.operator.show && meta.operator.value === 'has'">)</div>
|
||||
<div class="condition__value" style="margin-left: -5px;" v-if="meta.operator.show && meta.operator.value === 'has'">)</div>
|
||||
|
||||
<!-- 操作符选择器 -->
|
||||
<div class="condition__operation-select" v-if="meta.operator.show && meta.operator.isEditing">
|
||||
@@ -371,7 +371,7 @@ export default {
|
||||
return value
|
||||
}
|
||||
} else {
|
||||
let newValue = column.type === columnType.string ? stringInQuot(value) : value
|
||||
let newValue = (column.type.items ? column.type.items : column.type) === columnType.string ? stringInQuot(value) : value
|
||||
if (flag) {
|
||||
newValue = newValue.slice(1)
|
||||
newValue = newValue.slice(0, newValue.length - 1)
|
||||
@@ -388,9 +388,9 @@ export default {
|
||||
})
|
||||
const meta = new Meta()
|
||||
meta.column.label = param.column
|
||||
meta.column.type = column ? column.type : columnType.string
|
||||
meta.column.type = column ? (column.type.items ? column.type.items : column.type) : columnType.string
|
||||
meta.column.label = column ? column.label : param.column
|
||||
meta.operator.value = '='
|
||||
meta.operator.value = param.operator
|
||||
meta.operator.show = true
|
||||
meta.value.value = this.handleValue(param.value, column, column.operator, 'noQuotes')
|
||||
meta.value.show = true
|
||||
|
||||
@@ -794,6 +794,7 @@ export function handleMetaListToStr (metaList) {
|
||||
metaList.forEach(item => {
|
||||
if (item.column && item.column.type === 'fullText') {
|
||||
item.operator.value = '='
|
||||
item.operator.show = true
|
||||
item.value.value = item.column.label
|
||||
item.value.label = item.column.label
|
||||
item.column.label = getEntityTypeByValue(item.column.label)
|
||||
|
||||
@@ -472,6 +472,13 @@ export default {
|
||||
}
|
||||
]
|
||||
this.$refs.search.addParams(params)
|
||||
} else if (topData.topColumn === 'tag') {
|
||||
const params = {
|
||||
column: topData.topColumn,
|
||||
operator: 'has',
|
||||
value: name
|
||||
}
|
||||
this.$refs.search.addParams([params])
|
||||
} else {
|
||||
const params = {
|
||||
column: topData.topColumn,
|
||||
|
||||
Reference in New Issue
Block a user