2023-10-20

This commit is contained in:
2023-10-20 17:21:45 +08:00
parent 12ef707f64
commit bd9dabd21d
29 changed files with 1401 additions and 385 deletions

View File

@@ -343,6 +343,7 @@ export default defineComponent({
icon: createVNode(ExclamationCircleOutlined),
okText: 'Ok',
cancelText: 'Cancel',
mask:false,
// centered:true,
onOk() {
// _this.getDefaultPointList(_this.imgBox)
@@ -393,6 +394,7 @@ export default defineComponent({
libraryId:this.printObject.id,
templateId:this.printObject.templateId || null,
modelType:'Library',
checkMd5:1,
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
...this.getPrintLocation()
}
@@ -417,7 +419,8 @@ export default defineComponent({
file:this.printObject.file,
level1Type:'Models',
level2Type:'',
sex:'',
checkMd5:1,
sex:this.sex,
modelType:'Library',
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
}
@@ -429,7 +432,11 @@ export default defineComponent({
return new Promise((resolve,reject)=>{
Https.axiosPost(Https.httpUrls.libraryUpload, new_data,{headers:{'Content-Type': 'multipart/form-data'}}).then(
(rv: any) => {
resolve(rv)
if(!rv.checkMd5){
resolve(this.affirmCstomRequest(new_data))
}else{
resolve(rv)
}
}
).catch((res)=>{
reject(res)
@@ -437,7 +444,33 @@ export default defineComponent({
})
},
affirmCstomRequest(data:any){
let _this = this
return new Promise((resolve,reject)=>{
Modal.confirm({
title: 'This picture has been uploaded whether to continue uploading ',
icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes',
cancelText: 'No',
mask:false,
onOk() {
data.checkMd5 = 0
Https.axiosPost(Https.httpUrls.libraryUpload, data,{headers:{'Content-Type': 'multipart/form-data'}}).then(
(rv: any) => {
_this.isShowMark = false
resolve(rv)
}
).catch((res)=>{
reject(res)
});
},
onCancel(){
_this.isShowMark = false
}
});
})
},
getPrintLocation(){
let {width , height} = this.imgBox
let locationData:any = {}