人生啊人生 2 minggu lalu
induk
melakukan
c51f0444b9

+ 21 - 2
src/components/ThreeWorldEventQingXiCheAndQv/js/QingXiCheAdnQvCarEventStep.js

@@ -1,3 +1,4 @@
+import { QingXiCheAndQvCarEventClick } from './QingXiCheAndQvCarEventClick.js'
 
 /**
  * 操作动画停止播放和物体显示隐藏,材质,水流等逻辑
@@ -753,10 +754,28 @@ export class QingXiCheAdnQvCarEventStep {
     meshListBool = (type, meshId) => {
 
         // 现在改成当前流程是否在物体列表中了
+        // console.log(
+        //     "meshListBool = (type, meshId) => {",
+        //     QingXiCheAndQvCarEventClick.find().QingXiCheAndQvProcessEventStore.obj
+        // );
+
+        let listIndex = QingXiCheAndQvCarEventClick.find().QingXiCheAndQvProcessEventStore.obj.listIndex;
+        let list = QingXiCheAndQvCarEventClick.find().QingXiCheAndQvProcessEventStore.obj.list;
+        if (list[listIndex] == null || list[listIndex] == undefined) {
+            return false;
+        }
 
-        
-
+        // 得到当前流程的配置
+        let obj = list[listIndex];
+        // console.log( "meshListBool = (type, meshId) => { obj", obj );
+        if (typeof obj.correctAnswerMesh != 'object') {
+            return false;
+        }
 
+        if (obj.correctAnswerMesh[meshId] != null && obj.correctAnswerMesh[meshId] != undefined) {
+            return true;
+        }
+        
         return false;
 
         if (typeof type != 'string' || typeof meshId != 'string') {

+ 27 - 2
src/components/ThreeWorldEventQingXiCheAndQv/js/QingXiCheAndQvThreeWorldEvent.js

@@ -1,6 +1,7 @@
 import { ComVal } from "../common/ComVal.js";
 import { QingXiCheAndQvCarEventClick } from "../js/QingXiCheAndQvCarEventClick.js";
 import { QingXiCheAndQvComHighlightLayer } from "../js/QingXiCheAndQvComHighlightLayer.js";
+import { ElMessage, ElMessageBox } from 'element-plus';
 
 /**
  * 操作 3d场景 相关事件
@@ -190,7 +191,28 @@ export class QingXiCheAndQvThreeWorldEvent {
 
         if (thisClass.experimentMeshBool(pickResult) == true) {
 
-
+            ElMessageBox.confirm(
+                '确定进行该操作吗?',
+                '提示',
+                {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning',
+                }
+            )
+            .then(() => {
+                // ElMessage({
+                //     type: 'success',
+                //     message: 'Delete completed',
+                // })
+                QingXiCheAndQvCarEventClick.find().main(pickResult);
+            })
+            .catch(() => {
+                ElMessage({
+                    type: 'info',
+                    message: '取消成功',
+                })
+            })
 
         }
         
@@ -227,7 +249,10 @@ export class QingXiCheAndQvThreeWorldEvent {
                 for (let key in thisList.correctAnswerMesh) {
                     
                     let json = thisList.correctAnswerMesh[key];
-                    console.log("experimentMeshBool key =====>", key, json, meshId);
+                    // console.log("experimentMeshBool key =====>", key, json, meshId);
+                    if (meshId == key) {
+                        return true;
+                    }
 
                 }