From a459d2abb3494ba5a7cc1e79cc896288f197fad5 Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Mon, 4 Mar 2024 16:11:50 +0800 Subject: [PATCH] =?UTF-8?q?history=E6=A0=87=E7=AD=BE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/HomePage/ExportModel.vue | 4 + src/component/LibraryPage/searchLabel.vue | 67 +++++++---- src/component/LibraryPage/setLabel.vue | 2 + src/router/index.ts | 1 - src/views/HistoryPage.vue | 135 ++++++++++------------ src/views/LibraryPage.vue | 4 +- 6 files changed, 112 insertions(+), 101 deletions(-) diff --git a/src/component/HomePage/ExportModel.vue b/src/component/HomePage/ExportModel.vue index 272f3605..b12c3a1c 100644 --- a/src/component/HomePage/ExportModel.vue +++ b/src/component/HomePage/ExportModel.vue @@ -681,6 +681,10 @@ export default defineComponent({ } isLoadCanvas = true; canvas.loadFromJSON(canvasState.value[index], () => { + canvas.forEachObject(function(obj) { + obj.cornerSize = 10 + obj.transparentCorners=false + }); canvas.renderAll(); stateIndex.value = index; }); diff --git a/src/component/LibraryPage/searchLabel.vue b/src/component/LibraryPage/searchLabel.vue index 3a7aa409..4b9c4e45 100644 --- a/src/component/LibraryPage/searchLabel.vue +++ b/src/component/LibraryPage/searchLabel.vue @@ -127,7 +127,7 @@ export default defineComponent({ ] let sex:any = ref('Meal') let designType:any = ref('Outwear') - let renameType:any = ref('single')//修改名字的方式single-单个 batch-批量 + let renameType:any = ref('total')//修改名字的方式single-单个 batch-批量 let selectImgList:any = ref([]) return { @@ -164,12 +164,12 @@ export default defineComponent({ let parent:any = this.$parent this.selectCode = parent.selectCode || '' this.value = parent.value || '' - this.disignTypeList = parent.disignTypeList || '' - this.sexList = parent.sexList || '' + this.disignTypeList = parent.disignTypeList || [] + this.sexList = parent.sexList || [] this.sex = parent.sex || '' this.designType = parent.designType || '' this.selectImgList = parent.selectImgList || '' - this.options = parent.options || '' + this.options = parent.options || [] this.newPicName = '' this.editSex = this.sex @@ -199,7 +199,8 @@ export default defineComponent({ this.value.editLabelValue = [] this.selectSingleImg = data this.newPicName = data.name - if(type === 'single'){ + + if(type === 'total'){ Https.axiosPost(Https.httpUrls.getRelClassificationIdList, classData).then( (rv: any) => { this.value.editLabelValue = rv @@ -207,7 +208,11 @@ export default defineComponent({ ).catch((res)=>{ }); }else{ - classData.libraryIdList = data + if(this.selectCode == 'History'){ + classData.libraryIdList = [data.id] + }else{ + classData.libraryIdList = data + } Https.axiosPost(Https.httpUrls.getRelPublicClassificationIdList, classData).then( (rv: any) => { this.value.editLabelValue = rv @@ -247,8 +252,10 @@ export default defineComponent({ }, async confrimRename(){ let data = { - libraryIds:this.renameType === 'single' ? [this.selectSingleImg.id] : this.selectImgList, - libraryName:this.newPicName, + libraryIds:this.renameType === 'total' ? this.selectImgList : [this.selectSingleImg.id] , + libraryName:this.newPicName,//library名字 + userGroupName:this.newPicName,//history名字 + userGroupId :this.selectSingleImg.id,//history id timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone, } let designType = this.selectCode == 'Sketchboard' || this.selectCode == 'MarketingSketch' ? this.designType.value : '' @@ -261,40 +268,46 @@ export default defineComponent({ "classificationName": "", "createTime": "", "id": 0, - "libraryIdList": this.renameType === 'single' ? [this.selectSingleImg.id] : this.selectImgList, + "libraryIdList": this.renameType === 'total' ? this.selectImgList : [this.selectSingleImg.id], "type": this.selectCode, "updateTime": "", "userId": 0 } let bor = false - if(this.newPicName){//多选修改名字 - await Https.axiosPost(Https.httpUrls.batchUpdateLibraryName, data).then( - (rv: any) => { - // if(this.renameType ==='batch'){ - // this.selectImgList = [] - // } - bor = true - } - ).catch((res)=>{ - }); - } - if(this.renameType == 'single'){//多选修改标签 - await Https.axiosPost(Https.httpUrls.relationLibrary, data2).then( + if(this.newPicName && this.selectCode == 'History'){//多选修改名字 + + await Https.axiosPost(Https.httpUrls.updateUserGroupName, data).then( (rv: any) => { bor = true } ).catch((res)=>{ }); }else{ - await Https.axiosPost(Https.httpUrls.editRelPublicClassificationIdList, data2).then( + await Https.axiosPost(Https.httpUrls.batchUpdateLibraryName, data).then( (rv: any) => { bor = true } ).catch((res)=>{ }); } + if(this.renameType == 'total'){//多选修改标签 + await Https.axiosPost(Https.httpUrls.editRelPublicClassificationIdList, data2).then( + (rv: any) => { + bor = true + } + ).catch((res)=>{ + }); + }else{ + await Https.axiosPost(Https.httpUrls.relationLibrary, data2).then( + (rv: any) => { + bor = true + } + ).catch((res)=>{ + }); + + } let data3 = { - libraryId:this.renameType === 'single' ? [this.selectSingleImg.id] : this.selectImgList, + libraryId:this.renameType === 'total' ? this.selectImgList : [this.selectSingleImg.id], level2Type:this.editDesignType.value, } if(this.selectCode == 'Sketchboard'){ @@ -305,7 +318,11 @@ export default defineComponent({ }); } let parent:any = this.$parent - parent.getLibraryList('') + if(this.selectCode == 'History'){ + parent.getHistoryList() + }else{ + parent.getLibraryList('') + } this.closeRenameModal() }, dropdownVisibleChange1(){ diff --git a/src/component/LibraryPage/setLabel.vue b/src/component/LibraryPage/setLabel.vue index f9152b4e..0ecc9cea 100644 --- a/src/component/LibraryPage/setLabel.vue +++ b/src/component/LibraryPage/setLabel.vue @@ -326,6 +326,8 @@ export default defineComponent({ "updateTime": "", "userId": '' } + console.log(this.type); + return data }, deleteShow(value:any){ diff --git a/src/router/index.ts b/src/router/index.ts index e2e8d8a6..1a8b1b1f 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -107,7 +107,6 @@ router.beforeEach((to, from, next) => { // 如果页面存在,正常跳转 next(); } - next(); } else { // 如果页面不存在,可以跳转到404页面或者其他页面 next('/404'); diff --git a/src/views/HistoryPage.vue b/src/views/HistoryPage.vue index e17d2e9d..31f6f88e 100644 --- a/src/views/HistoryPage.vue +++ b/src/views/HistoryPage.vue @@ -79,28 +79,13 @@ - -
-
- -
-
{{ $t('HistoryPage.Submit') }}
-
-
+ diff --git a/src/views/LibraryPage.vue b/src/views/LibraryPage.vue index fa4f9f6b..d18e4b1e 100644 --- a/src/views/LibraryPage.vue +++ b/src/views/LibraryPage.vue @@ -139,7 +139,7 @@
-
+
@@ -573,7 +573,7 @@ export default defineComponent({ }); this.designType = arr[0] this.disignTypeList = arr - // this.workspaceItem.position = this.singleTypeList[0].label + // this.workspaceItem.position = this.totalTypeList[0].label } }) },