人生啊人生 2 weeks ago
parent
commit
cde5202864

+ 44 - 5
user_web/src/components/student/courseChapter3d/showDownHole.vue

@@ -36,14 +36,53 @@ const submitEvent = () => {
             return;
         }
     }
+    
+    // console.log(
+    //     "提交保存的表单 ---",
+    //     courseChapter3dShow().show.taskId,
+    //     courseChapter3dShow().show.studentTaskId,
+    //     courseChapter3dShow().show.showDownHoleConfig
+    // );
 
+    let submit = {
+        studentTaskId : courseChapter3dShow().show.studentTaskId,
+        // 任务名称/编号
+        taskName : courseChapter3dShow().show.showDownHoleConfig.taskName,
+        // 检测地点
+        testingSite : courseChapter3dShow().show.showDownHoleConfig.location,
+        // 井号
+        hashSign : courseChapter3dShow().show.showDownHoleConfig.hashSign,
+        // 检测方向
+        detectionDirection : courseChapter3dShow().show.showDownHoleConfig.detectionDirection,
+        // 管道类型
+        pipeType : courseChapter3dShow().show.showDownHoleConfig.pipeType,
+        // 材质
+        material : courseChapter3dShow().show.showDownHoleConfig.material,
+        // 管径
+        pipeDiameter : courseChapter3dShow().show.showDownHoleConfig.pipeDiameter,
+    };
+
+    studentTaskFoundationAdd(submit).then(res => {
+
+        courseChapter3dShow().show.showDownHoleViewOpen = false;
+        if (typeof courseChapter3dShow().show.showDownHoleCallback == 'function') {
+            courseChapter3dShow().show.showDownHoleCallback("yes");
+        }
+        
+    }).catch(error => {
 
-    
+        courseChapter3dShow().show.showDownHoleViewOpen = false;
+        if (typeof courseChapter3dShow().show.showDownHoleCallback == 'function') {
+            courseChapter3dShow().show.showDownHoleCallback("yes");
+        }
 
-    courseChapter3dShow().show.showDownHoleViewOpen = false;
-    if (typeof courseChapter3dShow().show.showDownHoleCallback == 'function') {
-        courseChapter3dShow().show.showDownHoleCallback("yes");
-    }
+    });
+
+
+    // courseChapter3dShow().show.showDownHoleViewOpen = false;
+    // if (typeof courseChapter3dShow().show.showDownHoleCallback == 'function') {
+    //     courseChapter3dShow().show.showDownHoleCallback("yes");
+    // }
     
 }
 

+ 4 - 0
user_web/src/stores/courseChapter3dShow.ts

@@ -419,6 +419,10 @@ export const courseChapter3dShow = defineStore('courseChapter3dShow', () => {
             show.value.showDownHoleViewOpen = true;
 
         },
+
+        // 记录当前三维用到的参数
+        taskId : null,
+        studentTaskId : null,
         
     });
     

+ 4 - 2
user_web/src/view/student/trainChapter/trainChapter.vue

@@ -205,8 +205,6 @@ const state: anyObj = reactive({
     lastChapterNum: -1,
 });
 
-console.log("url的 参数 ", taskId, studentTaskId);
-
 // 地下车是否可以展示
 let CarSimulationMainLook = ref(true);
 // QV检测是否可以展示
@@ -428,6 +426,10 @@ const initTips = () => {
 let studyInterval: NodeJS.Timeout;
 
 onMounted(() => {
+
+    // console.log("url的 参数 ", taskId, studentTaskId);
+    courseChapter3dShow().show.taskId = taskId;
+    courseChapter3dShow().show.studentTaskId = studentTaskId;
     
     threeWorld().loadSuccess = false;// CCTV实训检测三维场景逻辑
     courseChapter3dViewBool.value = false;