panqiuyao 7 месяцев назад
Родитель
Сommit
72b447c337

+ 0 - 1
build/extraResources/read.txt

@@ -1 +0,0 @@
-建议第三方软件放置在此目录中,打包时会将资源加入安装包内。

+ 10 - 0
frontend/src/stores/modules/check.ts

@@ -122,6 +122,8 @@ export const checkInfo = defineStore('checkInfo', () => {
 
     }
 
+    //第二次才算mcu正在失败
+    const mcuErrorCount = ref(0);
     // 通用设备检查函数
     const checkDevice = async (deviceName: string, messageType: string) => {
         try {
@@ -155,6 +157,14 @@ export const checkInfo = defineStore('checkInfo', () => {
                             }
                         }
                         if([-1,0].includes(result.status)){
+                            if(result.status === -1 ){
+                                if(mcuErrorCount.value  === 0){
+                                    mcuErrorCount.value++;
+                                    return;
+                                }else{
+                                    mcuErrorCount.value = 0
+                                }
+                            }
                             devices[deviceName].status = result.status;
                             devices[deviceName].msg = result.msg;
                         }

+ 4 - 2
frontend/src/views/Photography/check.vue

@@ -21,9 +21,9 @@
                 </span>
             </div>
             <div class="camera-preview  flex col center ">
-              <span v-if="step === 1" class="fs-14">
+              <template v-if="step === 1">
                  <img v-if="previewKey" class="camera-img" :src="preview+'?key='+previewKey" />
-              </span>
+              </template>
               <template v-if="step === 2" >
                 <img class="camera-img" :src="imageUrl+'?key='+imageUrlkey" />
                 <span  class="camera-description">这是一张用于检查镜头是否合适的测试图</span>
@@ -280,6 +280,8 @@ onBeforeUnmount(() => {
 
           .camera-img {
             width: 100%;
+            height: 100%;
+            object-fit:contain;
 
           }
           .example-image {