This commit is contained in:
X1627315083
2024-03-12 09:42:08 +08:00
parent c43763ad0a
commit d725bc7d71
3 changed files with 27 additions and 17 deletions

View File

@@ -3,6 +3,6 @@ NODE_ENV = 'development'
# VUE_APP_BASE_URL = 'https://api.aida.com.hk' # VUE_APP_BASE_URL = 'https://api.aida.com.hk'
# VUE_APP_BASE_URL = 'http://18.167.251.121:10086' # 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.9:17088'
# VUE_APP_BASE_URL = 'http://192.168.1.7:5567' VUE_APP_BASE_URL = 'http://192.168.1.7:5567'

View File

@@ -251,12 +251,22 @@ export default defineComponent({
}, },
soleId(arr,index){ soleId(arr,index){
let randomNum = Math.floor(100 + Math.random() * 900); let randomNum = Math.floor(100 + Math.random() * 900);
arr[index].id = this.sketchImg.id_? Number(this.sketchImg.id_+(randomNum+"")):this.current.id // 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)){ if(this.hasDuplicateId(arr)){
this.sketchImg.id_ = this.sketchImg.id
this.soleId(arr,index) this.soleId(arr,index)
}else{
return arr
} }
}else{
arr[index].id = this.sketchImg.id_
}
}else{
arr[index].id = this.current.id
}
// arr[index].id = this.sketchImg.id_? this.sketchImg.id_:this.current.id
return arr
}, },
//提交 //提交
setPreview(){ setPreview(){

View File

@@ -884,17 +884,17 @@ export default defineComponent({
polyLineBtn.on('mousedown',()=>{ polyLineBtn.on('mousedown',()=>{
canvas.skipTargetFind = true canvas.skipTargetFind = true
let points = currentPatterning.points let points = currentPatterning.points
currentPatterning.points.pop() points.pop()
currentPatterning.points.pop() points.pop()
// canvas.remove(currentPatterning) canvas.remove(currentPatterning)
// let polyline = new fabric.Polyline(points, { let polyline = new fabric.Polyline(points, {
// fill: 'transparent', fill: 'transparent',
// stroke: canvasPencilColor.value, stroke: canvasPencilColor.value,
// strokeWidth:canvasPencilWidth.value, strokeWidth:canvasPencilWidth.value,
// selection:false, selection:false,
// }) })
// canvas.add(polyline) canvas.add(polyline)
currentPatterning.set({stroke: canvasPencilColor.value}) // currentPatterning.set({stroke: canvasPencilColor.value})
createPatterningIs = false createPatterningIs = false
clearPatterning()//临时图形置为空并且添加撤回对象里面 clearPatterning()//临时图形置为空并且添加撤回对象里面
}) })