新增 删除 衣服
This commit is contained in:
@@ -535,31 +535,40 @@ export default defineComponent({
|
||||
},
|
||||
upFileUploadChange(data) {
|
||||
let file = data.file;
|
||||
let bor = true
|
||||
|
||||
if (file.status === "done") {
|
||||
let res = JSON.parse(file.xhr.response);
|
||||
file.id = res.data.id;
|
||||
file.url = res.data.url;
|
||||
file.resData = res.data;
|
||||
file.designType = res.data.designType
|
||||
file.category = this.current;
|
||||
file.minIOPath = file.resData.minIOPath
|
||||
let fileList = this.uploadList.filter(
|
||||
(v) => v.status === "done"
|
||||
);
|
||||
if (this.uploadList.length >= 8) {
|
||||
message.info(this.t('DesignDetailAlter.jsContent2'));
|
||||
} else {
|
||||
// this.store.commit("setSketchboardFile", fileList);
|
||||
this.uploadList = fileList
|
||||
// this.store.commit("clearMoodTemplateId");
|
||||
if(this.selectCode == 'Sketchboard'){
|
||||
this.apparelList = this.uploadList
|
||||
}else{
|
||||
this.printList = this.uploadList
|
||||
if(res.errCode == 0){
|
||||
file.id = res.data.id;
|
||||
file.url = res.data.url;
|
||||
file.resData = res.data;
|
||||
file.designType = res.data.designType
|
||||
file.category = this.current;
|
||||
file.minIOPath = file.resData.minIOPath
|
||||
let fileList = this.uploadList.filter(
|
||||
(v) => v.status === "done"
|
||||
);
|
||||
if (this.uploadList.length >= 8) {
|
||||
message.info(this.t('DesignDetailAlter.jsContent2'));
|
||||
} else {
|
||||
// this.store.commit("setSketchboardFile", fileList);
|
||||
this.uploadList = fileList
|
||||
// this.store.commit("clearMoodTemplateId");
|
||||
if(this.selectCode == 'Sketchboard'){
|
||||
this.apparelList = this.uploadList
|
||||
}else{
|
||||
this.printList = this.uploadList
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
bor = false
|
||||
}
|
||||
} else if (file.status === "error") {
|
||||
let index = -1;
|
||||
bor = false
|
||||
}
|
||||
if(!bor){
|
||||
let index = -1;
|
||||
this.uploadList.forEach((ele, index1) => {
|
||||
if (file.uid === ele.uid) {
|
||||
index = index1;
|
||||
@@ -568,8 +577,9 @@ export default defineComponent({
|
||||
if (index > -1) {
|
||||
this.uploadList.splice(index, 1);
|
||||
}
|
||||
message.warning(file.name + this.t('DesignDetailAlter.jsContent3'));
|
||||
}
|
||||
// message.warning(file.name + this.t('DesignDetailAlter.jsContent3'));
|
||||
message.warning(res.errMsg);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user