forked from github/dataease
refactor: 新建视图样式设置不再显示背景,改为仪表板组件样式设置
This commit is contained in:
parent
d504c96b2d
commit
fa7d5ad350
@ -2,11 +2,11 @@ import request from '@/utils/request'
|
||||
import store from '@/store'
|
||||
import { queryPanelComponents } from '@/api/panel/panel'
|
||||
|
||||
export function post(url, data) {
|
||||
export function post(url, data, loading = false) {
|
||||
return request({
|
||||
url: url,
|
||||
method: 'post',
|
||||
loading: false,
|
||||
loading: loading,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
@ -765,7 +765,6 @@ export default {
|
||||
xAxis: DEFAULT_XAXIS_STYLE,
|
||||
yAxis: DEFAULT_YAXIS_STYLE,
|
||||
yAxisExt: DEFAULT_YAXIS_EXT_STYLE,
|
||||
background: DEFAULT_BACKGROUND_COLOR,
|
||||
split: DEFAULT_SPLIT
|
||||
})
|
||||
view.senior = JSON.stringify({
|
||||
@ -784,7 +783,7 @@ export default {
|
||||
view.extBubble = JSON.stringify([])
|
||||
this.setChartDefaultOptions(view)
|
||||
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.$store.dispatch('chart/setTableId', null)
|
||||
this.$store.dispatch('chart/setTableId', this.table.id)
|
||||
|
@ -877,7 +877,7 @@
|
||||
@onLegendChange="onLegendChange"
|
||||
/>
|
||||
</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
|
||||
:param="param"
|
||||
class="attr-selector"
|
||||
|
@ -1006,6 +1006,8 @@ export default {
|
||||
component.y = 1
|
||||
}
|
||||
component.id = newComponentId
|
||||
// 统一设置背景信息
|
||||
component.commonBackground = deepCopy(COMMON_BACKGROUND)
|
||||
this.$store.commit('addComponent', { component })
|
||||
this.$store.commit('recordSnapshot', 'newViewInfo')
|
||||
this.clearCurrentInfo()
|
||||
|
Loading…
Reference in New Issue
Block a user