Jelajahi Sumber

设置版本语言名称

Karsa 11 bulan lalu
induk
melakukan
6145d2205e

+ 21 - 0
src/api/modules/chartApi.js

@@ -418,6 +418,27 @@ const dataBaseInterface = {
 	getBatchAddEdbSearchList:params=>{
 		return http.get('/datamanage/edb_info/calculate/multi/search',params)
 	},
+	/**
+	 * 设置指标对应版本信息
+	 * @param {*} params 
+	 * EdbInfoId EdbName Unit
+	 */
+	setEdbLangInfo: params => {
+		return http.post('/datamanage/edb_info/base/edit',params)
+	},
+
+	/**
+	 * 设置图表对应版本信息
+	 * @param {*} params 
+	 * ChartInfoId ChartName ChartEdbInfoList
+	 * @returns 
+	 */
+	setChartLangInfo: params => {
+		return http.post('/datamanage/chart_info/base/edit',params)
+	},
+
+
+
 	//========================================chart
 	// /**
 	//  * 

+ 43 - 3
src/api/modules/chartRelevanceApi.js

@@ -253,6 +253,16 @@ export default{
     return http.post('/datamanage/multiple_graph/preview_cure',params)
   },
 
+  /**
+	 * 设置图表对应版本信息
+	 * @param {*} params 
+	 * ChartInfoId ChartName
+	 * @returns 
+	 */
+	setChartLangInfo: params => {
+		return http.post('/correlation/chart_info/base/edit',params)
+	},
+
 }
 
 /* 拟合方程曲线 */
@@ -452,7 +462,17 @@ export const fittingEquationInterface = {
    */
   editChartEn: params => {
     return http.post('/line_equation/chart_info/en/edit',params)
-  }
+  },
+
+  /**
+	 * 设置图表对应版本信息
+	 * @param {*} params 
+	 * ChartInfoId ChartName
+	 * @returns 
+	 */
+	setChartLangInfo: params => {
+		return http.post('/line_equation/chart_info/base/edit',params)
+	},
 }
 
 /* 统计特征曲线 */
@@ -693,7 +713,17 @@ export const statisticFeatureInterface = {
      */
     previewSpline: params => {
       return http.post('/line_feature/preview_cure',params)
-    }
+    },
+    
+    /**
+     * 设置图表对应版本信息
+     * @param {*} params 
+     * ChartInfoId ChartName
+     * @returns 
+     */
+    setChartLangInfo: params => {
+      return http.post('/line_feature/chart_info/base/edit',params)
+    },
 }
 
 /* 跨品种分析 */
@@ -1027,5 +1057,15 @@ export const crossVarietyInterface = {
      */
     saveChart: params => {
       return http.post('/cross_variety/chart_info/save',params)
-    }
+    },
+
+    /**
+     * 设置图表对应版本信息
+     * @param {*} params 
+     * ChartInfoId ChartName TagList VarietyList
+     * @returns 
+     */
+    setChartLangInfo: params => {
+      return http.post('/cross_variety/chart_info/base/edit',params)
+    },
 }

+ 11 - 1
src/api/modules/futuresBaseApi.js

@@ -314,6 +314,16 @@ export default {
   */
   getChartBasicInfo: params => {
     return http.get('/future_good/chart_info/base_detail/from_unique_code',params)
-  }
+  },
+
+  /**
+	 * 设置图表对应版本信息
+	 * @param {*} params 
+	 * ChartInfoId ChartName ChartEdbInfoList
+	 * @returns 
+	 */
+	setChartLangInfo: params => {
+		return http.post('/datamanage/chart_info/base/edit')
+	},
   
 }

+ 3 - 3
src/components/chart/chartDetailHandlesWrap.vue

@@ -58,7 +58,7 @@
       /> {{$t('Chart.chart_copywx')}}
     </li>
     <li v-if="isShowBtn('enNameSetting')"
-        class="span-item copy" @click="openEnNameDia">
+        class="span-item copy" @click="openLangInfoDia">
       <img
         style="width: 16px; vertical-align: middle"
         :src="$icons.to_en"
@@ -96,8 +96,8 @@ export default {
     editChartHandle() {
       this.$emit('editChartHandle')
     },
-    openEnNameDia() {
-      this.$emit('openEnNameDia')
+    openLangInfoDia() {
+      this.$emit('openLangInfoDia')
     },
     delChartHandle() {
       this.$emit('delChartHandle')

+ 37 - 12
src/components/edbDetailPopover.vue

@@ -27,23 +27,48 @@ export default {
     }
   },
   computed: {
+    keysLabel(){
+      return {
+          'EdbName': /* '指标名称' */ this.$t('Edb.Detail.e_name'),
+          'EdbNameEn': /* '指标名称' */ this.$t('Edb.Detail.e_name'),
+          'EdbCode': /* '指标ID' */this.$t('Edb.Detail.e_id'),
+          'Frequency': /* '更新频度' */this.$t('Edb.Detail.e_fre'),
+          'Unit': /* '单位' */this.$t('Edb.Detail.e_unit'),
+          'UnitEn': /* '单位' */this.$t('Edb.Detail.e_unit'),
+          'StartDate': /* '起始时间' */this.$t('Edb.Detail.e_start_time'),
+          'LatestDate': /* '最新日期' */this.$t('Edb.Detail.e_latest_date'),
+          'LatestValue': /* '最新值' */this.$t('Edb.Detail.e_latest_value'),
+          'ModifyTime': /* '最近更新' */this.$t('Edb.Detail.e_recent_time'),
+          'SourceName': /* '数据来源' */this.$t('Edb.Detail.source'),
+        }
+    },
     keysArr(){
-      return Object.keys(this.keysLabel)
+      const keys = [
+        'EdbName',
+        'EdbCode',
+        'Frequency',
+        'Unit',
+        'StartDate',
+        'LatestDate',
+        'LatestValue',
+        'ModifyTime',
+        'SourceName'
+      ]
+
+      const enKeyMap = {
+        'EdbName': 'EdbNameEn',
+        'Unit': 'UnitEn'
+      }
+      return this.currentLang==='en'
+        ? keys.map(_=>enKeyMap[_]?enKeyMap[_]:_)
+        : keys
+    },
+    currentLang() {
+      return this.$store.state.lang
     }
   },
   data() {
     return {
-      keysLabel: {
-        'EdbName': /* '指标名称' */ this.$t('Edb.Detail.e_name'),
-        'EdbCode': /* '指标ID' */this.$t('Edb.Detail.e_id'),
-        'Frequency': /* '更新频度' */this.$t('Edb.Detail.e_fre'),
-        'Unit': /* '单位' */this.$t('Edb.Detail.e_unit'),
-        'StartDate': /* '起始时间' */this.$t('Edb.Detail.e_start_time'),
-        'LatestDate': /* '最新日期' */this.$t('Edb.Detail.e_latest_date'),
-        'LatestValue': /* '最新值' */this.$t('Edb.Detail.e_latest_value'),
-        'ModifyTime': /* '最近更新' */this.$t('Edb.Detail.e_recent_time'),
-        'SourceName': /* '数据来源' */this.$t('Edb.Detail.source'),
-      }
     };
   }
 };

+ 17 - 7
src/views/chartRelevance_manage/crossVarietyAnalysis/list.vue

@@ -34,7 +34,7 @@
 						<el-option
 							v-for="item in searchOptions"
 							:key="item.ChartInfoId"
-							:label="item.ChartName"
+							:label="currentLang==='en'?(item.ChartNameEn||item.ChartName):item.ChartName"
 							:value="item.ChartInfoId"
 						>
 						</el-option>
@@ -81,7 +81,7 @@
 									(select_node === data.UniqueCode && node.Nodewidth) || ''
 								}`"
 							>
-								<span>{{ data.ChartClassifyName }}</span>
+								<span>{{ currentLang==='en' ? (data.ChartClassifyNameEn||data.ChartClassifyName) : data.ChartClassifyName  }}</span>
 							</span>
 							<span
 								style="display: flex; align-items: center"
@@ -209,7 +209,7 @@
 									@saveChartHandle="saveChartHandle"
 									@saveChartOtherHandle="saveChartOtherHandle"
 									@editChartHandle="editChartHandle"
-									@openEnNameDia="openEnNameDia"
+									@openLangInfoDia="openLangInfoDia"
 									@delChartHandle="delChartHandle"
 								/>
               </el-col>
@@ -260,11 +260,19 @@
     />
 
 		<!-- 输入英文指标弹窗 -->
-		<set-en-name-dia 
+		<!-- <set-en-name-dia 
 			:isOpenDialog="setEnName" 
 		  :formData="formItemArray"
 			@cancel="setEnName=false"
    	  @updateEnName="updateEnName"
+		/> -->
+		
+    <!-- 设置对应版本信息弹窗 -->
+		<setLangInfoDia
+			:isOpenDialog="isLangInfoDia"
+			:formData="formItemArray"
+			@cancel="isLangInfoDia=false" 
+			@updateLang="updateLang"
 		/>
 
 	</div>
@@ -281,6 +289,7 @@ import setEnNameDia from '@/views/dataEntry_manage/components/setEnNameDia.vue'
 import { chartSetMixin } from '@/views/dataEntry_manage/mixins/chartPublic';
 import { copyOtherOptions } from '@/utils/defaultOptions';
 import edbTableSection from './components/edbTableSection.vue';
+import setLangInfoDia from '@/views/dataEntry_manage/components/setLangInfo.vue'
 export default {
 	components: {
 		classifyDia,
@@ -288,7 +297,8 @@ export default {
 		addMyClassifyDia,
 		SaveChartOther,
 		setEnNameDia,
-		edbTableSection
+		edbTableSection,
+		setLangInfoDia
 	},
 	mixins:[ leftMixin,chartSetMixin ],
 	computed: {
@@ -417,12 +427,12 @@ export default {
 
 
     /* 编辑节点 */
-    editNode(node, { ChartClassifyName,ChartClassifyId }) {
+    editNode(node, { ChartClassifyName,ChartClassifyNameEn,ChartClassifyId }) {
 
       this.dialog_title = this.$t('StatisticAnalysis.ChartRelevance.edit_chart_classify')||'编辑图表分类';
       /* 编辑目录 */
       this.classifyForm = {
-        classify_name: ChartClassifyName,
+        classify_name: this.currentLang==='en'?ChartClassifyNameEn:ChartClassifyName,
         classify_id: ChartClassifyId,
       };
       this.classifyDia = true;

+ 17 - 7
src/views/chartRelevance_manage/fittingEquation/fittingEquationList.vue

@@ -47,7 +47,7 @@
 						<el-option
 							v-for="item in searchOptions"
 							:key="item.ChartInfoId"
-							:label="item.ChartName"
+							:label="currentLang==='en'?(item.ChartNameEn||item.ChartName):item.ChartName"
 							:value="item.ChartInfoId"
 						>
 						</el-option>
@@ -94,7 +94,7 @@
 									(select_node === data.UniqueCode && node.Nodewidth) || ''
 								}`"
 							>
-								<span>{{ data.ChartClassifyName }}</span>
+								<span>{{ currentLang==='en' ? (data.ChartClassifyNameEn||data.ChartClassifyName) : data.ChartClassifyName  }}</span>
 							</span>
 							<span
 								style="display: flex; align-items: center"
@@ -184,7 +184,7 @@
 									@refreshHandle="refreshHandle"
 									@saveChartOtherHandle="saveChartOtherHandle"
 									@editChartHandle="editChartHandle"
-									@openEnNameDia="openEnNameDia"
+									@openLangInfoDia="openLangInfoDia"
 									@delChartHandle="delChartHandle"
 								/>
               </el-col>
@@ -232,11 +232,19 @@
     />
 
 		<!-- 输入英文指标弹窗 -->
-		<set-en-name-dia 
+		<!-- <set-en-name-dia 
 			:isOpenDialog="setEnName" 
 		  :formData="formItemArray"
 			@cancel="setEnName=false"
    	  @updateEnName="updateEnName"
+		/> -->
+
+		<!-- 设置对应版本信息弹窗 -->
+		<setLangInfoDia
+			:isOpenDialog="isLangInfoDia"
+			:formData="formItemArray"
+			@cancel="isLangInfoDia=false" 
+			@updateLang="updateLang"
 		/>
 
 	</div>
@@ -253,6 +261,7 @@ import SaveChartOther from '@/views/dataEntry_manage/components/SaveChartOther';
 import setEnNameDia from '@/views/dataEntry_manage/components/setEnNameDia.vue'
 import { chartSetMixin } from '@/views/dataEntry_manage/mixins/chartPublic';
 import { copyOtherOptions } from '@/utils/defaultOptions';
+import setLangInfoDia from '@/views/dataEntry_manage/components/setLangInfo.vue'
 export default {
 	components: { 
 		changeLang,
@@ -260,7 +269,8 @@ export default {
 		Chart,
 		addMyClassifyDia,
 		SaveChartOther,
-		setEnNameDia
+		setEnNameDia,
+		setLangInfoDia
 	},
 	mixins:[ leftMixin,chartSetMixin ],
 	computed: {
@@ -404,12 +414,12 @@ export default {
 		},
 
     /* 编辑节点 */
-    editNode(node, { ChartClassifyName,ChartClassifyId }) {
+    editNode(node, { ChartClassifyName,ChartClassifyNameEn,ChartClassifyId }) {
 
       this.dialog_title = this.$t('StatisticAnalysis.ChartRelevance.edit_chart_classify')||'编辑图表分类';
       /* 编辑目录 */
       this.classifyForm = {
-        classify_name: ChartClassifyName,
+        classify_name: this.currentLang==='en'?ChartClassifyNameEn:ChartClassifyName,
         classify_id: ChartClassifyId,
       };
       this.classifyDia = true;

+ 2 - 2
src/views/chartRelevance_manage/mixins/classifyMixin.js

@@ -131,7 +131,7 @@ export default {
         //目录名称可以双击修改
         if(data.ChartInfoId) return
         this.$set(data,'isEdit',true)
-        this.new_label = data.ChartClassifyName;
+        this.new_label = this.currentLang==='en'?data.ChartClassifyNameEn:data.ChartClassifyName;
         this.$nextTick(() => {
           this.$refs.editVal.focus();
         });
@@ -142,7 +142,7 @@ export default {
       if(!this.new_label) return this.$message.warning('名称不能为空');
       this.$set(data,'isEdit',false)
 
-      if(this.new_label === data.ClassifyName) return 
+      if((this.new_label===data.ClassifyName&&this.currentLang==='zh')||(this.new_label===data.ClassifyNameEn&&this.currentLang==='en')) return 
       
       let res;
       if(this.$route.path === '/fittingEquationList') {

+ 17 - 7
src/views/chartRelevance_manage/relevance/list.vue

@@ -39,7 +39,7 @@
             <el-option
               v-for="item in searchOptions"
               :key="item.ChartInfoId"
-              :label="item.ChartName"
+              :label="currentLang==='en'?(item.ChartNameEn||item.ChartName):item.ChartName"
               :value="item.ChartInfoId"
             >
             </el-option>
@@ -96,7 +96,7 @@
                   (select_node === data.UniqueCode && node.Nodewidth) || ''
                 }`"
               >
-                <span>{{ data.ChartClassifyName }}</span>
+                <span>{{ currentLang==='en' ? (data.ChartClassifyNameEn||data.ChartClassifyName) : data.ChartClassifyName  }}</span>
               </span>
               <span
                 style="display: flex; align-items: center"
@@ -201,7 +201,7 @@
                 @refreshHandle="refreshHandle"
                 @saveChartOtherHandle="saveChartOtherHandle"
                 @editChartHandle="editChartHandle"
-                @openEnNameDia="openEnNameDia"
+                @openLangInfoDia="openLangInfoDia"
                 @delChartHandle="delChartHandle"
               />
             </el-col>
@@ -301,12 +301,20 @@
     />
 
     <!-- 输入英文指标弹窗 -->
-    <set-en-name-dia
+    <!-- <set-en-name-dia
       :isOpenDialog="setEnName"
       :formData="formItemArray"
       @cancel="setEnName = false"
       @updateEnName="updateEnName"
-    />
+    /> -->
+
+     <!-- 设置对应版本信息弹窗 -->
+		<setLangInfoDia
+			:isOpenDialog="isLangInfoDia"
+			:formData="formItemArray"
+			@cancel="isLangInfoDia=false" 
+			@updateLang="updateLang"
+		/>
   </div>
 </template>
 
@@ -321,6 +329,7 @@ import SaveChartOther from "@/views/dataEntry_manage/components/SaveChartOther";
 import setEnNameDia from "@/views/dataEntry_manage/components/setEnNameDia.vue";
 import { chartSetMixin } from "@/views/dataEntry_manage/mixins/chartPublic";
 import { copyOtherOptions } from '@/utils/defaultOptions';
+import setLangInfoDia from '@/views/dataEntry_manage/components/setLangInfo.vue'
 export default {
   components: {
     changeLang,
@@ -329,6 +338,7 @@ export default {
     addMyClassifyDia,
     SaveChartOther,
     setEnNameDia,
+    setLangInfoDia
   },
   mixins: [leftMixin, chartSetMixin],
   computed: {
@@ -483,11 +493,11 @@ export default {
     },
 
     /* 编辑节点 */
-    editNode(node, { ChartClassifyName, ChartClassifyId }) {
+    editNode(node, { ChartClassifyName,ChartClassifyNameEn, ChartClassifyId }) {
       this.dialog_title = this.$t('StatisticAnalysis.ChartRelevance.edit_chart_classify')||"编辑图表分类";
       /* 编辑目录 */
       this.classifyForm = {
-        classify_name: ChartClassifyName,
+        classify_name: this.currentLang==='en'?ChartClassifyNameEn:ChartClassifyName,
         classify_id: ChartClassifyId,
       };
       this.classifyDia = true;

+ 17 - 7
src/views/chartRelevance_manage/statistic/statisticFeatureList.vue

@@ -34,7 +34,7 @@
 						<el-option
 							v-for="item in searchOptions"
 							:key="item.ChartInfoId"
-							:label="item.ChartName"
+							:label="currentLang==='en'?(item.ChartNameEn||item.ChartName):item.ChartName"
 							:value="item.ChartInfoId"
 						>
 						</el-option>
@@ -81,7 +81,7 @@
 									(select_node === data.UniqueCode && node.Nodewidth) || ''
 								}`"
 							>
-								<span>{{ data.ChartClassifyName }}</span>
+								<span>{{ currentLang==='en' ? (data.ChartClassifyNameEn||data.ChartClassifyName) : data.ChartClassifyName  }}</span>
 							</span>
 							<span
 								style="display: flex; align-items: center"
@@ -170,7 +170,7 @@
 									@refreshHandle="refreshHandle"
 									@saveChartOtherHandle="saveChartOtherHandle"
 									@editChartHandle="editChartHandle"
-									@openEnNameDia="openEnNameDia"
+									@openLangInfoDia="openLangInfoDia"
 									@delChartHandle="delChartHandle"
 								/>
               </el-col>
@@ -217,11 +217,19 @@
     />
 
 		<!-- 输入英文指标弹窗 -->
-		<set-en-name-dia 
+		<!-- <set-en-name-dia 
 			:isOpenDialog="setEnName" 
 		  :formData="formItemArray"
 			@cancel="setEnName=false"
    	  @updateEnName="updateEnName"
+		/> -->
+
+		<!-- 设置对应版本信息弹窗 -->
+		<setLangInfoDia
+			:isOpenDialog="isLangInfoDia"
+			:formData="formItemArray"
+			@cancel="isLangInfoDia=false" 
+			@updateLang="updateLang"
 		/>
 
 	</div>
@@ -238,13 +246,15 @@ import SaveChartOther from '@/views/dataEntry_manage/components/SaveChartOther';
 import setEnNameDia from '@/views/dataEntry_manage/components/setEnNameDia.vue'
 import { chartSetMixin } from '@/views/dataEntry_manage/mixins/chartPublic';
 import { copyOtherOptions } from '@/utils/defaultOptions';
+import setLangInfoDia from '@/views/dataEntry_manage/components/setLangInfo.vue'
 export default {
 	components: {
 		classifyDia,
 		Chart,
 		addMyClassifyDia,
 		SaveChartOther,
-		setEnNameDia
+		setEnNameDia,
+		setLangInfoDia
 	},
 	mixins:[ leftMixin,chartSetMixin ],
 	computed: {
@@ -382,12 +392,12 @@ export default {
 		},
 
     /* 编辑节点 */
-    editNode(node, { ChartClassifyName,ChartClassifyId }) {
+    editNode(node, { ChartClassifyName,ChartClassifyNameEn,ChartClassifyId }) {
 
       this.dialog_title = this.$t('StatisticAnalysis.ChartRelevance.edit_chart_classify')||'编辑图表分类';
       /* 编辑目录 */
       this.classifyForm = {
-        classify_name: ChartClassifyName,
+        classify_name: this.currentLang==='en'?ChartClassifyNameEn:ChartClassifyName,
         classify_id: ChartClassifyId,
       };
       this.classifyDia = true;

+ 21 - 10
src/views/dataEntry_manage/chartSetting.vue

@@ -643,9 +643,9 @@
                       <li 
                         v-permission="permissionBtn.chartLibPermission.chartLib_enNameSetting"
                         class="span-item copy"
-                        @click="openEnNameDia"
+                        @click="openLangInfoDia"
                       >
-                        <img style="width: 16px;vertical-align: middle" :src="$icons.to_en" />&nbsp;<!-- 设置英文名称 -->{{$t('Edb.detail_en_btn')}}
+                        <img style="width: 16px;vertical-align: middle" :src="$icons.to_en" />&nbsp;<!-- 编辑信息 -->{{$t('Edb.detail_en_btn')}}
                       </li>
                       <li 
                         v-permission="permissionBtn.chartLibPermission.chartLib_del"
@@ -793,7 +793,7 @@
     />
 
     <!-- 输入英文指标弹窗 -->
-		<set-en-name-dia 
+		<!-- <set-en-name-dia 
       :isOpenDialog="setEnName" 
       @cancel="setEnName=false" 
       @updateEnName="updateEnName" 
@@ -801,13 +801,18 @@
       :chartType="chartInfo.ChartType"
       :datainfo="chartInfo.ChartType===10?JSON.parse(chartInfo.ExtraConfig):null"
       :edblist="chartInfo.ChartType===10?tableData:[]"
-    />
-
-    <!-- 指标历史记录 -->
-    <!-- <edbHistoryDialog
-      :isOpenDialog.sync="isLookHistory"
-      :edbId="lookEdbId"
     /> -->
+
+    <!-- 设置对应版本信息弹窗 -->
+		<setLangInfoDia
+			:isOpenDialog="isLangInfoDia"
+			:formData="formItemArray"
+      :chartType="chartInfo.ChartType"
+      :datainfo="chartInfo.ChartType===10?JSON.parse(chartInfo.ExtraConfig):null"
+      :edblist="chartInfo.ChartType===10?tableData:[]"
+			@cancel="isLangInfoDia=false" 
+			@updateLang="updateLang"
+		/>
   </div>
 </template>
 
@@ -827,6 +832,7 @@ import SaveChartOther from './components/SaveChartOther';
 import changeLang from "./components/changeLang.vue"
 import setEnNameDia from "./components/setEnNameDia.vue"
 import EdbLabelList from '../../components/edbLabelList.vue';
+import setLangInfoDia from './components/setLangInfo.vue'
 export default {
   name: '',
   components: {
@@ -838,7 +844,8 @@ export default {
     SaveChartOther,
     changeLang,
     setEnNameDia,
-    EdbLabelList
+    EdbLabelList,
+    setLangInfoDia
   },
   directives: {
     drag(el, bindings) {
@@ -1670,6 +1677,10 @@ export default {
 
     },
 
+    getChartInfo(){
+      this.getChartDetail()
+    },
+
     /* 设置默认时间选中项 */
     setDefaultDateSelect() {
       this.year_select = this.chartInfo.DateType;

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

@@ -30,7 +30,7 @@
           v-model="form.classify"
           :options="classifyOptions"
           :props="{
-            label: 'ChartClassifyName',
+            label: currentLang==='en'?'ChartClassifyNameEn':'ChartClassifyName',
             value: 'ChartClassifyId',
             children: 'Children',
             emitPath: false

+ 397 - 0
src/views/dataEntry_manage/components/setLangInfo.vue

@@ -0,0 +1,397 @@
+<template>
+  <!-- 修改语言版本对应信息 复用设置英文弹窗 -->
+  <el-dialog 
+    :title="this.$t('Edb.detail_en_btn')" 
+    :visible.sync="isOpenDialog" 
+    :close-on-click-modal="false" 
+    :modal-append-to-body='false'
+    @close="cancel" 
+    custom-class="set-en-dialog" 
+    width="800px" 
+    v-dialogDrag
+  >
+      <el-form v-if="cType=='chart'" style="padding:0 40px" label-width="140px">
+        <!-- 截面散点图 -->
+        <div class="set-en-name-box" v-if="chartType===10">
+          <el-collapse v-model="activeNames" class="sectionScatter-collapse">
+            <el-collapse-item :title="$t('Chart.Detail.chart_name')" :name="0" >
+              <ul class="section-ul">
+                <li v-if="copyFormData.chartInfo.length">
+                  <el-input v-model="copyFormData.chartInfo[0].value" :placeholder="$t('Chart.InputHolderAll.input_common',{label:this.$t('Chart.Detail.chart_name')})" style="width: 600px;"/>
+                </li>
+                <li>
+                  <div class="ch-name"><!-- X轴名称: -->{{$t('Chart.Detail.x_name')}}</div>
+                  
+                  <el-input 
+                    v-model="updateInfo.XNameEn" 
+                    :placeholder="$t('Chart.InputHolderAll.input_common',{label:$t('Chart.Detail.x_name')})" 
+                    v-if="currentLang==='en'"
+                  />
+                  <el-input 
+                    v-model="updateInfo.XName" 
+                    :placeholder="$t('Chart.InputHolderAll.input_common',{label:$t('Chart.Detail.x_name')})" 
+                    v-else
+                  />
+                </li>
+                <li>
+                  <div class="ch-name"><!-- X轴单位 -->{{$t('Chart.Detail.x_unit')}}</div>
+
+                  <el-input 
+                    v-model="updateInfo.XUnitNameEn" 
+                    :placeholder="$t('Chart.InputHolderAll.input_unit')" 
+                    v-if="currentLang==='en'"
+                  />
+                  <el-input 
+                    v-model="updateInfo.XUnitName" 
+                    :placeholder="$t('Chart.InputHolderAll.input_unit')" 
+                    v-else
+                  />
+                </li>
+                <li>
+                  <div class="ch-name"><!-- Y轴名称: -->{{$t('Chart.Detail.y_name')}}</div>
+
+                  <el-input 
+                    v-model="updateInfo.YNameEn" 
+                    :placeholder="$t('Chart.InputHolderAll.input_common',{label:$t('Chart.Detail.y_en_name')})"
+                    v-if="currentLang==='en'"
+                  />
+                  <el-input 
+                    v-model="updateInfo.YName" 
+                    :placeholder="$t('Chart.InputHolderAll.input_common',{label:$t('Chart.Detail.y_name')})"
+                    v-else
+                  />
+                </li>
+                <li>
+                  <div class="ch-name"><!-- Y轴单位 -->{{$t('Chart.Detail.y_unit')}}</div>
+
+                  <el-input 
+                    v-model="updateInfo.YUnitNameEn" 
+                    :placeholder="$t('Chart.InputHolderAll.input_unit')" 
+                    v-if="currentLang==='en'"
+                  />
+                  <el-input 
+                    v-model="updateInfo.YUnitName" 
+                    :placeholder="$t('Chart.InputHolderAll.input_unit')" 
+                    v-else
+                  />
+                </li>
+
+              </ul>
+            </el-collapse-item>
+            
+            <!-- 系列标签 -->
+            <el-collapse-item :title="$t('EtaChartPage.label_tag_serie')" :name="1" v-if="updateInfo.SeriesList">
+              <ul class="section-ul">
+                <li v-for="(item,index) in updateInfo.SeriesList" :key="index">
+                  <div class="ch-name">{{$t('Chart.Detail.serie_name')}}{{index+1}}</div>
+
+                  <el-input 
+                    v-model="item.NameEn" 
+                    :placeholder="$t('Chart.InputHolderAll.input_en_label')" 
+                    v-if="currentLang==='en'"
+                  />
+                  <el-input 
+                    v-model="item.Name" 
+                    :placeholder="$t('Chart.InputHolderAll.input_en_label')" 
+                    v-else
+                  />
+                </li>
+              </ul>  
+              <ul class="section-ul">
+                <li v-for="(tag,index) in updateInfo.SeriesList[0].EdbInfoList" :key="index">
+                  <div class="ch-name">{{$t('Chart.Detail.tag_name')}}{{index+1}}</div>
+
+                  <el-input 
+                    v-model="tag.NameEn" 
+                    :placeholder="$t('Chart.InputHolderAll.input_en_label')"
+                    v-if="currentLang==='en'"
+                  />
+                  <el-input 
+                    v-model="tag.Name" 
+                    :placeholder="$t('Chart.InputHolderAll.input_en_label')"
+                    v-else
+                  />
+                </li>
+              </ul>
+            </el-collapse-item>
+
+            <!-- 指标 -->
+            <el-collapse-item :title="$t('Edb.Detail.e_name')" :name="2">
+              <ul class="section-ul">
+                <li v-for="(item,index) in fromEdbList" :key="index">
+                  <!-- <div class="ch-name text_oneLine">{{item.EdbName}}</div> -->
+
+                  <el-input 
+                    v-model="item.EdbNameEn" 
+                    :placeholder="$t('Chart.InputHolderAll.input_en_label')" 
+                    v-if="currentLang==='en'"
+                  />
+                  <el-input 
+                    v-model="item.EdbName" 
+                    :placeholder="$t('Chart.InputHolderAll.input_en_label')" 
+                    v-else
+                  />
+                </li>
+              </ul>  
+            </el-collapse-item>  
+          </el-collapse>
+        </div>
+
+        <!-- 普通图 -->
+        <div class="set-en-name-box" v-else>
+          <el-form-item :label="item.label+':'" :prop="item.key" v-for="item in copyFormData.chartInfo" :key="item.key">
+            <el-input v-model="item.value" :placeholder="item.placeholder" ></el-input>
+          </el-form-item>
+
+          <!-- 指标列表 -->
+          <el-collapse v-model="activeNames" v-if="copyFormData.chartsList.length">
+            <el-collapse-item :title="item[0].value" :name="index" v-for="(item,index) in copyFormData.chartsList" :key="index">
+              <el-form-item :label="it.label+':'" :prop="it.key"  v-for="(it) in item" :key="it.key">
+
+                <el-input v-model="it.value" :placeholder="it.placeholder" ></el-input>
+              </el-form-item>
+            </el-collapse-item>
+          </el-collapse>
+        </div>
+			</el-form>
+
+      <!-- 指标 -->
+			<el-form v-else label-width="120px" >
+				<el-form-item :label="item.label+':'" :prop="item.key" v-for="item in copyFormData" :key="item.key">
+          <el-input v-model="item.value" :placeholder="item.placeholder" style="width: 100%;"></el-input>
+				</el-form-item>
+			</el-form>
+
+      <div class="btn-bottom">
+        <el-button type="primary" @click="saveLangHandle" style="margin-right:20px"><!-- 确定 -->{{$t('Dialog.confirm_btn')}}</el-button>
+        <el-button @click="cancel"><!-- 取消 -->{{$t('Dialog.cancel_btn')}}</el-button>
+      </div>
+		</el-dialog>
+</template>
+<script>
+export default {
+  name:"setLangInfo",
+  computed: {
+    currentLang() {
+      return this.$store.state.lang
+    }
+  },
+  data() {
+    return {
+      langData:{
+        ChartInfoId:'',
+        ChartNameEn:'',
+        ChartEdbInfoList:[
+
+        ]
+      },
+      copyFormData:{
+        chartInfo:[],
+        chartsList:[]
+      },
+      activeNames: [0],
+
+      fromEdbList: [],
+      updateInfo: {}
+    }
+  },
+  props:{
+    cType:{
+      type:String,
+      default:'chart'
+    },
+    isOpenDialog:{
+      type:Boolean,
+      required:true,
+      default:false
+    },
+    formData:{
+      type:Array,
+      required:true,
+      default:[]
+    },
+    chartType: {
+      type: Number
+    },
+    datainfo: {
+      default: null
+    },
+    edblist: {
+      default: () => []
+    }
+  },
+  watch:{
+    isOpenDialog(newVal){
+      // 默认展开第一项
+      if(newVal){
+        this.activeNames=[0]
+        this.copyFormData = _.cloneDeep(this.formData);
+
+        this.fromEdbList = _.cloneDeep(this.edblist);
+        this.updateInfo = _.cloneDeep(this.datainfo);
+      }
+    }
+  },
+  methods:{
+    cancel(){
+      this.copyFormData={
+        chartInfo:[],
+        chartsList:[]
+      }
+      this.$emit('cancel')
+    },
+
+    /* 截面散点图设置英文 */
+    setSectionScatterLang(){
+      let ChartEdbInfoList = this.fromEdbList.map( _ => ({
+        EdbInfoId: _.EdbInfoId,
+        EdbName: this.currentLang==='en'?_.EdbNameEn:_.EdbName,
+        Unit: this.currentLang==='en'?_.UnitEn:_.Unit,
+      }))
+      this.updateInfo.SeriesList.forEach((item,index) => {
+        if(index) {
+          item.EdbInfoList.forEach((edb,edb_index) => {
+            const {NameEn} = this.updateInfo.SeriesList[0].EdbInfoList[edb_index];
+            edb.NameEn= NameEn;
+          })
+        }
+      })
+      
+      let ExtraConfig = JSON.stringify(this.updateInfo);
+      let params = {
+        ChartInfoId: this.copyFormData.chartInfo[0].id,
+        ChartName: this.copyFormData.chartInfo[0].value.trim(),
+        ChartEdbInfoList,
+        ExtraConfig
+      }
+      this.$emit('updateLang',params)
+    },
+
+    /* 跨品种分析参数设置 */
+    setCrossVarietyLang() {
+      console.log(this.copyFormData)
+      const { chartInfo,chartsList }  = this.copyFormData;
+      let params = {
+        ChartInfoId: chartInfo[1].id,
+        ChartNameEn: chartInfo[1].value.trim(),
+        TagList: [
+          { ChartTagId: chartInfo[3].id,TagNameEn: chartInfo[3].value },
+          { ChartTagId: chartInfo[5].id,TagNameEn: chartInfo[5].value }
+        ],
+        VarietyList: chartsList.map(_ => ({
+          ChartVarietyId: _[1].id,
+          VarietyNameEn: _[1].value
+        }))
+      }
+      this.$emit('updateLang',params)
+    },
+
+    /* 设置通用图表 */
+    setChartLang() {
+      this.langData.ChartInfoId = this.copyFormData.chartInfo[0].id // 表格ID
+      this.langData.ChartName = this.copyFormData.chartInfo[0].value.trim() 
+
+      if(this.copyFormData.chartInfo[1]) {
+        if(this.copyFormData.chartInfo[1].key==='FutureGoodName') {
+          this.langData.FutureGoodName = this.copyFormData.chartInfo[1].value.trim() // 期货名称
+        }else if(this.copyFormData.chartInfo[1].key==='ProfitName') {
+          this.langData.ProfitName = this.copyFormData.chartInfo[1].value.trim() // 利润名称
+        }
+      }
+      let chartEdbInfoListTem=[]
+      this.copyFormData.chartsList.map((item,index)=>{
+        let params ={}
+        params.EdbInfoId = item[0].id
+        item.filter(it => !it.notEdit) .map((it,i)=>{
+          params[it.key] = it.value
+        })
+        chartEdbInfoListTem.push(params)
+      })
+      this.langData.ChartEdbInfoList=chartEdbInfoListTem
+      this.$emit('updateLang',this.langData)
+    },
+
+    /* 设置指标 */
+    setEdbLang() {
+       // 指标库
+      let params={}
+      this.copyFormData.filter(it => !it.notEdit).map(item => {
+        params[item.key] = item.value.trim()
+      })
+
+      this.$emit('updateLang',params)
+    },
+
+    saveLangHandle(){
+
+      if(this.cType === 'chart'&&this.chartType === 10) return this.setSectionScatterLang();
+
+      else if(this.cType === 'chart'&&this.copyFormData.chartInfo[0].source === 10) return this.setCrossVarietyLang();
+      
+      if(JSON.stringify(this.copyFormData) === JSON.stringify(this.formData)){
+        // 没有修改过
+        this.$emit('cancel')
+        return
+      }
+
+      this.cType === 'chart' ? this.setChartLang() : this.setEdbLang();
+    }
+  }
+}
+</script>
+<style lang="scss">
+.set-en-dialog {
+  .el-dialog__body {
+    max-height:600px;
+    overflow-y:auto;
+  }
+}
+.set-en-name-box{
+  .el-collapse-item__header{
+    background-color:#DCDFE6;
+    padding-left:8px;
+    font-size: 16px;
+    font-weight: 400;
+    color: #333333;
+    margin-bottom:0;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    // text-overflow: ellipsis;
+    // white-space: nowrap;
+    overflow: hidden;
+    line-height: inherit;
+    .el-collapse-item__arrow{
+      margin-left: 12px;
+    }
+  }
+  .el-input{
+    width: 100%;
+  }
+  .el-collapse-item__content{
+    padding:18px 8px 0 8px;
+  }
+}
+
+
+</style>
+<style scoped lang="scss">
+  .section-ul {
+    display: flex;
+    justify-content: space-between;
+    flex-wrap: wrap;
+    li {
+      margin-bottom: 20px;
+      .ch-name {
+        margin-bottom: 10px;
+        width: 250px;
+      }
+      .el-input {  min-width: 240px;}
+    }
+  }
+  .btn-bottom {
+    display: flex;
+    margin: 40px 0;
+    justify-content: center;
+  }
+</style>

+ 109 - 72
src/views/dataEntry_manage/databaseList.vue

@@ -386,8 +386,8 @@
 			</div>
 		</div>
 		<!-- 输入英文指标弹窗 -->
-		<set-en-name-dia :isOpenDialog="setEnName" @cancel="setEnName=false" 
-		:formData="formItemArray" @updateEnName="updateEnName" cType="ebd" />
+		<!-- <set-en-name-dia :isOpenDialog="setEnName" @cancel="setEnName=false" 
+		:formData="formItemArray" @updateEnName="updateEnName" cType="ebd" /> -->
 
 		<!-- 目录弹窗 -->
 		<openDialog 
@@ -472,15 +472,6 @@
 			@lookHistory="id => {toHistoryPage(id,$route.matched);lookEdbId=id;}"
 			@changeSource="changeComputedType"
 		/>
-		<!-- 一键成图弹窗 -->
-		<!-- <create-chart
-			:isCreateChart="isCreateChart"
-			:edbid="selected_edbid"
-			:chartLang="currentLang"
-			ref="createChart"
-			@close="isCreateChart = false"
-			@editEnName="openEnNameDia"
-		/> -->
 
 		<!-- 一键更新弹窗 -->
 		<update-dialog
@@ -567,6 +558,15 @@
 			@closeSelf="handleCloseBatchPopSelf"
 			@addCallBack="addComputedCallBack"
 		/>
+
+		<!-- 设置对应版本信息弹窗 -->
+		<setLangInfoDia
+			:isOpenDialog="isLangInfoDia"
+			:formData="formItemArray"
+			@cancel="isLangInfoDia=false" 
+			@updateLang="updateLang"
+			cType="ebd" 
+		/>
 	</div>
 </template>
 
@@ -596,6 +596,7 @@ import chartTrendRender from './databaseComponents/chartTrendRender.vue';
 import edbDetailData from './databaseComponents/edbDetailData.vue';
 import SmoothEdbDialog from './databaseComponents/smoothEdbDialog.vue';
 import batchComputedV2 from './databaseComponents/batchComputedV2.vue';
+import setLangInfoDia from './components/setLangInfo.vue'
 export default {
 	name: '',
 	components: {
@@ -620,7 +621,8 @@ export default {
 		chartTrendRender,
 		edbDetailData,
 		SmoothEdbDialog,
-		batchComputedV2
+		batchComputedV2,
+		setLangInfoDia
 	},
 	directives: {
 		drag(el, bindings,vnode) {
@@ -814,6 +816,9 @@ export default {
 			isMainLeftShow:true,
 
 			showBatchComputedPop:false,
+
+			/* 修改对应版本信息弹窗  替换原有设置英文*/
+			isLangInfoDia: false
 		};
 	},
 	watch: {
@@ -1194,75 +1199,107 @@ export default {
 		// 	this.setLangIntoStore()
 		// },200),
 		// 打开 编辑英文名称弹窗
-		openEnNameDia(type='table'){
-			this.updateType = type
-			this.formItemArray=[{
-				label:/* '指标名称' */ this.$t('Edb.Detail.e_name'),
-				value:this.tableData[0].EdbName,
-				key:'EdbName',
-				notEdit:true
-			}]
-			// 中文单位有 才能编辑英文单位
-			if(this.tableData[0].Unit && this.tableData[0].Unit!='无'){
-				this.formItemArray.push({
-					label:this.$t('Edb.Detail.e_unit') /* '单位' */,
-					value:this.tableData[0].Unit,
-					key:'Unit',
-					notEdit:true
-				},
-				{
-					label:this.$t('Edb.Detail.e_en_name')/* '英文指标名称' */,
-					value:this.tableData[0].EdbNameEn,
-					key:'EdbNameEn',
-					placeholder: this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_en_name')}) /* '请输入英文指标名称' */
-				},
-				{
-					label:this.$t('Edb.Detail.e_en_unit') /* '英文单位' */,
-					value:this.tableData[0].UnitEn,
-					key:'UnitEn',
-					placeholder:this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_en_unit')})  /* '请输入英文单位' */
-				})
-			}else{
-				this.formItemArray.push({
-					label:this.$t('Edb.Detail.e_en_name') /* '英文指标名称' */,
-					value:this.tableData[0].EdbNameEn,
-					key:'EdbNameEn',
-					placeholder:this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_en_name')}) /* '请输入英文指标名称' */
-				})
-			}
+		// openEnNameDia(type='table'){
+		// 	this.updateType = type
+		// 	this.formItemArray=[{
+		// 		label:/* '指标名称' */ this.$t('Edb.Detail.e_name'),
+		// 		value:this.tableData[0].EdbName,
+		// 		key:'EdbName',
+		// 		notEdit:true
+		// 	}]
+		// 	// 中文单位有 才能编辑英文单位
+		// 	if(this.tableData[0].Unit && this.tableData[0].Unit!='无'){
+		// 		this.formItemArray.push({
+		// 			label:this.$t('Edb.Detail.e_unit') /* '单位' */,
+		// 			value:this.tableData[0].Unit,
+		// 			key:'Unit',
+		// 			notEdit:true
+		// 		},
+		// 		{
+		// 			label:this.$t('Edb.Detail.e_en_name')/* '英文指标名称' */,
+		// 			value:this.tableData[0].EdbNameEn,
+		// 			key:'EdbNameEn',
+		// 			placeholder: this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_en_name')}) /* '请输入英文指标名称' */
+		// 		},
+		// 		{
+		// 			label:this.$t('Edb.Detail.e_en_unit') /* '英文单位' */,
+		// 			value:this.tableData[0].UnitEn,
+		// 			key:'UnitEn',
+		// 			placeholder:this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_en_unit')})  /* '请输入英文单位' */
+		// 		})
+		// 	}else{
+		// 		this.formItemArray.push({
+		// 			label:this.$t('Edb.Detail.e_en_name') /* '英文指标名称' */,
+		// 			value:this.tableData[0].EdbNameEn,
+		// 			key:'EdbNameEn',
+		// 			placeholder:this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_en_name')}) /* '请输入英文指标名称' */
+		// 		})
+		// 	}
+
+		// 	this.setEnName = true
+		// },
+		// updateEnName(item){
+		// 	let params={
+		// 		EdbInfoId: Number(this.selected_edbid),
+		// 		...item
+		// 	}
+		// 	dataBaseInterface.edbInfoEditEn(params).then(res=>{
+		// 		if(res.Ret ==200){
+		// 			this.$message({
+		// 				message:res.Msg,
+		// 				type:"success"
+		// 			})
+
+		// 			this.getTreeData()
+		// 			this.getDataList()
+		// 			if(this.updateType=='chart'){
+		// 				// 重绘图表,刷新数据
+		// 				this.$refs.createChart.getEdbData()
+		// 			}
+		// 			this.setEnName = false
+		// 		}
+		// 	})
+		// },
+		openLangInfoDia(type='table') {
+				this.updateType = type
+				this.formItemArray=[
+					{
+						label:/* '指标名称' */ this.$t('Edb.Detail.e_name'),
+						value: this.currentLang==='en'?this.tableData[0].EdbNameEn:this.tableData[0].EdbName,
+						key:'EdbName',
+						placeholder:this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_name')})  /* '请输入指标名称' */
+					},
+					{
+						label:this.$t('Edb.Detail.e_unit') /* '单位' */,
+						value: this.currentLang==='en'?this.tableData[0].UnitEn:this.tableData[0].Unit,
+						key:'Unit',
+						placeholder:this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_unit')})  /* '请输入单位' */
+					}
+				]
 
-			this.setEnName = true
+				this.isLangInfoDia = true
 		},
-		updateEnName(item){
+
+		updateLang(item) {
 			let params={
 				EdbInfoId: Number(this.selected_edbid),
 				...item
 			}
-			dataBaseInterface.edbInfoEditEn(params).then(res=>{
-				if(res.Ret ==200){
-					this.$message({
-						message:res.Msg,
-						type:"success"
-					})
-					/* this.tableData[0].EdbNameEn = params.EdbNameEn
-					this.tableData[0].UnitEn = params.UnitEn
-					// 判断图表英文名称和英文单位是否都有,都有需要打上 英文标记
-					console.log(this.tableData[0].EdbNameEn,this.tableData[0].UnitEn);
-					if(this.tableData[0].EdbNameEn && (this.tableData[0].UnitEn || this.tableData[0].Unit == '无')){
-						this.tableData[0].IsEnEdb=true
-					}else{
-						this.tableData[0].IsEnEdb=false
-					} */
-					this.getTreeData()
-					this.getDataList()
-					if(this.updateType=='chart'){
-						// 重绘图表,刷新数据
-						this.$refs.createChart.getEdbData()
-					}
-					this.setEnName = false
+			dataBaseInterface.setEdbLangInfo(params).then(res=>{
+				if(res.Ret !==200) return
+
+				this.$message.success(res.Msg)
+
+				this.getTreeData()
+				this.getDataList()
+				if(this.updateType=='chart'){
+					// 重绘图表,刷新数据
+					this.$refs.createChart.getEdbData()
 				}
+				this.isLangInfoDia = false
 			})
 		},
+
 		/* 新增指标 */
 		addHandler() {
 			this.isAddTarget = true;

+ 255 - 102
src/views/dataEntry_manage/mixins/chartPublic.js

@@ -150,7 +150,10 @@ export const chartSetMixin = {
       crossVarietyChartData: {},
 
       /* 雷达图 */
-      radarChartData: {}
+      radarChartData: {},
+
+      /* 修改对应版本信息弹窗  替换原有设置英文*/
+			isLangInfoDia: false
 		}
 	},
   computed:{
@@ -230,22 +233,18 @@ export const chartSetMixin = {
 				newval.DataList && this.setSectionScatterChart();
 			},
 			deep: true
+    },
+
+    currentLang() {
+      this.changeLanguage()
     }
   },
 	methods: {
     /* --------------------------------------------切换中英文 */
-		async changeLanguage(lang){
+		async changeLanguage(){
       this.search_txt = '';
-			// this.currentLang = lang;
       
-      if(this.$route.path === '/chartsetting') {
-        // await dataBaseInterface.setUserLang({
-        //   ConfigCode: 'chart_language',
-        //   ConfigValue: lang === 'en' ? 'EN' : 'CN'
-        // })
-        // this.setLangIntoStore();
-        if(!this.selected_chartid) return
-      }
+      if(!this.$refs.chartRef) return
 
       //不同图表来源 1eta图 2商品价格图 3相关性图表
       const sourceMap = {
@@ -256,80 +255,249 @@ export const chartSetMixin = {
         5: this.changeCommodityLang
       }
 
-      sourceMap[this.chartInfo.Source]()
+      sourceMap[this.chartInfo.Source]&&sourceMap[this.chartInfo.Source]()
 		},
-    // 打开设置英文信息弹窗
-    async openEnNameDia(){
+    // // 打开设置英文信息弹窗
+    // async openEnNameDia(){
+    //   this.formItemArray={}
+    //   this.formItemArray.chartInfo=[]
+    //   this.formItemArray.chartsList=[]
+    //   this.formItemArray.chartInfo.push({
+    //     label:/* '图表名称' */this.$t('Chart.Detail.chart_name'),
+    //     value:this.chartInfo.ChartName,
+    //     key:'ChartName',
+    //     id:this.chartInfo.ChartInfoId,
+    //     source: this.chartInfo.Source,
+    //     notEdit:true
+    //   },
+    //   {
+    //     label:/* '英文图表名称' */this.$t('Chart.Detail.chart_en_name'),
+    //     value:this.chartInfo.ChartNameEn,
+    //     key:'ChartNameEn',
+    //     id:this.chartInfo.ChartInfoId,
+    //     placeholder:/* '请输入英文图表名称' */this.$t('Chart.InputHolderAll.input_en_name')
+    //   })
+
+    //   if([1,2,5].includes(this.chartInfo.Source)){ //需要设置指标的
+    //     this.tableData.map(item =>{
+    //       if(item.Unit){
+    //         this.formItemArray.chartsList.push([
+    //           {
+    //             label:/* '指标名称' */this.$t('Edb.Detail.e_name'),
+    //             value:item.EdbName,
+    //             key:'EdbName',
+    //             id:item.EdbInfoId,
+    //             notEdit:true
+    //           },
+    //           {
+    //             label:/* '单位' */this.$t('Edb.Detail.e_unit'),
+    //             value:item.Unit,
+    //             key:'Unit',
+    //             id:item.EdbInfoId,
+    //             notEdit:true
+    //           },
+    //           {
+    //             label:/* '英文指标名称' */this.$t('Edb.Detail.e_en_name'),
+    //             value:item.EdbNameEn,
+    //             key:'EdbNameEn',
+    //             id:item.EdbInfoId,
+    //             placeholder:/* '请输入英文指标名称' */ this.$t('Edb.InputHolderAll.input_common',{label: this.$t('Edb.Detail.e_en_name')})
+    //           },
+    //           {
+    //             label:/* '英文单位' */this.$t('Edb.Detail.e_en_unit'),
+    //             value:item.UnitEn,
+    //             key:'UnitEn',
+    //             id:item.EdbInfoId,
+    //             placeholder:/* '请输入英文单位' */this.$t('Edb.InputHolderAll.input_common',{label: this.$t('Edb.Detail.e_en_unit')})
+    //           }
+    //         ])
+    //       }else{
+    //         this.formItemArray.chartsList.push([
+    //           {
+    //             label:/* '指标名称' */this.$t('Edb.Detail.e_name'),
+    //             value:item.EdbName,
+    //             key:'EdbName',
+    //             id:item.EdbInfoId,
+    //             notEdit:true
+    //           },
+    //           {
+    //             label:/* '英文指标名称' */this.$t('Edb.Detail.e_en_name'),
+    //             value:item.EdbNameEn,
+    //             key:'EdbNameEn',
+    //             id:item.EdbInfoId,
+    //             placeholder:this.$t('Edb.InputHolderAll.input_common',{label: this.$t('Edb.Detail.e_en_name')})
+    //           }
+    //         ])
+    //       }
+    //     })
+    //   }
+
+    //   //价格曲线
+    //   if(this.chartInfo.Source===2) {
+    //     this.formItemArray.chartInfo.push({
+    //       label:/* '期货名称' */this.$t('Chart.Detail.good_name'),
+    //       value:this.commodityEdbList[1].EdbName,
+    //       key:'FutureGoodName',
+    //       id:this.chartInfo.ChartInfoId,
+    //       notEdit:true
+    //     },
+    //     {
+    //       label:/* '英文期货名称' */this.$t('Chart.Detail.good_en_name'),
+    //       value:this.commodityEdbList[1].EdbNameEn,
+    //       key:'FutureGoodNameEn',
+    //       id:this.chartInfo.ChartInfoId,
+    //       placeholder:/* '请输入英文期货名称' */this.$t('Chart.InputHolderAll.input_common',{label:this.$t('Chart.Detail.good_en_name')})
+    //     })
+    //   }
+
+    //   //利润曲线
+    //   else if(this.chartInfo.Source===5) {
+    //     this.formItemArray.chartInfo.push({
+    //       label:/* '盘面利润名称' */this.$t('Chart.Detail.profit_name'),
+    //       value:this.chartInfo.ProfitName,
+    //       key:'ProfitName',
+    //       id:this.chartInfo.ChartInfoId,
+    //       notEdit:true
+    //     },
+    //     {
+    //       label:/* '英文盘面利润名称' */this.$t('Chart.Detail.profit_en_name'),
+    //       value:this.chartInfo.ProfitNameEn,
+    //       key:'ProfitNameEn',
+    //       id:this.chartInfo.ChartInfoId,
+    //       placeholder:/* '请输入英文盘面利润名称' */this.$t('Chart.InputHolderAll.input_common',{label:this.$t('Chart.Detail.profit_en_name')})
+    //     })
+    //   }
+
+    //   //跨品种分析
+    //   else if(this.chartInfo.Source===10) {
+    //     let { Data } = await crossVarietyInterface.chartLangOption({ChartInfoId: this.chartInfo.ChartInfoId})
+
+    //     const { TagList,VarietyList } = Data;
+
+    //     this.formItemArray.chartInfo.push({
+    //       label:/* 'X轴名称' */this.$t('Chart.Detail.x_name'),
+    //       value:this.crossVarietyChartData.XName,
+    //       key:'XName',
+    //       id:TagList[0].ChartTagId,
+    //       notEdit:true
+    //     },
+    //     {
+    //       label:/* '英文X轴名称' */this.$t('Chart.Detail.x_en_name'),
+    //       value:this.crossVarietyChartData.XNameEn,
+    //       key:'XNameEn',
+    //       id:TagList[0].ChartTagId,
+    //       placeholder:/* '请输入英文X轴名称' */this.$t('Chart.InputHolderAll.input_common',{label:this.$t('Chart.Detail.x_en_name')})
+    //     },{
+    //       label:/* 'Y轴名称' */this.$t('Chart.Detail.y_name'),
+    //       value:this.crossVarietyChartData.YName,
+    //       key:'YName',
+    //       id:TagList[1].ChartTagId,
+    //       notEdit:true
+    //     },
+    //     {
+    //       label:/* '英文Y轴名称' */this.$t('Chart.Detail.y_en_name'),
+    //       value:this.crossVarietyChartData.YNameEn,
+    //       key:'YNameEn',
+    //       id:TagList[1].ChartTagId,
+    //       placeholder:/* '请输入英文Y轴名称' */this.$t('Chart.InputHolderAll.input_common',{label:this.$t('Chart.Detail.y_en_name')})
+    //     })
+
+    //     VarietyList.forEach(item => {
+    //       this.formItemArray.chartsList.push([
+    //         {
+    //           label:/* '品种名称' */this.$t('Chart.Detail.variety_name'),
+    //           value:item.ChartVarietyName,
+    //           key:'ChartVarietyName',
+    //           id:item.ChartVarietyId,
+    //           notEdit:true
+    //         },
+    //         {
+    //           label:/* '英文品种名称' */this.$t('Chart.Detail.variety_en_name'),
+    //           value:item.ChartVarietyNameEn,
+    //           key:'ChartVarietyNameEn',
+    //           id:item.ChartVarietyId,
+    //           placeholder:/* '请输入英文品种名称' */this.$t('Chart.InputHolderAll.input_common',{label:this.$t('Chart.Detail.variety_en_name')})
+    //         }
+    //       ])
+    //     })
+    //   }
+
+
+    //   this.setEnName = true
+    // },
+    // // 更新英文信息
+    // async updateEnName(enNameData){
+    //   // console.log(enNameData)
+    //   let res=null
+    //   if([2,5].includes(this.chartInfo.Source)){//商品价格
+    //     res=await futuresInterface.editChartEn({
+    //       ChartInfoId: enNameData.ChartInfoId,
+    //       ChartNameEn: enNameData.ChartNameEn,
+    //       UnitEn: enNameData.ChartEdbInfoList[0].UnitEn || '',
+    //       EdbNameEn: enNameData.ChartEdbInfoList[0].EdbNameEn || '',
+    //       FutureGoodNameEn: enNameData.FutureGoodNameEn || '',
+    //       ProfitNameEn: enNameData.ProfitNameEn || ''
+    //     })
+    //   }else if(this.chartInfo.Source===3){//相关性
+    //     res=await chartRelevanceApi.editChartEn({
+    //       ChartInfoId: enNameData.ChartInfoId,
+    //       ChartNameEn: enNameData.ChartNameEn
+    //     })
+    //   }else if(this.chartInfo.Source===6){//拟合方程
+    //     res=await fittingEquationInterface.editChartEn({
+    //       ChartInfoId: enNameData.ChartInfoId,
+    //       ChartNameEn: enNameData.ChartNameEn
+    //     })
+    //   }else if([7,8,9].includes(this.chartInfo.Source)){//统计特征
+    //     res=await statisticFeatureInterface.editChartEn({
+    //       ChartInfoId: enNameData.ChartInfoId,
+    //       ChartNameEn: enNameData.ChartNameEn
+    //     })
+    //   }else if(this.chartInfo.Source === 10) {//跨品种分析
+    //     res=await crossVarietyInterface.editChartEn(enNameData)
+    //   }else{
+    //     res = await dataBaseInterface.chartInfoEditEn(enNameData)
+    //   }
+
+		// 	if(res.Ret !==200) return
+
+		// 	this.$message.success(this.$t('MsgPrompt.edit_msg'))
+    //   this.getChartInfo()
+		// 	this.setEnName = false
+    // },
+
+    /* 打开编辑信息弹窗 */
+    async openLangInfoDia() {
       this.formItemArray={}
       this.formItemArray.chartInfo=[]
       this.formItemArray.chartsList=[]
       this.formItemArray.chartInfo.push({
         label:/* '图表名称' */this.$t('Chart.Detail.chart_name'),
-        value:this.chartInfo.ChartName,
+        value: this.currentLang==='en'?this.chartInfo.ChartNameEn:this.chartInfo.ChartName,
         key:'ChartName',
         id:this.chartInfo.ChartInfoId,
         source: this.chartInfo.Source,
-        notEdit:true
-      },
-      {
-        label:/* '英文图表名称' */this.$t('Chart.Detail.chart_en_name'),
-        value:this.chartInfo.ChartNameEn,
-        key:'ChartNameEn',
-        id:this.chartInfo.ChartInfoId,
-        placeholder:/* '请输入英文图表名称' */this.$t('Chart.InputHolderAll.input_en_name')
+        placeholder:/* '请输入图表名称' */this.$t('Chart.InputHolderAll.input_common',{label:this.$t('Chart.Detail.chart_name')})
       })
 
       if([1,2,5].includes(this.chartInfo.Source)){ //需要设置指标的
         this.tableData.map(item =>{
-          if(item.Unit){
             this.formItemArray.chartsList.push([
               {
                 label:/* '指标名称' */this.$t('Edb.Detail.e_name'),
-                value:item.EdbName,
+                value:this.currentLang==='en'?item.EdbNameEn:item.EdbName,
                 key:'EdbName',
                 id:item.EdbInfoId,
-                notEdit:true
+                placeholder:/* '请输入指标名称' */ this.$t('Edb.InputHolderAll.input_common',{label: this.$t('Edb.Detail.e_name')})
               },
               {
                 label:/* '单位' */this.$t('Edb.Detail.e_unit'),
-                value:item.Unit,
+                value:this.currentLang==='en'?item.UnitEn:item.Unit,
                 key:'Unit',
                 id:item.EdbInfoId,
-                notEdit:true
-              },
-              {
-                label:/* '英文指标名称' */this.$t('Edb.Detail.e_en_name'),
-                value:item.EdbNameEn,
-                key:'EdbNameEn',
-                id:item.EdbInfoId,
-                placeholder:/* '请输入英文指标名称' */ this.$t('Edb.InputHolderAll.input_common',{label: this.$t('Edb.Detail.e_en_name')})
-              },
-              {
-                label:/* '英文单位' */this.$t('Edb.Detail.e_en_unit'),
-                value:item.UnitEn,
-                key:'UnitEn',
-                id:item.EdbInfoId,
-                placeholder:/* '请输入英文单位' */this.$t('Edb.InputHolderAll.input_common',{label: this.$t('Edb.Detail.e_en_unit')})
-              }
-            ])
-          }else{
-            this.formItemArray.chartsList.push([
-              {
-                label:/* '指标名称' */this.$t('Edb.Detail.e_name'),
-                value:item.EdbName,
-                key:'EdbName',
-                id:item.EdbInfoId,
-                notEdit:true
-              },
-              {
-                label:/* '英文指标名称' */this.$t('Edb.Detail.e_en_name'),
-                value:item.EdbNameEn,
-                key:'EdbNameEn',
-                id:item.EdbInfoId,
-                placeholder:this.$t('Edb.InputHolderAll.input_common',{label: this.$t('Edb.Detail.e_en_name')})
+                placeholder:/* '请输入单位' */ this.$t('Edb.InputHolderAll.input_common',{label: this.$t('Edb.Detail.e_unit')})
               }
             ])
-          }
         })
       }
 
@@ -337,17 +505,10 @@ export const chartSetMixin = {
       if(this.chartInfo.Source===2) {
         this.formItemArray.chartInfo.push({
           label:/* '期货名称' */this.$t('Chart.Detail.good_name'),
-          value:this.commodityEdbList[1].EdbName,
+          value:this.currentLang==='en'?this.commodityEdbList[1].EdbNameEn:this.commodityEdbList[1].EdbName,
           key:'FutureGoodName',
           id:this.chartInfo.ChartInfoId,
-          notEdit:true
-        },
-        {
-          label:/* '英文期货名称' */this.$t('Chart.Detail.good_en_name'),
-          value:this.commodityEdbList[1].EdbNameEn,
-          key:'FutureGoodNameEn',
-          id:this.chartInfo.ChartInfoId,
-          placeholder:/* '请输入英文期货名称' */this.$t('Chart.InputHolderAll.input_common',{label:this.$t('Chart.Detail.good_en_name')})
+          placeholder:/* '请输入期货名称' */this.$t('Chart.InputHolderAll.input_common',{label:this.$t('Chart.Detail.good_name')})
         })
       }
 
@@ -355,17 +516,10 @@ export const chartSetMixin = {
       else if(this.chartInfo.Source===5) {
         this.formItemArray.chartInfo.push({
           label:/* '盘面利润名称' */this.$t('Chart.Detail.profit_name'),
-          value:this.chartInfo.ProfitName,
+          value: this.currentLang==='en'?this.chartInfo.ProfitNameEn:this.chartInfo.ProfitName,
           key:'ProfitName',
           id:this.chartInfo.ChartInfoId,
-          notEdit:true
-        },
-        {
-          label:/* '英文盘面利润名称' */this.$t('Chart.Detail.profit_en_name'),
-          value:this.chartInfo.ProfitNameEn,
-          key:'ProfitNameEn',
-          id:this.chartInfo.ChartInfoId,
-          placeholder:/* '请输入英文盘面利润名称' */this.$t('Chart.InputHolderAll.input_common',{label:this.$t('Chart.Detail.profit_en_name')})
+          placeholder:/* '请输入盘面利润名称' */this.$t('Chart.InputHolderAll.input_common',{label:this.$t('Chart.Detail.profit_en_name')})
         })
       }
 
@@ -423,48 +577,47 @@ export const chartSetMixin = {
         })
       }
 
-
-      this.setEnName = true
+      this.isLangInfoDia = true
     },
-    // 更新英文信息
-    async updateEnName(enNameData){
-      // console.log(enNameData)
+
+    /* 更新版本图表信息 */
+    async updateLang(paramsData) {
       let res=null
       if([2,5].includes(this.chartInfo.Source)){//商品价格
-        res=await futuresInterface.editChartEn({
-          ChartInfoId: enNameData.ChartInfoId,
-          ChartNameEn: enNameData.ChartNameEn,
-          UnitEn: enNameData.ChartEdbInfoList[0].UnitEn || '',
-          EdbNameEn: enNameData.ChartEdbInfoList[0].EdbNameEn || '',
-          FutureGoodNameEn: enNameData.FutureGoodNameEn || '',
-          ProfitNameEn: enNameData.ProfitNameEn || ''
+        res=await futuresInterface.setChartLangInfo({
+          ChartInfoId: paramsData.ChartInfoId,
+          ChartName: paramsData.ChartName,
+          Unit: paramsData.ChartEdbInfoList[0].Unit || '',
+          EdbName: paramsData.ChartEdbInfoList[0].EdbName || '',
+          FutureGoodName: paramsData.FutureGoodName || '',
+          ProfitName: paramsData.ProfitName || ''
         })
       }else if(this.chartInfo.Source===3){//相关性
-        res=await chartRelevanceApi.editChartEn({
-          ChartInfoId: enNameData.ChartInfoId,
-          ChartNameEn: enNameData.ChartNameEn
+        res=await chartRelevanceApi.setChartLangInfo({
+          ChartInfoId: paramsData.ChartInfoId,
+          ChartName: paramsData.ChartName
         })
       }else if(this.chartInfo.Source===6){//拟合方程
-        res=await fittingEquationInterface.editChartEn({
-          ChartInfoId: enNameData.ChartInfoId,
-          ChartNameEn: enNameData.ChartNameEn
+        res=await fittingEquationInterface.setChartLangInfo({
+          ChartInfoId: paramsData.ChartInfoId,
+          ChartNameEn: paramsData.ChartName
         })
       }else if([7,8,9].includes(this.chartInfo.Source)){//统计特征
-        res=await statisticFeatureInterface.editChartEn({
-          ChartInfoId: enNameData.ChartInfoId,
-          ChartNameEn: enNameData.ChartNameEn
+        res=await statisticFeatureInterface.setChartLangInfo({
+          ChartInfoId: paramsData.ChartInfoId,
+          ChartName: paramsData.ChartName
         })
       }else if(this.chartInfo.Source === 10) {//跨品种分析
-        res=await crossVarietyInterface.editChartEn(enNameData)
+        res=await crossVarietyInterface.setChartLangInfo(paramsData)
       }else{
-        res = await dataBaseInterface.chartInfoEditEn(enNameData)
+        res = await dataBaseInterface.setChartLangInfo(paramsData)
       }
 
 			if(res.Ret !==200) return
 
 			this.$message.success(this.$t('MsgPrompt.edit_msg'))
       this.getChartInfo()
-			this.setEnName = false
+			this.isLangInfoDia = false
     },
 
     /* 切换柱形图中英文 */

+ 9 - 6
src/views/datasheet_manage/components/CustomTable.vue

@@ -49,9 +49,9 @@
                 @click="() => { !disabled && item==='EdbName' && clickEdbName(edb)}"
               >
                 <template v-if="item === 'EdbName'">
-                  <span :class="{'edbname-td':disabled}" @click="edbJumpToBase(edb)">{{ edb.EdbAliasName||edb[item] }}</span>
+                  <span :class="{'edbname-td':disabled}" @click="edbJumpToBase(edb)">{{ edb.EdbAliasName||(currentLang==='en'?edb['EdbNameEn']:edb[item]) }}</span>
                 </template>
-                <template v-else>{{ edb[item] }}/{{ edb.Frequency }}</template>
+                <template v-else>{{ (currentLang==='en'?edb['UnitEn']:edb[item]) }}/{{ edb.Frequency }}</template>
               </td>
             </tr>
 
@@ -242,9 +242,9 @@
                 @click="() => { !disabled && item==='EdbName' && clickEdbName(edb)}"
               >
                 <template v-if="item === 'EdbName'">
-                  <span :class="{'edbname-td':disabled}" @click="edbJumpToBase(edb)">{{ edb.EdbAliasName||edb[item] }}</span>
+                  <span :class="{'edbname-td':disabled}" @click="edbJumpToBase(edb)">{{ edb.EdbAliasName||(currentLang==='en'?edb['EdbNameEn']:edb[item]) }}</span>
                 </template>
-                <template v-else>{{ edb[item] }}/{{ edb.Frequency }}</template>
+                <template v-else>{{ (currentLang==='en'?edb['UnitEn']:edb[item]) }}/{{ edb.Frequency }}</template>
               </td>
 
               <!-- 数据列 -->
@@ -475,6 +475,9 @@ export default {
     },
     contextMenuOption(){
         return [{ label: this.$t('ETable.Btn.delete_btn') ,key: 'del' }]
+    },
+    currentLang() {
+      return this.$store.state.lang
     }
   },
   data() {
@@ -550,9 +553,9 @@ export default {
     // 单击指标名称修改别名
     clickEdbName(edb) {
       // console.log(edb)
-      const { EdbName,EdbAliasName,EdbInfoId } = edb;
+      const { EdbName,EdbNameEn,EdbAliasName,EdbInfoId } = edb;
       this.editEdb = {
-        EdbName,
+        EdbName:this.currentLang==='en'?(EdbNameEn||EdbName):EdbName,
         EdbAliasName,
         EdbInfoId
       };

+ 3 - 1
src/views/datasheet_manage/customSheetEdit.vue

@@ -203,7 +203,7 @@ export default {
     async handleSelectTarget(e) {
       if(!e) return
 
-      const { EdbName,EdbInfoId,Unit,Frequency } = e;
+      const { EdbName,EdbNameEn,UnitEn,EdbInfoId,Unit,Frequency } = e;
       if(this.$refs.customTableRef.config.data.find(_ => _.EdbInfoId===EdbInfoId)) return this.$message.warning(this.$t('OnlineExcelPage.already_exists_msg') )
       
       const {Data} = this.$refs.customTableRef.config.data.length 
@@ -223,6 +223,8 @@ export default {
         EdbAliasName: '',
         EdbName,
         Unit,
+        EdbNameEn,
+        UnitEn,
         Frequency,
         EdbInfoId,
       })

+ 16 - 10
src/views/mychart_manage/components/chartDetailDia.vue

@@ -194,9 +194,9 @@
                 v-permission="permissionBtn.myETAPermission.myChart_enNameSetting"
                 class="span-item"
                 style="margin-left: 7px"
-                @click="openEnNameDia"
+                @click="openLangInfoDia"
               >
-                <span> <img style="width: 16px;vertical-align: middle" :src="$icons.to_en" />&nbsp;<!-- 设置英文名称 -->{{$t('Edb.detail_en_btn')}} </span>
+                <span> <img style="width: 16px;vertical-align: middle" :src="$icons.to_en" />&nbsp;<!-- 编辑信息 -->{{$t('Edb.detail_en_btn')}} </span>
               </span>
               <el-popconfirm
                 v-permission="permissionBtn.myETAPermission.myChart_del"
@@ -569,7 +569,7 @@
     />
 
     <!-- 输入英文指标弹窗 -->
-    <set-en-name-dia 
+    <!-- <set-en-name-dia 
       :isOpenDialog="setEnName" 
       @cancel="setEnName=false" 
       @updateEnName="updateEnName" 
@@ -577,13 +577,18 @@
       :chartType="chartInfo.ChartType"
       :datainfo="chartInfo.ChartType===10?JSON.parse(chartInfo.ExtraConfig):null"
       :edblist="chartInfo.ChartType===10?tableData:[]"
-    />
-
-    <!-- 指标历史记录 -->
-    <!-- <edbHistoryDialog
-      :isOpenDialog.sync="isLookHistory"
-      :edbId="lookEdbId"
     /> -->
+
+    <!-- 设置对应版本信息弹窗 -->
+		<setLangInfoDia
+			:isOpenDialog="isLangInfoDia"
+			:formData="formItemArray"
+      :chartType="chartInfo.ChartType"
+      :datainfo="chartInfo.ChartType===10?JSON.parse(chartInfo.ExtraConfig):null"
+      :edblist="chartInfo.ChartType===10?tableData:[]"
+			@cancel="isLangInfoDia=false" 
+			@updateLang="updateLang"
+		/>
   </div>
 </template>
 
@@ -601,11 +606,12 @@ import SaveChartOther from '@/views/dataEntry_manage/components/SaveChartOther';
 import DateChooseDia from '@/views/dataEntry_manage/components/DateChooseDia';
 import changeLang from "@/views/dataEntry_manage/components/changeLang"
 import setEnNameDia from "@/views/dataEntry_manage/components/setEnNameDia"
+import setLangInfoDia from '@/views/dataEntry_manage/components/setLangInfo.vue'
 import { chartSetMixin } from '@/views/dataEntry_manage/mixins/chartPublic'
 import { copyFit } from '@/utils/svgToblob.js';
 
 export default {
-  components: { Chart, DateChooseDia,SaveChartOther,changeLang,setEnNameDia },
+  components: { Chart, DateChooseDia,SaveChartOther,changeLang,setEnNameDia,setLangInfoDia },
   mixins: [ chartSetMixin],
   directives: {
     'click-outside':{

+ 3 - 11
src/views/predictEdb_manage/components/childData.vue

@@ -17,15 +17,7 @@
           <span>{{ item.label }}</span>
         </template>
         <template slot-scope="{row}">
-          <span v-if="item.key === 'Unit' && lang === 'ch'">{{ row.Unit }}</span>
-          <span v-else-if="item.key === 'Unit' && lang !== 'ch' && row.Unit==='无'"></span>
-          <span 
-            v-else-if="item.key === 'Unit' && lang !== 'ch' && row.Unit!=='无'" 
-            :style="!row.UnitEn && 'color: #999'"
-            @click="changeEnOptions"
-          >
-            {{ row.UnitEn || '英文单位' }}
-          </span>
+          <span v-if="item.key === 'Unit'">{{ lang === 'en'?row.UnitEn:row.Unit }}</span>
           <span v-else-if="item.key === 'Frequency'">{{ lang === 'ch' ? row.Frequency : row.FrequencyEn }}</span>
           <span v-else>{{ row[item.key] }}</span>
         </template>
@@ -198,8 +190,8 @@ export default {
       })
     },
 
-    changeEnOptions() {
-      this.$emit('openEnNameDia',this.tableData[0])
+    changeLangOptions() {
+      this.$emit('openLangInfoDia',this.tableData[0])
     },
 
     /* 滚动加载 */

+ 2 - 2
src/views/predictEdb_manage/components/edbDetail.vue

@@ -159,8 +159,8 @@ export default {
         refreshData(type=''){
             this.getDetail(type)
         },
-        changeEnOptions() {
-            this.$emit('openEnNameDia',this.edbData.EdbInfo)
+        changeLangOptions() {
+            this.$emit('openLangInfoDia',this.edbData.EdbInfo)
         },
 
         /* 关联图片 */

+ 112 - 73
src/views/predictEdb_manage/predictEdb.vue

@@ -239,7 +239,7 @@
 									<el-button 
 										v-permission="permissionBtn.predictEdbPermission.edbPreData_enNameSetting"
 										type="text" 
-										@click="openLangInfoDia"
+										@click="clickEdbNameHandle"
 									>
 										{{$t('Edb.detail_en_btn')}}<!-- 编辑信息 -->
 									</el-button>
@@ -281,7 +281,7 @@
 							@updateTit="setNameBack"
 							@setCurrentClassify="setCurrentClassify"
 							@setOpera="({button,detail}) => { edbButton = button;predictEdbInfo=detail }"
-							@openEnNameDia="openEnNameDia"
+							@openLangInfoDia="openLangInfoDia"
 						/>
 					</div>
 
@@ -381,14 +381,14 @@
 			@successCallback="getTreeData"
 		/>
 
-		<!-- 输入英文指标弹窗 -->
+		<!-- 输入英文指标弹窗
 		<set-en-name-dia 
 			:isOpenDialog="setEnName" 
 			@cancel="setEnName=false" 
 			:formData="formItemArray" 
 			@updateEnName="updateEnName" 
 			cType="predictEbd" 
-		/>
+		/> -->
 
 		<!-- 运算指标弹窗 -->
 		<computedDialog
@@ -472,8 +472,8 @@
       :isOpenDialog.sync="isLookHistory"
       :edbId="lookEdbId"
     /> -->
-	<!-- 指数修匀弹窗 -->
-	<SmoothEdbDialog 
+		<!-- 指数修匀弹窗 -->
+		<SmoothEdbDialog 
 			:is-open-smooth="computed_type==='alpha'"
 			:computed-source="computed_source"
 			:operationForm="operationForm"
@@ -484,6 +484,15 @@
 			@lookHistory="id => {toHistoryPage(id,$route.matched);lookEdbId=id;}"
 		/>
 
+		<!-- 设置对应版本信息弹窗 -->
+		<setLangInfoDia
+			:isOpenDialog="isLangInfoDia"
+			:formData="formItemArray"
+			@cancel="isLangInfoDia=false" 
+			@updateLang="updateLang"
+			cType="ebd" 
+		/>
+
 	</div>
 </template>
 
@@ -508,6 +517,7 @@ import { formulaTip } from '@/views/dataEntry_manage/databaseComponents/util';
 import dataAssociateChart from '@/views/dataEntry_manage/databaseComponents/dataAssociateChart.vue'
 import dataAssociateComputeData from '@/views/dataEntry_manage/databaseComponents/dataAssociateComputeData.vue'
 import SmoothEdbDialog from '@/views/dataEntry_manage/databaseComponents/smoothEdbDialog.vue';
+import setLangInfoDia from '@/views/dataEntry_manage/components/setLangInfo.vue'
 
 export default {
 	name:'',
@@ -527,7 +537,8 @@ export default {
 		diffusionIndexDialog,
 		dataAssociateChart,
 		dataAssociateComputeData,
-		SmoothEdbDialog
+		SmoothEdbDialog,
+		setLangInfoDia
 	},
 	mixins:[ leftMixin ],
 	beforeRouteLeave (to, from, next) {
@@ -677,6 +688,9 @@ export default {
 			activeTab:'',
 
 			predictEdbInfo: {},
+
+			/* 修改对应版本信息弹窗  替换原有设置英文*/
+			isLangInfoDia: false
 		};
 	},
 	computed: {
@@ -964,20 +978,6 @@ export default {
 
 			const { DeleteStatus,TipsMsg } = Data;
 
-			// DeleteStatus === 1 
-			// ? this.$confirm('该分类下关联指标不可删除', '删除失败', {
-			// 	confirmButtonText: '知道了',
-			// 	showCancelButton: false,
-			// 	type: 'error',
-			// }) : DeleteStatus === 0 && !EdbInfoId
-			// ?  this.$confirm('确定删除当前分类吗?', '提示', {
-			// 	confirmButtonText: '确定',
-			// 	cancelButtonText: '取消',
-			// 	type: 'warning',
-			// }).then(() => {
-			// 	this.delApi(ClassifyId, EdbInfoId)
-			// }): null;
-
 			/**
 			 * 0 可删除
 			 * 1 关联指标
@@ -1333,67 +1333,106 @@ export default {
 		// },200),
 
 		/* 编辑英文 */
-		openEnNameDia(info){
-			this.formItemArray=[{
-				label:/* '指标名称' */ this.$t('Edb.Detail.e_name'),
-				value:info.EdbName,
-				key:'EdbName',
-				notEdit:true
-			}]
-			// 中文单位有 才能编辑英文单位
-			if(info.Unit && info.Unit!='无'){
-				this.formItemArray.push({
-					label:this.$t('Edb.Detail.e_unit') /* '单位' */,
-					value:info.Unit,
-					key:'Unit',
-					notEdit:true
-				},
-				{
-					label:this.$t('Edb.Detail.e_en_name')/* '英文指标名称' */,
-					value:info.EdbNameEn,
-					key:'EdbNameEn',
-					placeholder: this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_en_name')}) /* '请输入英文指标名称' */
-				},
-				{
-					label:this.$t('Edb.Detail.e_en_unit') /* '英文单位' */,
-					value:info.UnitEn,
-					key:'UnitEn',
-					placeholder:this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_en_unit')})  /* '请输入英文单位' */
-				})
-			}else{
-				this.formItemArray.push({
-					label:this.$t('Edb.Detail.e_en_name') /* '英文指标名称' */,
-					value:info.EdbNameEn,
-					key:'EdbNameEn',
-					placeholder:this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_en_name')}) /* '请输入英文指标名称' */
-				})
-			}
+		// openEnNameDia(info){
+		// 	this.formItemArray=[{
+		// 		label:/* '指标名称' */ this.$t('Edb.Detail.e_name'),
+		// 		value:info.EdbName,
+		// 		key:'EdbName',
+		// 		notEdit:true
+		// 	}]
+		// 	// 中文单位有 才能编辑英文单位
+		// 	if(info.Unit && info.Unit!='无'){
+		// 		this.formItemArray.push({
+		// 			label:this.$t('Edb.Detail.e_unit') /* '单位' */,
+		// 			value:info.Unit,
+		// 			key:'Unit',
+		// 			notEdit:true
+		// 		},
+		// 		{
+		// 			label:this.$t('Edb.Detail.e_en_name')/* '英文指标名称' */,
+		// 			value:info.EdbNameEn,
+		// 			key:'EdbNameEn',
+		// 			placeholder: this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_en_name')}) /* '请输入英文指标名称' */
+		// 		},
+		// 		{
+		// 			label:this.$t('Edb.Detail.e_en_unit') /* '英文单位' */,
+		// 			value:info.UnitEn,
+		// 			key:'UnitEn',
+		// 			placeholder:this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_en_unit')})  /* '请输入英文单位' */
+		// 		})
+		// 	}else{
+		// 		this.formItemArray.push({
+		// 			label:this.$t('Edb.Detail.e_en_name') /* '英文指标名称' */,
+		// 			value:info.EdbNameEn,
+		// 			key:'EdbNameEn',
+		// 			placeholder:this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_en_name')}) /* '请输入英文指标名称' */
+		// 		})
+		// 	}
+
+		// 	this.setEnName = true
+		// },
+
+		// updateEnName(item){
+		// 	let params={
+		// 		EdbInfoId: Number(this.select_id),
+		// 		...item
+		// 	}
+		// 	dataBaseInterface.edbInfoEditEn(params).then(res=>{
+		// 		if(res.Ret ==200){
+		// 			this.$message({
+		// 				message:res.Msg,
+		// 				type:"success"
+		// 			})
+		// 			this.detail_show_chart ? this.$refs.detailComponentRef.getDetail() : this.$refs.detailComponentRef.getData();
+		// 			this.setEnName = false
+		// 			this.getTreeData({
+		// 				code: this.select_node,
+		// 				id: this.select_id
+		// 			});
+		// 		}
+		// 	})
+		// },
 
-			this.setEnName = true
+		clickEdbNameHandle() {
+			this.$refs.detailComponentRef.changeLangOptions();
 		},
 
-		clickEdbNameHandle() {
-			this.$refs.detailComponentRef.changeEnOptions();
+		openLangInfoDia(info) {
+				this.formItemArray=[
+					{
+						label:/* '指标名称' */ this.$t('Edb.Detail.e_name'),
+						value: this.currentLang==='en'?info.EdbNameEn:info.EdbName,
+						key:'EdbName',
+						placeholder:this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_name')})  /* '请输入指标名称' */
+					},
+					{
+						label:this.$t('Edb.Detail.e_unit') /* '单位' */,
+						value: this.currentLang==='en'?info.UnitEn:info.Unit,
+						key:'Unit',
+						placeholder:this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_unit')})  /* '请输入单位' */
+					}
+				]
+
+				this.isLangInfoDia = true
 		},
 
-		updateEnName(item){
+		updateLang(item) {
 			let params={
 				EdbInfoId: Number(this.select_id),
 				...item
 			}
-			dataBaseInterface.edbInfoEditEn(params).then(res=>{
-				if(res.Ret ==200){
-					this.$message({
-						message:res.Msg,
-						type:"success"
-					})
-					this.detail_show_chart ? this.$refs.detailComponentRef.getDetail() : this.$refs.detailComponentRef.getData();
-					this.setEnName = false
-					this.getTreeData({
-						code: this.select_node,
-						id: this.select_id
-					});
-				}
+			dataBaseInterface.setEdbLangInfo(params).then(res=>{
+				if(res.Ret !==200) return
+
+				this.$message.success(res.Msg)
+
+				this.detail_show_chart ? this.$refs.detailComponentRef.getDetail() : this.$refs.detailComponentRef.getData();
+				this.getTreeData({
+					code: this.select_node,
+					id: this.select_id
+				});
+
+				this.isLangInfoDia = false
 			})
 		},
 

+ 4 - 4
src/views/sandbox_manage/sandFlowNew/components/addLInkDia.vue

@@ -34,7 +34,7 @@
                   style="vertical-align:middle" 
                   v-if="!item.HaveOperaAuth"
                 />
-                {{item.EdbName}}
+                {{currentLang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName}}
               </div>
             </el-option>
           </el-select>
@@ -66,7 +66,7 @@
                   style="vertical-align:middle" 
                   v-if="!item.HaveOperaAuth"
                 />
-                {{item.ChartName}}
+                {{currentLang==='en'?(item.ChartNameEn||item.ChartName):item.ChartName}}
               </div>
             </el-option>
           </el-select>
@@ -84,13 +84,13 @@
                   <template slot-scope="scope">{{ scope.row.EdbCode }}</template>
                 </el-table-column>
                 <el-table-column :label="$t('Table.edb_name')" align="center" width="200">
-                  <template slot-scope="scope">{{ scope.row.EdbName }}</template>
+                  <template slot-scope="scope">{{ currentLang==='en'?(scope.row.EdbNameEn||scope.row.EdbName):scope.row.EdbName }}</template>
                 </el-table-column>
                 <el-table-column :label="$t('Table.frequency')" align="center" width="50">
                   <template slot-scope="scope">{{ scope.row.Frequency }}</template>
                 </el-table-column>
                 <el-table-column :label="$t('Table.unit')" align="center">
-                  <template slot-scope="scope">{{ scope.row.Unit }}</template>
+                  <template slot-scope="scope">{{ currentLang==='en'?(scope.row.UnitEn||scope.row.Unit):scope.row.Unit }}</template>
                 </el-table-column>
                 <el-table-column :label="$t('Table.start_time')" align="center" width="100">
                   <template slot-scope="scope">{{ scope.row.StartDate }}</template>