tangning 2 månader sedan
förälder
incheckning
67ecbef2d1
1 ändrade filer med 4 tillägg och 2 borttagningar
  1. 4 2
      src/views/device/index.vue

+ 4 - 2
src/views/device/index.vue

@@ -82,7 +82,7 @@
       [Descriptions.Item.name]: Descriptions.Item,
     },
     setup() {
-      const { t } = useI18n();
+      const { t, locale } = useI18n();
       const userStore = useUserStore();
       const getUserInfo = userStore.getUserInfo;
       const { hasPermission } = usePermission();
@@ -411,13 +411,15 @@
         });
       }
       async function getTemplate() {
+        const lang = locale.value == 'zh_CN' ? 'zh' : 'en';
         try {
-          const res = await downCameraExport();
+          const res = await downCameraExport({lang});
         } catch (error) {
           console.log('not passing', error);
         }
       }
       function handleAdd() {
+        // 打开模态框
         openModal(true, {});
       }
       function headleDetails(record: Recordable) {