人生啊人生 hace 3 meses
padre
commit
42fb1e2bbd
Se han modificado 1 ficheros con 15 adiciones y 20 borrados
  1. 15 20
      user_web/src/view/student/trainChapter/trainChapter.vue

+ 15 - 20
user_web/src/view/student/trainChapter/trainChapter.vue

@@ -63,6 +63,7 @@
         <!-- 3d组件放在这里,让它可以隐藏起来,提前加载好场景。要不然后续切换3d场景每次要重新加载,比较麻烦 -->
         <!-- <div v-show="state.hasRead && state.showCnt && state.currentChapter.type == 30" class="chapter-3d"> -->
         <div v-if="courseChapter3dViewBool == true" class="chapter-3d">
+            <!-- CCTV实训检测三维场景逻辑 -->
             <div v-show="state.hasRead && state.showCnt && state.currentChapter.type == 30">
                 <CourseChapter3d
                     :config="state?.currentChapter ?? ''"
@@ -119,8 +120,6 @@ const state: anyObj = reactive({
     lastChapterNum: -1,
 });
 
-// 播放声音
-let objAudio =  new ModelHtml5Audio();
 let chapterQueue: Array<Array<anyObj>> = [];
 let maxChapterNum = 0;
 // 获取当前学生任务ID缺陷列表
@@ -275,20 +274,10 @@ const initTips = () => {
     }
 };
 let studyInterval: NodeJS.Timeout;
-// 开场音乐
-let musicIndex = new URL("./../../../assets/music/index.mp3", import.meta.url).href;
-onMounted(() => {
-
-    // // 第一次进来播放指定的声音
-    // objAudio.pause();
-    // // 设置播放音乐的文件,或者地址
-    // objAudio.setUrl(musicIndex);
-    // // 不需要循环播放
-    // objAudio.loopClose();
-    // // 继续播放音乐
-    // objAudio.start();
 
-    threeWorld().loadSuccess = false;
+onMounted(() => {
+    
+    threeWorld().loadSuccess = false;// CCTV实训检测三维场景逻辑
     courseChapter3dViewBool.value = false;
 
     //学习时间上报
@@ -381,6 +370,7 @@ watch(
 );
 
 /**
+ * // CCTV实训检测三维场景逻辑
  * 检测实训注意事项 知道了点击回调
  */
 courseChapter3dShow().show.showMatterGotItCallback = function () {
@@ -393,6 +383,7 @@ courseChapter3dShow().show.showMatterGotItCallback = function () {
 };
 
 /**
+ * // CCTV实训检测三维场景逻辑
  * 监听弹出提示隐藏后来触发不同的逻辑
  */
 watch(
@@ -417,9 +408,10 @@ watch(
 );
 
 // 记录 tipsBtnsUpOpenEvent 事件是否显示上一步按钮
-let tipsBtnsUpOpenEventBool: Boolean = true;
+let tipsBtnsUpOpenEventBool: Boolean = true;// CCTV实训检测三维场景逻辑
 
 /**
+ * // CCTV实训检测三维场景逻辑
  * 上一步是否显示
  * open     true - 显示, false - 隐藏
  */
@@ -430,9 +422,10 @@ const tipsBtnsUpOpenEvent = (open: Boolean) => {
 };
 
 // 记录 tipsBtnsUpOpenEvent 事件是否显示下一步按钮
-let tipsBtnsDownOpenEventBool: Boolean = true;
+let tipsBtnsDownOpenEventBool: Boolean = true;// CCTV实训检测三维场景逻辑
 
 /**
+ * // CCTV实训检测三维场景逻辑
  * 下一步是否显示
  * open     true - 显示, false - 隐藏
  */
@@ -443,6 +436,7 @@ const tipsBtnsDownOpenEvent = (open: Boolean) => {
 };
 
 /**
+ * // CCTV实训检测三维场景逻辑
  * 通过3d传来的事件来控制上一步下一步是否显示逻辑
  */
 const tipsBtnsUpAndDownOpenEvent = () => {
@@ -483,7 +477,7 @@ const tipsBtnsUpAndDownOpenEvent = () => {
 };
 
 // 操作帮助点击退出
-const showOperationHelpExitEvent = () => {
+const showOperationHelpExitEvent = () => {// CCTV实训检测三维场景逻辑
     // 触发下一步逻辑
     nextStep();
 };
@@ -491,7 +485,7 @@ const showOperationHelpExitEvent = () => {
 /**
  * 车的完成下井实验
  */
-const carShutDownEvent = () => {
+const carShutDownEvent = () => {// CCTV实训检测三维场景逻辑
     // 触发下一步逻辑
     nextStep();
 };
@@ -500,7 +494,7 @@ const carShutDownEvent = () => {
  * 车的相机截图
  * img       base64位图片
  */
-const carCameraScreenshotEvent = (img: any) => {
+const carCameraScreenshotEvent = (img: any) => {// CCTV实训检测三维场景逻辑
     // console.log(
     //     "车的相机截图", img
     // );
@@ -579,6 +573,7 @@ const dataURLtoBlob = (dataurl: any) => {
     }
     return new Blob([u8arr], { type: mime });
 };
+
 </script>
 <style lang="scss" scoped>
 .chapter-container {