Handy_Cao 1 年間 前
コミット
bae4bd6203

+ 9 - 1
public/locales/en-US.json

@@ -92,6 +92,11 @@
         "title": "Funds Information",
         "account": "Account Code",
         "accountid": "Account ID",
+        "userId": "User ID:",
+        "loginId": "Login ID:",
+        "connected": "Connected",
+        "unconnected": "unConnected",
+        "quoteservice": "Quote Service:",
         "balance": "Balance",
         "balance2": "Balance Funds",
         "currentbalance": "Current Balance",
@@ -110,7 +115,10 @@
         "tradestatus": "Trade Status",
         "riskRate": "Risk Rate",
         "riskRate1": "Risk Rate:",
-        "cutRate": "Cut Rate:"
+        "cutRate": "Cut Rate:",
+        "tips1": "RiskRate = (Occupation/NetWorth) * 100%",
+        "tips2": "CutRate = (RiskRate/CutRiskRate) * 100%",
+        "formula": "Formula"
     },
     "quote": {
         "goodsname": "Name/Code",

+ 7 - 0
public/locales/zh-CN.json

@@ -93,6 +93,11 @@
         "title": "资金信息",
         "account": "资金账户",
         "accountid": "资金账号",
+        "userId": "用户ID:",
+        "loginId": "登录ID:",
+        "connected": "已连接",
+        "unconnected": "未连接",
+        "quoteservice": "行情服务:",
         "balance": "余额",
         "balance2": "期初余额",
         "currentbalance": "期末余额",
@@ -112,6 +117,8 @@
         "riskRate": "风险率",
         "riskRate1": "风险率:",
         "cutRate": "斩仓率:",
+        "tips1": "风险率 = (占用 / 净值) * 100%",
+        "tips2": "斩仓率 = (风险率 / 斩仓风险率) * 100%",
         "formula": "公式"
     },
     "quote": {

+ 10 - 8
src/packages/pc/components/layouts/page/index.vue

@@ -45,27 +45,27 @@
       <div class="statusbar-right">
         <ul>
           <li>
-            <el-popover trigger="hover" title="公式" content="风险率 = (占用 / 净值) * 100%" :width="220">
+            <el-popover trigger="hover" :title="t('account.formula')" :content="t('account.tips1')" :width="220">
               <template #reference>
-                <span :class="accountStore.currentAccount.hazardRatioColor" style="cursor: pointer;">风险率:{{
+                <span :class="accountStore.currentAccount.hazardRatioColor" style="cursor: pointer;">{{ t('account.riskRate1') }}{{
                   parsePercent(accountStore.currentAccount.hazardRatio) }}</span>
               </template>
             </el-popover>
           </li>
           <li>
-            <el-popover trigger="hover" title="公式" content="斩仓率 = (风险率 / 斩仓风险率) * 100%" :width="280">
+            <el-popover trigger="hover" :title="t('account.formula')" :content="t('account.tips2')" :width="280">
               <template #reference>
-                <span :class="accountStore.currentAccount.hazardRatioColor" style="cursor: pointer;">斩仓率:{{
+                <span :class="accountStore.currentAccount.hazardRatioColor" style="cursor: pointer;">{{ t('account.cutRate') }}{{
                   parsePercent(accountStore.currentAccount.liquidationRate) }}</span>
               </template>
             </el-popover>
           </li>
           <li>
-            <span>用户ID:</span>
+            <span>{{ t('account.userId') }}</span>
             <span>{{ loginStore.userId }}</span>
           </li>
           <li>
-            <span>登录ID:</span>
+            <span>{{ t('account.loginId') }}</span>
             <span>{{ loginStore.loginId }}</span>
           </li>
           <li>
@@ -73,7 +73,7 @@
             <span>{{ serverTime?.format('HH:mm:ss') }}</span>
           </li>
           <li>
-            <el-tooltip :hide-after="0" :content="`行情服务:${quoteServerStatus ? '已连接' : '未连接'}`">
+            <el-tooltip :hide-after="0" :content="`${ t('account.quoteservice') }${ quoteServerStatus ? t('account.connected') : t('account.unconnected') }`">
               <i :class="['server-status', quoteServerStatus ? 'green' : 'red']"></i>
             </el-tooltip>
           </li>
@@ -90,7 +90,7 @@ import moment, { Moment } from 'moment'
 import { timerTask } from '@/utils/timer'
 import { parsePercent } from '@/filters'
 import { getServerTime } from '@/services/api/common'
-import { useGlobalStore, useLoginStore, useAccountStore } from '@/stores'
+import { useGlobalStore, useLoginStore, useAccountStore, i18n } from '@/stores'
 import eventBus from '@/services/bus'
 import quoteSocket from '@/services/websocket/quote'
 import AppIcon from '@pc/components/base/icon/index.vue'
@@ -111,6 +111,8 @@ const serverTime = ref<Moment>()
 const meta = document.getElementsByTagName('meta')
 const version = meta.namedItem('revised')?.content ?? '0'
 
+const { t } = i18n.global
+
 // 手动给组件添加 name 属性,处理缓存 exclude 无效的问题
 const handleComponent = (component: Record<'type', { name: RouteRecordName | undefined }>, route: RouteRecordNormalized) => {
   if (component) {

+ 7 - 6
src/packages/pc/views/query/inoutapply/history/index.vue

@@ -4,7 +4,7 @@
         <template #headerLeft>
             <app-filter :options="filterOptons">
                 <template #before>
-                    <el-date-picker type="daterange" effect="dark" start-placeholder="开始日期" end-placeholder="结束日期"
+                    <el-date-picker type="daterange" effect="dark" :start-placeholder="t('common.startdate')" :end-placeholder="t('common.enddate')"
                         value-format="YYYYMMDD" v-model="filterDate" />
                 </template>
             </app-filter>
@@ -31,7 +31,7 @@ import { useDataFilter } from '@/hooks/datatable'
 import { useRequest } from '@/hooks/request'
 import { queryAccountInOutApply } from '@/services/api/bank'
 import { getInOutApplyStatusName, getInOutExecuteTypeName, getInOutApplyStatusList } from '@/constants/order'
-import { useTableColumnsStore } from '@/stores'
+import { useTableColumnsStore, i18n } from '@/stores'
 import AppTable from '@pc/components/base/table/index.vue'
 import AppFilter from '@pc/components/base/table-filter/index.vue'
 
@@ -39,12 +39,13 @@ const { getTableColumns } = useTableColumnsStore()
 const { filterOptons, getQueryParams } = useDataFilter<Model.AccountInOutApplyReq>()
 const filterDate = shallowRef<string[]>([])
 const tableColumns = shallowRef<Model.TableColumn[]>([])
+const { t } = i18n.global
 
 const { loading, dataList, run } = useRequest(queryAccountInOutApply, { manual: true })
 
 filterOptons.buttonList = [
-    { lable: '重置', className: 'el-button--info', onClick: () => onSearch(true) },
-    { lable: '查询', className: 'el-button--info', onClick: () => onSearch() }
+    { lable: t('operation.reset'), className: 'el-button--info', onClick: () => onSearch(true) },
+    { lable: t('operation.search'), className: 'el-button--info', onClick: () => onSearch() }
 ]
 
 filterOptons.selectList = [
@@ -52,8 +53,8 @@ filterOptons.selectList = [
         key: 'querytype',
         selectedValue: undefined,
         options: [
-            { label: '出金', value: 1 },
-            { label: '入金', value: 2 },
+            { label: t('mine.cashin'), value: 1 },
+            { label:t('mine.cashout'), value: 2 },
         ]
     },
     {

+ 1 - 1
src/packages/pc/views/query/trade/swap/history/index.vue

@@ -30,7 +30,7 @@
             {{ formatDate(value) }}
         </template>
         <template #append v-if="pageIndex < pageCount">
-            <el-button size="small" plain @click="loadMore">加载更多</el-button>
+            <el-button size="small" plain @click="loadMore">{{ t('common.loadMore') }}</el-button>
         </template>
     </app-table>
 </template>