|
@@ -8,7 +8,7 @@
|
|
|
<!-- 线条设置 -->
|
|
|
<template v-if="key==='lineOptions'">
|
|
|
<li class="option-item">
|
|
|
- <label class="el-form-item__label">颜色</label>
|
|
|
+ <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt01')}}</label>
|
|
|
<el-color-picker
|
|
|
v-model="themeOptions[key].colors[themeOptions[key].colorIndex]"
|
|
|
show-alpha
|
|
@@ -18,7 +18,7 @@
|
|
|
/>
|
|
|
</li>
|
|
|
<li class="option-item">
|
|
|
- <label class="el-form-item__label">顺序</label>
|
|
|
+ <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt02')}}</label>
|
|
|
<el-select
|
|
|
v-model="themeOptions[key].colorIndex"
|
|
|
style="width: 90px"
|
|
@@ -26,7 +26,7 @@
|
|
|
<el-option
|
|
|
v-for="(item,index) in themeOptions[key].colors"
|
|
|
:key="index"
|
|
|
- :label="`第${index+1}${typeLabelMap[chartType].lineLabel}`"
|
|
|
+ :label="`${$i18n.locale == 'zh'?'第':''}${index+1}${typeLabelMap[chartType].lineLabel}`"
|
|
|
:value="index"
|
|
|
/>
|
|
|
</el-select>
|
|
@@ -35,7 +35,7 @@
|
|
|
<!-- 曲线额外配置 雷达 -->
|
|
|
<template v-if="[1,2,11].includes(chartType)">
|
|
|
<li class="option-item">
|
|
|
- <label class="el-form-item__label">线型</label>
|
|
|
+ <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt03')}}</label>
|
|
|
<el-select
|
|
|
v-model="themeOptions[key].dashStyle"
|
|
|
style="width: 90px"
|
|
@@ -52,7 +52,7 @@
|
|
|
</el-select>
|
|
|
</li>
|
|
|
<li class="option-item">
|
|
|
- <label class="el-form-item__label">粗细</label>
|
|
|
+ <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt04')}}</label>
|
|
|
<el-input
|
|
|
v-model="themeOptions[key].lineWidth"
|
|
|
style="width: 90px"
|
|
@@ -62,7 +62,7 @@
|
|
|
/>
|
|
|
</li>
|
|
|
<li class="option-item">
|
|
|
- <label class="el-form-item__label">平滑线</label>
|
|
|
+ <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt05')}}</label>
|
|
|
<el-select
|
|
|
v-model="themeOptions[key].lineType"
|
|
|
style="width: 90px"
|
|
@@ -76,7 +76,7 @@
|
|
|
<!-- 散点额外配置 -->
|
|
|
<template v-else-if="[5,10].includes(chartType)">
|
|
|
<li class="option-item">
|
|
|
- <label class="el-form-item__label">大小</label>
|
|
|
+ <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt06')}}</label>
|
|
|
<el-input
|
|
|
v-model="themeOptions[key].radius"
|
|
|
style="width: 90px"
|
|
@@ -91,7 +91,7 @@
|
|
|
<!-- 图例设置 -->
|
|
|
<template v-else-if="key==='legendOptions'">
|
|
|
<li class="option-item">
|
|
|
- <label class="el-form-item__label">颜色</label>
|
|
|
+ <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt01')}}</label>
|
|
|
<el-color-picker
|
|
|
v-model="themeOptions[key].itemStyle.color"
|
|
|
show-alpha
|
|
@@ -100,7 +100,7 @@
|
|
|
/>
|
|
|
</li>
|
|
|
<li class="option-item">
|
|
|
- <label class="el-form-item__label">位置</label>
|
|
|
+ <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt07')}}</label>
|
|
|
<el-select
|
|
|
v-model="themeOptions[key].verticalAlign"
|
|
|
style="width: 90px"
|
|
@@ -114,7 +114,7 @@
|
|
|
</el-select>
|
|
|
</li>
|
|
|
<li class="option-item">
|
|
|
- <label class="el-form-item__label">字号</label>
|
|
|
+ <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt08')}}</label>
|
|
|
<el-input
|
|
|
v-model="themeOptions[key].itemStyle.fontSize"
|
|
|
style="width: 90px"
|
|
@@ -128,7 +128,7 @@
|
|
|
<!-- 标题设置 -->
|
|
|
<template v-else-if="key==='titleOptions'">
|
|
|
<li class="option-item">
|
|
|
- <label class="el-form-item__label">颜色</label>
|
|
|
+ <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt01')}}</label>
|
|
|
<el-color-picker
|
|
|
v-model="themeOptions[key].style.color"
|
|
|
show-alpha
|
|
@@ -137,7 +137,7 @@
|
|
|
/>
|
|
|
</li>
|
|
|
<li class="option-item">
|
|
|
- <label class="el-form-item__label">字号</label>
|
|
|
+ <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt08')}}</label>
|
|
|
<el-input
|
|
|
v-model="themeOptions[key].style.fontSize"
|
|
|
style="width: 90px"
|
|
@@ -147,7 +147,7 @@
|
|
|
/>
|
|
|
</li>
|
|
|
<li class="option-item">
|
|
|
- <label class="el-form-item__label">对齐方式</label>
|
|
|
+ <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt09')}}</label>
|
|
|
<el-radio-group v-model="themeOptions[key].align" size="small">
|
|
|
<el-radio-button
|
|
|
v-for="item in alignPositions"
|
|
@@ -164,7 +164,7 @@
|
|
|
<!-- 标记文字 横轴 纵轴设置 -->
|
|
|
<template v-else-if="['markerOptions','xAxisOptions','yAxisOptions'].includes(key)">
|
|
|
<li class="option-item">
|
|
|
- <label class="el-form-item__label">颜色</label>
|
|
|
+ <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt01')}}</label>
|
|
|
<el-color-picker
|
|
|
v-model="themeOptions[key].style.color"
|
|
|
show-alpha
|
|
@@ -173,7 +173,7 @@
|
|
|
/>
|
|
|
</li>
|
|
|
<li class="option-item">
|
|
|
- <label class="el-form-item__label">字号</label>
|
|
|
+ <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt08')}}</label>
|
|
|
<el-input
|
|
|
v-model="themeOptions[key].style.fontSize"
|
|
|
style="width: 90px"
|
|
@@ -187,7 +187,7 @@
|
|
|
<!-- 绘图区设置 -->
|
|
|
<template v-else-if="key==='drawOption'">
|
|
|
<li class="option-item">
|
|
|
- <label class="el-form-item__label">背景色</label>
|
|
|
+ <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt10')}}</label>
|
|
|
<el-color-picker
|
|
|
v-model="themeOptions[key].plotBackgroundColor"
|
|
|
show-alpha
|
|
@@ -214,6 +214,32 @@ export default {
|
|
|
chartType() {
|
|
|
}
|
|
|
},
|
|
|
+ computed:{
|
|
|
+ labelMap(){
|
|
|
+ return new Map([
|
|
|
+ ['lineOptions',this.$t('SystemManage.ChartSet.opt_label01')],
|
|
|
+ ['scatterOptions',this.$t('SystemManage.ChartSet.opt_label02')],
|
|
|
+ ['legendOptions',this.$t('SystemManage.ChartSet.opt_label03')],
|
|
|
+ ['titleOptions',this.$t('SystemManage.ChartSet.opt_label04')],
|
|
|
+ ['markerOptions',this.$t('SystemManage.ChartSet.opt_label05')],
|
|
|
+ ['xAxisOptions',this.$t('SystemManage.ChartSet.opt_label06')],
|
|
|
+ ['yAxisOptions',this.$t('SystemManage.ChartSet.opt_label07')],
|
|
|
+ ['drawOption',this.$t('SystemManage.ChartSet.opt_label08')],
|
|
|
+ ])
|
|
|
+ },
|
|
|
+ typeLabelMap(){
|
|
|
+ return {
|
|
|
+ 1: {label:this.$t('SystemManage.ChartSet.opt_label01'),lineLabel: this.$t('SystemManage.ChartSet.unit01')},
|
|
|
+ 2: {label:this.$t('SystemManage.ChartSet.opt_label01'),lineLabel: this.$t('SystemManage.ChartSet.unit01')},
|
|
|
+ 4: {label:this.$t('SystemManage.ChartSet.opt_label09'),lineLabel: this.$t('SystemManage.ChartSet.unit02')},
|
|
|
+ 5: {label:this.$t('SystemManage.ChartSet.opt_label02'),lineLabel: this.$t('SystemManage.ChartSet.unit03')},
|
|
|
+ 6: {label:this.$t('SystemManage.ChartSet.opt_label10'),lineLabel: this.$t('SystemManage.ChartSet.unit03')},
|
|
|
+ 7: {label:this.$t('SystemManage.ChartSet.opt_label09'),lineLabel: this.$t('SystemManage.ChartSet.unit02')},
|
|
|
+ 10: {label:this.$t('SystemManage.ChartSet.opt_label02'),lineLabel: this.$t('SystemManage.ChartSet.unit03')},
|
|
|
+ 11: {label:this.$t('SystemManage.ChartSet.opt_label01'),lineLabel: this.$t('SystemManage.ChartSet.unit01')},
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
predefineColors,
|
|
@@ -238,26 +264,26 @@ export default {
|
|
|
drawOption: defaultETAOptions.drawOption
|
|
|
},
|
|
|
lengendPositions: verticalPositions.filter(_ => _.value!=='middle'),
|
|
|
- typeLabelMap: {
|
|
|
- 1: {label:'线条设置',lineLabel: '条'},
|
|
|
- 2: {label:'线条设置',lineLabel: '条'},
|
|
|
- 4: {label:'柱形设置',lineLabel: '根'},
|
|
|
- 5: {label:'散点设置',lineLabel: '系列'},
|
|
|
- 6: {label:'线条、柱形设置',lineLabel: '系列'},
|
|
|
- 7: {label:'柱形设置',lineLabel: '根'},
|
|
|
- 10: {label:'散点设置',lineLabel: '系列'},
|
|
|
- 11: {label:'线条设置',lineLabel: '条'},
|
|
|
- },
|
|
|
- labelMap: new Map([
|
|
|
- ['lineOptions','线条设置'],
|
|
|
- ['scatterOptions','散点设置'],
|
|
|
- ['legendOptions','图例设置'],
|
|
|
- ['titleOptions','标题设置'],
|
|
|
- ['markerOptions','标记文字设置(来源,标识)'],
|
|
|
- ['xAxisOptions','横轴设置'],
|
|
|
- ['yAxisOptions','纵轴设置'],
|
|
|
- ['drawOption','绘图区设置'],
|
|
|
- ]),
|
|
|
+ // typeLabelMap: {
|
|
|
+ // 1: {label:'线条设置',lineLabel: '条'},
|
|
|
+ // 2: {label:'线条设置',lineLabel: '条'},
|
|
|
+ // 4: {label:'柱形设置',lineLabel: '根'},
|
|
|
+ // 5: {label:'散点设置',lineLabel: '系列'},
|
|
|
+ // 6: {label:'线条、柱形设置',lineLabel: '系列'},
|
|
|
+ // 7: {label:'柱形设置',lineLabel: '根'},
|
|
|
+ // 10: {label:'散点设置',lineLabel: '系列'},
|
|
|
+ // 11: {label:'线条设置',lineLabel: '条'},
|
|
|
+ // },
|
|
|
+ // labelMap: new Map([
|
|
|
+ // ['lineOptions','线条设置'],
|
|
|
+ // ['scatterOptions','散点设置'],
|
|
|
+ // ['legendOptions','图例设置'],
|
|
|
+ // ['titleOptions','标题设置'],
|
|
|
+ // ['markerOptions','标记文字设置(来源,标识)'],
|
|
|
+ // ['xAxisOptions','横轴设置'],
|
|
|
+ // ['yAxisOptions','纵轴设置'],
|
|
|
+ // ['drawOption','绘图区设置'],
|
|
|
+ // ]),
|
|
|
configOptions: []
|
|
|
}
|
|
|
},
|
|
@@ -307,6 +333,8 @@ export default {
|
|
|
margin-top: 20px;
|
|
|
.option-item {
|
|
|
margin: 10px 0;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
}
|
|
|
}
|
|
|
.option-title{
|
|
@@ -321,8 +349,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.el-form-item__label {
|
|
|
- width: 70px;
|
|
|
+ width: 90px;
|
|
|
text-align: left;
|
|
|
+ line-height: 1.5;
|
|
|
}
|
|
|
}
|
|
|
</style>
|