diff --git a/.env.dev b/.env.dev
index e120d43e..802084fa 100644
--- a/.env.dev
+++ b/.env.dev
@@ -1,9 +1,9 @@
NODE_ENV = 'development'
# VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
-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 = '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.9:5567'
-# VUE_APP_BASE_URL = 'http://192.168.1.7:5567'
diff --git a/src/component/Detail/DesignDetail.vue b/src/component/Detail/DesignDetail.vue
index 4f794cd9..280df86a 100644
--- a/src/component/Detail/DesignDetail.vue
+++ b/src/component/Detail/DesignDetail.vue
@@ -86,7 +86,7 @@
-
- {{ $t('DesignDetailEnd.preview') }}
+ {{ $t('DesignDetailEnd.preview') }}
{{ $t('DesignDetailEnd.Layout') }}
{{ $t('DesignDetailEnd.preview') }}
@@ -189,7 +189,7 @@ export default defineComponent({
this.type_ = num
this.colorList[this.selectIndex] = this.$parent.selectColor
this.overallSingle = this.current?.printObject?.ifSingle == null?false:this.current?.printObject?.ifSingle
- this.systemDesignerPercentage = this.current?.printObject?.scale?this.current?.printObject?.scale:.3*100
+ this.systemDesignerPercentage = this.current?.printObject?.ifSingle?100:this.current?.printObject?.prints[0].scale?this.current?.printObject?.prints[0].scale*100:100
},
//模型
setSketchImg(v){
@@ -304,13 +304,16 @@ export default defineComponent({
}
}
})
+ index = index? index:0
if(!this.current.id){
- data.designSingleItemDTOList[index].priority = zIndex+=1
+ if(index){
+ data.designSingleItemDTOList[index].priority = zIndex+=1
+ }
}
if(this.type_ == 1){
if(data.designSingleItemDTOList[index].path != this.sketchImg.minIOPath && this.sketchImg.id_){
data.designSingleItemDTOList[index].offset = [0,0]
- data.designSingleItemDTOList[index].scale = 1
+ data.designSingleItemDTOList[index].scale = [1,1]
}
data.designSingleItemDTOList = this.soleId(data.designSingleItemDTOList,index)
this.sketchImg.id_ = data.designSingleItemDTOList[index].id
diff --git a/src/component/Detail/DesignPrintOperation.vue b/src/component/Detail/DesignPrintOperation.vue
index 9c11166d..a21792d5 100644
--- a/src/component/Detail/DesignPrintOperation.vue
+++ b/src/component/Detail/DesignPrintOperation.vue
@@ -41,6 +41,7 @@
{{ $t('DesignPrintOperation.Scale') }}
{
if(!this.overallSingle){
- scale = this.systemDesignerPercentage*3/100
+ scale = this.systemDesignerPercentage/100
// location = [arr[index].style.left.replace(/px/g,'')*sketchNum+this.print.width.replace(/px/g,'')/2-7,arr[index].style.top.replace(/px/g,'')*sketchNum+this.print.height.replace(/px/g,'')/2-7]
location = [arr[index].style.left.replace(/px/g,'')*sketchNum,arr[index].style.top.replace(/px/g,'')*sketchNum]
}else{
diff --git a/src/component/Detail/DesignPrintOperationMobile.vue b/src/component/Detail/DesignPrintOperationMobile.vue
index f9351650..e53922ca 100644
--- a/src/component/Detail/DesignPrintOperationMobile.vue
+++ b/src/component/Detail/DesignPrintOperationMobile.vue
@@ -41,6 +41,7 @@
Scale
{
if(!this.overallSingle){
- scale = this.systemDesignerPercentage*3/100
+ scale = this.systemDesignerPercentage/100
// location = [arr[index].style.left.replace(/px/g,'')*sketchNum+this.print.width.replace(/px/g,'')/2-7,arr[index].style.top.replace(/px/g,'')*sketchNum+this.print.height.replace(/px/g,'')/2-7]
location = [arr[index].style.left.replace(/px/g,'')*sketchNum,arr[index].style.top.replace(/px/g,'')*sketchNum]
}else{
diff --git a/src/component/Detail/setDesignItem.vue b/src/component/Detail/setDesignItem.vue
index 22646bdd..a3c4bb73 100644
--- a/src/component/Detail/setDesignItem.vue
+++ b/src/component/Detail/setDesignItem.vue
@@ -139,7 +139,6 @@ export default defineComponent({
let front = []
let back = []
let body
-
designItemDetail.others.forEach((item) => {
if(item.type == 'Body'){
body = item
@@ -299,7 +298,7 @@ export default defineComponent({
w = (e.x - this.frontBack.front[this.imgDomIndex].centers.left)
h = (e.x - this.frontBack.front[this.imgDomIndex].centers.left)*num
width = w+'px'
- height = w*num+'px'
+ // height = w*num+'px'
}else if(this.direction == 'top'){
num = width/height
this.frontBack.front[this.imgDomIndex].style.top = 'auto'
@@ -309,19 +308,19 @@ export default defineComponent({
h = (this.frontBack.front[this.imgDomIndex].centers.top - e.y)
height = h+'px'
- width = h*num+'px'
+ // width = h*num+'px'
}else if(this.direction == 'bottom'){
num = width/height
h = (e.y - this.frontBack.front[this.imgDomIndex].centers.top)
height = h+'px'
- width = h*num+'px'
+ // width = h*num+'px'
}else if(this.direction == 'left'){
this.frontBack.front[this.imgDomIndex].style.left = 'auto'
this.frontBack.front[this.imgDomIndex].style.right = parentNode.offsetWidth -imgDomWH.width - this.imgDom.offsetLeft+'px'
w = (this.frontBack.front[this.imgDomIndex].centers.left - e.x)
width = w+'px'
- height = w*num+'px'
+ // height = w*num+'px'
}
//判断尺寸是否到边
this.frontBack.front[this.imgDomIndex].style.width = width
@@ -409,8 +408,10 @@ export default defineComponent({
if(item.id == arr[index].id && !arr[index].similarity){
let y = ((arr[index]?.style?.top.replace(/px/g,'')*ratio).toFixed(0) - arr[index]?.position[0])
let x = ((arr[index]?.style?.left.replace(/px/g,'')*ratio).toFixed(0) - arr[index]?.position[1])
- let scale = arr[index]?.imageSize?Number(((arr[index]?.style?.width.replace(/px/g,'')*ratio)/(arr[index]?.imageSize[0]/arr[index].scale)).toFixed(2)):1
- item.scale = scale
+ let scaleWidth = arr[index]?.imageSize?Number(((arr[index]?.style?.width.replace(/px/g,'')*ratio)/(arr[index]?.imageSize[0]/arr[index].scale[0])).toFixed(2)):1
+ let scaleHeight = arr[index]?.imageSize?Number(((arr[index]?.style?.height.replace(/px/g,'')*ratio)/(arr[index]?.imageSize[1]/arr[index].scale[1])).toFixed(2)):1
+ // let widthScale = (arr[index].style.width.replace(/px/g,'')/arr[index].style.height.replace(/px/g,'')).toFixed(2)
+ item.scale = [scaleWidth,scaleHeight]
let top = y == 0 ? item.offset[1]:y+item.offset[1]
let left = x == 0 ? item.offset[0]:x+item.offset[0]
item.offset = [left,top]
diff --git a/src/component/Detail/setDesignItemMobile.vue b/src/component/Detail/setDesignItemMobile.vue
index 28bedc8d..243e8c7f 100644
--- a/src/component/Detail/setDesignItemMobile.vue
+++ b/src/component/Detail/setDesignItemMobile.vue
@@ -296,7 +296,7 @@ export default defineComponent({
w = (e.changedTouches[0].pageX -imgDomWH.left)
h = (e.changedTouches[0].pageX -imgDomWH.left)*num
width = w+'px'
- height = w*num+'px'
+ // height = w*num+'px'
}else if(this.direction == 'top'){
num = width/height
this.frontBack.front[this.imgDomIndex].style.top = 'auto'
@@ -307,18 +307,18 @@ export default defineComponent({
h = (this.frontBack.front[this.imgDomIndex].centers.top - e.changedTouches[0].pageY)
height = h+'px'
- width = h*num+'px'
+ // width = h*num+'px'
}else if(this.direction == 'bottom'){
num = width/height
h = (e.changedTouches[0].pageY -imgDomWH.top)
height = h+'px'
- width = h*num+'px'
+ // width = h*num+'px'
}else if(this.direction == 'left'){
w = (this.frontBack.front[this.imgDomIndex].centers.left - e.changedTouches[0].pageX)
this.frontBack.front[this.imgDomIndex].style.left = 'auto'
this.frontBack.front[this.imgDomIndex].style.right = this.frontBack.front[this.imgDomIndex].centers.right+'px'
width = w+'px'
- height = w*num+'px'
+ // height = w*num+'px'
}
//判断尺寸是否到边
this.frontBack.front[this.imgDomIndex].style.width = width
@@ -403,12 +403,13 @@ export default defineComponent({
imageCategory1 = arr[1].imageCategory
}
arr.forEach((i)=>{
- let imageCategory = i.imageCategory.split('_')[0]
if(item.id == i.id){
let y = ((i?.style?.top.replace(/px/g,'')*ratio).toFixed(0) - i?.position[0])
let x = ((i?.style?.left.replace(/px/g,'')*ratio).toFixed(0) - i?.position[1])
- let scale = i?.imageSize?Number(((i?.style?.width.replace(/px/g,'')*ratio)/(i?.imageSize[0]/i.scale)).toFixed(2)):1
- item.scale = scale
+ // let scale = i?.imageSize?Number(((i?.style?.width.replace(/px/g,'')*ratio)/(i?.imageSize[0]/i.scale)).toFixed(2)):1
+ let scaleWidth = i?.imageSize?Number(((i?.style?.width.replace(/px/g,'')*ratio)/(i?.imageSize[0]/i.scale[0])).toFixed(2)):1
+ let scaleHeight = i?.imageSize?Number(((i?.style?.height.replace(/px/g,'')*ratio)/(i?.imageSize[1]/i.scale[1])).toFixed(2)):1
+ item.scale = [scaleWidth,scaleHeight]
let top = y == 0 ? item.offset[1]:y+item.offset[1]
let left = x == 0 ? item.offset[0]:x+item.offset[0]
item.offset = [left,top]
diff --git a/src/lang/cn.ts b/src/lang/cn.ts
index bf82e306..1b1502d5 100644
--- a/src/lang/cn.ts
+++ b/src/lang/cn.ts
@@ -111,6 +111,7 @@ export default {
GetStarted:'开始设计',
Start:'开始',
Edit:'编辑',
+ Reset:'重置',
Design:'设计',
Redesign:'重新设计',
GeneratedDesign:'生成的设计',
diff --git a/src/lang/en.ts b/src/lang/en.ts
index 5f0091ed..14b887c3 100644
--- a/src/lang/en.ts
+++ b/src/lang/en.ts
@@ -112,6 +112,7 @@ export default {
GetStarted:'Get Started',
Start:'Start',
Edit:'Edit',
+ Reset:'Reset',
Design:'Design',
Redesign:'Redesign',
GeneratedDesign:'Generated Design',
diff --git a/src/store/uploadFile/uploadFile.ts b/src/store/uploadFile/uploadFile.ts
index f86545b2..993e5d8f 100644
--- a/src/store/uploadFile/uploadFile.ts
+++ b/src/store/uploadFile/uploadFile.ts
@@ -185,7 +185,6 @@ const UploadFilesModule : Module = {
state.printboard = [...state.printboardFiles,...state.printGenerateFiles,...state.printMaterialFiles]
},
-
setColorboardList(state,colorBoards){
state.colorBoards = colorBoards
},
diff --git a/src/views/HomeView/HomeView.vue b/src/views/HomeView/HomeView.vue
index 50febce2..997efe14 100644
--- a/src/views/HomeView/HomeView.vue
+++ b/src/views/HomeView/HomeView.vue
@@ -33,6 +33,9 @@
{{ $t('HomeView.Edit') }}
+
+ {{ $t('HomeView.Reset') }}
+
@@ -556,6 +559,13 @@ export default defineComponent({
collectionModal.recollection();
},
+ resetCollection(){
+ this.store.commit("clearAllData");
+ this.store.commit("clearAllCollection");
+ this.store.commit("setAllBoardDataChoose",{});
+ this.store.commit("clearShowSketchboard",{});
+
+ },
//完成设计
finishCollection() {
let _this = this;
diff --git a/src/views/LoginPage.vue b/src/views/LoginPage.vue
index 0ca19b7c..da12ceb9 100644
--- a/src/views/LoginPage.vue
+++ b/src/views/LoginPage.vue
@@ -529,6 +529,7 @@ export default defineComponent({
this.store.commit("clearAllData");
this.store.commit("clearAllCollection");
this.store.commit("setAllBoardDataChoose",{});
+ this.store.commit("clearShowSketchboard",{});
this.$router.push("/home");
},
//获取当前语言