fix
This commit is contained in:
@@ -180,7 +180,7 @@ export default defineComponent({
|
||||
}
|
||||
});
|
||||
},
|
||||
isPin(str:any){
|
||||
isPin(str:any,resolve:any){
|
||||
let _this = this
|
||||
Modal.confirm({
|
||||
title: this.t('collectionModal.jsContent5',{str:str}),
|
||||
@@ -190,16 +190,17 @@ export default defineComponent({
|
||||
mask:false,
|
||||
centered:true,
|
||||
onOk() {
|
||||
return true
|
||||
resolve(true)
|
||||
// return true
|
||||
},
|
||||
onCancel(){
|
||||
_this.isShowMark = false
|
||||
return false
|
||||
resolve(false)
|
||||
}
|
||||
});
|
||||
// message.warning(this.t('SketchboardUpload.jsContent1',str:str));
|
||||
},
|
||||
isPinOpen(list:any){
|
||||
async isPinOpen(list:any){
|
||||
this.workspace
|
||||
let numTop = 0
|
||||
let numBottom = 0
|
||||
@@ -232,26 +233,32 @@ export default defineComponent({
|
||||
numTop++
|
||||
}
|
||||
});
|
||||
top.forEach((positionItem:any) => {
|
||||
bottom.forEach((positionItem:any) => {
|
||||
if(item.category == positionItem && item.pin){
|
||||
numBottom++
|
||||
}
|
||||
});
|
||||
});
|
||||
let str
|
||||
if(numTop >= 8){
|
||||
str = `top ${topStr.join(' and ')}`
|
||||
return this.isPin(str)
|
||||
}else if(numBottom >= 8){
|
||||
str = `bottom ${bottomStr.join(' and ')}`
|
||||
return this.isPin(str)
|
||||
}else{
|
||||
return true
|
||||
}
|
||||
|
||||
let bor
|
||||
await new Promise(async (resolve:any)=>{
|
||||
let str
|
||||
if(numTop >= 8){
|
||||
str = `top ${topStr.join(' and ')}`
|
||||
this.isPin(str,resolve)
|
||||
return
|
||||
}else if(numBottom >= 8){
|
||||
str = `bottom ${bottomStr.join(' and ')}`
|
||||
this.isPin(str,resolve)
|
||||
}else{
|
||||
resolve(true)
|
||||
}
|
||||
}).then((v:any)=>{
|
||||
bor = v
|
||||
})
|
||||
return bor
|
||||
},
|
||||
//完成
|
||||
finishCollection(){
|
||||
async finishCollection(){
|
||||
this.isShowMark = true
|
||||
let sketchList = this.store.state.UploadFilesModule.sketchboard
|
||||
let arr:any = []
|
||||
@@ -265,8 +272,7 @@ export default defineComponent({
|
||||
arr.push(obj)
|
||||
});
|
||||
let data = {sketchBoards:arr}
|
||||
// console.log(this.position);
|
||||
if(!this.isPinOpen(sketchList)){
|
||||
if(!await this.isPinOpen(sketchList)){
|
||||
this.isShowMark = false
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user