forked from github/dataease
fix(仪表板): 过滤器标题隐藏后再开启被清空
This commit is contained in:
parent
2532483a85
commit
f5ca282259
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div ref="myContainer" class="my-container">
|
<div ref="myContainer" class="my-container">
|
||||||
<div ref="conditionMain" :style="outsideStyle" class="condition-main">
|
<div ref="conditionMain" :style="outsideStyle" class="condition-main">
|
||||||
<div v-if="element.options.attrs.title" ref="deTitleContainer" :style="titleStyle" class="condition-title">
|
<div v-if="element.options.attrs.showTitle && element.options.attrs.title" ref="deTitleContainer" :style="titleStyle" class="condition-title">
|
||||||
<div class="condition-title-absolute">
|
<div class="condition-title-absolute">
|
||||||
<div class="first-title">
|
<div class="first-title">
|
||||||
<div class="span-container">
|
<div class="span-container">
|
||||||
@ -13,7 +13,7 @@
|
|||||||
<div
|
<div
|
||||||
ref="deContentContainer"
|
ref="deContentContainer"
|
||||||
class="condition-content"
|
class="condition-content"
|
||||||
:class="element.options.attrs.title ? '' : 'condition-content-default'"
|
:class="(element.options.attrs.showTitle && element.options.attrs.title) ? '' : 'condition-content-default'"
|
||||||
>
|
>
|
||||||
<div class="condition-content-container">
|
<div class="condition-content-container">
|
||||||
<div class="first-element">
|
<div class="first-element">
|
||||||
|
@ -562,7 +562,7 @@ export default {
|
|||||||
return false
|
return false
|
||||||
} else if (this.curComponent && this.showAttrComponent.includes(this.curComponent.type)) {
|
} else if (this.curComponent && this.showAttrComponent.includes(this.curComponent.type)) {
|
||||||
// 过滤组件有标题才显示
|
// 过滤组件有标题才显示
|
||||||
if (this.curComponent.type === 'custom' && !this.curComponent.options.attrs.title) {
|
if (this.curComponent.type === 'custom' && (!this.curComponent.options.attrs.showTitle || !this.curComponent.options.attrs.title)) {
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
return true
|
return true
|
||||||
|
@ -76,7 +76,7 @@ export default {
|
|||||||
if (showName) {
|
if (showName) {
|
||||||
result = this.$t(showName)
|
result = this.$t(showName)
|
||||||
}
|
}
|
||||||
if (item.options.attrs.title) {
|
if (item.options.attrs.showTitle && item.options.attrs.title) {
|
||||||
result += '【' + item.options.attrs.title + '】'
|
result += '【' + item.options.attrs.title + '】'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,8 +50,13 @@
|
|||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
<el-popover v-model="titlePopovervisible" placement="bottom-end" :disabled="!attrs.showTitle" width="200">
|
<el-popover v-model="titlePopovervisible" placement="bottom-end" :disabled="!attrs.showTitle" width="200">
|
||||||
<div style="width: 100%;overflow-y: auto;overflow-x: hidden;word-break: break-all;position: relative;">
|
<div style="width: 100%;overflow-y: auto;overflow-x: hidden;word-break: break-all;position: relative;">
|
||||||
<el-input v-model="attrs.title" :placeholder="$t('panel.input_title')" type="textarea" maxlength="15"
|
<el-input
|
||||||
show-word-limit/>
|
v-model="attrs.title"
|
||||||
|
:placeholder="$t('panel.input_title')"
|
||||||
|
type="textarea"
|
||||||
|
maxlength="15"
|
||||||
|
show-word-limit
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<i
|
<i
|
||||||
@ -107,8 +112,10 @@
|
|||||||
class="de-checkbox"
|
class="de-checkbox"
|
||||||
>
|
>
|
||||||
<div class="span-div">
|
<div class="span-div">
|
||||||
<span v-if="item.alias && item.alias.length <= 7"
|
<span
|
||||||
style="margin-left: 6px">{{ item.alias }}</span>
|
v-if="item.alias && item.alias.length <= 7"
|
||||||
|
style="margin-left: 6px"
|
||||||
|
>{{ item.alias }}</span>
|
||||||
<el-tooltip v-else class="item" effect="dark" :content="item.alias" placement="left">
|
<el-tooltip v-else class="item" effect="dark" :content="item.alias" placement="left">
|
||||||
<span style="margin-left: 6px">{{ item.alias }}</span>
|
<span style="margin-left: 6px">{{ item.alias }}</span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
@ -179,59 +186,42 @@ export default {
|
|||||||
if ('timeYearWidget,timeMonthWidget,timeDateWidget,textSelectWidget,numberSelectWidget'.indexOf(this.widget.name) !== -1) {
|
if ('timeYearWidget,timeMonthWidget,timeDateWidget,textSelectWidget,numberSelectWidget'.indexOf(this.widget.name) !== -1) {
|
||||||
this.showParams = true
|
this.showParams = true
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
,
|
|
||||||
methods: {
|
methods: {
|
||||||
multipleChange(value)
|
multipleChange(value) {
|
||||||
{
|
|
||||||
this.fillAttrs2Filter()
|
this.fillAttrs2Filter()
|
||||||
}
|
},
|
||||||
,
|
showTimeChange(value) {
|
||||||
showTimeChange(value)
|
|
||||||
{
|
|
||||||
this.attrs.accuracy = this.accuracyOptions[1].id
|
this.attrs.accuracy = this.accuracyOptions[1].id
|
||||||
this.attrs.default.isDynamic = false
|
this.attrs.default.isDynamic = false
|
||||||
this.fillAttrs2Filter()
|
this.fillAttrs2Filter()
|
||||||
}
|
},
|
||||||
,
|
checkedViewsChange(values) {
|
||||||
checkedViewsChange(values)
|
|
||||||
{
|
|
||||||
this.fillAttrs2Filter()
|
this.fillAttrs2Filter()
|
||||||
}
|
},
|
||||||
,
|
enableRangeChange(value) {
|
||||||
enableRangeChange(value)
|
|
||||||
{
|
|
||||||
if (!value) {
|
if (!value) {
|
||||||
this.attrs.viewIds = []
|
this.attrs.viewIds = []
|
||||||
}
|
}
|
||||||
this.fillAttrs2Filter()
|
this.fillAttrs2Filter()
|
||||||
}
|
},
|
||||||
,
|
enableParametersChange(value) {
|
||||||
enableParametersChange(value)
|
|
||||||
{
|
|
||||||
if (!value) {
|
if (!value) {
|
||||||
this.attrs.parameters = []
|
this.attrs.parameters = []
|
||||||
}
|
}
|
||||||
this.fillAttrs2Filter()
|
this.fillAttrs2Filter()
|
||||||
}
|
},
|
||||||
,
|
showTitleChange(value) {
|
||||||
showTitleChange(value)
|
|
||||||
{
|
|
||||||
if (!value) {
|
if (!value) {
|
||||||
this.attrs.title = ''
|
|
||||||
this.element.style.backgroundColor = ''
|
this.element.style.backgroundColor = ''
|
||||||
}
|
}
|
||||||
this.fillAttrs2Filter()
|
this.fillAttrs2Filter()
|
||||||
}
|
},
|
||||||
,
|
showVisualChange(value) {
|
||||||
showVisualChange(value)
|
|
||||||
{
|
|
||||||
this.fillAttrs2Filter()
|
this.fillAttrs2Filter()
|
||||||
}
|
},
|
||||||
,
|
|
||||||
|
|
||||||
fillAttrs2Filter()
|
fillAttrs2Filter() {
|
||||||
{
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user