2023-11-6-1

This commit is contained in:
X1627315083
2023-11-06 15:19:52 +08:00
parent 19a163c674
commit 845da1b127
21 changed files with 262 additions and 88 deletions

View File

@@ -280,13 +280,9 @@ export default defineComponent({
// imgBoxSize.style.backgroundImage = 'url('+require('@assets/images/library/lemaleBG.png')')'
let cropper:any = this.$refs.cropper
console.log(cropper);
cropper.cropH = cropper.scale*cropper.trueHeight
cropper.cropW = cropper.cropH/2.125
cropper.cropOffsertX = cropper.getImgAxis().x1+(cropper.scale*cropper.trueWidth/2-cropper.cropW/2)
console.log(cropper.getImgAxis().x1,cropper.scale*cropper.trueWidth/2,cropper.cropW/2);
cropper.cropOffsertY = cropper.getImgAxis().y1
imgBoxSize.addEventListener('mousemove',this.startMove)
this.setImageSize()
@@ -307,7 +303,6 @@ export default defineComponent({
let position = imgBoxSize.getBoundingClientRect()
let position1 = imgbox.getBoundingClientRect()
let cropper:any = this.$refs.cropper
console.log(position1,position);
this.imgBox = {
width:cropper.cropW,
height:cropper.cropH,
@@ -387,8 +382,8 @@ export default defineComponent({
},
setPoint(){
console.log();
let printObject = JSON.parse(JSON.stringify(this.printObject))
let file = this.printObject.file
let url = this.printObject.url
this.printObject = {
"shoulderLeft": [
0.3338,
@@ -414,8 +409,8 @@ export default defineComponent({
0.6764,
0.4715
],
file:printObject.file,
url:printObject.url
file:file,
url:url
}
this.getDefaultPointList(this.imgBox,'setPoint')
},
@@ -506,8 +501,6 @@ export default defineComponent({
this.moveOriginal.posX = 0
this.moveOriginal.posY = 0 // 1为边框
console.log(this.moveOriginal);
this.startDian = true
}
@@ -554,8 +547,6 @@ export default defineComponent({
restoreLocationList(){
this.locationList = []
console.log(this.locationList);
this.pointList = JSON.parse(JSON.stringify(this.oldPointList))
this.locationList = JSON.parse(JSON.stringify(this.oldLocationList))
},
@@ -571,27 +562,42 @@ export default defineComponent({
// })
let cropper:any = this.$refs.cropper,
that = this
cropper.getCropData(async (value:any) => {
// 转换为File对象
if(this.printObject.templateId){
this.printObject.id = this.printObject.libraryId
this.confrimSubmit()
}else{
let file:any = base64toFile(value,this.printObject.file.name);
// console.log(file,this.printObject,'-=-=--==-');
file.uid = this.printObject.file.uid
this.printObject.file = file
this.customRequest().then((rv:any)=>{
this.isShowMark = false
this.printObject.id = rv.id
if(this.userInfo.userId == 88 || this.userInfo.userId == 83){
if(this.modelType == 'System'){
if(this.printObject.templateId){
this.printObject.id = this.printObject.libraryId
this.confrimSubmit()
}).catch((res:any)=>{
this.isShowMark = false
}else{
this.customRequest().then((rv:any)=>{
this.isShowMark = false
this.printObject.id = rv.id
this.confrimSubmit()
}).catch((res:any)=>{
this.isShowMark = false
})
}
}else{
cropper.getCropData(async (value:any) => {
// 转换为File对象
if(this.printObject.templateId){
this.printObject.id = this.printObject.libraryId
this.confrimSubmit()
}else{
let file:any = base64toFile(value,this.printObject.file.name);
file.uid = this.printObject.file.uid
this.printObject.file = file
this.customRequest().then((rv:any)=>{
this.isShowMark = false
this.printObject.id = rv.id
this.confrimSubmit()
}).catch((res:any)=>{
this.isShowMark = false
})
}
})
}
})
}
},
confrimSubmit(){