OCR 调整

dev
张同海 2 years ago
parent d3f7db405b
commit e8f45f2949

@ -658,9 +658,8 @@ export default {
ctx.lineWidth = 1 ctx.lineWidth = 1
this.width = e.offsetX - x this.width = e.offsetX - x
this.height = e.offsetY - y this.height = e.offsetY - y
this.Bx = e.offsetX
this.By = e.offsetY ctx.strokeRect(x, y, e.offsetX - x, e.offsetY - y)
ctx.strokeRect(x, y, e.offsetX + 5 - x, e.offsetY + 5 - y)
} }
}, },
mousemove(e) { mousemove(e) {
@ -672,14 +671,14 @@ export default {
this.$refs.myCanvas.getContext('2d').clearRect(0, 0, this.$refs.myCanvas.width, this.$refs.myCanvas.height) this.$refs.myCanvas.getContext('2d').clearRect(0, 0, this.$refs.myCanvas.width, this.$refs.myCanvas.height)
if (this.imgSrc) { if (this.imgSrc) {
this.flag = true this.flag = true
this.x = e.offsetX + 5 // X this.x = e.offsetX // X
this.y = e.offsetY + 5 // Y this.y = e.offsetY // Y
this.CvBoxType = false this.CvBoxType = false
this.width = 0 this.width = 0
this.height = 0 this.height = 0
} }
}, },
mouseup() { mouseup(e) {
// console.log(this.width, this.flag, this.imgSrc) // console.log(this.width, this.flag, this.imgSrc)
this.flag = false this.flag = false
if (this.imgSrc && this.width != 0 && this.height != 0) { if (this.imgSrc && this.width != 0 && this.height != 0) {
@ -692,6 +691,8 @@ export default {
scale: this.scale scale: this.scale
}).then(res => { }).then(res => {
this.Rdata = res.data this.Rdata = res.data
this.Bx = this.x + this.width
this.By = this.y + this.height
this.CvBoxType = true this.CvBoxType = true
}) })
} }
@ -1227,6 +1228,7 @@ export default {
} }
.OCRBox { .OCRBox {
/deep/.ant-drawer-body { /deep/.ant-drawer-body {
position: relative;
padding: 0 !important; padding: 0 !important;
} }
} }
@ -1248,9 +1250,9 @@ export default {
} }
} }
.CV { .CV {
width: 100%; // width: 100%;
height: auto; // height: auto;
background-repeat: no-repeat; // background-repeat: no-repeat;
} }
@import url('../index.less'); @import url('../index.less');
.operation-area { .operation-area {

Loading…
Cancel
Save