人生啊人生 3 hónapja
szülő
commit
9fb29f21e6
1 módosított fájl, 13 hozzáadás és 1 törlés
  1. 13 1
      user_web/src/view/student/trainChapter/trainChapter.vue

+ 13 - 1
user_web/src/view/student/trainChapter/trainChapter.vue

@@ -163,6 +163,7 @@ import { courseChapter3dShow } from '@/stores/courseChapter3dShow.ts';
 import { threeWorld } from '@/stores/threeWorld.ts';
 import { uploadFileOss, getLiteMeta } from '../../../util/fileUtils';
 import { ElMessage, ElMessageBox, ElNotification } from 'element-plus';
+import { ElLoading } from 'element-plus';
 import { studentTaskPhoto } from '@/api/techer/taskStudentScore';
 
 import QvSimulationMain from "../../../components/QvSimulation/QvSimulationMain.vue";
@@ -667,11 +668,16 @@ const carCameraScreenshotEvent = (img: any) => {// CCTV实训检测三维场景
     //     "车的相机截图", img
     // );
 
+    let loading = ElLoading.service({
+        lock: true,
+        text: '上传中,请稍后……',
+        background: 'rgba(0, 0, 0, 0.7)',
+    });
+
     // 将 base64为转换成,Blob格式
     let objBlob = dataURLtoBlob(img);
     // blob 转换成 file对象
     const file = new File([objBlob], 'example.png', { type: 'text/plain' });
-
     
     // 优先上传文件
     // @ts-ignore
@@ -691,6 +697,8 @@ const carCameraScreenshotEvent = (img: any) => {// CCTV实训检测三维场景
                     //     "上传文件成功", studentTaskPhotoRes
                     // );
 
+                    loading.close();
+
                     // ElMessage({
                     //     message: '截图上传完成',
                     //     type: 'success',
@@ -718,6 +726,8 @@ const carCameraScreenshotEvent = (img: any) => {// CCTV实训检测三维场景
                     //     type: 'warning',
                     // });
 
+                    loading.close();
+
                     if (threeWorldLoadType.value == "cctv") {
 
                         courseChapter3dShow().show.showToastViewBool = false;
@@ -740,6 +750,8 @@ const carCameraScreenshotEvent = (img: any) => {// CCTV实训检测三维场景
             //     type: 'warning',
             // });
 
+            loading.close();
+
             if (threeWorldLoadType.value == "cctv") {
 
                 courseChapter3dShow().show.showToastViewBool = false;