材料站出库OCR识别优化
This commit is contained in:
parent
245752055d
commit
07107dffc5
|
|
@ -53,9 +53,9 @@
|
|||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</view>
|
||||
<div style="width: 100%">
|
||||
<ElectronicSeal :maCode="codeData?.maCode" :maId="codeData?.maId" :devType="queryParams?.jiJuType" />
|
||||
</div>
|
||||
<!-- <div style="width: 100%">-->
|
||||
<!-- <ElectronicSeal :maCode="codeData?.maCode" :maId="codeData?.maId" :devType="queryParams?.jiJuType" />-->
|
||||
<!-- </div>-->
|
||||
|
||||
<button type="primary" style="margin-top: 20px" @click="addCode">添加编码</button>
|
||||
</view>
|
||||
|
|
@ -106,10 +106,10 @@
|
|||
<script>
|
||||
import { decryptWithSM4 } from '@/utils/sm'
|
||||
import { getInfoByCodeApi } from '@/services/picking/outbound'
|
||||
import ElectronicSeal from '@/components/ElectronicSeal/index.vue'
|
||||
// import ElectronicSeal from '@/components/ElectronicSeal/index.vue'
|
||||
|
||||
export default {
|
||||
components: { ElectronicSeal },
|
||||
// components: { ElectronicSeal },
|
||||
data() {
|
||||
return {
|
||||
showCamera: false,
|
||||
|
|
@ -136,6 +136,8 @@ export default {
|
|||
focusTimeout: null,
|
||||
// 设备信息
|
||||
systemInfo: null,
|
||||
screenHeight: null,
|
||||
screenWidth: null,
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
|
|
@ -205,6 +207,11 @@ export default {
|
|||
const systemInfo = uni.getSystemInfoSync()
|
||||
console.log('设备信息:', systemInfo)
|
||||
this.systemInfo = systemInfo
|
||||
// 获取屏幕高度和宽度
|
||||
const screenHeight = systemInfo.screenHeight; // 屏幕高度:1000
|
||||
const screenWidth = systemInfo.screenWidth; // 屏幕宽度:600
|
||||
this.screenHeight = screenHeight;
|
||||
this.screenWidth = screenWidth;
|
||||
} catch (error) {
|
||||
console.error('获取设备信息失败:', error)
|
||||
}
|
||||
|
|
@ -482,7 +489,7 @@ export default {
|
|||
console.log('拍照前聚焦...')
|
||||
console.log('开始拍照...')
|
||||
CameraPreview.takePicture(
|
||||
{ width: 640, height: 540, quality: 50 },
|
||||
{width:this.screenWidth, height:this.screenHeight, quality: 50 },
|
||||
async (base64PictureData) => {
|
||||
console.log('拍照返回数据', base64PictureData)
|
||||
await this.processImage(base64PictureData)
|
||||
|
|
|
|||
Loading…
Reference in New Issue