人生啊人生 1 månad sedan
förälder
incheckning
c4cd5c6291

+ 3 - 0
src/components/ThreeWorldEventQingXiCheAndQv/js/QingXiCheAndQvCarEvent.js

@@ -713,6 +713,7 @@ export class QingXiCheAndQvCarEvent {
         QingXiCheAdnQvCarEventStep.find().waterShuiQiangEvent(false);
         QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
         QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('stopAll');
+        WindowEvent.find().WindowTimeStoreLook(false);
 
         if (QingXiCheAndQvCarEvent.find().eventMode != 0) {
             WindowEvent.find().WindowNotesStoreLook(true);
@@ -775,6 +776,8 @@ export class QingXiCheAndQvCarEvent {
 
         if (QingXiCheAndQvCarEvent.find().eventMode == 0) {
             QingXiCheAdnQvCarEventStep.find().meshVisibility("人物穿衣服", true);
+        } else {
+            WindowEvent.find().WindowTimeStoreLook(true);
         }
         
         objIframeEdit.cameraVisualAngleGetListNameGpsTo("穿衣服_1");

+ 19 - 9
src/components/WindowQingXiCheAndQv/WindowTime.vue

@@ -1,12 +1,27 @@
 <script setup>
 import dayjs from "dayjs";
-import { computed, onMounted, onUnmounted, ref } from "vue";
+import { computed, onMounted, onUnmounted, ref, watch } from "vue";
 import { WindowTimeStore } from "@/components/WindowQingXiCheAndQv/store/WindowTimeStore.js";
 import { ComVal } from "../ThreeWorldEventQingXiCheAndQv/common/ComVal.js";
 import { WindowEvent } from "../WindowQingXiCheAndQv/js/WindowEvent.js";
 
 WindowEvent.find().ComStore["WindowTimeStore"] = WindowTimeStore;
 
+let code = "countdownEvent";
+
+watch(
+    () => WindowTimeStore().obj.viewOpen,
+    (newVal, oldVal) => {
+
+        if (WindowTimeStore().obj.viewOpen == true) {
+            countdownEvent();
+        } else {
+            ComVal.find().fpsEventDel(code);
+        }
+        
+    }
+);
+
 /**
  * 将秒换算成 01小时01分钟01秒 这样的格式
  */
@@ -44,8 +59,7 @@ let countdownEventVal = ref("00:00:00")
  * 倒计时逻辑
  */
 const countdownEvent = () => {
-
-    let code = "countdownEvent";
+    
     let time = 60 * 60 * 1;
     
     ComVal.find().fpsEventDel(code);
@@ -72,12 +86,8 @@ onMounted(() => {
 
 <template>
     <div class="WindowTime">
-
-        <!-- <div v-if="WindowNotesStore().obj.viewOpen == true" class="main">
-            
-        </div> -->
-
-        <div class="main">
+        
+        <div v-if="WindowTimeStore().obj.viewOpen == true" class="main">
             {{ countdownEventVal }}
         </div>
         

+ 11 - 0
src/components/WindowQingXiCheAndQv/js/WindowEvent.js

@@ -338,6 +338,17 @@ export class WindowEvent {
 
     }
 
+
+    /**
+     * 是否显示倒计时
+     * open     true    显示, false 隐藏
+     */
+    WindowTimeStoreLook = function(open) {
+
+        let thisClass = this;
+        thisClass.ComStore["WindowTimeStore"]().obj.viewOpen = open;
+
+    }
     
 
 }