更改 OCR

dev
张同海 2 years ago
parent ada22c86cb
commit 9ee413cff4

@ -647,14 +647,14 @@ export default {
ctx.beginPath()
//线
ctx.strokeStyle = '#00ff00'
ctx.strokeStyle = '#e1271d'
// 线
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 + 12 - x, e.offsetY + 12 - y)
ctx.strokeRect(x, y, e.offsetX + 5 - x, e.offsetY + 5 - y)
}
},
mousemove(e) {
@ -663,16 +663,20 @@ export default {
}
},
mousedown(e) {
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 + 12 // X
this.y = e.offsetY + 12 // Y
this.x = e.offsetX + 5 // X
this.y = e.offsetY + 5 // Y
this.CvBoxType = false
this.width = 0
this.height = 0
}
},
mouseup() {
if (this.flag && this.imgSrc) {
this.flag = false
// console.log(this.width, this.flag, this.imgSrc)
this.flag = false
if (this.imgSrc && this.width != 0 && this.height != 0) {
BookingOrderOcrGetText({
fileName: this.fileName,
x: this.x,
@ -1222,6 +1226,7 @@ export default {
border: 1px solid #f0f0f0;
box-shadow: 0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017;
padding: 0;
background: #ffffff;
li {
width: 100%;
text-align: center;

Loading…
Cancel
Save