This commit is contained in:
X1627315083
2023-12-12 14:34:57 +08:00
parent c70abb9867
commit d2dfcd4c45
6 changed files with 92 additions and 49 deletions

View File

@@ -180,16 +180,31 @@ export default defineComponent({
}
});
},
isPin(list:any){
isPin(str:any){
let _this = this
Modal.confirm({
title: this.t('collectionModal.jsContent5',{str:str}),
icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes',
cancelText: 'No',
mask:false,
centered:true,
onOk() {
return true
},
onCancel(){
_this.isShowMark = false
return false
}
});
// message.warning(this.t('SketchboardUpload.jsContent1',str:str));
},
isPinOpen(list:any){
this.workspace
let numTop = 0
let numBottom = 0
let top:any
let bottom:any
console.log(this.position);
this.position.forEach((item:any) => {
// let str =
});
if(this.workspace.sexEnum.name == "Female"){
top = ['Outwear','Dress','Blouse']
bottom = ['Trousers','Skirt']
@@ -197,11 +212,21 @@ export default defineComponent({
top = ['Outwear','Tops']
bottom = ['Bottoms']
}
console.log(this.workspace);
let topStr:any = []
let bottomStr:any = []
this.position.forEach((item:any) => {
let topBor
let botBor
topBor = top.includes(item.name)
botBor = bottom.includes(item.name)
if(topBor){
topStr.push(item.value)
}
if(botBor){
bottomStr.push(item.value)
}
});
list.forEach((item:any,index:number) => {
console.log(item);
top.forEach((positionItem:any) => {
if(item.category == positionItem && item.pin){
numTop++
@@ -210,15 +235,21 @@ export default defineComponent({
}
});
});
let str
if(numTop >= 8){
// let str =
// return
console.log(1);
str = `top ${topStr.join(' and ')}`
return this.isPin(str)
}else if(numBottom >= 8){
return
console.log(2);
str = `bottom ${bottomStr.join(' and ')}`
return this.isPin(str)
}else{
console.log(3);
return true
}
// message.warning(this.t('SketchboardUpload.jsContent1',str:str));
},
//完成
finishCollection(){
@@ -236,7 +267,10 @@ export default defineComponent({
});
let data = {sketchBoards:arr}
// console.log(this.position);
this.isPin(sketchList)
if(!this.isPinOpen(sketchList)){
this.isShowMark = false
return
}
let elList = document.querySelectorAll('.img_block_item_sketch img')
Https.axiosPost(Https.httpUrls.sketchBoardsBoundingBox, data)
.then((rv: any) => {