forked from github/dataease
Merge pull request #1999 from dataease/pr@dev@refactor_panel-view-style
refactor: 新建视图样式设置不再显示背景,改为仪表板组件样式设置
This commit is contained in:
commit
42401467b5
@ -2,11 +2,11 @@ import request from '@/utils/request'
|
|||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { queryPanelComponents } from '@/api/panel/panel'
|
import { queryPanelComponents } from '@/api/panel/panel'
|
||||||
|
|
||||||
export function post(url, data) {
|
export function post(url, data, loading = false) {
|
||||||
return request({
|
return request({
|
||||||
url: url,
|
url: url,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
loading: false,
|
loading: loading,
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -765,7 +765,6 @@ export default {
|
|||||||
xAxis: DEFAULT_XAXIS_STYLE,
|
xAxis: DEFAULT_XAXIS_STYLE,
|
||||||
yAxis: DEFAULT_YAXIS_STYLE,
|
yAxis: DEFAULT_YAXIS_STYLE,
|
||||||
yAxisExt: DEFAULT_YAXIS_EXT_STYLE,
|
yAxisExt: DEFAULT_YAXIS_EXT_STYLE,
|
||||||
background: DEFAULT_BACKGROUND_COLOR,
|
|
||||||
split: DEFAULT_SPLIT
|
split: DEFAULT_SPLIT
|
||||||
})
|
})
|
||||||
view.senior = JSON.stringify({
|
view.senior = JSON.stringify({
|
||||||
@ -784,7 +783,7 @@ export default {
|
|||||||
view.extBubble = JSON.stringify([])
|
view.extBubble = JSON.stringify([])
|
||||||
this.setChartDefaultOptions(view)
|
this.setChartDefaultOptions(view)
|
||||||
const _this = this
|
const _this = this
|
||||||
post('/chart/view/newOne/' + this.panelInfo.id, view).then(response => {
|
post('/chart/view/newOne/' + this.panelInfo.id, view,true).then(response => {
|
||||||
this.closeCreateChart()
|
this.closeCreateChart()
|
||||||
this.$store.dispatch('chart/setTableId', null)
|
this.$store.dispatch('chart/setTableId', null)
|
||||||
this.$store.dispatch('chart/setTableId', this.table.id)
|
this.$store.dispatch('chart/setTableId', this.table.id)
|
||||||
|
@ -877,7 +877,7 @@
|
|||||||
@onLegendChange="onLegendChange"
|
@onLegendChange="onLegendChange"
|
||||||
/>
|
/>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item name="background" :title="$t('chart.background')">
|
<el-collapse-item v-if="chart.customStyle.background" name="background" :title="$t('chart.background')">
|
||||||
<background-color-selector
|
<background-color-selector
|
||||||
:param="param"
|
:param="param"
|
||||||
class="attr-selector"
|
class="attr-selector"
|
||||||
|
@ -1006,6 +1006,8 @@ export default {
|
|||||||
component.y = 1
|
component.y = 1
|
||||||
}
|
}
|
||||||
component.id = newComponentId
|
component.id = newComponentId
|
||||||
|
// 统一设置背景信息
|
||||||
|
component.commonBackground = deepCopy(COMMON_BACKGROUND)
|
||||||
this.$store.commit('addComponent', { component })
|
this.$store.commit('addComponent', { component })
|
||||||
this.$store.commit('recordSnapshot', 'newViewInfo')
|
this.$store.commit('recordSnapshot', 'newViewInfo')
|
||||||
this.clearCurrentInfo()
|
this.clearCurrentInfo()
|
||||||
|
Loading…
Reference in New Issue
Block a user