提交 cab602d5 authored 作者: taojinlong's avatar taojinlong

Merge branch 'v1.1' of github.com:dataease/dataease into v1.1

...@@ -101,6 +101,16 @@ export default { ...@@ -101,6 +101,16 @@ export default {
watch: { watch: {
'chart': { 'chart': {
handler: function() { handler: function() {
this.initData()
}
}
},
mounted() {
this.init()
this.initData()
},
methods: {
initData() {
const chart = JSON.parse(JSON.stringify(this.chart)) const chart = JSON.parse(JSON.stringify(this.chart))
if (chart.customStyle) { if (chart.customStyle) {
let customStyle = null let customStyle = null
...@@ -113,13 +123,7 @@ export default { ...@@ -113,13 +123,7 @@ export default {
this.legendForm = customStyle.legend this.legendForm = customStyle.legend
} }
} }
}
}
},
mounted() {
this.init()
}, },
methods: {
init() { init() {
const arr = [] const arr = []
for (let i = 10; i <= 60; i = i + 2) { for (let i = 10; i <= 60; i = i + 2) {
......
...@@ -81,6 +81,16 @@ export default { ...@@ -81,6 +81,16 @@ export default {
watch: { watch: {
'chart': { 'chart': {
handler: function() { handler: function() {
this.initData()
}
}
},
mounted() {
this.init()
this.initData()
},
methods: {
initData() {
const chart = JSON.parse(JSON.stringify(this.chart)) const chart = JSON.parse(JSON.stringify(this.chart))
if (chart.customStyle) { if (chart.customStyle) {
let customStyle = null let customStyle = null
...@@ -95,13 +105,7 @@ export default { ...@@ -95,13 +105,7 @@ export default {
this.splitForm = JSON.parse(JSON.stringify(DEFAULT_SPLIT)) this.splitForm = JSON.parse(JSON.stringify(DEFAULT_SPLIT))
} }
} }
}
}
},
mounted() {
this.init()
}, },
methods: {
init() { init() {
const arr = [] const arr = []
for (let i = 6; i <= 40; i = i + 2) { for (let i = 6; i <= 40; i = i + 2) {
......
...@@ -91,6 +91,16 @@ export default { ...@@ -91,6 +91,16 @@ export default {
watch: { watch: {
'chart': { 'chart': {
handler: function() { handler: function() {
this.initData()
}
}
},
mounted() {
this.init()
this.initData()
},
methods: {
initData() {
const chart = JSON.parse(JSON.stringify(this.chart)) const chart = JSON.parse(JSON.stringify(this.chart))
if (chart.customStyle) { if (chart.customStyle) {
let customStyle = null let customStyle = null
...@@ -104,13 +114,7 @@ export default { ...@@ -104,13 +114,7 @@ export default {
} }
this.titleForm.title = this.chart.title this.titleForm.title = this.chart.title
} }
}
}
},
mounted() {
this.init()
}, },
methods: {
init() { init() {
const arr = [] const arr = []
for (let i = 10; i <= 60; i = i + 2) { for (let i = 10; i <= 60; i = i + 2) {
......
...@@ -112,6 +112,16 @@ export default { ...@@ -112,6 +112,16 @@ export default {
watch: { watch: {
'chart': { 'chart': {
handler: function() { handler: function() {
this.initData()
}
}
},
mounted() {
this.init()
this.initData()
},
methods: {
initData() {
const chart = JSON.parse(JSON.stringify(this.chart)) const chart = JSON.parse(JSON.stringify(this.chart))
if (chart.customStyle) { if (chart.customStyle) {
let customStyle = null let customStyle = null
...@@ -130,13 +140,7 @@ export default { ...@@ -130,13 +140,7 @@ export default {
} }
} }
} }
}
}
},
mounted() {
this.init()
}, },
methods: {
init() { init() {
const arr = [] const arr = []
for (let i = 6; i <= 40; i = i + 2) { for (let i = 6; i <= 40; i = i + 2) {
......
...@@ -112,6 +112,16 @@ export default { ...@@ -112,6 +112,16 @@ export default {
watch: { watch: {
'chart': { 'chart': {
handler: function() { handler: function() {
this.initData()
}
}
},
mounted() {
this.init()
this.initData()
},
methods: {
initData() {
const chart = JSON.parse(JSON.stringify(this.chart)) const chart = JSON.parse(JSON.stringify(this.chart))
if (chart.customStyle) { if (chart.customStyle) {
let customStyle = null let customStyle = null
...@@ -130,13 +140,7 @@ export default { ...@@ -130,13 +140,7 @@ export default {
} }
} }
} }
}
}
},
mounted() {
this.init()
}, },
methods: {
init() { init() {
const arr = [] const arr = []
for (let i = 6; i <= 40; i = i + 2) { for (let i = 6; i <= 40; i = i + 2) {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<!-- <el-form-item :label="$t('chart.show')" class="form-item">--> <!-- <el-form-item :label="$t('chart.show')" class="form-item">-->
<!-- <el-checkbox v-model="labelForm.show" @change="changeLabelAttr">{{ $t('chart.show') }}</el-checkbox>--> <!-- <el-checkbox v-model="labelForm.show" @change="changeLabelAttr">{{ $t('chart.show') }}</el-checkbox>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item :label="$t('chart.pie_label_line_show')" class="form-item"> <el-form-item v-show="chart.type && !chart.type.includes('pie')" :label="$t('chart.pie_label_line_show')" class="form-item">
<el-checkbox v-model="labelForm.labelLine.show" @change="changeLabelAttr">{{ $t('chart.pie_label_line_show') }}</el-checkbox> <el-checkbox v-model="labelForm.labelLine.show" @change="changeLabelAttr">{{ $t('chart.pie_label_line_show') }}</el-checkbox>
</el-form-item> </el-form-item>
<el-form-item :label="$t('chart.text_fontsize')" class="form-item"> <el-form-item :label="$t('chart.text_fontsize')" class="form-item">
...@@ -116,6 +116,16 @@ export default { ...@@ -116,6 +116,16 @@ export default {
watch: { watch: {
'chart': { 'chart': {
handler: function() { handler: function() {
this.initData()
}
}
},
mounted() {
this.init()
this.initData()
},
methods: {
initData() {
const chart = JSON.parse(JSON.stringify(this.chart)) const chart = JSON.parse(JSON.stringify(this.chart))
if (chart.customAttr) { if (chart.customAttr) {
let customAttr = null let customAttr = null
...@@ -131,13 +141,7 @@ export default { ...@@ -131,13 +141,7 @@ export default {
} }
} }
} }
}
}
},
mounted() {
this.init()
}, },
methods: {
init() { init() {
const arr = [] const arr = []
for (let i = 10; i <= 20; i = i + 2) { for (let i = 10; i <= 20; i = i + 2) {
......
...@@ -183,6 +183,16 @@ export default { ...@@ -183,6 +183,16 @@ export default {
watch: { watch: {
'chart': { 'chart': {
handler: function() { handler: function() {
this.initData()
}
}
},
mounted() {
this.init()
this.initData()
},
methods: {
initData() {
const chart = JSON.parse(JSON.stringify(this.chart)) const chart = JSON.parse(JSON.stringify(this.chart))
if (chart.customAttr) { if (chart.customAttr) {
let customAttr = null let customAttr = null
...@@ -195,13 +205,7 @@ export default { ...@@ -195,13 +205,7 @@ export default {
this.sizeForm = customAttr.size this.sizeForm = customAttr.size
} }
} }
}
}
},
mounted() {
this.init()
}, },
methods: {
init() { init() {
const arr = [] const arr = []
for (let i = 10; i <= 60; i = i + 2) { for (let i = 10; i <= 60; i = i + 2) {
......
...@@ -95,6 +95,16 @@ export default { ...@@ -95,6 +95,16 @@ export default {
watch: { watch: {
'chart': { 'chart': {
handler: function() { handler: function() {
this.initData()
}
}
},
mounted() {
this.init()
this.initData()
},
methods: {
initData() {
const chart = JSON.parse(JSON.stringify(this.chart)) const chart = JSON.parse(JSON.stringify(this.chart))
if (chart.customAttr) { if (chart.customAttr) {
let customAttr = null let customAttr = null
...@@ -107,13 +117,7 @@ export default { ...@@ -107,13 +117,7 @@ export default {
this.tooltipForm = customAttr.tooltip this.tooltipForm = customAttr.tooltip
} }
} }
}
}
},
mounted() {
this.init()
}, },
methods: {
init() { init() {
const arr = [] const arr = []
for (let i = 10; i <= 20; i = i + 2) { for (let i = 10; i <= 20; i = i + 2) {
......
...@@ -1128,10 +1128,12 @@ export default { ...@@ -1128,10 +1128,12 @@ export default {
}, },
changeChart() { changeChart() {
if (this.view.tableId !== this.changeTable.id) {
this.view.tableId = this.changeTable.id this.view.tableId = this.changeTable.id
this.view.xaxis = [] this.view.xaxis = []
this.view.yaxis = [] this.view.yaxis = []
this.view.customFilter = [] this.view.customFilter = []
}
this.save(true, 'chart', false) this.save(true, 'chart', false)
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论