NEZ-1294 feat: 初始chart-clock 时钟组件开发

This commit is contained in:
@changcode
2021-12-28 16:48:50 +08:00
parent caa8e2d0e6
commit 835d3afba5
8 changed files with 426 additions and 8 deletions

View File

@@ -99,6 +99,32 @@
</el-option>
</el-select>
</el-form-item>
<!-- timeType -->
<el-form-item
:label="$t('dashboard.panel.chartForm.timeType')"
class="form-item--half-width"
v-if="chartConfig.type === 'clock'"
prop="type"
>
<el-select
id="chart-box-type"
v-model="chartConfig.param.timeType"
:disabled="chartConfig.type === 'group'"
:placeholder="$t('el.select.placeholder')"
popper-class="right-box-select-top prevent-clickoutside"
size="small"
value-key="chartType"
@change="change">
<el-option
v-for="item in timeType"
:key="item.value"
:label="item.label"
:value="item.value">
<span class="panel-dropdown-label-txt" >{{item.label}}</span>
</el-option>
</el-select>
</el-form-item>
</div>
<!--content-->
<div v-if="contentShow(chartConfig.type)" class="form__sub-title">
@@ -178,6 +204,10 @@ export default {
{
id: 'hexagon',
name: this.$t('dashboard.panel.chartForm.typeVal.hexagonFigure.label')
},
{
id: 'clock',
name: this.$t('dashboard.panel.chartForm.typeVal.clock.label')
}
]
}
@@ -187,6 +217,7 @@ export default {
this.chartConfig = JSON.parse(JSON.stringify(this.params))
},
chartTypeChange (type) {
console.log(type)
switch (type) {
case 'group':
this.chartConfig.span = 12
@@ -213,6 +244,11 @@ export default {
url: ''
}
break
case 'clock':
this.chartConfig.param = {
timeType: this.chartConfig.param.timeType
}
break
}
this.change()
},