2023-11-6-模特上传修改

This commit is contained in:
X1627315083
2023-11-06 15:34:57 +08:00
parent 81004c6c02
commit e5f902851a
10 changed files with 53 additions and 55 deletions

View File

@@ -562,12 +562,29 @@ export default defineComponent({
// })
let cropper:any = this.$refs.cropper,
that = this
if(this.userInfo.userId == 88 || this.userInfo.userId == 83){
if(this.modelType == 'System'){
if(this.modelType == 'System' && this.userInfo.userId == 88 || this.userInfo.userId == 83){
if(this.printObject.templateId){
this.printObject.id = this.printObject.libraryId
this.confrimSubmit()
}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
@@ -576,26 +593,7 @@ export default defineComponent({
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
})
}
})
}
})
}
},