Browse Source

fix: 分类次级联选中英文显示

ldong 3 months ago
parent
commit
06818f934b

+ 9 - 2
src/views/chartRelevance_manage/crossVarietyAnalysis/components/chartFormSection.vue

@@ -62,7 +62,7 @@
           <el-option
             v-for="item in tagList"
             :key="item.ChartTagId"
-            :label="item.ChartTagName"
+            :label="item[langObj[currentLang]]"
             :value="item.ChartTagId"
             :disabled="item.ChartTagId===form.TagY"
           />
@@ -78,7 +78,7 @@
           <el-option
             v-for="item in tagList"
             :key="item.ChartTagId"
-            :label="item.ChartTagName"
+            :label="item[langObj[currentLang]]"
             :value="item.ChartTagId"
             :disabled="item.ChartTagId===form.TagX"
           />
@@ -166,6 +166,9 @@ export default {
     }
   },
   computed:{
+    currentLang() {
+      return this.$store.state.lang;
+    },
     unitOpt(){
       return [
           {label:this.$t('Edb.FreAll.year_min'),val:'年'},
@@ -204,6 +207,10 @@ export default {
   },
   data() {
     return {
+      langObj:{
+        'zh':'ChartTagName',
+        'en':'ChartTagNameEn'
+      },
       form: {
         ChartName:'',
         Source: 10,

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

@@ -114,12 +114,13 @@
 						/>
 					</el-form-item>
 					<el-form-item :label="$t('Chart.Detail.chart_classify')" prop="classify">
-						<el-cascader
+						<cascader
 							v-model="chartInfo.classify"
 							:options="classifyOptions"
 							:props="levelProps"
-							style="width: 90%"
+							cascaderWidth="width: 90%"
 							:placeholder="$t('Chart.InputHolderAll.input_classify')"
+							:config="{ label: currentLang === 'zh' ? 'ChartClassifyName' : 'ChartClassifyNameEn',value: 'ChartClassifyId'}"
 						/>
 					</el-form-item>
 					<el-form-item :label="$t('Chart.Detail.chart_unit')" prop="Unit" v-if="[7,11].includes(chartInfo.ChartType)">

+ 7 - 1
src/views/dataEntry_manage/thirdBase/components/batchAddEdbDia.vue

@@ -45,13 +45,14 @@
                   :options="classifyOptions"
                   :key="item.edbIndex"
                   :props="{
-                    label: 'ClassifyName',
+                    label:currentLang==='zh'?'ClassifyName':'ClassifyNameEn',
                     value: 'BaseFromMysteelChemicalClassifyId',
                     children: 'Children',
                     emitPath: false,
                   }"
                   :placeholder="$t('Edb.InputHolderAll.input_classify')"
                 />
+
               </el-form-item>
             </el-col>
             <img src="~@/assets/img/delete-minus-red.png" @click="delEdbItem(index)" v-if="edbForm.edbDataList.length>1" />
@@ -94,6 +95,11 @@ import { steelInterface } from "@/api/modules/thirdBaseApi";
         }
       },
     },
+    computed: {
+      currentLang() {
+          return this.$store.state.lang;
+      },
+    },
     data(){
       this.checkAge=(rule, value, callback) => {
         // 不能输入中文和空格

+ 4 - 1
src/views/dataEntry_manage/thirdBase/components/targetDialog.vue

@@ -30,7 +30,7 @@
               v-model="formData.classify"
               :options="classifyOptions"
               :props="{
-                label: 'ClassifyName',
+                label:currentLang==='zh'?'ClassifyName':'ClassifyNameEn',
                 value: 'BaseFromMysteelChemicalClassifyId',
                 children: 'Children',
                 emitPath: false,
@@ -145,6 +145,9 @@ export default {
     },
   },
   computed: {
+    currentLang() {
+      return this.$store.state.lang;
+    },
     // timeArr() {
     //   //30间隔的时间数组
     //   const timeArrays = new Array(48).fill("").map((item, index) => {

+ 13 - 11
src/views/futures_manage/chartEditor.vue

@@ -67,18 +67,18 @@
 					:rules="chartRules"
 				>
 					<el-form-item :label="$t('ToolBox.CommodityPriceChart.select_future')" prop="futures_id" v-if="chartInfo.Source===2">
-						<el-cascader
+						<cascader
 							v-model="chartInfo.futures_id"
 							:options="futuresOptions"
-							:props="{
-								label: 'FutureGoodEdbInfoName',
+							cascaderWidth="width: 90%"
+							:placeholder="$t('ToolBox.CommodityPriceChart.please_select_future')"
+							@changeVal="changeFuturesHandle"
+							:config="{  
+								label:momentLang=== 'zh'?'FutureGoodEdbInfoName':'FutureGoodEdbInfoNameEn',
 								value: 'FutureGoodEdbInfoId',
 								children: 'Child',
 								emitPath: false
 							}"
-							style="width: 90%"
-							:placeholder="$t('ToolBox.CommodityPriceChart.please_select_future')"
-							@change="changeFuturesHandle"
 						/>
 					</el-form-item>
 					<el-form-item :label="$t('ToolBox.CommodityPriceChart.chart_name')" :prop="currentLang==='en'?'ChartNameEn':'ChartName'">
@@ -98,16 +98,15 @@
 						/>
 					</el-form-item>
 					<el-form-item :label="$t('ToolBox.CommodityPriceChart.chart_classify')" prop="classify">
-						<el-cascader
+						<cascader
 							v-model="chartInfo.classify"
 							:options="classifyOptions"
-							:props="{
-								label: 'ChartClassifyName',
+							:config="{
+								label:momentLang=== 'zh'?'ChartClassifyName':'ChartClassifyNameEn',
 								value: 'ChartClassifyId',
-								children: 'Children',
 								emitPath: false
 							}"
-							style="width: 90%"
+							cascaderWidth="width: 90%"
 							:placeholder="$t('ToolBox.CommodityPriceChart.please_select_classify')"
 						/>
 					</el-form-item>
@@ -229,6 +228,9 @@ export default {
     },
   },
 	computed: {
+		momentLang() {
+			return this.$store.state.lang;
+		},
 		roleName() {
 			return localStorage.getItem('userName');
 		},

+ 7 - 12
src/views/predictEdb_manage/addPredicEdb.vue

@@ -15,18 +15,13 @@
           <el-form-item prop="classify">
             <div class="item">
               <span class="label">{{$t('PredictEditPage.add_to_classify')}}<!-- 添加到分类 --></span>
-              <el-cascader
-                    v-model="formData.classify"
-                    :options="classifyArr"
-                    :props="{
-                        label: 'ClassifyName',
-                        value: 'ClassifyId',
-                        children: 'Children',
-                        checkStrictly: true
-                    }"
-                    style="width: 90%"
-                    :placeholder="$t('Edb.InputHolderAll.input_classify')"
-                />
+              <cascader
+                v-model="formData.classify"
+                :options="classifyArr"
+                cascaderWidth="width: 100%"
+                :placeholder="$t('Edb.InputHolderAll.input_classify')"
+                :config="{  checkStrictly: true}"
+              />
             </div>
           </el-form-item>
           <el-form-item prop="oldEdb" v-if="!formData.edb_id">