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 {