Handy_Cao 1 gadu atpakaļ
vecāks
revīzija
c014b0d21e

+ 2 - 1
src/packages/pc/views/footer/capital/statement/index.vue

@@ -2,7 +2,7 @@
 <template>
     <app-table :data="tableList" v-model:columns="tableColumns" :loading="loading">
         <!-- 操作类型 -->
-        <template #operatetypename="{ row }" v-if="i18n.global.locale === 'zh-CN'">
+        <template #operatetypename="{ row }">
             {{ operatetypename(row) }}
         </template>
         <!-- 委托时间 -->
@@ -33,6 +33,7 @@ const { loading } = useRequest(queryAmountLog, {
 const { t } = i18n.global
 
 const operatetypename = ((row: Model.AmountLogRsp) => {
+    console.log(row, i18n.global.locale)
     switch (i18n.global.locale) {
         case "zh-CN":
             return row.operatetypename

+ 15 - 17
src/packages/pc/views/query/capital/list/index.vue

@@ -20,21 +20,9 @@
         <template #createtime="{ value }">
             {{ formatDate(value) }}
         </template>
-        <!-- 操作类型 -->
-        <template #operatetypename="{ value }" v-if="i18n.global.locale === 'zh-CN'">
-            {{ value }}
-        </template>
-         <!-- 操作类型 -->
-         <template #operatetypename_tw="{ value }" v-if="i18n.global.locale === 'zh-TW'">
-            {{ value }}
-        </template>
-         <!-- 操作类型 -->
-         <template #operatetypenameen="{ value }" v-if="i18n.global.locale === 'en-US'">
-            {{ value }}
-        </template>
          <!-- 操作类型 -->
-         <template #operatetypenameth="{ value }" v-if="i18n.global.locale === 'th'">
-            {{ value }}
+         <template #operatetypename="{ row }">
+            {{ operatetypename(row) }}
         </template>
         <template #append v-if="showLoadMore">
             <el-button size="small" plain @click="loadMore">{{ t('common.loadMore') }}</el-button>
@@ -63,12 +51,22 @@ const { loading, dataList, run } = useRequest(queryAmountLog, {
 
 const { t } = i18n.global
 
+const operatetypename = ((row: Model.AmountLogRsp) => {
+    switch (i18n.global.locale) {
+        case "zh-CN":
+            return row.operatetypename
+        case "zh-TW":
+            return row.operatetypename_tw
+        case "en-US":
+            return row.operatetypenameen
+        default:
+            return row.operatetypenameth
+    }
+})
+
 const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'accountid', label: 'banksign.capital.accountid' },
     { field: 'operatetypename', label: 'banksign.capital.operatetypename' },
-    { field: 'operatetypename_tw', label: 'banksign.capital.operatetypename' },
-    { field: 'operatetypenameen', label: 'banksign.capital.operatetypename' },
-    { field: 'operatetypenameth', label: 'banksign.capital.operatetypename' },
     { field: 'amount', label: 'banksign.capital.amount' },
     { field: 'createtime', label: 'banksign.capital.createtime' }
 ])