人生啊人生 2 months ago
parent
commit
82696540af
1 changed files with 88 additions and 0 deletions
  1. 88 0
      src/components/ThreeWorldEventQingXiCheAndQv/QingXiCheAndQvMain.vue

+ 88 - 0
src/components/ThreeWorldEventQingXiCheAndQv/QingXiCheAndQvMain.vue

@@ -30,6 +30,9 @@ const callbackProcessEvent = (json) => {
     
     let type = json["type"];
     let config = json["config"];
+
+    console.log("清洗车 或者 QV 的 当前切换到的步骤", config);
+
     // 进入触发当前步骤的逻辑
     QingXiCheAndQvCarEvent.find().typeEvent(config.name);
 
@@ -180,7 +183,10 @@ watch(
         if (CommonVal().loadSuccess == true) {
 
             setTimeout(function() {
+                
                 QingXiCheEventInit();
+                // QvEventInit();
+
             }, 2000);
             
         }
@@ -194,16 +200,98 @@ watch(
 const QingXiCheEventInit = () => {
     ComReturnCallbackExit();
     console.log("初始化 清洗车 的逻辑 ===>");
+    QingXiCheStepUpdate("仿真模拟");
+}
+
+/**
+ * 清洗车
+ * 根据指定进度的名字,切换到对应步骤逻辑
+ */
+const QingXiCheStepUpdate = (name) => {
 
+    // // 自动触发到第1个步骤
+    // QingXiCheAndQvProcessEventStore().obj.listIndex = 0;
+    
+    // 循环找到指定名字的流程,来开始
+    for (let processEventStoreListI = 0; processEventStoreListI < QingXiCheAndQvProcessEventStore().obj.list.length; processEventStoreListI++) {
+        let thisList = QingXiCheAndQvProcessEventStore().obj.list[processEventStoreListI];
+        if (thisList.name == name) {
+        // if (thisList.name == "仿真模拟") {
+        // if (thisList.name == "下车确定安全灯显示是否正常") {
+            QingXiCheAndQvProcessEventStore().obj.listIndex = processEventStoreListI;
+        }
+    }
+    
+    // 进入触发当前步骤的逻辑
+    QingXiCheAndQvCarEvent.find().typeEvent(
+        QingXiCheAndQvProcessEventStore().obj.list[QingXiCheAndQvProcessEventStore().obj.listIndex].name
+    );
+
+    // 上一步按钮是否展示
+    QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallback = function(openBool) {
+        QingXiCheAndQvProcessEventStore().obj.btnUp = openBool;
+    };
+
+    // 下一步按钮是否展示
+    QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallback = function(openBool) {
+        QingXiCheAndQvProcessEventStore().obj.btnDown = openBool;
+    };
+
+    setTimeout(function() {
+        QingXiCheAndQvThreeWorldEventMain.find().commonBirthplaceUpdate();
+    }, 1600);
+    
 }
 
+
+
 /**
  * 初始化 QV检测 的逻辑
  */
 const QvEventInit = () => {
     ComReturnCallbackExit();
+    QvStepUpdate("数字修复虚拟仿真-将阀门关闭停止水流");
 }
 
+/**
+ * Qv
+ * 根据指定进度的名字,切换到对应步骤逻辑
+ */
+const QvStepUpdate = (name) => {
+
+    // 循环找到指定名字的流程,来开始
+    for (let processEventStoreListI = 0; processEventStoreListI < QingXiCheAndQvProcessEventStore().obj.list.length; processEventStoreListI++) {
+        let thisList = QingXiCheAndQvProcessEventStore().obj.list[processEventStoreListI];
+        // if (thisList.name == "数字修复虚拟仿真-将橡胶垫片放置到正确的位置") {
+        if (thisList.name == name) {
+        // if (thisList.name == "数字修复虚拟仿真-将阀门关闭停止水流") {
+            QingXiCheAndQvProcessEventStore().obj.listIndex = processEventStoreListI;
+        }
+    }
+    
+    // 进入触发当前步骤的逻辑
+    QingXiCheAndQvCarEvent.find().typeEvent(
+        QingXiCheAndQvProcessEventStore().obj.list[QingXiCheAndQvProcessEventStore().obj.listIndex].name
+    );
+
+    // 上一步按钮是否展示
+    QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallback = function(openBool) {
+        QingXiCheAndQvProcessEventStore().obj.btnUp = openBool;
+    };
+
+    // 下一步按钮是否展示
+    QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallback = function(openBool) {
+        QingXiCheAndQvProcessEventStore().obj.btnDown = openBool;
+    };
+
+    QingXiCheAndQvProcessEventStore().obj.btnUp = false;
+    QingXiCheAndQvProcessEventStore().obj.btnDown = false;
+
+    setTimeout(function() {
+        QingXiCheAndQvThreeWorldEventMain.find().commonBirthplaceUpdate();
+    }, 1600);
+
+}
 
 </script>