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">
|
||||||
|
@ -366,12 +366,12 @@
|
|||||||
<svg-icon icon-class="warn-tre" style="width: 20px;height: 20px;float: right" />
|
<svg-icon icon-class="warn-tre" style="width: 20px;height: 20px;float: right" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="21">
|
<el-col :span="21">
|
||||||
<span style="font-size: 13px;margin-left: 10px;font-weight: bold;line-height: 20px">{{$t('panel.panel_cache_use_tips')}}</span>
|
<span style="font-size: 13px;margin-left: 10px;font-weight: bold;line-height: 20px">{{ $t('panel.panel_cache_use_tips') }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button size="mini" @click="useCache(false)">{{$t('panel.no')}}</el-button>
|
<el-button size="mini" @click="useCache(false)">{{ $t('panel.no') }}</el-button>
|
||||||
<el-button type="primary" size="mini" @click="useCache(true)">{{$t('panel.yes')}}</el-button>
|
<el-button type="primary" size="mini" @click="useCache(true)">{{ $t('panel.yes') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@ -387,7 +387,7 @@ import FilterGroup from '../filter'
|
|||||||
import SubjectSetting from '../SubjectSetting'
|
import SubjectSetting from '../SubjectSetting'
|
||||||
import bus from '@/utils/bus'
|
import bus from '@/utils/bus'
|
||||||
import Editor from '@/components/canvas/components/Editor/index'
|
import Editor from '@/components/canvas/components/Editor/index'
|
||||||
import {deepCopy, imgUrlTrans, matrixBaseChange} from '@/components/canvas/utils/utils'
|
import { deepCopy, imgUrlTrans, matrixBaseChange } from '@/components/canvas/utils/utils'
|
||||||
import componentList, {
|
import componentList, {
|
||||||
BASE_MOBILE_STYLE,
|
BASE_MOBILE_STYLE,
|
||||||
COMMON_BACKGROUND,
|
COMMON_BACKGROUND,
|
||||||
@ -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
|
||||||
@ -721,8 +721,8 @@ export default {
|
|||||||
bus.$on('delete-condition', this.deleteCustomComponent)
|
bus.$on('delete-condition', this.deleteCustomComponent)
|
||||||
bus.$on('current-component-change', this.asideRefresh)
|
bus.$on('current-component-change', this.asideRefresh)
|
||||||
},
|
},
|
||||||
asideRefresh(){
|
asideRefresh() {
|
||||||
if(this.$refs['chartEditRef']){
|
if (this.$refs['chartEditRef']) {
|
||||||
this.$refs['chartEditRef'].resetChartData()
|
this.$refs['chartEditRef'].resetChartData()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -790,7 +790,7 @@ export default {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (useCache) {
|
if (useCache) {
|
||||||
_this.$store.commit('recordSnapshot', 'cache')
|
_this.$store.commit('recordSnapshot', 'cache')
|
||||||
_this.$store.commit('recordChangeTimes' )
|
_this.$store.commit('recordChangeTimes')
|
||||||
} else {
|
} else {
|
||||||
_this.$store.commit('refreshSaveStatus')
|
_this.$store.commit('refreshSaveStatus')
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
@ -75,7 +80,7 @@
|
|||||||
class="de-checkbox"
|
class="de-checkbox"
|
||||||
>
|
>
|
||||||
<div class="span-div">
|
<div class="span-div">
|
||||||
<svg-icon :icon-class="item.type" class="chart-icon"/>
|
<svg-icon :icon-class="item.type" class="chart-icon" />
|
||||||
<span v-if="item.name && item.name.length <= 7" style="margin-left: 6px">{{ item.name }}</span>
|
<span v-if="item.name && item.name.length <= 7" style="margin-left: 6px">{{ item.name }}</span>
|
||||||
<el-tooltip v-else class="item" effect="dark" :content="item.name" placement="left">
|
<el-tooltip v-else class="item" effect="dark" :content="item.name" placement="left">
|
||||||
<span style="margin-left: 6px">{{ item.name }}</span>
|
<span style="margin-left: 6px">{{ item.name }}</span>
|
||||||
@ -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>
|
||||||
@ -164,9 +171,9 @@ export default {
|
|||||||
parametersVisible: false,
|
parametersVisible: false,
|
||||||
timePopovervisible: false,
|
timePopovervisible: false,
|
||||||
accuracyOptions: [
|
accuracyOptions: [
|
||||||
{id: 'HH', name: 'HH'},
|
{ id: 'HH', name: 'HH' },
|
||||||
{id: 'HH:mm', name: 'HH:mm'},
|
{ id: 'HH:mm', name: 'HH:mm' },
|
||||||
{id: 'HH:mm:ss', name: 'HH:mm:ss'}
|
{ id: 'HH:mm:ss', name: 'HH:mm:ss' }
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -179,62 +186,45 @@ 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) {
|
||||||
}
|
this.attrs.accuracy = this.accuracyOptions[1].id
|
||||||
,
|
this.attrs.default.isDynamic = false
|
||||||
showTimeChange(value)
|
this.fillAttrs2Filter()
|
||||||
{
|
},
|
||||||
this.attrs.accuracy = this.accuracyOptions[1].id
|
checkedViewsChange(values) {
|
||||||
this.attrs.default.isDynamic = false
|
this.fillAttrs2Filter()
|
||||||
this.fillAttrs2Filter()
|
},
|
||||||
}
|
enableRangeChange(value) {
|
||||||
,
|
if (!value) {
|
||||||
checkedViewsChange(values)
|
this.attrs.viewIds = []
|
||||||
{
|
}
|
||||||
this.fillAttrs2Filter()
|
this.fillAttrs2Filter()
|
||||||
}
|
},
|
||||||
,
|
enableParametersChange(value) {
|
||||||
enableRangeChange(value)
|
if (!value) {
|
||||||
{
|
this.attrs.parameters = []
|
||||||
if (!value) {
|
}
|
||||||
this.attrs.viewIds = []
|
this.fillAttrs2Filter()
|
||||||
}
|
},
|
||||||
this.fillAttrs2Filter()
|
showTitleChange(value) {
|
||||||
}
|
if (!value) {
|
||||||
,
|
this.element.style.backgroundColor = ''
|
||||||
enableParametersChange(value)
|
}
|
||||||
{
|
this.fillAttrs2Filter()
|
||||||
if (!value) {
|
},
|
||||||
this.attrs.parameters = []
|
showVisualChange(value) {
|
||||||
}
|
this.fillAttrs2Filter()
|
||||||
this.fillAttrs2Filter()
|
},
|
||||||
}
|
|
||||||
,
|
|
||||||
showTitleChange(value)
|
|
||||||
{
|
|
||||||
if (!value) {
|
|
||||||
this.attrs.title = ''
|
|
||||||
this.element.style.backgroundColor = ''
|
|
||||||
}
|
|
||||||
this.fillAttrs2Filter()
|
|
||||||
}
|
|
||||||
,
|
|
||||||
showVisualChange(value)
|
|
||||||
{
|
|
||||||
this.fillAttrs2Filter()
|
|
||||||
}
|
|
||||||
,
|
|
||||||
|
|
||||||
fillAttrs2Filter()
|
fillAttrs2Filter() {
|
||||||
{
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user