From 904b9856fdce0327608c5250f1f5c2f96934dc7f Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Tue, 19 Dec 2023 16:36:48 +0800 Subject: [PATCH] fix --- src/component/HomePage/Material.vue | 14 +++-- .../HomePage/NewCollectionReview.vue | 3 - src/component/HomePage/collectionModal.vue | 44 +++++++------ src/component/LibraryPage/ModelPlacement.vue | 2 +- .../LibraryPage/ModelPlacementMobile.vue | 2 +- src/lang/cn.ts | 1 + src/lang/en.ts | 1 + src/lang/fr.ts | 1 + src/lang/it.ts | 1 + src/lang/ja.ts | 1 + src/lang/kr.ts | 1 + src/lang/ru.ts | 1 + src/lang/th.ts | 1 + src/lang/vn.ts | 1 + src/views/HomeView.vue | 61 ++++++++++++++++--- src/views/LibraryPage.vue | 3 +- src/views/LoginPage.vue | 3 +- src/views/trialApproval.vue | 2 +- 18 files changed, 103 insertions(+), 40 deletions(-) diff --git a/src/component/HomePage/Material.vue b/src/component/HomePage/Material.vue index 7253bd9d..9cdbea12 100644 --- a/src/component/HomePage/Material.vue +++ b/src/component/HomePage/Material.vue @@ -65,7 +65,7 @@ {{ $t('Material.PIN') }} -
+
@@ -95,6 +95,7 @@ export default defineComponent({ let selectCode:any = ref('') let currentPage:any = ref(1) let searchPictureName = ref('') + let isOldSearchPictureName = ref('') let pageSize = ref(12) let total = ref(0) let searcMaterialhName:any = ref('') //搜索名字 @@ -112,6 +113,7 @@ export default defineComponent({ selectCode, currentPage, searchPictureName, + isOldSearchPictureName, pageSize, total, searcMaterialhName, @@ -287,6 +289,7 @@ export default defineComponent({ this.isShowLoading = true Https.axiosPost(Https.httpUrls.queryLibraryPage,data).then( (rv: any) => { + this.total = rv.total let aa:any = [] rv.content.forEach((item:any,index:any) => { let arr @@ -315,13 +318,16 @@ export default defineComponent({ } aa.push(item) }); - if(aa[aa.length-1].id == this.imgList[this.imgList.length-1]?.id){ - + if(this.searchPictureName != this.isOldSearchPictureName){ + this.imgList = [] + }else{ + } + this.isOldSearchPictureName = this.searchPictureName + if((aa[aa.length-1].id == this.imgList[this.imgList.length-1]?.id) && aa?.[aa.length-1]?.id){ }else{ this.imgList.push(...aa) } // this.imgList = aa - this.total = rv.total this.isShowLoading = false } ).catch((res)=>{ diff --git a/src/component/HomePage/NewCollectionReview.vue b/src/component/HomePage/NewCollectionReview.vue index d87316a0..99b4e7e7 100644 --- a/src/component/HomePage/NewCollectionReview.vue +++ b/src/component/HomePage/NewCollectionReview.vue @@ -97,9 +97,6 @@ export default defineComponent({ watch: { sketchList:{ handler(newVal:any,oldVal:any){ - console.log(oldVal,newVal); - console.log(this.sketchList ); - // this.sketchList = [] // this.sketch = [[],[],[]] // this.sketchList = this.allBoardData.sketchboardFiles diff --git a/src/component/HomePage/collectionModal.vue b/src/component/HomePage/collectionModal.vue index de370bc9..8b587b08 100644 --- a/src/component/HomePage/collectionModal.vue +++ b/src/component/HomePage/collectionModal.vue @@ -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 } diff --git a/src/component/LibraryPage/ModelPlacement.vue b/src/component/LibraryPage/ModelPlacement.vue index 38b4ae5e..3a56c6b3 100644 --- a/src/component/LibraryPage/ModelPlacement.vue +++ b/src/component/LibraryPage/ModelPlacement.vue @@ -50,7 +50,7 @@