瀏覽代碼

图库lang fix

Karsa 1 年之前
父節點
當前提交
e6f3c1a4c3

+ 1 - 1
src/lang/modules/EtaBase/commonLang.js

@@ -110,7 +110,7 @@ export default {
   },
   time_len_set: {
     zh:'时间长度设置',
-    en:'Recently N years'
+    en:'Time Duration Setting'
   },
   recent_n_yaer: {
     zh:'最近N年',

+ 16 - 3
src/lang/modules/EtaChart/En.js

@@ -12,6 +12,9 @@ export default {
     //分类弹窗
     one_level_menu: 'First-level Directory',
     two_level_menu: 'Secondary Directory ',
+
+    /* 加入我的图库弹窗 */
+    add_my_classify: 'Add category'
   },
   
   /* 添加编辑图库页面 */
@@ -37,6 +40,9 @@ export default {
     label_day_num: 'Days',
     label_date_choose: 'Select date',
 
+    //图例设置弹窗
+    legend_hint: 'By default, the data year of the latest date of the curve is used as the legend name. If you manually edit it to other formats, it will no longer be automatically updated.',
+
     //标示线区弹窗
     add_plotline_btn: 'Add Marker Line',
     add_plotarea_btn: 'Add Marker Area',
@@ -52,6 +58,12 @@ export default {
     label_text_pos:'Text Position',
     label_text_color:'Text Color',
     label_text_size:'Text Size',
+    section_line: 'Solid Line',
+    section_dash_long: 'Long Dash Point',
+    section_dash_short: 'Short Dash Point',
+    section_pos_top: 'Top',
+    section_pos_center: 'Center',
+    section_pos_bot: 'Bottom',
 
     //截面散点图区域
     label_serie_set:'Series {index} Configuration',
@@ -67,8 +79,9 @@ export default {
     label_x_edb: 'X-axis Indicator',
     label_y_edb: 'Y-axis Indicator',
     label_edb_num: 'items',
-    label_replace_edb: '指标替换',
-    label_replace_to:'替换为',
-    label_add_moreserie:'More series configurations'
+    label_replace_edb: 'Replace Indicator',
+    label_replace_to:'Replace with',
+    label_add_moreserie:'More series configurations',
+    label_date_unit:'Day'
   }
 }

+ 14 - 1
src/lang/modules/EtaChart/Zh.js

@@ -12,6 +12,9 @@ export default {
     //分类弹窗
     one_level_menu: '一级目录',
     two_level_menu: '二级目录',
+
+    /* 加入我的图库弹窗 */
+    add_my_classify: '新增分类'
   },
 
   /* 添加编辑图库页面 */
@@ -37,6 +40,9 @@ export default {
     label_day_num: '天数',
     label_date_choose: '选择日期',
 
+    //图例设置弹窗
+    legend_hint: '默认取该曲线最新日期的数据年份作为图例名称,手动编辑为其他格式,则不再自动更新',
+
     //标示线区弹窗
     add_plotline_btn: '添加标识线',
     add_plotarea_btn: '添加标识区',
@@ -52,6 +58,12 @@ export default {
     label_text_pos:'文本位置',
     label_text_color:'文本颜色',
     label_text_size:'文本字号',
+    section_line: '实线',
+    section_dash_long: '长虚线点',
+    section_dash_short: '短虚线点',
+    section_pos_top: '顶部',
+    section_pos_center: '居中',
+    section_pos_bot: '底部',
 
     //截面散点图区域
     label_serie_set:'系列{index}配置',
@@ -69,6 +81,7 @@ export default {
     label_edb_num: '项',
     label_replace_edb: '指标替换',
     label_replace_to:'替换为',
-    label_add_moreserie:'更多系列配置'
+    label_add_moreserie:'更多系列配置',
+    label_date_unit:'天'
   }
 }

+ 21 - 1
src/lang/modules/EtaChart/commonLang.js

@@ -110,7 +110,7 @@ export default {
   },
   select_my_chart_classify:{
     zh:'选择我的分类',
-    en:'Select My Category Add New category'
+    en:'Select my category'
   },
   add_chart_btn:{
     zh:'添加图表',
@@ -195,6 +195,10 @@ export default {
       zh:'复制标题失败',
       en:'Failed to copy the title'
     },
+    add_mine_success: {
+      zh:'已加入我的图库',
+      en:'Successfully added to my gallery'
+    }
 
 
   },
@@ -453,6 +457,18 @@ export default {
       zh: '系列名称不能为空',
       en: 'Series Name can not be empty'
     },
+    classify_msg: {
+      zh: '分类名称不能为空',
+      en: 'Category name can not be empty'
+    },
+    day_msg: {
+      zh: '天数不能为空',
+      en: 'Days can not be empty'
+    },
+    date_msg: {
+      zh: '日期不能为空',
+      en: 'Date can not be empty'
+    },
   },
 
   /* 相关placeholder */
@@ -485,6 +501,10 @@ export default {
       zh: '请输入内容',
       en: 'Please input content'
     },
+    input_classify: {
+      zh: '请输入分类名称',
+      en: 'Please input the category name'
+    }
   },
 
   /* 所有source */

+ 5 - 5
src/utils/defaultOptions.js

@@ -119,19 +119,19 @@ export const defaultOpts = {
 /* 图表分类弹窗校验 */
 export const formRules = {
 	level_1:[
-		{ required: true, message: '分类名称不能为空', trigger: 'blur' },
+		{ required: true, message: /* '分类名称不能为空' */bus.$i18nt.t('Chart.Vailds.classify_msg'), trigger: 'blur' },
 	],
 	level_2:[
-		{ required: true, message: '分类名称不能为空', trigger: 'blur' },
+		{ required: true, message: /* '分类名称不能为空' */bus.$i18nt.t('Chart.Vailds.classify_msg'), trigger: 'blur' },
 	],
 	level_3:[
-		{ required: true, message: '分类名称不能为空', trigger: 'blur' },
+		{ required: true, message: /* '分类名称不能为空' */bus.$i18nt.t('Chart.Vailds.classify_msg'), trigger: 'blur' },
 	],
 	level_4:[
-		{ required: true, message: '图表名称不能为空', trigger: 'blur' },
+		{ required: true, message: /* '图表名称不能为空' */bus.$i18nt.t('Chart.Vailds.name_msg'), trigger: 'blur' },
 	],
 	level_menu:[
-		{ required: true, message: '所属分类不能为空', trigger: 'blur' },
+		{ required: true, message: /* '图表分类不能为空' */bus.$i18nt.t('Chart.Vailds.classify_msg'), trigger: 'blur' },
 	],
 }
 /* 添加图表表单校验 */

+ 1 - 2
src/views/dataEntry_manage/addChart.vue

@@ -136,8 +136,7 @@
 					<div style="margin-bottom: 12px;" class="xaxis-range-tip">
 						{{$t('EtaChartAddPage.label_xserie_range')}}<!-- 横坐标显示范围 --> 
 						<el-tooltip>
-							<div slot="content">
-								{{$t('EtaChartAddPage.xserie_range_tip')}}
+							<div slot="content" v-html="$t('EtaChartAddPage.xserie_range_tip')">
 							</div>
 							<img src="~@/assets/img/icons/question_mark_black.png" style="height: 16px;cursor: pointer;margin-left: 6px;" />
 						</el-tooltip>

+ 1 - 1
src/views/dataEntry_manage/components/DateChooseDia.vue

@@ -1,7 +1,7 @@
 <template>
 		<el-dialog
 		:modal-append-to-body='false'
-		:title="dialogTitle" 
+		:title="dialogTitle==='时间长度设置'? this.$t('Edb.time_len_set') :''" 
 		:visible.sync="isDateDia"
 		:close-on-click-modal="false"
 		@close="cancelHandle"

+ 4 - 4
src/views/dataEntry_manage/components/LegendEditDia.vue

@@ -1,7 +1,7 @@
 <template>
   <el-dialog
   :modal-append-to-body='false'
-  title="图例名称设置" 
+  :title="$t('EtaChartAddPage.label_legend_set')" 
   :visible.sync="isEditLegend"
   :close-on-click-modal="false"
   @close="cancelHandle"
@@ -13,11 +13,11 @@
         <div class="legend-item-color" :style="{backgroundColor:seasonColor[index]}"></div>
         <el-input v-model.trim="item.Value" placeholder="请输入图例名称" style="width: 295px;"></el-input>
       </div>
-      <div class="legend-box-hint">默认取该曲线最新日期的数据年份作为图例名称,手动编辑为其他格式,则不再自动更新</div>
+      <div class="legend-box-hint" v-html="$t('EtaChartAddPage.legend_hint')"></div>
     </div>
     <div class="dia-bot">
-      <el-button plain @click="cancelHandle" style="width: 120px;">取消</el-button>
-      <el-button type="primary" style="width: 120px;margin-left:30px" @click="saveHandle">保存</el-button>
+      <el-button plain @click="cancelHandle" style="width: 120px;"><!-- 取消 -->{{$t('Dialog.cancel_btn')}}</el-button>
+      <el-button type="primary" style="width: 120px;margin-left:30px" @click="saveHandle"><!-- 保存 -->{{$t('Dialog.confirm_save_btn')}}</el-button>
     </div>
   </el-dialog>
 </template>

+ 3 - 3
src/views/dataEntry_manage/components/addMarkerDialog.vue

@@ -330,9 +330,9 @@ export default {
       },
 
       dashOptions: [
-        { label: '实线',value: 'Solid',svg:`<g clip-path="url(#clip0_2634_4692)"><rect x="-14" y="4" width="116" height="2" fill="#333333"/></g><defs><clipPath id="clip0_2634_4692"><rect width="88" height="10" fill="white"/></clipPath></defs>` },
-        { label: '长虚线点',value: 'LongDashDot',svg:`<g clip-path="url(#clip0_2634_4933)"><circle cy="5" r="1" fill="#333333"/><rect x="2" y="4" width="13" height="2" rx="1" fill="#333333"/><circle cx="17" cy="5" r="1" fill="#333333"/><rect x="19" y="4" width="13" height="2" rx="1" fill="#333333"/><circle cx="34" cy="5" r="1" fill="#333333"/><rect x="36" y="4" width="13" height="2" rx="1" fill="#333333"/><circle cx="51" cy="5" r="1" fill="#333333"/><rect x="53" y="4" width="13" height="2" rx="1" fill="#333333"/><circle cx="68" cy="5" r="1" fill="#333333"/><rect x="70" y="4" width="13" height="2" rx="1" fill="#333333"/><circle cx="85" cy="5" r="1" fill="#333333"/><rect x="87" y="4" width="13" height="2" rx="1" fill="#333333"/></g><defs><clipPath id="clip0_2634_4933"><rect width="88" height="10" fill="white"/></clipPath></defs>` },
-        { label: '短虚线点',value: 'ShortDashDot',svg:`<g clip-path="url(#clip0_2634_4756)"><rect x="1" y="4" width="2" height="2" fill="#333333"/><rect x="4" y="4" width="5" height="2" fill="#333333"/><rect x="10" y="4" width="2" height="2" fill="#333333"/><rect x="13" y="4" width="5" height="2" fill="#333333"/><rect x="19" y="4" width="2" height="2" fill="#333333"/><rect x="22" y="4" width="5" height="2" fill="#333333"/><rect x="28" y="4" width="2" height="2" fill="#333333"/><rect x="31" y="4" width="5" height="2" fill="#333333"/><rect x="37" y="4" width="2" height="2" fill="#333333"/><rect x="40" y="4" width="5" height="2" fill="#333333"/><rect x="46" y="4" width="2" height="2" fill="#333333"/><rect x="49" y="4" width="5" height="2" fill="#333333"/><rect x="55" y="4" width="2" height="2" fill="#333333"/><rect x="58" y="4" width="5" height="2" fill="#333333"/><rect x="64" y="4" width="2" height="2" fill="#333333"/><rect x="67" y="4" width="5" height="2" fill="#333333"/><rect x="73" y="4" width="2" height="2" fill="#333333"/><rect x="76" y="4" width="5" height="2" fill="#333333"/><rect x="82" y="4" width="2" height="2" fill="#333333"/><rect x="85" y="4" width="5" height="2" fill="#333333"/></g><defs><clipPath id="clip0_2634_4756"><rect width="88" height="10" fill="white"/></clipPath></defs>` },
+        { label: /* '实线' */ this.$t('EtaChartAddPage.section_line'),value: 'Solid',svg:`<g clip-path="url(#clip0_2634_4692)"><rect x="-14" y="4" width="116" height="2" fill="#333333"/></g><defs><clipPath id="clip0_2634_4692"><rect width="88" height="10" fill="white"/></clipPath></defs>` },
+        { label: /* '长虚线点' */this.$t('EtaChartAddPage.section_dash_long'),value: 'LongDashDot',svg:`<g clip-path="url(#clip0_2634_4933)"><circle cy="5" r="1" fill="#333333"/><rect x="2" y="4" width="13" height="2" rx="1" fill="#333333"/><circle cx="17" cy="5" r="1" fill="#333333"/><rect x="19" y="4" width="13" height="2" rx="1" fill="#333333"/><circle cx="34" cy="5" r="1" fill="#333333"/><rect x="36" y="4" width="13" height="2" rx="1" fill="#333333"/><circle cx="51" cy="5" r="1" fill="#333333"/><rect x="53" y="4" width="13" height="2" rx="1" fill="#333333"/><circle cx="68" cy="5" r="1" fill="#333333"/><rect x="70" y="4" width="13" height="2" rx="1" fill="#333333"/><circle cx="85" cy="5" r="1" fill="#333333"/><rect x="87" y="4" width="13" height="2" rx="1" fill="#333333"/></g><defs><clipPath id="clip0_2634_4933"><rect width="88" height="10" fill="white"/></clipPath></defs>` },
+        { label: /* '短虚线点' */this.$t('EtaChartAddPage.section_dash_short'),value: 'ShortDashDot',svg:`<g clip-path="url(#clip0_2634_4756)"><rect x="1" y="4" width="2" height="2" fill="#333333"/><rect x="4" y="4" width="5" height="2" fill="#333333"/><rect x="10" y="4" width="2" height="2" fill="#333333"/><rect x="13" y="4" width="5" height="2" fill="#333333"/><rect x="19" y="4" width="2" height="2" fill="#333333"/><rect x="22" y="4" width="5" height="2" fill="#333333"/><rect x="28" y="4" width="2" height="2" fill="#333333"/><rect x="31" y="4" width="5" height="2" fill="#333333"/><rect x="37" y="4" width="2" height="2" fill="#333333"/><rect x="40" y="4" width="5" height="2" fill="#333333"/><rect x="46" y="4" width="2" height="2" fill="#333333"/><rect x="49" y="4" width="5" height="2" fill="#333333"/><rect x="55" y="4" width="2" height="2" fill="#333333"/><rect x="58" y="4" width="5" height="2" fill="#333333"/><rect x="64" y="4" width="2" height="2" fill="#333333"/><rect x="67" y="4" width="5" height="2" fill="#333333"/><rect x="73" y="4" width="2" height="2" fill="#333333"/><rect x="76" y="4" width="5" height="2" fill="#333333"/><rect x="82" y="4" width="2" height="2" fill="#333333"/><rect x="85" y="4" width="5" height="2" fill="#333333"/></g><defs><clipPath id="clip0_2634_4756"><rect width="88" height="10" fill="white"/></clipPath></defs>` },
       ],
     }
   },

+ 6 - 6
src/views/dataEntry_manage/components/addMyClassifyDia.vue

@@ -87,14 +87,14 @@ export default {
       selected_classify: [],
 			//新增弹窗
 			isClassifyDia: false,
-      dia_title: '新增分类',
+      dia_title: /* '新增分类' */this.$t('EtaChartPage.add_my_classify'),
       dialogKeyArrs: [
         {
-          label: '分类名称',
+          label: /* '分类名称' */ this.$t('Chart.classify_name_label'),
           prop: 'name',
           type: 'input',
           maxlen: 10,
-          placeholder: '请输入分类名称',
+          placeholder: /* '请输入分类名称' */this.$t('Chart.InputHolderAll.input_classify'),
         },
       ],
       formData: {
@@ -102,7 +102,7 @@ export default {
       },
 			addRules: {
 				name:[
-					{ required: true, message: '分类名称不能为空', trigger: 'blur' },
+					{ required: true, message: /* '分类名称不能为空' */this.$t('Chart.Vailds.classify_msg'), trigger: 'blur' },
 				],
 			}
 		};
@@ -144,13 +144,13 @@ export default {
 
     /* 加入图库 */
     saveHandle() {
-      if(!this.selected_classify.length) return this.$message.warning('请选择分类');
+      if(!this.selected_classify.length) return this.$message.warning(/* '请选择分类' */this.$t('MsgPrompt.select_category'));
       mychartInterface.add({
         ChartInfoId: this.add_id,
         MyChartClassifyId: this.selected_classify
       }).then(res => {
         if(res.Ret !== 200) return 
-        this.$message.success('已加入我的图库')
+        this.$message.success(/* '已加入我的图库' */this.$t('Chart.OptMsg.add_mine_success'))
         this.$emit('addSuccess',res.Data)
       })
     },

+ 2 - 2
src/views/dataEntry_manage/components/barOptionSection.vue

@@ -239,8 +239,8 @@ export default {
     /* 保存日期push日期数组  */
     saveDate() {
       const { Type,Value,Date } = this.dialogForm;
-      if( Type === 2 && !Value) return this.$message.warning('天数不能为空')
-      if( Type === 3 && !Date) return this.$message.warning('日期不能为空')
+      if( Type === 2 && !Value) return this.$message.warning(/* '天数不能为空' */this.$t('Chart.Vailds.day_msg'))
+      if( Type === 3 && !Date) return this.$message.warning(/* '日期不能为空' */this.$t('Chart.Vailds.date_msg'))
 
       if(this.edit_index !== 0) {
         //修改

+ 5 - 5
src/views/dataEntry_manage/components/satterSeriesDia.vue

@@ -173,7 +173,7 @@
       <el-form-item label="" prop="x_unit">
         <selectUnit 
           v-model="form.x_unit" 
-          style="width: 150px"
+          style="width: 160px"
           clearable
         />
       </el-form-item>
@@ -192,7 +192,7 @@
             v-model="form.x_date_value"
             style="width:100px;"
           />
-          天
+          <!--  -->{{$t('EtaChartAddPage.label_date_unit')}}
         </span>
         <el-date-picker
           v-else-if="form.x_date_type === 3"
@@ -214,7 +214,7 @@
       <el-form-item label="" prop="y_unit">
         <selectUnit 
           v-model="form.y_unit" 
-          style="width: 150px"
+          style="width: 160px"
           clearable
         />
       </el-form-item>
@@ -233,7 +233,7 @@
             v-model="form.y_date_value"
             style="width:100px;"
           />
-          天
+          <!--  -->{{$t('EtaChartAddPage.label_date_unit')}}
         </span>
         <el-date-picker
           v-else-if="form.y_date_type === 3"
@@ -272,7 +272,7 @@
     <m-dialog
       :show.sync="openReplaceDialog"
       width="700px"
-      title="指标替换"
+      :title="$t('EtaChartAddPage.label_replace_edb')"
       @close="cancelReplace"
     >
       <div>

+ 1 - 2
src/views/dataEntry_manage/editChart.vue

@@ -144,8 +144,7 @@
 					<div style="margin-bottom: 12px;" class="xaxis-range-tip">
 						{{$t('EtaChartAddPage.label_xserie_range')}}<!-- 横坐标显示范围 -->  
 						<el-tooltip>
-							<div slot="content">
-								{{$t('EtaChartAddPage.xserie_range_tip')}}
+							<div slot="content" v-html="$t('EtaChartAddPage.xserie_range_tip')">
 							</div>
 							<img src="~@/assets/img/icons/question_mark_black.png" style="height: 16px;cursor: pointer;margin-left: 6px;" />
 						</el-tooltip>

+ 5 - 3
src/views/system_manage/chartTheme/common/config.js

@@ -1,3 +1,5 @@
+import bus from '@/api/bus'
+
 // 一些常量
 import { defaultOpts } from '@/utils/defaultOptions';
 
@@ -69,9 +71,9 @@ export const lineStylesOpts = [
 
 //垂直位置 上中下
 export const verticalPositions = [
-  { label: '顶部',value: 'top' },
-  { label: '居中',value: 'middle' },
-  { label: '底部',value: 'bottom' },
+  { label: /* '顶部'  */bus.$i18nt.t('EtaChartAddPage.section_pos_top'),value: 'top' },
+  { label: /* '居中' */bus.$i18nt.t('EtaChartAddPage.section_pos_center'),value: 'middle' },
+  { label: /* '底部' */bus.$i18nt.t('EtaChartAddPage.section_pos_bot'),value: 'bottom' },
 ]
 //水平位置
 export const alignPositions = [