|
|
@@ -28,12 +28,12 @@
|
|
|
<div class="example-image flex-col"><span class="example-text">示范图片</span></div>
|
|
|
</div>
|
|
|
<div v-if="step === 1" class="action-button flex cente">
|
|
|
- <div @click="takePictures" class="check-button button--primary1 flex-col"><span class="button-text">拍照检查</span>
|
|
|
+ <div @click="takePictures" class="check-button button--primary1 flex-col"><span class="button-text" v-loading="loading">拍照检查</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div v-else class="action-button flex center">
|
|
|
- <div @click="checkConfirm" class="check-button button--white flex-col">
|
|
|
+ <div @click="checkConfirm(false)" class="check-button button--white flex-col">
|
|
|
<span class="button-text cu-p">重新拍照检查</span>
|
|
|
</div>
|
|
|
<router-link class="mar-left-20 " :to="{
|
|
|
@@ -51,7 +51,7 @@
|
|
|
</div>
|
|
|
|
|
|
<hardware-check
|
|
|
- @confirm="checkConfirm"
|
|
|
+ @confirm="checkConfirm(true)"
|
|
|
/>
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
@@ -80,11 +80,15 @@ const previewKey = ref(0)
|
|
|
const preview = ref(digiCamControlWEB+'liveview.jpg')
|
|
|
|
|
|
const step = ref(1)
|
|
|
-function checkConfirm(){
|
|
|
+function checkConfirm(init){
|
|
|
step.value =1
|
|
|
- menu.push({
|
|
|
- type:'setting'
|
|
|
- })
|
|
|
+ if(menu.length === 0){
|
|
|
+ menu.push({
|
|
|
+ type:'setting'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(!init) previewKey.value++;
|
|
|
+
|
|
|
showVideo()
|
|
|
}
|
|
|
|
|
|
@@ -121,6 +125,7 @@ function hideVideo(){
|
|
|
|
|
|
}
|
|
|
|
|
|
+const loading = ref(false)
|
|
|
|
|
|
function takePictures() {
|
|
|
if (clientStore.isClient) {
|
|
|
@@ -128,12 +133,15 @@ function takePictures() {
|
|
|
clientStore.ipc.send(icpList.camera.takePictures);
|
|
|
clientStore.ipc.on(icpList.camera.takePictures, async (event, result) => {
|
|
|
|
|
|
-
|
|
|
+ if(interval) clearInterval(interval)
|
|
|
+ loading.value = true;
|
|
|
+ imageUrlkey.value++;
|
|
|
setTimeout(()=>{
|
|
|
hideVideo()
|
|
|
step.value = 2
|
|
|
imageUrlkey.value++;
|
|
|
- },5000)
|
|
|
+ loading.value = false;
|
|
|
+ },8000)
|
|
|
})
|
|
|
}
|
|
|
}
|