|
|
@@ -315,7 +315,7 @@
|
|
|
<template #footer>
|
|
|
<div class="btn-row">
|
|
|
<div class="normal-btn" @click="dialogVisible = false">关闭</div>
|
|
|
- <!-- <div class="primary-btn" @click="testShoesFlip">拍照测试</div> -->
|
|
|
+ <div class="primary-btn" v-loading="captureLoading" @click="testShoesFlip">拍照测试</div>
|
|
|
<div class="primary-btn" @click="saveRow">保存并关闭</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -339,8 +339,9 @@ import client from "@/stores/modules/client";
|
|
|
import icpList from '@/utils/ipc';
|
|
|
const clientStore = client();
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
|
|
-
|
|
|
+import { digiCamControlWEB } from '@/utils/appconfig'
|
|
|
import { useCheckInfo } from '@/composables/userCheck';
|
|
|
+import { preview } from '@planckdev/element-plus/utils'
|
|
|
useCheckInfo();
|
|
|
|
|
|
// 路由和状态管理初始化
|
|
|
@@ -811,9 +812,33 @@ async function changeNum(type, min, max) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-</script>
|
|
|
|
|
|
+/*测试拍照*/
|
|
|
+const captureLoading = ref(false)
|
|
|
+const imageUrl = ref(digiCamControlWEB+'preview.jpg')
|
|
|
+const imageUrlkey = ref(0)
|
|
|
+function testShoesFlip(){
|
|
|
+ if (clientStore.isClient) {
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.camera.takePictures);
|
|
|
+ clientStore.ipc.send(icpList.camera.takePictures,false);
|
|
|
+ clientStore.ipc.on(icpList.camera.takePictures, async (event, result) => {
|
|
|
+ captureLoading.value = true;
|
|
|
+ setTimeout(()=>{
|
|
|
+ imageUrlkey.value++;
|
|
|
+ preview(imageUrl.value+'?key='+imageUrlkey.value)
|
|
|
+ captureLoading.value = false;
|
|
|
+ },5000)
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+</script>
|
|
|
|
|
|
+<style lang="scss">
|
|
|
+.el-image-viewer__wrapper{
|
|
|
+ z-index: 9999 !important;
|
|
|
+}
|
|
|
+</style>
|
|
|
<style lang="scss" scoped>
|
|
|
body {
|
|
|
background: #EAECED;
|