feat: 仪表板 添加 min max

This commit is contained in:
zhangyu
2021-12-24 15:32:16 +08:00
parent cd7e043eff
commit af51ff5b48
4 changed files with 66 additions and 3 deletions

View File

@@ -201,6 +201,10 @@ export default {
if (!params.groupId) {
params.groupId = 0
}
if (params.type !== 'guage') {
delete params.param.min
delete params.param.max
}
if (!params.x && !params.y) {
params.x = this.chartLastPosition.x + params.span > 12 ? 0 : this.chartLastPosition.x
params.y = this.chartLastPosition.y + 12
@@ -284,6 +288,8 @@ export default {
height: 4,
unit: 2,
type: 'line',
min: 0,
max: 100,
elements: [{ expression: '', legend: '', type: 'expert', id: '', name: 'A' }],
param: {
stack: 0,
@@ -328,6 +334,8 @@ export default {
nullType: 'null',
statistics: 'last',
text: 'value',
min: 0,
max: 100,
enable: {
thresholds: false,
legend: true,
@@ -413,6 +421,12 @@ export default {
if (this.editChart.groupId === -1) {
this.editChart.groupId = ''
}
if (!this.editChart.param.min) {
this.editChart.param.min = 0
}
if (!this.editChart.param.max) {
this.editChart.param.max = 100
}
}
},
'editChart.type': {