提交 08d1659b authored 作者: taojinlong's avatar taojinlong

Merge branch 'dev' of github.com:dataease/dataease into dev

...@@ -1078,6 +1078,9 @@ public class DorisQueryProvider extends QueryProvider { ...@@ -1078,6 +1078,9 @@ public class DorisQueryProvider extends QueryProvider {
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" " + getLogic(y.getLogic()) + " ", strList) + ")" : null; return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" " + getLogic(y.getLogic()) + " ", strList) + ")" : null;
} }
private String reflectFieldName(DatasetTableField field) {
return field.getDataeaseName();
}
private String calcFieldRegex(String originField, SQLObj tableObj) { private String calcFieldRegex(String originField, SQLObj tableObj) {
originField = originField.replaceAll("[\\t\\n\\r]]", ""); originField = originField.replaceAll("[\\t\\n\\r]]", "");
// 正则提取[xxx] // 正则提取[xxx]
......
...@@ -836,6 +836,10 @@ public class MysqlQueryProvider extends QueryProvider { ...@@ -836,6 +836,10 @@ public class MysqlQueryProvider extends QueryProvider {
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null; return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
} }
private String reflectFieldName(DatasetTableField field) {
return field.getDataeaseName();
}
public String transExtFilterList(SQLObj tableObj, List<ChartExtFilterRequest> requestList) { public String transExtFilterList(SQLObj tableObj, List<ChartExtFilterRequest> requestList) {
if (CollectionUtils.isEmpty(requestList)) { if (CollectionUtils.isEmpty(requestList)) {
return null; return null;
......
...@@ -2,6 +2,7 @@ package io.dataease.service.chart; ...@@ -2,6 +2,7 @@ package io.dataease.service.chart;
import cn.hutool.core.util.ReflectUtil; import cn.hutool.core.util.ReflectUtil;
import com.google.gson.Gson; import com.google.gson.Gson;
import io.dataease.base.domain.DatasetTableField;
import io.dataease.base.domain.Datasource; import io.dataease.base.domain.Datasource;
import io.dataease.controller.request.chart.ChartExtFilterRequest; import io.dataease.controller.request.chart.ChartExtFilterRequest;
import io.dataease.dto.chart.ChartFieldCustomFilterDTO; import io.dataease.dto.chart.ChartFieldCustomFilterDTO;
...@@ -132,12 +133,13 @@ public class ViewPluginBaseServiceImpl implements ViewPluginBaseService { ...@@ -132,12 +133,13 @@ public class ViewPluginBaseServiceImpl implements ViewPluginBaseService {
private String getOriginName(String dsType, PluginViewField pluginViewField, PluginViewSQL tableObj) { private String getOriginName(String dsType, PluginViewField pluginViewField, PluginViewSQL tableObj) {
String keyword_fix = ConstantsUtil.constantsValue(dsType, "KEYWORD_FIX"); String keyword_fix = ConstantsUtil.constantsValue(dsType, "KEYWORD_FIX");
String originField; String originField;
String reflectField = reflectFieldName(dsType, pluginViewField);
if (ObjectUtils.isNotEmpty(pluginViewField.getExtField()) && pluginViewField.getExtField() == 2) { if (ObjectUtils.isNotEmpty(pluginViewField.getExtField()) && pluginViewField.getExtField() == 2) {
originField = calcFieldRegex(dsType,pluginViewField.getOriginName(), tableObj); originField = calcFieldRegex(dsType,pluginViewField.getOriginName(), tableObj);
} else if (ObjectUtils.isNotEmpty(pluginViewField.getExtField()) && pluginViewField.getExtField() == 1) { } else if (ObjectUtils.isNotEmpty(pluginViewField.getExtField()) && pluginViewField.getExtField() == 1) {
originField = String.format(keyword_fix, tableObj.getTableAlias(), pluginViewField.getOriginName()); originField = String.format(keyword_fix, tableObj.getTableAlias(), StringUtils.isNotBlank(reflectField) ? reflectField : pluginViewField.getOriginName());
} else { } else {
originField = String.format(keyword_fix, tableObj.getTableAlias(), pluginViewField.getOriginName()); originField = String.format(keyword_fix, tableObj.getTableAlias(), StringUtils.isNotBlank(reflectField) ? reflectField : pluginViewField.getOriginName());
} }
return originField; return originField;
} }
...@@ -153,6 +155,17 @@ public class ViewPluginBaseServiceImpl implements ViewPluginBaseService { ...@@ -153,6 +155,17 @@ public class ViewPluginBaseServiceImpl implements ViewPluginBaseService {
return null; return null;
} }
private String reflectFieldName(String dsType, PluginViewField pluginViewField ) {
QueryProvider queryProvider = ProviderFactory.getQueryProvider(dsType);
String methodName = "reflectFieldName";
DatasetTableField field = BeanUtils.copyBean(new DatasetTableField(), pluginViewField);;
Object o ;
if ((o = execProviderMethod(queryProvider, methodName, field)) != null) {
return (String)o;
}
return null;
}
private PluginViewSQL getField(String dsType, PluginViewField field, String originField, String fieldAlias) { private PluginViewSQL getField(String dsType, PluginViewField field, String originField, String fieldAlias) {
......
...@@ -20,19 +20,20 @@ ...@@ -20,19 +20,20 @@
@mouseenter="enter" @mouseenter="enter"
@mouseleave="leave" @mouseleave="leave"
> >
<edit-bar v-if="editBarShow" style="transform: translateZ(10px)" :active-model="'edit'" :element="element" @showViewDetails="showViewDetails" @amRemoveItem="amRemoveItem" @amAddItem="amAddItem" @resizeView="resizeView" @linkJumpSet="linkJumpSet" @boardSet="boardSet" />
<mobile-check-bar v-if="mobileCheckBarShow" :element="element" @amRemoveItem="amRemoveItem" />
<div v-if="resizing" style="transform: translateZ(11px);position: absolute; z-index: 3" :style="resizeShadowStyle" />
<div <div
:class="[ :class="[
{ {
['de-drag-active-inner']:enabled, ['de-drag-active-inner']:enabled,
[classNameMouseOn]: mouseOn || active [classNameMouseOn]: mouseOn || active
}, },
className className,
'main-background'
]" ]"
:style="mainSlotStyle" :style="mainSlotStyle"
> >
<edit-bar v-if="editBarShow" style="transform: translateZ(10px)" :active-model="'edit'" :element="element" @showViewDetails="showViewDetails" @amRemoveItem="amRemoveItem" @amAddItem="amAddItem" @resizeView="resizeView" @linkJumpSet="linkJumpSet" @boardSet="boardSet" />
<mobile-check-bar v-if="mobileCheckBarShow" :element="element" @amRemoveItem="amRemoveItem" />
<div v-if="resizing" style="transform: translateZ(11px);position: absolute; z-index: 3" :style="resizeShadowStyle" />
<div <div
v-for="(handlei, indexi) in actualHandles" v-for="(handlei, indexi) in actualHandles"
:key="indexi" :key="indexi"
...@@ -59,6 +60,7 @@ import eventBus from '@/components/canvas/utils/eventBus' ...@@ -59,6 +60,7 @@ import eventBus from '@/components/canvas/utils/eventBus'
import { mapState } from 'vuex' import { mapState } from 'vuex'
import EditBar from '@/components/canvas/components/Editor/EditBar' import EditBar from '@/components/canvas/components/Editor/EditBar'
import MobileCheckBar from '@/components/canvas/components/Editor/MobileCheckBar' import MobileCheckBar from '@/components/canvas/components/Editor/MobileCheckBar'
import { hexColorToRGBA } from '@/views/chart/chart/util'
export default { export default {
replace: true, replace: true,
...@@ -531,13 +533,18 @@ export default { ...@@ -531,13 +533,18 @@ export default {
width: this.computedMainSlotWidth, width: this.computedMainSlotWidth,
height: this.computedMainSlotHeight height: this.computedMainSlotHeight
} }
if (this.element.commonBackground && this.element.commonBackground.enable) { if (this.element.commonBackground) {
if (this.element.commonBackground.backgroundType === 'innerImage') { style['padding'] = (this.element.commonBackground.innerPadding || 0) + 'px'
style['background'] = `url(${this.element.commonBackground.innerImage}) no-repeat` style['border-radius'] = (this.element.commonBackground.borderRadius || 0) + 'px'
} else if (this.element.commonBackground.backgroundType === 'outerImage') { if (this.element.commonBackground.enable) {
style['background'] = `url(${this.element.commonBackground.outerImage}) no-repeat` if (this.element.commonBackground.backgroundType === 'innerImage') {
style['background'] = `url(${this.element.commonBackground.innerImage}) no-repeat`
} else if (this.element.commonBackground.backgroundType === 'outerImage') {
style['background'] = `url(${this.element.commonBackground.outerImage}) no-repeat`
} else if (this.element.commonBackground.backgroundType === 'color') {
style['background-color'] = hexColorToRGBA(this.element.commonBackground.color, this.element.commonBackground.alpha)
}
} }
style['background-size'] = `100% 100%`
} }
return style return style
}, },
...@@ -1857,4 +1864,7 @@ export default { ...@@ -1857,4 +1864,7 @@ export default {
.de-drag-active-inner{ .de-drag-active-inner{
outline: 1px solid #70c0ff; outline: 1px solid #70c0ff;
} }
.main-background{
background-size: 100% 100% !important;
}
</style> </style>
...@@ -49,6 +49,7 @@ import DeOutWidget from '@/components/dataease/DeOutWidget' ...@@ -49,6 +49,7 @@ import DeOutWidget from '@/components/dataease/DeOutWidget'
import EditBar from '@/components/canvas/components/Editor/EditBar' import EditBar from '@/components/canvas/components/Editor/EditBar'
import MobileCheckBar from '@/components/canvas/components/Editor/MobileCheckBar' import MobileCheckBar from '@/components/canvas/components/Editor/MobileCheckBar'
import CloseBar from '@/components/canvas/components/Editor/CloseBar' import CloseBar from '@/components/canvas/components/Editor/CloseBar'
import { hexColorToRGBA } from '@/views/chart/chart/util'
export default { export default {
components: { CloseBar, MobileCheckBar, DeOutWidget, EditBar }, components: { CloseBar, MobileCheckBar, DeOutWidget, EditBar },
...@@ -94,13 +95,20 @@ export default { ...@@ -94,13 +95,20 @@ export default {
width: '100%', width: '100%',
height: '100%' height: '100%'
} }
if (this.config.commonBackground && this.config.commonBackground.enable) { if (this.config.commonBackground) {
if (this.config.commonBackground.backgroundType === 'innerImage') { style['padding'] = (this.config.commonBackground.innerPadding || 0) + 'px'
style['background'] = `url(${this.config.commonBackground.innerImage}) no-repeat` style['border-radius'] = (this.config.commonBackground.borderRadius || 0) + 'px'
} else if (this.config.commonBackground.backgroundType === 'outerImage') { if (this.config.commonBackground.enable) {
style['background'] = `url(${this.config.commonBackground.outerImage}) no-repeat` if (this.config.commonBackground.backgroundType === 'innerImage') {
style['background'] = `url(${this.config.commonBackground.innerImage}) no-repeat`
} else if (this.config.commonBackground.backgroundType === 'outerImage') {
style['background'] = `url(${this.config.commonBackground.outerImage}) no-repeat`
} else if (this.config.commonBackground.backgroundType === 'color') {
style['background-color'] = hexColorToRGBA(this.config.commonBackground.color, this.config.commonBackground.alpha)
}
} }
style['background-size'] = `100% 100%` style['background-size'] = `100% 100%`
style['overflow'] = 'hidden'
} }
return style return style
}, },
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<el-dropdown-item v-if="'view'===curComponent.type" icon="el-icon-link" @click.native="linkageSetting">{{ $t('panel.linkage_setting') }}</el-dropdown-item> <el-dropdown-item v-if="'view'===curComponent.type" icon="el-icon-link" @click.native="linkageSetting">{{ $t('panel.linkage_setting') }}</el-dropdown-item>
<el-dropdown-item v-if="'de-tabs'===curComponent.type" icon="el-icon-link" @click.native="addTab">{{ $t('panel.add_tab') }}</el-dropdown-item> <el-dropdown-item v-if="'de-tabs'===curComponent.type" icon="el-icon-link" @click.native="addTab">{{ $t('panel.add_tab') }}</el-dropdown-item>
<el-dropdown-item v-if="'view'===curComponent.type" icon="el-icon-connection" @click.native="linkJumpSet">{{ $t('panel.setting_jump') }}</el-dropdown-item> <el-dropdown-item v-if="'view'===curComponent.type" icon="el-icon-connection" @click.native="linkJumpSet">{{ $t('panel.setting_jump') }}</el-dropdown-item>
<el-dropdown-item icon="el-icon-full-screen" @click.native="boardSet">{{ $t('panel.setting_background') }}</el-dropdown-item> <el-dropdown-item icon="el-icon-magic-stick" @click.native="boardSet">{{ $t('panel.component_style') }}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
......
...@@ -1033,6 +1033,7 @@ export default { ...@@ -1033,6 +1033,7 @@ export default {
}, },
methods: { methods: {
boardSet(item) { boardSet(item) {
this.$emit('boardSet', item)
this.boardSetVisible = true this.boardSetVisible = true
}, },
changeStyleWithScale, changeStyleWithScale,
......
...@@ -57,16 +57,8 @@ export default { ...@@ -57,16 +57,8 @@ export default {
created() { created() {
}, },
mounted() { mounted() {
this.init()
}, },
methods: { methods: {
init() {
const iframe = document.getElementById('iframe')
NProgress.start()
iframe.onload = function() {
NProgress.done()
}
}
} }
} }
......
...@@ -263,6 +263,9 @@ export default { ...@@ -263,6 +263,9 @@ export default {
resultCount() { resultCount() {
return this.canvasStyleData.panel.resultCount return this.canvasStyleData.panel.resultCount
}, },
innerPadding() {
return this.element.commonBackground.innerPadding || 0
},
...mapState([ ...mapState([
'canvasStyleData', 'canvasStyleData',
'nowPanelTrackInfo', 'nowPanelTrackInfo',
...@@ -276,7 +279,12 @@ export default { ...@@ -276,7 +279,12 @@ export default {
}, },
watch: { watch: {
'innerPadding': {
handler: function(val1, val2) {
this.resizeChart()
},
deep: true
},
'cfilters': { 'cfilters': {
handler: function(val1, val2) { handler: function(val1, val2) {
if (isChange(val1, val2) && !this.isFirstLoad) { if (isChange(val1, val2) && !this.isFirstLoad) {
...@@ -303,9 +311,7 @@ export default { ...@@ -303,9 +311,7 @@ export default {
} }
// 如果gap有变化刷新 // 如果gap有变化刷新
if (this.preCanvasPanel && this.preCanvasPanel.gap !== newVal.panel.gap) { if (this.preCanvasPanel && this.preCanvasPanel.gap !== newVal.panel.gap) {
this.chart.isPlugin this.resizeChart()
? this.$refs[this.element.propValue.id].callPluginInner({ methodName: 'chartResize' })
: this.$refs[this.element.propValue.id].chartResize()
} }
this.preCanvasPanel = deepCopy(newVal.panel) this.preCanvasPanel = deepCopy(newVal.panel)
}, },
...@@ -315,15 +321,7 @@ export default { ...@@ -315,15 +321,7 @@ export default {
'hw': { 'hw': {
handler(newVal, oldVla) { handler(newVal, oldVla) {
if (newVal !== oldVla && this.$refs[this.element.propValue.id]) { if (newVal !== oldVla && this.$refs[this.element.propValue.id]) {
if (this.chart.type === 'map') { this.resizeChart()
this.destroyTimeMachine()
this.changeIndex++
this.chartResize(this.changeIndex)
} else {
this.chart.isPlugin
? this.$refs[this.element.propValue.id].callPluginInner({ methodName: 'chartResize' })
: this.$refs[this.element.propValue.id].chartResize()
}
} }
}, },
deep: true deep: true
...@@ -369,6 +367,17 @@ export default { ...@@ -369,6 +367,17 @@ export default {
} }
}, },
methods: { methods: {
resizeChart() {
if (this.chart.type === 'map') {
this.destroyTimeMachine()
this.changeIndex++
this.chartResize(this.changeIndex)
} else {
this.chart.isPlugin
? this.$refs[this.element.propValue.id].callPluginInner({ methodName: 'chartResize' })
: this.$refs[this.element.propValue.id].chartResize()
}
},
bindPluginEvent() { bindPluginEvent() {
bus.$on('plugin-chart-click', param => { bus.$on('plugin-chart-click', param => {
param.viewId && param.viewId === this.element.propValue.viewId && this.chartClick(param) param.viewId && param.viewId === this.element.propValue.viewId && this.chartClick(param)
...@@ -748,6 +757,7 @@ export default { ...@@ -748,6 +757,7 @@ export default {
this.chart.customAttr = param.viewInfo.customAttr this.chart.customAttr = param.viewInfo.customAttr
this.chart.customStyle = param.viewInfo.customStyle this.chart.customStyle = param.viewInfo.customStyle
this.chart.senior = param.viewInfo.senior this.chart.senior = param.viewInfo.senior
this.chart.title = param.viewInfo.title
this.sourceCustomAttrStr = this.chart.customAttr this.sourceCustomAttrStr = this.chart.customAttr
this.sourceCustomStyleStr = this.chart.customStyle this.sourceCustomStyleStr = this.chart.customStyle
this.mergeScale() this.mergeScale()
......
...@@ -16,7 +16,7 @@ export const BASE_MOBILE_STYLE = { ...@@ -16,7 +16,7 @@ export const BASE_MOBILE_STYLE = {
auxiliaryMatrix: true auxiliaryMatrix: true
} }
// 公共背景 // 组件仪表板样式
export const COMMON_BACKGROUND = { export const COMMON_BACKGROUND = {
enable: false, enable: false,
backgroundType: 'innerImage', backgroundType: 'innerImage',
...@@ -24,7 +24,8 @@ export const COMMON_BACKGROUND = { ...@@ -24,7 +24,8 @@ export const COMMON_BACKGROUND = {
innerImage: null, innerImage: null,
outerImage: null, outerImage: null,
alpha: 100, alpha: 100,
borderRadius: 5 borderRadius: 5,
innerPadding: 0
} }
// 公共样式 // 公共样式
......
...@@ -1390,6 +1390,10 @@ export default { ...@@ -1390,6 +1390,10 @@ export default {
sure_bt: 'Confirm' sure_bt: 'Confirm'
}, },
panel: { panel: {
inner_padding: 'Inner Padding',
board_radio: 'Board Radio',
background: 'Background',
component_style: 'component Style',
web_set_tips: 'Some Websites Cannot Be Displayed Because Of Cross Domain Problems ', web_set_tips: 'Some Websites Cannot Be Displayed Because Of Cross Domain Problems ',
repeat_params: 'Repeat Params Exist', repeat_params: 'Repeat Params Exist',
enable_outer_param_set: 'Enable Outer Param Set', enable_outer_param_set: 'Enable Outer Param Set',
......
...@@ -1391,6 +1391,10 @@ export default { ...@@ -1391,6 +1391,10 @@ export default {
sure_bt: '確定' sure_bt: '確定'
}, },
panel: { panel: {
inner_padding: '内边距',
board_radio: '边框半径',
background: '背景',
component_style: '组件样式',
web_set_tips: '部分网站可能存在跨域问题无法显示', web_set_tips: '部分网站可能存在跨域问题无法显示',
repeat_params: '存在名称重复的参数', repeat_params: '存在名称重复的参数',
enable_outer_param_set: '启用外部参数设置', enable_outer_param_set: '启用外部参数设置',
......
...@@ -1399,6 +1399,10 @@ export default { ...@@ -1399,6 +1399,10 @@ export default {
sure_bt: '确定' sure_bt: '确定'
}, },
panel: { panel: {
inner_padding: '内边距',
board_radio: '边框半径',
background: '背景',
component_style: '组件样式',
web_set_tips: '部分网站可能存在跨域问题无法显示', web_set_tips: '部分网站可能存在跨域问题无法显示',
repeat_params: '存在名称重复的参数', repeat_params: '存在名称重复的参数',
enable_outer_param_set: '启用外部参数设置', enable_outer_param_set: '启用外部参数设置',
......
...@@ -2,71 +2,98 @@ ...@@ -2,71 +2,98 @@
<el-row> <el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<span style="font-weight:600;margin-right: 20px;font-size: 14px">{{ $t('panel.choose_background') }}</span> <span style="font-weight:600;margin-right: 20px;font-size: 14px">{{ $t('panel.component_style') }}</span>
<el-checkbox v-model="curComponent.commonBackground.enable">{{ $t('commons.enable') }}</el-checkbox>
<span style="color: #909399; font-size: 8px;margin-left: 3px">
Tips:{{ $t('panel.choose_background_tips') }}
</span>
</el-col> </el-col>
</el-row> </el-row>
<el-row class="main-content" disabled="!curComponent.commonBackground.enable"> <el-row class="main-content" disabled="!curComponent.commonBackground.enable">
<!-- <el-row style="height: 80px;margin-top:10px;margin-bottom:20px;overflow: hidden">-->
<!-- <el-col :span="3" style="padding-left: 10px">--> <el-row style="height: 50px;overflow: hidden">
<!-- <el-radio v-model="curComponent.commonBackground.backgroundType" label="color" @change="onChangeType">颜色</el-radio>--> <el-col :span="3">
<!-- </el-col>--> <span class="params-title">{{ $t('panel.inner_padding') }}</span>
<!-- <el-col :span="3">-->
<!-- <el-color-picker v-model="curComponent.commonBackground.color" class="color-picker-style" :predefine="predefineColors" />-->
<!-- </el-col>-->
<!-- <el-col :span="3" style="text-align: right;margin-top: 8px">-->
<!-- <span>不透明度:</span>-->
<!-- </el-col>-->
<!-- <el-col :span="9">-->
<!-- <el-slider v-model="curComponent.commonBackground.alpha" show-input :show-input-controls="false" input-size="mini" />-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row style="height: 80px;margin-top:10px;margin-bottom:20px;overflow: hidden">
<el-col :span="3" style="padding-left: 10px">
<el-radio v-model="curComponent.commonBackground.backgroundType" label="outerImage" @change="onChangeType">{{ $t('panel.photo') }}</el-radio>
</el-col> </el-col>
<el-col style="width: 130px!important;"> <el-col :span="15">
<el-upload <el-slider v-model="curComponent.commonBackground.innerPadding" show-input :show-input-controls="false" input-size="mini" />
action=""
accept=".jpeg,.jpg,.png,.gif,.svg"
class="avatar-uploader"
list-type="picture-card"
:class="{disabled:uploadDisabled}"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
:http-request="upload"
:file-list="fileList"
:on-change="onChange"
>
<i class="el-icon-plus" />
</el-upload>
<el-dialog top="25vh" width="600px" :modal-append-to-body="false" :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row style="height: 50px;overflow: hidden">
<el-col :span="3" style="padding-left: 10px"> <el-col :span="3">
<el-radio v-model="curComponent.commonBackground.backgroundType" label="innerImage" @change="onChangeType">边框</el-radio> <span class="params-title">{{ $t('panel.board_radio') }}</span>
</el-col> </el-col>
<el-col :span="21" class="main-row"> <el-col :span="15">
<el-row v-for="(value, key) in BackgroundShowMap" :key="key"> <el-slider v-model="curComponent.commonBackground.borderRadius" show-input :show-input-controls="false" input-size="mini" />
<el-col :span="24"><span>{{ key }}</span> </el-col>
<el-col
v-for="item in value"
:key="item.id"
:span="6"
>
<background-item
:template="item"
/>
</el-col>
</el-row>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="height: 50px">
<el-col :span="3" style="padding-left: 10px;padding-top: 5px">
<el-checkbox v-model="curComponent.commonBackground.enable">{{ $t('panel.background') }}</el-checkbox>
</el-col>
<el-col :span="21">
<span style="color: #909399; font-size: 8px;margin-left: 3px;line-height: 30px">
Tips:{{ $t('panel.choose_background_tips') }}
</span>
</el-col>
</el-row>
<el-row v-if="curComponent.commonBackground.enable">
<el-row style="height: 40px;overflow: hidden">
<el-col :span="3" style="padding-left: 10px;padding-top: 5px">
<el-radio v-model="curComponent.commonBackground.backgroundType" label="color" @change="onChangeType">颜色</el-radio>
</el-col>
<el-col :span="1" style="padding-top: 5px">
<el-color-picker v-model="curComponent.commonBackground.color" size="mini" class="color-picker-style" :predefine="predefineColors" />
</el-col>
<el-col :span="3">
<span class="params-title-small">不透明度:</span>
</el-col>
<el-col :span="11">
<el-slider v-model="curComponent.commonBackground.alpha" show-input :show-input-controls="false" input-size="mini" />
</el-col>
</el-row>
<el-row style="height: 80px;margin-top:10px;margin-bottom:20px;overflow: hidden">
<el-col :span="3" style="padding-left: 10px">
<el-radio v-model="curComponent.commonBackground.backgroundType" label="outerImage" @change="onChangeType">{{ $t('panel.photo') }}</el-radio>
</el-col>
<el-col style="width: 130px!important;">
<el-upload
action=""
accept=".jpeg,.jpg,.png,.gif,.svg"
class="avatar-uploader"
list-type="picture-card"
:class="{disabled:uploadDisabled}"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
:http-request="upload"
:file-list="fileList"
:on-change="onChange"
>
<i class="el-icon-plus" />
</el-upload>
<el-dialog top="25vh" width="600px" :modal-append-to-body="false" :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</el-col>
</el-row>
<el-row>
<el-col :span="3" style="padding-left: 10px">
<el-radio v-model="curComponent.commonBackground.backgroundType" label="innerImage" @change="onChangeType">边框</el-radio>
</el-col>
<el-col :span="21" class="main-row">
<el-row v-for="(value, key) in BackgroundShowMap" :key="key">
<el-col :span="24"><span>{{ key }}</span> </el-col>
<el-col
v-for="item in value"
:key="item.id"
:span="6"
>
<background-item
:template="item"
/>
</el-col>
</el-row>
</el-col>
</el-row>
</el-row>
</el-row> </el-row>
<el-row class="root-class"> <el-row class="root-class">
<el-col :span="24"> <el-col :span="24">
...@@ -178,7 +205,7 @@ export default { ...@@ -178,7 +205,7 @@ export default {
} }
.main-row{ .main-row{
height: 40vh; height: 140px;
overflow-y: auto; overflow-y: auto;
} }
...@@ -226,4 +253,17 @@ export default { ...@@ -226,4 +253,17 @@ export default {
border:1px solid #E6E6E6; border:1px solid #E6E6E6;
} }
.params-title{
font-weight: bold;
line-height: 40px;
margin-left: 10px;
font-size: 14px;
}
.params-title-small{
font-weight: bold;
line-height: 40px;
margin-left: 10px;
font-size: 12px;
}
</style> </style>
...@@ -1717,6 +1717,7 @@ export default { ...@@ -1717,6 +1717,7 @@ export default {
view.customStyle = JSON.stringify(this.view.customStyle) view.customStyle = JSON.stringify(this.view.customStyle)
view.customFilter = JSON.stringify(this.view.customFilter) view.customFilter = JSON.stringify(this.view.customFilter)
view.senior = JSON.stringify(this.view.senior) view.senior = JSON.stringify(this.view.senior)
view.title = this.view.title
// view.data = this.data // view.data = this.data
this.chart = view this.chart = view
......
...@@ -393,6 +393,7 @@ export default { ...@@ -393,6 +393,7 @@ export default {
}, },
data() { data() {
return { return {
asideToolType: 'none',
outerParamsSetVisible: false, outerParamsSetVisible: false,
autoMoveOffSet: 15, autoMoveOffSet: 15,
mobileEditorShow: true, mobileEditorShow: true,
...@@ -460,14 +461,21 @@ export default { ...@@ -460,14 +461,21 @@ export default {
showAside() { showAside() {
return !this.linkageSettingStatus && !this.mobileLayoutStatus return !this.linkageSettingStatus && !this.mobileLayoutStatus
}, },
// 显示仪表板工具栏
showPanelToolsAside() {
return !this.curComponent
},
// 显示视图工具栏 // 显示视图工具栏
showViewToolsAside() { showViewToolsAside() {
return this.curComponent && this.curComponent.type === 'view' return this.curComponent && this.curComponent.type === 'view'
}, },
showViewToolAsideType() {
if (this.curComponent) {
if (this.curComponent.type === 'view') {
return 'view'
} else {
return 'publicSet'
}
} else {
return 'none'
}
},
showAttr() { showAttr() {
if (this.mobileLayoutStatus) { if (this.mobileLayoutStatus) {
return false return false
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论