Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
3173eaca7a
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div ref="myContainer" class="my-container">
|
||||
<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="first-title">
|
||||
<div class="span-container">
|
||||
@ -13,7 +13,7 @@
|
||||
<div
|
||||
ref="deContentContainer"
|
||||
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="first-element">
|
||||
|
||||
@ -11,25 +11,25 @@
|
||||
</el-form-item>
|
||||
<div v-show="showProperty('marginModel') && marginForm.marginModel !== 'auto'">
|
||||
<el-form-item v-show="showProperty('marginTop')" :label="$t('chart.text_pos_top')" class="form-item" prop="marginTop">
|
||||
<el-input v-model="marginForm.marginTop" :placeholder="placeholder" oninput="value=value.replace(/[^\d]/g,'')" @change="changeMarginStyle(marginForm.marginTop, 'marginTop')">
|
||||
<el-input v-model="marginForm.marginTop" :placeholder="placeholder" type="number" class="hide-icon-number" @change="changeMarginStyle(marginForm.marginTop, 'marginTop')">
|
||||
<template v-if="unitSuffix" slot="append">{{ unitSuffix }}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="showProperty('marginBottom')" :label="$t('chart.text_pos_bottom')" class="form-item" prop="marginBottom">
|
||||
<el-input v-model="marginForm.marginBottom" :placeholder="placeholder" oninput="value=value.replace(/[^\d]/g,'')" @change="changeMarginStyle(marginForm.marginBottom, 'marginBottom')">
|
||||
<el-input v-model="marginForm.marginBottom" :placeholder="placeholder" type="number" class="hide-icon-number" @change="changeMarginStyle(marginForm.marginBottom, 'marginBottom')">
|
||||
<template v-if="unitSuffix" slot="append">{{ unitSuffix }}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="showProperty('marginLeft')" :label="$t('chart.text_pos_left')" class="form-item" prop="marginLeft">
|
||||
<el-input v-model="marginForm.marginLeft" :placeholder="placeholder" oninput="value=value.replace(/[^\d]/g,'')" @change="changeMarginStyle(marginForm.marginLeft, 'marginLeft')">
|
||||
<el-input v-model="marginForm.marginLeft" :placeholder="placeholder" type="number" class="hide-icon-number" @change="changeMarginStyle(marginForm.marginLeft, 'marginLeft')">
|
||||
<template v-if="unitSuffix" slot="append">{{ unitSuffix }}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="showProperty('marginRight')" :label="$t('chart.text_pos_right')" class="form-item" prop="marginRight">
|
||||
<el-input v-model="marginForm.marginRight" :placeholder="placeholder" oninput="value=value.replace(/[^\d]/g,'')" @change="changeMarginStyle(marginForm.marginRight, 'marginRight')">
|
||||
<el-input v-model="marginForm.marginRight" :placeholder="placeholder" type="number" class="hide-icon-number" @change="changeMarginStyle(marginForm.marginRight, 'marginRight')">
|
||||
<template v-if="unitSuffix" slot="append">{{ unitSuffix }}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -117,7 +117,11 @@ export default {
|
||||
}
|
||||
if (customStyle.margin) {
|
||||
this.marginForm = customStyle.margin
|
||||
} else {
|
||||
this.marginForm = JSON.parse(JSON.stringify(DEFAULT_MARGIN_STYLE))
|
||||
}
|
||||
} else {
|
||||
this.marginForm = JSON.parse(JSON.stringify(DEFAULT_MARGIN_STYLE))
|
||||
}
|
||||
},
|
||||
|
||||
@ -196,4 +200,12 @@ export default {
|
||||
cursor: pointer;
|
||||
z-index: 1003;
|
||||
}
|
||||
::v-deep .hide-icon-number input::-webkit-outer-spin-button,
|
||||
::v-deep .hide-icon-number input::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none !important;
|
||||
}
|
||||
::v-deep .hide-icon-number input[type="number"] {
|
||||
-moz-appearance: textfield !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@ -366,12 +366,12 @@
|
||||
<svg-icon icon-class="warn-tre" style="width: 20px;height: 20px;float: right" />
|
||||
</el-col>
|
||||
<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-row>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<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 size="mini" @click="useCache(false)">{{ $t('panel.no') }}</el-button>
|
||||
<el-button type="primary" size="mini" @click="useCache(true)">{{ $t('panel.yes') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
@ -387,7 +387,7 @@ import FilterGroup from '../filter'
|
||||
import SubjectSetting from '../SubjectSetting'
|
||||
import bus from '@/utils/bus'
|
||||
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, {
|
||||
BASE_MOBILE_STYLE,
|
||||
COMMON_BACKGROUND,
|
||||
@ -562,7 +562,7 @@ export default {
|
||||
return false
|
||||
} 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
|
||||
} else {
|
||||
return true
|
||||
@ -721,8 +721,8 @@ export default {
|
||||
bus.$on('delete-condition', this.deleteCustomComponent)
|
||||
bus.$on('current-component-change', this.asideRefresh)
|
||||
},
|
||||
asideRefresh(){
|
||||
if(this.$refs['chartEditRef']){
|
||||
asideRefresh() {
|
||||
if (this.$refs['chartEditRef']) {
|
||||
this.$refs['chartEditRef'].resetChartData()
|
||||
}
|
||||
},
|
||||
@ -790,7 +790,7 @@ export default {
|
||||
setTimeout(() => {
|
||||
if (useCache) {
|
||||
_this.$store.commit('recordSnapshot', 'cache')
|
||||
_this.$store.commit('recordChangeTimes' )
|
||||
_this.$store.commit('recordChangeTimes')
|
||||
} else {
|
||||
_this.$store.commit('refreshSaveStatus')
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ export default {
|
||||
if (showName) {
|
||||
result = this.$t(showName)
|
||||
}
|
||||
if (item.options.attrs.title) {
|
||||
if (item.options.attrs.showTitle && item.options.attrs.title) {
|
||||
result += '【' + item.options.attrs.title + '】'
|
||||
}
|
||||
|
||||
|
||||
@ -50,8 +50,13 @@
|
||||
</el-checkbox>
|
||||
<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;">
|
||||
<el-input v-model="attrs.title" :placeholder="$t('panel.input_title')" type="textarea" maxlength="15"
|
||||
show-word-limit/>
|
||||
<el-input
|
||||
v-model="attrs.title"
|
||||
:placeholder="$t('panel.input_title')"
|
||||
type="textarea"
|
||||
maxlength="15"
|
||||
show-word-limit
|
||||
/>
|
||||
</div>
|
||||
|
||||
<i
|
||||
@ -75,7 +80,7 @@
|
||||
class="de-checkbox"
|
||||
>
|
||||
<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>
|
||||
<el-tooltip v-else class="item" effect="dark" :content="item.name" placement="left">
|
||||
<span style="margin-left: 6px">{{ item.name }}</span>
|
||||
@ -107,8 +112,10 @@
|
||||
class="de-checkbox"
|
||||
>
|
||||
<div class="span-div">
|
||||
<span v-if="item.alias && item.alias.length <= 7"
|
||||
style="margin-left: 6px">{{ item.alias }}</span>
|
||||
<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">
|
||||
<span style="margin-left: 6px">{{ item.alias }}</span>
|
||||
</el-tooltip>
|
||||
@ -164,9 +171,9 @@ export default {
|
||||
parametersVisible: false,
|
||||
timePopovervisible: false,
|
||||
accuracyOptions: [
|
||||
{id: 'HH', name: 'HH'},
|
||||
{id: 'HH:mm', name: 'HH:mm'},
|
||||
{id: 'HH:mm:ss', name: 'HH:mm:ss'}
|
||||
{ id: 'HH', name: 'HH' },
|
||||
{ id: 'HH:mm', name: 'HH:mm' },
|
||||
{ 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) {
|
||||
this.showParams = true
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
multipleChange(value)
|
||||
{
|
||||
this.fillAttrs2Filter()
|
||||
}
|
||||
,
|
||||
showTimeChange(value)
|
||||
{
|
||||
this.attrs.accuracy = this.accuracyOptions[1].id
|
||||
this.attrs.default.isDynamic = false
|
||||
this.fillAttrs2Filter()
|
||||
}
|
||||
,
|
||||
checkedViewsChange(values)
|
||||
{
|
||||
this.fillAttrs2Filter()
|
||||
}
|
||||
,
|
||||
enableRangeChange(value)
|
||||
{
|
||||
if (!value) {
|
||||
this.attrs.viewIds = []
|
||||
}
|
||||
this.fillAttrs2Filter()
|
||||
}
|
||||
,
|
||||
enableParametersChange(value)
|
||||
{
|
||||
if (!value) {
|
||||
this.attrs.parameters = []
|
||||
}
|
||||
this.fillAttrs2Filter()
|
||||
}
|
||||
,
|
||||
showTitleChange(value)
|
||||
{
|
||||
if (!value) {
|
||||
this.attrs.title = ''
|
||||
this.element.style.backgroundColor = ''
|
||||
}
|
||||
this.fillAttrs2Filter()
|
||||
}
|
||||
,
|
||||
showVisualChange(value)
|
||||
{
|
||||
this.fillAttrs2Filter()
|
||||
}
|
||||
,
|
||||
},
|
||||
methods: {
|
||||
multipleChange(value) {
|
||||
this.fillAttrs2Filter()
|
||||
},
|
||||
showTimeChange(value) {
|
||||
this.attrs.accuracy = this.accuracyOptions[1].id
|
||||
this.attrs.default.isDynamic = false
|
||||
this.fillAttrs2Filter()
|
||||
},
|
||||
checkedViewsChange(values) {
|
||||
this.fillAttrs2Filter()
|
||||
},
|
||||
enableRangeChange(value) {
|
||||
if (!value) {
|
||||
this.attrs.viewIds = []
|
||||
}
|
||||
this.fillAttrs2Filter()
|
||||
},
|
||||
enableParametersChange(value) {
|
||||
if (!value) {
|
||||
this.attrs.parameters = []
|
||||
}
|
||||
this.fillAttrs2Filter()
|
||||
},
|
||||
showTitleChange(value) {
|
||||
if (!value) {
|
||||
this.element.style.backgroundColor = ''
|
||||
}
|
||||
this.fillAttrs2Filter()
|
||||
},
|
||||
showVisualChange(value) {
|
||||
this.fillAttrs2Filter()
|
||||
},
|
||||
|
||||
fillAttrs2Filter()
|
||||
{
|
||||
fillAttrs2Filter() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user