|
@@ -133,9 +133,9 @@
|
|
|
:placeholder="$t('Chart.InputHolderAll.input_common',{label:$t('Chart.Detail.chart_unit')})">
|
|
|
<el-option
|
|
|
v-for="item in UnitOptions"
|
|
|
- :key="item"
|
|
|
- :label="item"
|
|
|
- :value="item">
|
|
|
+ :key="item.label"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -741,7 +741,7 @@
|
|
|
<script>
|
|
|
import { dataBaseInterface } from '@/api/api.js';
|
|
|
import { chartSetMixin } from './mixins/chartPublic';
|
|
|
-import {unitArr} from '@/utils/defaultOptions.js';
|
|
|
+import {unitSelectList} from '@/utils/defaultOptions.js';
|
|
|
import addOrEditMixn from './mixins/addOreditMixin';
|
|
|
import Chart from './components/chart';
|
|
|
import DateChooseDia from './components/DateChooseDia';
|
|
@@ -810,7 +810,10 @@ export default {
|
|
|
computed: {
|
|
|
roleName() {
|
|
|
return localStorage.getItem('userName');
|
|
|
- }
|
|
|
+ },
|
|
|
+ UnitOptions(){
|
|
|
+ return unitSelectList()
|
|
|
+ }
|
|
|
},
|
|
|
mixins: [chartSetMixin,addOrEditMixn],
|
|
|
data() {
|
|
@@ -825,7 +828,7 @@ export default {
|
|
|
needWatch: true,
|
|
|
IsNameDefault:true,
|
|
|
|
|
|
- UnitOptions:unitArr,
|
|
|
+ /* UnitOptions:unitArr, */
|
|
|
|
|
|
useUnit:''
|
|
|
|
|
@@ -834,20 +837,24 @@ export default {
|
|
|
methods: {
|
|
|
/* 保存 */
|
|
|
saveHandle() {
|
|
|
- if(!this.tableData.length) return this.$message.warning('暂未选择指标');
|
|
|
+ if(!this.tableData.length)
|
|
|
+ return this.$message.warning(/* '暂未选择指标' */this.$t('ToolBox.CommodityPriceChart.tips_msg05'));
|
|
|
console.log(this.chartInfo)
|
|
|
this.$refs.diaForm.validate((valid) => {
|
|
|
if(valid) {
|
|
|
// 季节图只允许添加一个指标
|
|
|
- if(this.chartInfo.ChartType === 2 && this.tableData.length > 1) return this.$message.warning('您选择的图表样式为季节性图表,只支持单指标画图');
|
|
|
+ if(this.chartInfo.ChartType === 2 && this.tableData.length > 1)
|
|
|
+ return this.$message.warning(/* '您选择的图表样式为季节性图表,只支持单指标画图' */this.$t('Chart.OptMsg.season_one_msg'));
|
|
|
|
|
|
- else if([7,11].includes(this.chartInfo.ChartType) && !this.$refs.BarOptRef.dateList.length) return this.$message.warning('请添加日期');
|
|
|
+ else if([7,11].includes(this.chartInfo.ChartType) && !this.$refs.BarOptRef.dateList.length)
|
|
|
+ return this.$message.warning(/*'请添加日期'*/this.$t('ToolBox.CommodityPriceChart.tips_msg06'));
|
|
|
|
|
|
- else if(this.chartInfo.ChartType === 10 && !this.$refs.SectionScatterOptRef.seriesArr[0].edbs) return this.$message.warning('请添加系列指标');
|
|
|
+ else if(this.chartInfo.ChartType === 10 && !this.$refs.SectionScatterOptRef.seriesArr[0].edbs)
|
|
|
+ return this.$message.warning(/* '请添加系列指标' */this.$t('Chart.OptMsg.season_add_hint'));
|
|
|
|
|
|
if(this.chartInfo.ChartType === 2){
|
|
|
if(!(this.SeasonExtraConfig.XStartDate && this.SeasonExtraConfig.XEndDate)){
|
|
|
- return this.$message.warning('横坐标显示范围不能为空');
|
|
|
+ return this.$message.warning(/* '横坐标显示范围不能为空' */this.$t('Chart.OptMsg.season_area_hint'));
|
|
|
}
|
|
|
}
|
|
|
|