forked from github/dataease
feat(视图): 视图编辑调整
This commit is contained in:
parent
6440804d93
commit
d50fbd21ca
@ -52,8 +52,9 @@ export default {
|
|||||||
// console.log(chart_option);
|
// console.log(chart_option);
|
||||||
// 处理shape attr
|
// 处理shape attr
|
||||||
if (chart.customAttr) {
|
if (chart.customAttr) {
|
||||||
if (chart.customAttr.color) {
|
const customAttr = JSON.parse(chart.customAttr)
|
||||||
chart_option.color = chart.customAttr.color.colors
|
if (customAttr.color) {
|
||||||
|
chart_option.color = customAttr.color.colors
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.myEcharts(chart_option)
|
this.myEcharts(chart_option)
|
||||||
|
@ -94,7 +94,12 @@ export default {
|
|||||||
'chart': {
|
'chart': {
|
||||||
handler: function() {
|
handler: function() {
|
||||||
const chart = JSON.parse(JSON.stringify(this.chart))
|
const chart = JSON.parse(JSON.stringify(this.chart))
|
||||||
this.colorForm.colorCase = chart.customAttr.color.value
|
if (chart.customAttr) {
|
||||||
|
const customAttr = JSON.parse(chart.customAttr)
|
||||||
|
if (customAttr.color) {
|
||||||
|
this.colorForm.colorCase = customAttr.color.value
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -264,7 +264,7 @@ export default {
|
|||||||
getData(id) {
|
getData(id) {
|
||||||
if (id) {
|
if (id) {
|
||||||
post('/chart/view/getData/' + id, null).then(response => {
|
post('/chart/view/getData/' + id, null).then(response => {
|
||||||
this.view = response.data
|
this.view = JSON.parse(JSON.stringify(response.data))
|
||||||
this.view.xaxis = this.view.xaxis ? JSON.parse(this.view.xaxis) : []
|
this.view.xaxis = this.view.xaxis ? JSON.parse(this.view.xaxis) : []
|
||||||
this.view.yaxis = this.view.yaxis ? JSON.parse(this.view.yaxis) : []
|
this.view.yaxis = this.view.yaxis ? JSON.parse(this.view.yaxis) : []
|
||||||
this.view.customAttr = this.view.customAttr ? JSON.parse(this.view.customAttr) : {}
|
this.view.customAttr = this.view.customAttr ? JSON.parse(this.view.customAttr) : {}
|
||||||
|
Loading…
Reference in New Issue
Block a user