From e8f45f2949272a55eb935b462bc2b1c31d7f8124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <963808678@qq.com> Date: Mon, 19 Dec 2022 10:29:05 +0800 Subject: [PATCH] =?UTF-8?q?OCR=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/modules/operationArea.vue | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/views/main/BookingLedger/detail/modules/operationArea.vue b/src/views/main/BookingLedger/detail/modules/operationArea.vue index 1aac81e..fc5d181 100644 --- a/src/views/main/BookingLedger/detail/modules/operationArea.vue +++ b/src/views/main/BookingLedger/detail/modules/operationArea.vue @@ -658,9 +658,8 @@ export default { ctx.lineWidth = 1 this.width = e.offsetX - x this.height = e.offsetY - y - this.Bx = e.offsetX - this.By = e.offsetY - ctx.strokeRect(x, y, e.offsetX + 5 - x, e.offsetY + 5 - y) + + ctx.strokeRect(x, y, e.offsetX - x, e.offsetY - y) } }, mousemove(e) { @@ -672,14 +671,14 @@ export default { this.$refs.myCanvas.getContext('2d').clearRect(0, 0, this.$refs.myCanvas.width, this.$refs.myCanvas.height) if (this.imgSrc) { this.flag = true - this.x = e.offsetX + 5 // 鼠标落下时的X - this.y = e.offsetY + 5 // 鼠标落下时的Y + this.x = e.offsetX // 鼠标落下时的X + this.y = e.offsetY // 鼠标落下时的Y this.CvBoxType = false this.width = 0 this.height = 0 } }, - mouseup() { + mouseup(e) { // console.log(this.width, this.flag, this.imgSrc) this.flag = false if (this.imgSrc && this.width != 0 && this.height != 0) { @@ -692,6 +691,8 @@ export default { scale: this.scale }).then(res => { this.Rdata = res.data + this.Bx = this.x + this.width + this.By = this.y + this.height this.CvBoxType = true }) } @@ -1227,6 +1228,7 @@ export default { } .OCRBox { /deep/.ant-drawer-body { + position: relative; padding: 0 !important; } } @@ -1248,9 +1250,9 @@ export default { } } .CV { - width: 100%; - height: auto; - background-repeat: no-repeat; + // width: 100%; + // height: auto; + // background-repeat: no-repeat; } @import url('../index.less'); .operation-area {