Browse Source

Merge branch 'feature/1.5.3-update-20240318' into languages/es

# Conflicts:
#	src/views/ncs-orginazition/components/partInfoEdit.vue
vothin 1 năm trước cách đây
mục cha
commit
6a4b4a1657

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/index.html


+ 2 - 0
languages/en.js

@@ -1636,5 +1636,7 @@ module.exports = {
     inputFileAddress: 'Please enter a file storage address',
     inputMysqlAddress: 'Please enter the address of the MySQL server',
     deleteSqlMsg: 'The data is not recoverable after the deletion operation, are you sure you want to delete this data?',
+    choiceTimeZone: 'Select Time Zone',
+    choiceLanguage: 'Select language'
   }
 }

+ 2 - 0
languages/es.js

@@ -1636,5 +1636,7 @@ module.exports = {
     inputFileAddress: 'Introduzca una dirección de almacenamiento de archivos',
     inputMysqlAddress: 'Introduzca la dirección del servidor MySQL',
     deleteSqlMsg: 'Los datos no se pueden recuperar después de la operación de eliminación, ¿está seguro de que desea eliminar estos datos?',
+    choiceTimeZone: 'Elegir zona horaria',
+    choiceLanguage: 'Elegir idioma'
   }
 }

+ 2 - 0
languages/ru-RU.js

@@ -1636,5 +1636,7 @@ module.exports = {
     inputFileAddress: 'Пожалуйста, введите адрес хранения файлов',
     inputMysqlAddress: 'Пожалуйста, введите адрес сервера MySQL',
     deleteSqlMsg: 'Данные не подлежат восстановлению после операции удаления, вы уверены, что хотите удалить эти данные?',
+    choiceTimeZone: 'Выберите часовой пояс',
+    choiceLanguage: 'Выбор языка'
   }
 }

+ 2 - 0
languages/zh-CN.js

@@ -1636,5 +1636,7 @@ module.exports = {
     inputFileAddress: '请输入文件存储地址',
     inputMysqlAddress: '请输入mysql服务器地址',
     deleteSqlMsg: '删除操作后数据不可复原,您确定要删除此数据?',
+    choiceTimeZone: '选择时区',
+    choiceLanguage: '选择语言'
   }
 }

+ 10 - 0
src/utils/enum/LanguageTypeEnum.js

@@ -0,0 +1,10 @@
+import createEnum from '@/utils/enum/createEnum'
+
+export const LANGUAGE_TYPE = createEnum(
+  {
+    CN: ['cn', '中文简体'],
+    EN: ['en', 'English'],
+    ES: ['es', 'Español'],
+    RU: ['ru', 'Русский']
+  }
+)

+ 32 - 0
src/utils/enum/TimeZoneTypeEnum.js

@@ -0,0 +1,32 @@
+import createEnum from '@/utils/enum/createEnum'
+
+export const TIME_ZONE_TYPE = createEnum(
+  {
+    UTC0: ['Africa/Lome', 'UTC+0'],
+    UTC1: ['Africa/Luanda', 'UTC+1'],
+    UTC2: ['Africa/Kigali', 'UTC+2'],
+    UTC3: ['Europe/Moscow', 'UTC+3'],
+    UTC4: ['Europe/Astrakhan', 'UTC+4'],
+    UTC5: ['Asia/Karachi', 'UTC+5'],
+    UTC6: ['Asia/Dhaka', 'UTC+6'],
+    UTC7: ['Asia/Ho_Chi_Minh', 'UTC+7'],
+    UTC8: ['Asia/Shanghai', 'UTC+8'],
+    UTC9: ['Asia/Seoul', 'UTC+9'],
+    UTC10: ['Asia/Ust-Nera', 'UTC+10'],
+    UTC11: ['Asia/Magadan', 'UTC+11'],
+    UTC12: ['Asia/Anadyr', 'UTC+12'],
+    UTC13: ['Pacific/Apia', 'UTC+13'],
+    UTC14: ['Pacific/Kiritimati', 'UTC+14'],
+    UTC_1: ['Atlantic/Cape_Verde', 'UTC-1'],
+    UTC_2: ['America/Noronha', 'UTC-2'],
+    UTC_3: ['America/Sao_Paulo', 'UTC-3'],
+    UTC_4: ['America/Montserrat', 'UTC-4'],
+    UTC_5: ['America/Bogota', 'UTC-5'],
+    UTC_6: ['America/Merida', 'UTC-6'],
+    UTC_7: ['America/Creston', 'UTC-7'],
+    UTC_8: ['Pacific/Pitcairn', 'UTC-8'],
+    UTC_9: ['Pacific/Gambier', 'UTC-9'],
+    UTC_10: ['Pacific/Honolulu', 'UTC-10'],
+    UTC_11: ['Pacific/Midway', 'UTC-11']
+  }
+)

+ 24 - 0
src/views/ncs-orginazition/components/partInfoEdit.vue

@@ -777,6 +777,26 @@
               </el-form-item>
             </el-col>
 
+            <el-col :span="8">
+              <el-form-item :label="this.$t('zy20240205.choiceTimeZone')" prop="time_zone">
+                <el-select v-model="formmodel.time_zone"
+                           :placeholder="this.$t('zy20240205.choiceTimeZone')"
+                           filterable clearable>
+                  <el-option v-for="(item,index) in timeZoneType" :key="index" :label="item.key" :value="item.value" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item :label="this.$t('zy20240205.choiceLanguage')" prop="language">
+                <el-select v-model="formmodel.language"
+                           :placeholder="this.$t('zy20240205.choiceLanguage')"
+                           filterable clearable>
+                  <el-option v-for="(item,index) in languageType" :key="index" :label="item.key" :value="item.value" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+
 <!--            <el-col :span="8" v-if="isShow">-->
 <!--              <el-form-item :label="this.$t('action.excelUpload')">-->
 <!--                <el-upload-->
@@ -821,6 +841,8 @@ import * as API_Device from '@/api/ncs_device'
 import * as API_Excel from "@/api/ncs_excel";
 import moment from  'moment'
 import {SERIAL_TYPE} from "@/utils/enum/SerialTypeEnum";
+import {TIME_ZONE_TYPE} from "@/utils/enum/TimeZoneTypeEnum";
+import {LANGUAGE_TYPE} from "@/utils/enum/LanguageTypeEnum";
 const serverUrl = domain.serverUrl
 const DeviceUrl = domain.DeviceUrl
 export default {
@@ -856,6 +878,8 @@ export default {
       excelUploadUrl: DeviceUrl + '/ncs/excel/upload/' + this.partId,
       excelUploadDemo: serverUrl + '/upload/excel/demo/excel_demo.xlsx',
       serialType: SERIAL_TYPE.getKeyValueList(),
+      timeZoneType: TIME_ZONE_TYPE.getKeyValueList(),
+      languageType: LANGUAGE_TYPE.getKeyValueList(),
     }
   },
   async mounted() {