Ver código fonte

指标库页面表层翻译

Karsa 1 ano atrás
pai
commit
1c68a18b4c

+ 5 - 0
src/lang/commonLang.js

@@ -1,3 +1,6 @@
+import Edb from './modules/EtaBase/commonLang';
+import Chart from './modules/EtaChart/commonLang';
+
 // 通用文字翻译
 export default {
   Dialog: {
@@ -162,4 +165,6 @@ export default {
       zh: "分类",
     },
   },
+  Edb,
+  Chart
 };

+ 2 - 0
src/lang/en.js

@@ -19,4 +19,6 @@ export default {
   Confirm: transformLanguageData(commonLang.Confirm, "en"),
   Table: transformLanguageData(commonLang.Table, "en"),
   MsgPrompt: transformLanguageData(commonLang.MsgPrompt, "en"),
+  Edb: transformLanguageData(commonLang.Edb, "en"),
+  Chart: transformLanguageData(commonLang.Chart, "en"),
 };

+ 12 - 9
src/lang/modules/EtaBase/En.js

@@ -1,14 +1,17 @@
 /* 指标库模块 */
 
 export default {
-  EtaBaseManage: {
-    /* 指标库页面 */
-    EtaBasePage: {
-      add_edb_btn: 'Add Indicator',
-      calculation_edb_btn: 'Calculation',
-      replace_edb_btn: 'Indicator Replacement',
-      algorithm_btn: 'Code Algorithm',
-      adjustment_btn: 'Data Adjustment'
-    }
+  /* 指标库页面 */
+  EtaBasePage: {
+    add_edb_btn: 'Add Indicator',
+    calculation_edb_btn: 'Calculation',
+    replace_edb_btn: 'Indicator Replacement',
+    algorithm_btn: 'Code Algorithm',
+    adjustment_btn: 'Data Adjustment',
+    search_placeholder: 'Indicator ID/Indicator Name',
+    add_first_menu_btn: 'Add first-level catalogue',
+    total_prefix:'Total',
+    total_suffix: 'indicators',
+    time_show: 'Creat Time',
   }
 }

+ 12 - 9
src/lang/modules/EtaBase/Zh.js

@@ -1,14 +1,17 @@
 /* 指标库模块 */
 
 export default {
-  EtaBaseManage: {
-    /* 指标库页面 */
-    EtaBasePage: {
-      add_edb_btn: '添加指标',
-      calculation_edb_btn: '计算指标',
-      replace_edb_btn: '替换指标',
-      algorithm_btn: '代码运算',
-      adjustment_btn: '数据调整'
-    }
+  /* 指标库页面 */
+  EtaBasePage: {
+    add_edb_btn: '添加指标',
+    calculation_edb_btn: '计算指标',
+    replace_edb_btn: '替换指标',
+    algorithm_btn: '代码运算',
+    adjustment_btn: '数据调整',
+    search_placeholder: '指标ID/指标名称',
+    add_first_menu_btn: '添加一级目录',
+    total_prefix:'共',
+    total_suffix: '个指标',
+    time_show: '创建时间',
   }
 }

+ 2 - 0
src/lang/zh.js

@@ -20,4 +20,6 @@ export default {
   Confirm: transformLanguageData(commonLang.Confirm, "zh"),
   Table: transformLanguageData(commonLang.Table, "zh"),
   MsgPrompt: transformLanguageData(commonLang.MsgPrompt, "zh"),
+  Edb: transformLanguageData(commonLang.Edb, "zh"),
+  Chart: transformLanguageData(commonLang.Chart, "zh"),
 };

+ 1 - 1
src/views/dataEntry_manage/databaseComponents/edbDetailData.vue

@@ -62,7 +62,7 @@
 					<span :class="['value-style',{'predict-act': tableData[0].DataInsertConfig.Date===item.DataTime}]">{{item.Value}}</span>
 				</span>
 			</li>
-			<li class="nodata value-item" v-if="!dataList.length">暂无数据</li>
+			<li class="nodata value-item" v-if="!dataList.length">{{$t('Table.prompt_slogan')}}</li>
 		</ul>
 	</div>
 </template>

+ 35 - 35
src/views/dataEntry_manage/databaseList.vue

@@ -3,22 +3,22 @@
 		<div class="database_top">
 			<div class="top-left">
 				<el-button v-permission="permissionBtn.edbDataPermission.edbData_addEdb"
-					type="primary" @click="addHandler">添加指标</el-button>
+					type="primary" @click="addHandler">{{$t('EtaBasePage.add_edb_btn')}}</el-button>
 				<el-button v-permission="permissionBtn.edbDataPermission.edbData_calcuEdb"
-					type="primary" @click="addComputedHandler">计算指标</el-button>
+					type="primary" @click="addComputedHandler">{{$t('EtaBasePage.calculation_edb_btn')}}</el-button>
 				<el-button v-permission="permissionBtn.edbDataPermission.edbData_replaceEdb"
-					type="primary" @click="replaceEdbHandler">替换指标</el-button>
+					type="primary" @click="replaceEdbHandler">{{$t('EtaBasePage.replace_edb_btn')}}</el-button>
 				<el-button v-permission="permissionBtn.edbDataPermission.edbData_codeRun"
-					type="primary" @click="$router.push({path: '/codecount'})">代码运算</el-button>
+					type="primary" @click="$router.push({path: '/codecount'})">{{$t('EtaBasePage.algorithm_btn')}}</el-button>
 				<el-button v-permission="permissionBtn.edbDataPermission.edbData_dataAdjust"
-					type="primary" @click="$router.push({path: '/adjustdata'})">数据调整</el-button>
+					type="primary" @click="$router.push({path: '/adjustdata'})">{{$t('EtaBasePage.adjustment_btn')}}</el-button>
 				<!-- <el-button v-permission="permissionBtn.edbDataPermission.edbData_batchUpdate"
 					type="primary" plain @click="updateHandler">一键刷新</el-button> -->
 			</div>
 			<div class="top-right">
 
-				<change-lang v-permission="permissionBtn.edbDataPermission.edbData_switchEn"
-					:lang="currentLang" style="height: 32px;" @changeLang="changeLanguage"/>
+				<!-- <change-lang v-permission="permissionBtn.edbDataPermission.edbData_switchEn"
+					:lang="currentLang" style="height: 32px;" @changeLang="changeLanguage"/> -->
 
 				<el-select
 					v-model="search_txt"
@@ -27,7 +27,7 @@
 					:filterable="!search_txt"
 					remote
 					clearable
-					placeholder="指标ID/指标名称"
+					:placeholder="$t('EtaBasePage.search_placeholder')"
 					style="width: 260px;"
 					:remote-method="searchHandle"
 					@click.native="inputFocusHandle"
@@ -176,7 +176,7 @@
 							alt=""
 							style="width: 16px; height: 16px; margin-right: 10px"
 						/>
-						<span>添加一级目录</span>
+						<span>{{$t('EtaBasePage.add_first_menu_btn')}}</span>
 					</div>
 				</div>
 				<span class="move-btn resize" v-drag id="resize" @mousemove="dynamicNode&&resetNodeStyle(dynamicNode)">
@@ -226,22 +226,22 @@
 				<div class="detail">
 					<div class="header">
 						<el-tabs v-model="activeTab" @tab-click="rePainChart">
-							<el-tab-pane label="走势图" name="Chart">
+							<el-tab-pane :label="$t('Edb.trend_chart_tab')" name="Chart">
 							</el-tab-pane>
-							<el-tab-pane label="数据详情" name="Data">
+							<el-tab-pane :label="$t('Edb.data_detail_tab')" name="Data">
 							</el-tab-pane>
 						</el-tabs>
 						<div class="edb-tool-icon edb-tool" style="align-items: center;">
 							<el-button v-if="isEdbBtnShow('update')"
-								type="text" @click="refreshTargetHandle" >刷新</el-button>
+								type="text" @click="refreshTargetHandle" >{{$t('Edb.detail_refresh_btn')}}</el-button>
 							<el-button v-if="isEdbBtnShow('edit')"
 								type="text" :disabled="!(EdbData.Button.OpButton)"
-								@click="editNode({},EdbData)">编辑</el-button>
+								@click="editNode({},EdbData)">{{$t('Edb.detail_edit_btn')}}</el-button>
 							<!-- 指保存指标的上下限,在走势图才显示 -->
 							<el-button v-if="activeTab==='Chart'&&isEdbBtnShow('saveEdb')"
-								type="text" @click.stop="saveEdbLimit">保存</el-button>
+								type="text" @click.stop="saveEdbLimit">{{$t('Edb.detail_save_btn')}}</el-button>
 							<el-button v-if="EdbData.EdbType===2&&isEdbBtnShow('toSource')"
-								type="text" @click="toHistoryPage(selected_edbid,$route.matched);lookEdbId=selected_edbid">指标溯源</el-button>
+								type="text" @click="toHistoryPage(selected_edbid,$route.matched);lookEdbId=selected_edbid">{{$t('Edb.detail_trace_btn')}}</el-button>
 							<el-popover v-if="showPopver"
 								placement="bottom-end" 
 								trigger="hover"
@@ -249,20 +249,20 @@
 								width="300" style="display: inline-block;">
 								<div class="edb-tool-wrap">
 									<el-button v-if="isEdbBtnShow('setEn')"
-										type="text" @click="openEnNameDia">设置英文名称</el-button>
+										type="text" @click="openEnNameDia">{{$t('Edb.detail_en_btn')}}</el-button>
 									<el-button v-if="EdbData.Button.InsertNewDataButton&&isEdbBtnShow('newValue')"
-										type="text" @click.stop="updateNewestDataHandle" >{{(EdbData.DataInsertConfig.Date)?'编辑最新值':'添加最新值'}}</el-button>
+										type="text" @click.stop="updateNewestDataHandle" >{{(EdbData.DataInsertConfig.Date)?$t('Edb.detail_edit_latest'):$t('Edb.detail_add_latest')}}</el-button>
 									<el-button v-if="EdbData.EdbType===2&&isEdbBtnShow('calculateAgain')"
-										type="text" @click.stop="reCalculateHandler" :loading="calculateLoading">重新计算</el-button>
+										type="text" @click.stop="reCalculateHandler" :loading="calculateLoading">{{$t('Edb.detail_recalculate_btn')}}</el-button>
 									<el-button v-if="EdbData.EdbType===1&&isEdbBtnShow('refreshAll')"
-										type="text" @click.stop="refreshBaseHandler" :loading="refreshLoading">全部刷新</el-button>
+										type="text" @click.stop="refreshBaseHandler" :loading="refreshLoading">{{$t('Edb.detail_refresh_all')}}</el-button>
 									<el-button v-if="isEdbBtnShow('copyData')"
-										type="text" @click="copyCode">复制数据</el-button>
+										type="text" @click="copyCode">{{$t('Edb.detail_copydata_btn')}}</el-button>
 									<el-button v-if="EdbData.Button.DeleteButton&&isEdbBtnShow('deleteEdb')"
-										type="text" @click="removeNode(_,EdbData)" style="color:#C54322;">删除</el-button>
+										type="text" @click="removeNode(_,EdbData)" style="color:#C54322;">{{$t('Edb.detail_del_btn')}}</el-button>
 								</div>
 								<div class="edb-btn" slot="reference">
-									<el-button type="text">更多操作</el-button>
+									<el-button type="text">{{$t('Edb.detail_more_btn')}}</el-button>
 									<i class="el-icon-more" style="font-size: 14px;transform: rotate(90deg);cursor: pointer;color: #3375e1;"/>
 								</div>
 							</el-popover>
@@ -279,14 +279,14 @@
 								ref="createChart"
 								@editEnName="openEnNameDia"/>
 							<div class="info">
-								<span>数据来源:{{EdbData.SourceName}}</span>
-								<span>添加人:{{EdbData.SysUserRealName}}</span>
+								<span>{{$t('Edb.source')}}:{{EdbData.SourceName}}</span>
+								<span>{{$t('Edb.Creator')}}:{{EdbData.SysUserRealName}}</span>
 							</div>
 							<ul class="value-ul"
 								v-show="showTable&&dataList.length">
 								<li class="value-item" style="background-color: #EBEFF6;">
-									<span style="width:240px">日期(频度:{{EdbData.Frequency}})</span>
-									<span style="flex:1;"></span>
+									<span style="width:240px">{{$t('Edb.e_date')}}({{$t('Edb.e_fre')}}:{{EdbData.Frequency}})</span>
+									<span style="flex:1;">{{$t('Edb.e_value')}}</span>
 								</li>
 								<li class="value-item"
 									v-for="item in dataList.slice(0,3)"
@@ -597,25 +597,25 @@ export default {
 			/*表格列 */
 			tableColumsOne: [
 				{
-					label: '指标ID',
+					label: this.$t('Edb.e_id'),
 					key: 'EdbCode',
 					minwidthsty: '150px'
 				},
 				{
-					label: '指标名称',
+					label: this.$t('Edb.e_name'),
 					key: 'EdbName',
 					enKey:'EdbNameEn',
 					inputTip:'点击输入英文指标名称',
 					minwidthsty: '200px'
 				},
 				{
-					label: '频度',
+					label: this.$t('Edb.e_fre'),
 					key: 'Frequency',
 					enKey:'FrequencyEn',
 					widthsty: '100px'
 				},
 				{
-					label: '单位',
+					label: this.$t('Edb.e_unit'),
 					key: 'Unit',
 					enKey:'UnitEn',
 					inputTip:'英文单位',
@@ -623,29 +623,29 @@ export default {
 					widthsty: '100px'
 				},
 				{
-					label: '数据来源',
+					label: this.$t('Edb.source'),
 					key: 'SourceName',
 					widthsty: '160px'
 				},
 			],
 			tableColumsTwo: [
 				{
-					label: '指标目录',
+					label: this.$t('Edb.e_menu'),
 					key: 'Menu',
 					minwidthsty: '150px',
 				},
 				{
-					label: '起始时间',
+					label: this.$t('Edb.e_start_time'),
 					key: 'StartDate',
 					minwidthsty: '115px',
 				},
 				{
-					label: '更新时间',
+					label: this.$t('Edb.e_update_time'),
 					key: 'ModifyTime',
 					minwidthsty: '120px',
 				},
 				{
-					label: '添加人',
+					label: this.$t('Edb.creater'),
 					key: 'SysUserRealName',
 					widthsty: '160px',
 				}