|
|
@ -647,14 +647,14 @@ export default {
|
|
|
|
ctx.beginPath()
|
|
|
|
ctx.beginPath()
|
|
|
|
|
|
|
|
|
|
|
|
//设置线条颜色,必须放在绘制之前
|
|
|
|
//设置线条颜色,必须放在绘制之前
|
|
|
|
ctx.strokeStyle = '#00ff00'
|
|
|
|
ctx.strokeStyle = '#e1271d'
|
|
|
|
// 线宽设置,必须放在绘制之前
|
|
|
|
// 线宽设置,必须放在绘制之前
|
|
|
|
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.Bx = e.offsetX
|
|
|
|
this.By = e.offsetY
|
|
|
|
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) {
|
|
|
|
mousemove(e) {
|
|
|
@ -663,16 +663,20 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mousedown(e) {
|
|
|
|
mousedown(e) {
|
|
|
|
|
|
|
|
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 + 12 // 鼠标落下时的X
|
|
|
|
this.x = e.offsetX + 5 // 鼠标落下时的X
|
|
|
|
this.y = e.offsetY + 12 // 鼠标落下时的Y
|
|
|
|
this.y = e.offsetY + 5 // 鼠标落下时的Y
|
|
|
|
this.CvBoxType = false
|
|
|
|
this.CvBoxType = false
|
|
|
|
|
|
|
|
this.width = 0
|
|
|
|
|
|
|
|
this.height = 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mouseup() {
|
|
|
|
mouseup() {
|
|
|
|
if (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) {
|
|
|
|
BookingOrderOcrGetText({
|
|
|
|
BookingOrderOcrGetText({
|
|
|
|
fileName: this.fileName,
|
|
|
|
fileName: this.fileName,
|
|
|
|
x: this.x,
|
|
|
|
x: this.x,
|
|
|
@ -1222,6 +1226,7 @@ export default {
|
|
|
|
border: 1px solid #f0f0f0;
|
|
|
|
border: 1px solid #f0f0f0;
|
|
|
|
box-shadow: 0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017;
|
|
|
|
box-shadow: 0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017;
|
|
|
|
padding: 0;
|
|
|
|
padding: 0;
|
|
|
|
|
|
|
|
background: #ffffff;
|
|
|
|
li {
|
|
|
|
li {
|
|
|
|
width: 100%;
|
|
|
|
width: 100%;
|
|
|
|
text-align: center;
|
|
|
|
text-align: center;
|
|
|
|