feat: chart-right-box 调整

This commit is contained in:
zhangyu
2021-12-07 14:19:16 +08:00
parent d720198c2c
commit 8025528df8
8 changed files with 212 additions and 117 deletions

View File

@@ -107,6 +107,7 @@
:label="$t('dashboard.panel.chartForm.refer')"
class="form-item--half-width"
prop="param.stack"
style="display: none"
>
<el-select
id="chart-box-height"
@@ -348,7 +349,7 @@
<div>
<div class='mapping-display'>Title</div>
</div>
<el-form-item :prop="'param.columns.' + index + 'title'" :rules="{ required: true, message: $t('validate.required'), trigger: 'change'}" class="thresholds-from-item">
<el-form-item :prop="'param.columns.' + index + 'title'" :rules="{ required: true, message: $t('validate.required'), trigger: 'change'}" class="thresholds-from-item" style="flex: 1">
<el-input size="small" v-model="item.title" placeholder="regx"></el-input>
</el-form-item>
<div>
@@ -358,7 +359,7 @@
placeholder=""
popper-class="dc-dropdown right-box-select-top right-public-box-dropdown-top prevent-clickoutside chart-box-unit"
size="small"
style="width: 100%"
style="flex: 1"
@change="unitSelected"
>
</el-cascader>
@@ -398,6 +399,7 @@ export default {
rules: {},
groupList: [],
selectList: [],
oldType: '',
chartTypeList: [
{
id: 'stat',
@@ -436,6 +438,7 @@ export default {
methods: {
init () {
this.chartConfig = JSON.parse(JSON.stringify(this.params))
this.oldType = this.chartConfig.type
},
getSystemData () {
this.loading = true
@@ -468,19 +471,23 @@ export default {
case 'pie':
case 'guage':
case 'treemap':
if (this.oldType !== 'table') {
break
}
this.chartConfig.param.valueMapping = {
show: true,
mapping: []
}
this.chartConfig.param.refer = 1
this.chartConfig.param.refer = 0
delete this.chartConfig.param.columns
break
case 'table':
this.chartConfig.param.columns = []
this.chartConfig.param.refer = 1
this.chartConfig.param.refer = 0
delete this.chartConfig.param.valueMapping
break
}
this.oldType = type
this.change()
},
changeSystem (item) {