Ver código fonte

feat: 完善多语言

Jack Zhou 1 semana atrás
pai
commit
d7162e6067

+ 30 - 28
src/views/MultilingualConfig/src/MultilingualConfig.vue

@@ -31,10 +31,10 @@ const tabList = ref([
     type: 'traditionalChinese',
     statusKey: 'traditionalChineseStatus'
   },
-  { name: 'Français', checked: false, number: 0, type: 'french', statusKey: 'frenchStatus' },
-  { name: 'Español', checked: false, number: 0, type: 'spanish', statusKey: 'spanishStatus' },
+  { name: 'French', checked: false, number: 0, type: 'french', statusKey: 'frenchStatus' },
+  { name: 'Spanish', checked: false, number: 0, type: 'spanish', statusKey: 'spanishStatus' },
   {
-    name: 'Português',
+    name: 'Portuguese',
     checked: false,
     number: 0,
     type: 'portuguese',
@@ -88,15 +88,15 @@ const columnList = computed(() => {
         column.field = 'traditionalChinese'
         break
       case 'frenchStatus':
-        column.title = 'Français'
+        column.title = 'French'
         column.field = 'french'
         break
       case 'spanishStatus':
-        column.title = 'Español'
+        column.title = 'Spanish'
         column.field = 'spanish'
         break
       case 'portugueseStatus':
-        column.title = 'Português'
+        column.title = 'Portuguese'
         column.field = 'portuguese'
         break
     }
@@ -189,6 +189,8 @@ const tableData = ref<VxeGridProps<RowItem>>({
   border: true,
   round: true,
   columns: [],
+  // scrollY: { enabled: true, gt: 20 },
+
   cellConfig: {
     // minHeight: 62
   },
@@ -198,23 +200,7 @@ const tableData = ref<VxeGridProps<RowItem>>({
   emptyText: ' '
 })
 
-const originalTableData = ref([
-  {
-    key: 'username',
-    traditionalChinese: '用戶名', // 繁体中文
-    traditionalChineseStatus: 0, // 0: 未审核, 1: 已审核, 2: 已修改
-    simplifiedChinese: '用户名', // 简体中文
-    simplifiedChineseStatus: 0, // 0: 未审核, 1: 已审核, 2: 已修改
-    english: 'Username', // 英文
-    englishStatus: 0, // 0: 未审核, 1: 已审核, 2: 已修改
-    french: "Nom d'utilisateur", // 法语
-    frenchStatus: 0, // 0: 未审核, 1: 已审核, 2: 已修改
-    spanish: 'Nombre de usuario', // 西班牙语
-    spanishStatus: 0, // 0: 未审核, 1: 已审核, 2: 已修改
-    portuguese: 'Nome de usuário', // 葡萄牙语
-    portugueseStatus: 0 // 0: 未审核, 1: 已审核, 2: 已修改
-  }
-])
+const originalTableData = ref([])
 const variableTableData = ref([])
 
 const showTableData = computed(() => {
@@ -315,8 +301,14 @@ const handleEdit = (rowIndex: number, field: EditableField, value: string) => {
   currentEditor.value = { rowIndex, field }
   currentEditorValue.value = value
 }
-const handleComfirmEdit = (rowIndex: number, field: EditableField) => {
-  showTableData.value[rowIndex][field] = currentEditorValue.value
+const handleComfirmEdit = (
+  rowIndex: number,
+  field: EditableField,
+  onlyUpdateState: boolean = false
+) => {
+  if (!onlyUpdateState) {
+    showTableData.value[rowIndex][field] = currentEditorValue.value
+  }
   showTableData.value[rowIndex][field + 'Status'] = 1
   currentEditor.value = { rowIndex: null, field: null }
   currentEditorValue.value = ''
@@ -500,11 +492,21 @@ onUnmounted(() => {
               <span>{{ row[column.field as EditableField] }}</span>
             </div>
             <div
-              class="unverified-tag"
               v-if="row[(column.field as EditableField) + 'Status'] === 0"
+              style="display: flex; justify-content: space-between; align-items: center"
             >
-              <span class="font_family icon-icon_delay_b" style="font-size: 14px"></span>
-              <span style="display: inline-block; margin-top: 2px">Unverified</span>
+              <div class="unverified-tag">
+                <span class="font_family icon-icon_delay_b" style="font-size: 15px"></span>
+                <span style="display: inline-block; margin-top: 2px">Unverified</span>
+              </div>
+              <el-button
+                class="el-button--main"
+                style="width: 57px; height: 24px"
+                @click="handleComfirmEdit(rowIndex, column.field as EditableField, true)"
+              >
+                <span class="font_family icon-icon_confirm_b" style="font-size: 14px"></span>
+                <span style="font-size: 12px">Verify</span>
+              </el-button>
             </div>
             <div class="verified-tag" v-if="row[(column.field as EditableField) + 'Status'] === 1">
               <span class="font_family icon-icon_active" style="font-size: 9px"></span>

+ 1 - 1
src/views/Tracking/src/components/TrackingTable/src/TrackingTable.vue

@@ -586,7 +586,7 @@ defineExpose({
     element-loading-background="rgb(43, 47, 54, 0.7)"
   >
     <div class="table-tools">
-      <div class="left-total-records">{{ selectedNumber }} t('booking.selected')</div>
+      <div class="left-total-records">{{ selectedNumber }} {{ t('booking.selected') }}</div>
       <div class="right-tools-btn">
         <el-popover
           trigger="click"