From d725bc7d71745897a863ee09e61cc7a5495ee7ad Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Tue, 12 Mar 2024 09:42:08 +0800 Subject: [PATCH] fix --- .env.dev | 4 ++-- src/component/Detail/DesignDetailEnd.vue | 18 ++++++++++++++---- src/component/HomePage/ExportModel.vue | 22 +++++++++++----------- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/.env.dev b/.env.dev index d429345a..dd5ff006 100644 --- a/.env.dev +++ b/.env.dev @@ -3,6 +3,6 @@ NODE_ENV = 'development' # VUE_APP_BASE_URL = 'https://api.aida.com.hk' # VUE_APP_BASE_URL = 'http://18.167.251.121:10086' -VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk' +# VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk' # VUE_APP_BASE_URL = 'http://192.168.1.9:17088' -# VUE_APP_BASE_URL = 'http://192.168.1.7:5567' +VUE_APP_BASE_URL = 'http://192.168.1.7:5567' diff --git a/src/component/Detail/DesignDetailEnd.vue b/src/component/Detail/DesignDetailEnd.vue index a51d7a8c..77b70888 100644 --- a/src/component/Detail/DesignDetailEnd.vue +++ b/src/component/Detail/DesignDetailEnd.vue @@ -251,12 +251,22 @@ export default defineComponent({ }, soleId(arr,index){ let randomNum = Math.floor(100 + Math.random() * 900); - arr[index].id = this.sketchImg.id_? Number(this.sketchImg.id_+(randomNum+"")):this.current.id - if(this.hasDuplicateId(arr)){ - this.soleId(arr,index) + // if(this.sketchImg.id_){ + if(this.sketchImg.id){ + if(this.sketchImg.id == this.sketchImg.id_){ + arr[index].id = Number(this.sketchImg.id_+(randomNum+"")) + if(this.hasDuplicateId(arr)){ + this.sketchImg.id_ = this.sketchImg.id + this.soleId(arr,index) + } + }else{ + arr[index].id = this.sketchImg.id_ + } }else{ - return arr + arr[index].id = this.current.id } + // arr[index].id = this.sketchImg.id_? this.sketchImg.id_:this.current.id + return arr }, //提交 setPreview(){ diff --git a/src/component/HomePage/ExportModel.vue b/src/component/HomePage/ExportModel.vue index 5c9f10ab..4d0988a5 100644 --- a/src/component/HomePage/ExportModel.vue +++ b/src/component/HomePage/ExportModel.vue @@ -884,17 +884,17 @@ export default defineComponent({ polyLineBtn.on('mousedown',()=>{ canvas.skipTargetFind = true let points = currentPatterning.points - currentPatterning.points.pop() - currentPatterning.points.pop() - // canvas.remove(currentPatterning) - // let polyline = new fabric.Polyline(points, { - // fill: 'transparent', - // stroke: canvasPencilColor.value, - // strokeWidth:canvasPencilWidth.value, - // selection:false, - // }) - // canvas.add(polyline) - currentPatterning.set({stroke: canvasPencilColor.value}) + points.pop() + points.pop() + canvas.remove(currentPatterning) + let polyline = new fabric.Polyline(points, { + fill: 'transparent', + stroke: canvasPencilColor.value, + strokeWidth:canvasPencilWidth.value, + selection:false, + }) + canvas.add(polyline) + // currentPatterning.set({stroke: canvasPencilColor.value}) createPatterningIs = false clearPatterning()//临时图形置为空并且添加撤回对象里面 })