forked from github/dataease
feat(查询组件): 查询组件在外面显示精确匹配和模糊匹配需支持配置显示与不显示 #12183
This commit is contained in:
parent
4d97b721d2
commit
32d8bf517a
@ -325,10 +325,11 @@ defineExpose({
|
||||
<template>
|
||||
<div class="list-item top-item" v-if="curComponent.displayType === '8'" @click.stop>
|
||||
<div class="label">设置默认值</div>
|
||||
<div class="value">
|
||||
<div class="value" :class="curComponent.hideConditionSwitching && 'hide-condition_switching'">
|
||||
<div class="condition-type">
|
||||
<el-select
|
||||
class="condition-value-select"
|
||||
v-if="!curComponent.hideConditionSwitching"
|
||||
popper-class="condition-value-select-popper"
|
||||
v-model="curComponent.defaultConditionValueOperatorF"
|
||||
>
|
||||
@ -346,6 +347,7 @@ defineExpose({
|
||||
<div class="condition-type" v-if="[1, 2].includes(curComponent.conditionType)">
|
||||
<sapn class="condition-type-tip">{{ curComponent.conditionType === 1 ? '与' : '或' }}</sapn>
|
||||
<el-select
|
||||
v-if="!curComponent.hideConditionSwitching"
|
||||
class="condition-value-select"
|
||||
popper-class="condition-value-select-popper"
|
||||
v-model="curComponent.defaultConditionValueOperatorS"
|
||||
@ -710,6 +712,16 @@ defineExpose({
|
||||
margin-top: -0.5px;
|
||||
}
|
||||
}
|
||||
|
||||
&.hide-condition_switching {
|
||||
.bottom-line {
|
||||
width: 307px !important;
|
||||
|
||||
&.next-line {
|
||||
width: 288px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.value {
|
||||
.sort-field {
|
||||
|
@ -1020,6 +1020,7 @@ const weightlessness = () => {
|
||||
const parameterCompletion = () => {
|
||||
const attributes = {
|
||||
timeType: 'fixed',
|
||||
hideConditionSwitching: false,
|
||||
required: false,
|
||||
defaultMapValue: [],
|
||||
mapValue: [],
|
||||
@ -1067,7 +1068,7 @@ const parameterCompletion = () => {
|
||||
treeFieldList: []
|
||||
}
|
||||
Object.entries(attributes).forEach(([key, val]) => {
|
||||
!curComponent.value[key] && (curComponent.value[key] = val)
|
||||
curComponent.value[key] ?? (curComponent.value[key] = val)
|
||||
})
|
||||
|
||||
if (!curComponent.value.timeRange.relativeToCurrentRange) {
|
||||
@ -2138,6 +2139,9 @@ defineExpose({
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="curComponent.displayType === '8'">
|
||||
<el-checkbox v-model="curComponent.hideConditionSwitching" label="隐藏条件切换" />
|
||||
</div>
|
||||
<condition-default-configuration
|
||||
ref="defaultConfigurationRef"
|
||||
@handleTimeTypeChange="handleTimeTypeChange"
|
||||
|
@ -6,6 +6,7 @@ interface SelectConfig {
|
||||
id: string
|
||||
conditionValueOperatorF: string
|
||||
conditionValueF: string
|
||||
hideConditionSwitching: boolean
|
||||
conditionValueOperatorS: string
|
||||
conditionValueS: string
|
||||
defaultConditionValueOperatorF: string
|
||||
@ -90,6 +91,7 @@ const lineWidth = computed(() => {
|
||||
<div class="condition-type">
|
||||
<el-select
|
||||
class="condition-value-select"
|
||||
v-if="!config.hideConditionSwitching"
|
||||
@change="handleValueChange"
|
||||
:effect="dvInfo.type === 'dataV' ? 'dark' : ''"
|
||||
popper-class="condition-value-select-popper"
|
||||
@ -109,6 +111,7 @@ const lineWidth = computed(() => {
|
||||
<div class="condition-type" v-if="[1, 2].includes(config.conditionType)">
|
||||
<sapn class="condition-type-tip">{{ config.conditionType === 1 ? '与' : '或' }}</sapn>
|
||||
<el-select
|
||||
v-if="!config.hideConditionSwitching"
|
||||
class="condition-value-select"
|
||||
@change="handleValueChange"
|
||||
:effect="dvInfo.type === 'dataV' ? 'dark' : ''"
|
||||
|
Loading…
Reference in New Issue
Block a user