新增 删除 衣服

This commit is contained in:
X1627315083
2023-12-13 16:09:17 +08:00
parent e6c8fe3866
commit a0a8ab9a17
27 changed files with 608 additions and 260 deletions

View File

@@ -378,9 +378,6 @@ export default defineComponent({
workspaceCom(newVal,oldVal){
this.workspace = newVal
this.upload.gender = newVal.sexEnum.name
console.log(this.workspace);
// this.getPosition()
},
sketchboardList:{
handler(newVal:any,oldVal:any){
@@ -437,28 +434,36 @@ export default defineComponent({
},
fileUploadChange(data: any) {
let file = data.file;
let bor = true
if (file.status === "done") {
let res = JSON.parse(file.xhr.response);
file.imgUrl = res.data.url;
file.resData = res.data;
// file.pin = false;
//category用来数据处理
file.categoryValue = this.sketchCatecoryList?.[0]?.value;
file.category = this.sketchCatecoryList?.[0]?.name;
file.categoryShow = false;
file.id_ = GO.id++
file.id = res.data.id
file.type_ = {
type1:'upload',
type2:'Sketchboard'
};
let fileList = this.fileList.filter(
(v: any) => v.status === "done"
);
this.store.commit("setSketchboardFile", fileList);
} else if (data.errCode === -1) {
let index = -1;
if(res.errCode == 0){
file.imgUrl = res.data.url;
file.resData = res.data;
// file.pin = false;
//category用来数据处理
file.categoryValue = this.sketchCatecoryList?.[0]?.value;
file.category = this.sketchCatecoryList?.[0]?.name;
file.categoryShow = false;
file.id_ = GO.id++
file.id = res.data.id
file.type_ = {
type1:'upload',
type2:'Sketchboard'
};
let fileList = this.fileList.filter(
(v: any) => v.status === "done"
);
this.store.commit("setSketchboardFile", fileList);
}else{
bor = false
}
} else if (file.status === "error") {
bor = false
}
if(!bor){
let index = -1;
let res:any = JSON.parse(file.xhr.response);
this.fileList.forEach((ele: any, index1: any) => {
if (file.uid === ele.uid) {
index = index1;
@@ -467,9 +472,9 @@ export default defineComponent({
if (index > -1) {
this.fileList.splice(index, 1);
}
message.warning(file.name + this.t('SketchboardUpload.jsContent1'));
}
// message.warning(file.name + this.t('SketchboardUpload.jsContent1'));
message.warning(res.errMsg);
}
},
beforeUpload(file: any) {