不等比缩放
This commit is contained in:
4
.env.dev
4
.env.dev
@@ -1,9 +1,9 @@
|
|||||||
NODE_ENV = 'development'
|
NODE_ENV = 'development'
|
||||||
# VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
|
# 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 = '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.9:5567'
|
# VUE_APP_BASE_URL = 'http://192.168.1.9:5567'
|
||||||
# VUE_APP_BASE_URL = 'http://192.168.1.7:5567'
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
<i v-else class="fi fi-rr-picture centent clothes_item_icon" @click="openCurrent(1)"></i>
|
<i v-else class="fi fi-rr-picture centent clothes_item_icon" @click="openCurrent(1)"></i>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="clothes_detail_item clothes_detail_item_print" :class="[current.id?'':'hideCursor']">
|
<div class="clothes_detail_item clothes_detail_item_print" :class="[current?.id?'':'hideCursor']">
|
||||||
<div class="clothes_item_header">
|
<div class="clothes_item_header">
|
||||||
<i class="fi fi-rs-comments"></i>
|
<i class="fi fi-rs-comments"></i>
|
||||||
<div>{{ $t('DesignDetail.CurrentPrint') }}</div>
|
<div>{{ $t('DesignDetail.CurrentPrint') }}</div>
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="clothes_detail_item clothes_detail_item_color" :class="[current.id?'':'hideCursor']">
|
<div class="clothes_detail_item clothes_detail_item_color" :class="[current?.id?'':'hideCursor']">
|
||||||
<div class="clothes_item_header">
|
<div class="clothes_item_header">
|
||||||
<i class="fi fi-rs-comments"></i>
|
<i class="fi fi-rs-comments"></i>
|
||||||
<div>{{ $t('DesignDetail.CurrentColor') }}</div>
|
<div>{{ $t('DesignDetail.CurrentColor') }}</div>
|
||||||
@@ -676,7 +676,7 @@ export default defineComponent({
|
|||||||
changed:item.changed?item.changed:false,
|
changed:item.changed?item.changed:false,
|
||||||
designType:item.designType?item.designType:"Library",
|
designType:item.designType?item.designType:"Library",
|
||||||
offset:item.layersObject?.[1]?.offset == null?[0,0]:item.layersObject[1].offset,
|
offset:item.layersObject?.[1]?.offset == null?[0,0]:item.layersObject[1].offset,
|
||||||
scale:item.layersObject?.[1]?.scale?item.layersObject[1].scale:1,
|
scale:item.layersObject?.[1]?.scale?item.layersObject[1].scale:[1,1],
|
||||||
printObject:{
|
printObject:{
|
||||||
ifSingle:item.printObject.ifSingle == null ? false : item.printObject.ifSingle,
|
ifSingle:item.printObject.ifSingle == null ? false : item.printObject.ifSingle,
|
||||||
// path:item.printObject.path?item.printObject.path :'',
|
// path:item.printObject.path?item.printObject.path :'',
|
||||||
@@ -850,7 +850,9 @@ export default defineComponent({
|
|||||||
|
|
||||||
}else{
|
}else{
|
||||||
this.deleteShow = false
|
this.deleteShow = false
|
||||||
|
|
||||||
let designItemDetail = JSON.parse(JSON.stringify(this.designItemDetail))
|
let designItemDetail = JSON.parse(JSON.stringify(this.designItemDetail))
|
||||||
|
|
||||||
let data:any = this.setSubmitItem('preview',true)
|
let data:any = this.setSubmitItem('preview',true)
|
||||||
if(!this.deleteItemShow){
|
if(!this.deleteItemShow){
|
||||||
return
|
return
|
||||||
@@ -861,6 +863,12 @@ export default defineComponent({
|
|||||||
designItemDetail.currentFullBodyView = rv.currentFullBodyView
|
designItemDetail.currentFullBodyView = rv.currentFullBodyView
|
||||||
designItemDetail.ifSubmit = true
|
designItemDetail.ifSubmit = true
|
||||||
this.loadingShow = false
|
this.loadingShow = false
|
||||||
|
// if(this.designItemDetail.clothes[this.designItemDetail.clothes.legnth-1] && !this.designItemDetail.clothes[this.designItemDetail.clothes.legnth-1].id){
|
||||||
|
// this.designItemDetail.clothes.split(this.designItemDetail.clothes.legnth-1,1)
|
||||||
|
// }
|
||||||
|
if(data.clothes[data.clothes.legnth-1] && !data.clothes[data.clothes.legnth-1].id){
|
||||||
|
data.clothes.split(data.clothes.legnth-1,1)
|
||||||
|
}
|
||||||
this.store.commit("setDesignItemDetail", designItemDetail);
|
this.store.commit("setDesignItemDetail", designItemDetail);
|
||||||
this.store.commit("setDesignPreviewData", data);
|
this.store.commit("setDesignPreviewData", data);
|
||||||
this.setRevocation(designItemDetail,data)
|
this.setRevocation(designItemDetail,data)
|
||||||
@@ -931,6 +939,7 @@ export default defineComponent({
|
|||||||
"minIOPath": "",
|
"minIOPath": "",
|
||||||
"color": color,
|
"color": color,
|
||||||
gradient:gradient,
|
gradient:gradient,
|
||||||
|
priority:10,
|
||||||
"printObject": {
|
"printObject": {
|
||||||
"ifSingle": null,
|
"ifSingle": null,
|
||||||
"prints": [
|
"prints": [
|
||||||
@@ -944,10 +953,10 @@ export default defineComponent({
|
|||||||
// let DesignDetailAlter:any = this.$refs.DesignDetailAlter
|
// let DesignDetailAlter:any = this.$refs.DesignDetailAlter
|
||||||
// DesignDetailAlter.changePlace()
|
// DesignDetailAlter.changePlace()
|
||||||
this.designOrder = true
|
this.designOrder = true
|
||||||
if(this.designItemDetail.clothes?.[this.designItemDetail?.clothes.length-1]?.id){
|
if(this.designItemDetail.clothes?.[this.designItemDetail?.clothes.length-1]?.id || this.designItemDetail.clothes?.length == 0){
|
||||||
this.designItemDetail.clothes.push(aa)
|
this.designItemDetail.clothes.push(aa)
|
||||||
}else{
|
}else{
|
||||||
|
return
|
||||||
}
|
}
|
||||||
this.clothesDetail(aa,this.designItemDetail.clothes.length-1)
|
this.clothesDetail(aa,this.designItemDetail.clothes.length-1)
|
||||||
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
|
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
|
||||||
@@ -971,8 +980,13 @@ export default defineComponent({
|
|||||||
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
|
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
|
||||||
|
|
||||||
this.designOrder = true
|
this.designOrder = true
|
||||||
this.current = designItemDetail.clothes[index]
|
if(clothes){
|
||||||
if(this.current.id && !designItemDetail.clothes[designItemDetail.clothes.length-1].id){
|
this.current = clothes
|
||||||
|
}else{
|
||||||
|
this.current = designItemDetail.clothes[index]
|
||||||
|
}
|
||||||
|
if(!this.current) return
|
||||||
|
if(this.current?.id && !designItemDetail?.clothes[designItemDetail.clothes.length-1].id){
|
||||||
designItemDetail.clothes.splice(designItemDetail.clothes.length-1,1)
|
designItemDetail.clothes.splice(designItemDetail.clothes.length-1,1)
|
||||||
this.store.commit('setDesignItemDetail',designItemDetail)
|
this.store.commit('setDesignItemDetail',designItemDetail)
|
||||||
}
|
}
|
||||||
@@ -985,6 +999,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
this.currentIndex = this.currentIndex>0?this.currentIndex:0
|
||||||
data.designSingleItemDTOList[this.currentIndex] = {
|
data.designSingleItemDTOList[this.currentIndex] = {
|
||||||
color:`${this.current.color.r} ${this.current.color.g} ${this.current.color.b}`,
|
color:`${this.current.color.r} ${this.current.color.g} ${this.current.color.b}`,
|
||||||
|
|
||||||
@@ -994,7 +1009,7 @@ export default defineComponent({
|
|||||||
path:this.current.minIOPath?this.current.minIOPath:'',
|
path:this.current.minIOPath?this.current.minIOPath:'',
|
||||||
offset:this.current.layersObject?.[1]?.offset?this.current.layersObject[1].offset:[0,0],
|
offset:this.current.layersObject?.[1]?.offset?this.current.layersObject[1].offset:[0,0],
|
||||||
priority:this.current.priority,
|
priority:this.current.priority,
|
||||||
scale:this.current.layersObject?.[1]?.scale?this.current.layersObject[1].scale:1,
|
scale:this.current.layersObject?.[1]?.scale?this.current.layersObject[1].scale:[1,1],
|
||||||
printObject:{
|
printObject:{
|
||||||
ifSingle:this.current?.printObject?.ifSingle == null ? false : this.current?.printObject?.ifSingle,
|
ifSingle:this.current?.printObject?.ifSingle == null ? false : this.current?.printObject?.ifSingle,
|
||||||
// prints:this.current?.printObject[0]?.path == null ? [] : [{
|
// prints:this.current?.printObject[0]?.path == null ? [] : [{
|
||||||
|
|||||||
@@ -566,7 +566,17 @@ export default defineComponent({
|
|||||||
init(num){
|
init(num){
|
||||||
this.type_ = num
|
this.type_ = num
|
||||||
this.select = true
|
this.select = true
|
||||||
let arr = this.current.color
|
let arr
|
||||||
|
if(this.current?.color){
|
||||||
|
arr = this.current.color
|
||||||
|
}else{
|
||||||
|
arr = {
|
||||||
|
r: 0,
|
||||||
|
g: 0,
|
||||||
|
b: 0,
|
||||||
|
a:1,
|
||||||
|
}
|
||||||
|
}
|
||||||
// if(!arr[3]){
|
// if(!arr[3]){
|
||||||
// arr[3] = 1
|
// arr[3] = 1
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
<img v-show="type_==1" class="result_appare_img" :src="sketchImg?.path?sketchImg?.path:current?.path" :title="current?.type">
|
<img v-show="type_==1" class="result_appare_img" :src="sketchImg?.path?sketchImg?.path:current?.path" :title="current?.type">
|
||||||
<!-- <img v-show="type_==2" class="result_print_img" :src="current?.path" :title="current?.type" @click="setPrint"> -->
|
<!-- <img v-show="type_==2" class="result_print_img" :src="current?.path" :title="current?.type" @click="setPrint"> -->
|
||||||
<div v-show="type_==2" class="result_print_img" @click="setPrint" :title="current?.type">
|
<div v-show="type_==2" class="result_print_img" @click="setPrint" :title="current?.type">
|
||||||
<img v-for="item in current.layersObject" :src="item.imageUrl" alt="">
|
<img v-for="item in current?.layersObject" :src="item.imageUrl" alt="">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-show="type_ == 1 || type_ == 3" @click.stop="setPreview" class="subitOkPreviewBtn" :class="[ !sketchImg.id?!current.id?'active':'':'' ]">{{ $t('DesignDetailEnd.preview') }}</div>
|
<div v-show="type_ == 1 || type_ == 3" @click.stop="setPreview" class="subitOkPreviewBtn" :class="[ !sketchImg?.id?!current?.id?'active':'':'' ]">{{ $t('DesignDetailEnd.preview') }}</div>
|
||||||
<div v-if="type_ == 2 && current?.printObject?.prints?.[0]?.path != null" @click.stop="setPrint" class="subitOkPreviewBtn Guide_1_23">{{ $t('DesignDetailEnd.Layout') }}</div>
|
<div v-if="type_ == 2 && current?.printObject?.prints?.[0]?.path != null" @click.stop="setPrint" class="subitOkPreviewBtn Guide_1_23">{{ $t('DesignDetailEnd.Layout') }}</div>
|
||||||
<div v-else-if="type_ == 2 && designItemDetail?.clothes?.[currentIndex]?.printObject?.prints?.[0]?.path != null && current?.printObject?.prints?.[0]?.path == null" @click.stop="setPreview" class="subitOkPreviewBtn">{{ $t('DesignDetailEnd.preview') }}</div>
|
<div v-else-if="type_ == 2 && designItemDetail?.clothes?.[currentIndex]?.printObject?.prints?.[0]?.path != null && current?.printObject?.prints?.[0]?.path == null" @click.stop="setPreview" class="subitOkPreviewBtn">{{ $t('DesignDetailEnd.preview') }}</div>
|
||||||
<DesignPrintOperation v-if="!moible" ref="DesignPrintOperation"></DesignPrintOperation>
|
<DesignPrintOperation v-if="!moible" ref="DesignPrintOperation"></DesignPrintOperation>
|
||||||
@@ -189,7 +189,7 @@ export default defineComponent({
|
|||||||
this.type_ = num
|
this.type_ = num
|
||||||
this.colorList[this.selectIndex] = this.$parent.selectColor
|
this.colorList[this.selectIndex] = this.$parent.selectColor
|
||||||
this.overallSingle = this.current?.printObject?.ifSingle == null?false:this.current?.printObject?.ifSingle
|
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){
|
setSketchImg(v){
|
||||||
@@ -304,13 +304,16 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
index = index? index:0
|
||||||
if(!this.current.id){
|
if(!this.current.id){
|
||||||
data.designSingleItemDTOList[index].priority = zIndex+=1
|
if(index){
|
||||||
|
data.designSingleItemDTOList[index].priority = zIndex+=1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(this.type_ == 1){
|
if(this.type_ == 1){
|
||||||
if(data.designSingleItemDTOList[index].path != this.sketchImg.minIOPath && this.sketchImg.id_){
|
if(data.designSingleItemDTOList[index].path != this.sketchImg.minIOPath && this.sketchImg.id_){
|
||||||
data.designSingleItemDTOList[index].offset = [0,0]
|
data.designSingleItemDTOList[index].offset = [0,0]
|
||||||
data.designSingleItemDTOList[index].scale = 1
|
data.designSingleItemDTOList[index].scale = [1,1]
|
||||||
}
|
}
|
||||||
data.designSingleItemDTOList = this.soleId(data.designSingleItemDTOList,index)
|
data.designSingleItemDTOList = this.soleId(data.designSingleItemDTOList,index)
|
||||||
this.sketchImg.id_ = data.designSingleItemDTOList[index].id
|
this.sketchImg.id_ = data.designSingleItemDTOList[index].id
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
<div v-show="!overallSingle" class="habit_System_Designer">
|
<div v-show="!overallSingle" class="habit_System_Designer">
|
||||||
<div class="habit_System_Designer_text">{{ $t('DesignPrintOperation.Scale') }}</div>
|
<div class="habit_System_Designer_text">{{ $t('DesignPrintOperation.Scale') }}</div>
|
||||||
<a-slider id="system_silder"
|
<a-slider id="system_silder"
|
||||||
|
:min="1"
|
||||||
v-model:value="systemDesignerPercentage"
|
v-model:value="systemDesignerPercentage"
|
||||||
@afterChange="systemDesigner"
|
@afterChange="systemDesigner"
|
||||||
:tip-formatter="formatter"
|
:tip-formatter="formatter"
|
||||||
@@ -296,15 +297,14 @@ export default defineComponent({
|
|||||||
this.refetchTemplate(0)
|
this.refetchTemplate(0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
systemDesigner(num) {
|
systemDesigner(num) {
|
||||||
let DesignPrintOperationParent = this.$parent
|
let DesignPrintOperationParent = this.$parent
|
||||||
DesignPrintOperationParent.systemDesignerPercentage = num
|
DesignPrintOperationParent.systemDesignerPercentage = num
|
||||||
},
|
},
|
||||||
formatter(value) {
|
formatter(value) {
|
||||||
|
if(value<30)value = 30
|
||||||
return `${value*3}%`;
|
return `${value*3}%`;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -608,7 +608,7 @@ export default defineComponent({
|
|||||||
let location
|
let location
|
||||||
arr.forEach((v,index)=>{
|
arr.forEach((v,index)=>{
|
||||||
if(!this.overallSingle){
|
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+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]
|
location = [arr[index].style.left.replace(/px/g,'')*sketchNum,arr[index].style.top.replace(/px/g,'')*sketchNum]
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
<div v-show="!overallSingle" class="habit_System_Designer">
|
<div v-show="!overallSingle" class="habit_System_Designer">
|
||||||
<div class="habit_System_Designer_text">Scale</div>
|
<div class="habit_System_Designer_text">Scale</div>
|
||||||
<a-slider id="system_silder"
|
<a-slider id="system_silder"
|
||||||
|
:min="1"
|
||||||
v-model:value="systemDesignerPercentage"
|
v-model:value="systemDesignerPercentage"
|
||||||
@afterChange="systemDesigner"
|
@afterChange="systemDesigner"
|
||||||
:tip-formatter="formatter"
|
:tip-formatter="formatter"
|
||||||
@@ -610,7 +611,7 @@ export default defineComponent({
|
|||||||
let location
|
let location
|
||||||
arr.forEach((v,index)=>{
|
arr.forEach((v,index)=>{
|
||||||
if(!this.overallSingle){
|
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+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]
|
location = [arr[index].style.left.replace(/px/g,'')*sketchNum,arr[index].style.top.replace(/px/g,'')*sketchNum]
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -139,7 +139,6 @@ export default defineComponent({
|
|||||||
let front = []
|
let front = []
|
||||||
let back = []
|
let back = []
|
||||||
let body
|
let body
|
||||||
|
|
||||||
designItemDetail.others.forEach((item) => {
|
designItemDetail.others.forEach((item) => {
|
||||||
if(item.type == 'Body'){
|
if(item.type == 'Body'){
|
||||||
body = item
|
body = item
|
||||||
@@ -299,7 +298,7 @@ export default defineComponent({
|
|||||||
w = (e.x - this.frontBack.front[this.imgDomIndex].centers.left)
|
w = (e.x - this.frontBack.front[this.imgDomIndex].centers.left)
|
||||||
h = (e.x - this.frontBack.front[this.imgDomIndex].centers.left)*num
|
h = (e.x - this.frontBack.front[this.imgDomIndex].centers.left)*num
|
||||||
width = w+'px'
|
width = w+'px'
|
||||||
height = w*num+'px'
|
// height = w*num+'px'
|
||||||
}else if(this.direction == 'top'){
|
}else if(this.direction == 'top'){
|
||||||
num = width/height
|
num = width/height
|
||||||
this.frontBack.front[this.imgDomIndex].style.top = 'auto'
|
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)
|
h = (this.frontBack.front[this.imgDomIndex].centers.top - e.y)
|
||||||
|
|
||||||
height = h+'px'
|
height = h+'px'
|
||||||
width = h*num+'px'
|
// width = h*num+'px'
|
||||||
}else if(this.direction == 'bottom'){
|
}else if(this.direction == 'bottom'){
|
||||||
num = width/height
|
num = width/height
|
||||||
h = (e.y - this.frontBack.front[this.imgDomIndex].centers.top)
|
h = (e.y - this.frontBack.front[this.imgDomIndex].centers.top)
|
||||||
height = h+'px'
|
height = h+'px'
|
||||||
width = h*num+'px'
|
// width = h*num+'px'
|
||||||
}else if(this.direction == 'left'){
|
}else if(this.direction == 'left'){
|
||||||
this.frontBack.front[this.imgDomIndex].style.left = 'auto'
|
this.frontBack.front[this.imgDomIndex].style.left = 'auto'
|
||||||
this.frontBack.front[this.imgDomIndex].style.right = parentNode.offsetWidth -imgDomWH.width - this.imgDom.offsetLeft+'px'
|
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)
|
w = (this.frontBack.front[this.imgDomIndex].centers.left - e.x)
|
||||||
|
|
||||||
width = w+'px'
|
width = w+'px'
|
||||||
height = w*num+'px'
|
// height = w*num+'px'
|
||||||
}
|
}
|
||||||
//判断尺寸是否到边
|
//判断尺寸是否到边
|
||||||
this.frontBack.front[this.imgDomIndex].style.width = width
|
this.frontBack.front[this.imgDomIndex].style.width = width
|
||||||
@@ -409,8 +408,10 @@ export default defineComponent({
|
|||||||
if(item.id == arr[index].id && !arr[index].similarity){
|
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 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 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
|
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
|
||||||
item.scale = scale
|
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 top = y == 0 ? item.offset[1]:y+item.offset[1]
|
||||||
let left = x == 0 ? item.offset[0]:x+item.offset[0]
|
let left = x == 0 ? item.offset[0]:x+item.offset[0]
|
||||||
item.offset = [left,top]
|
item.offset = [left,top]
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ export default defineComponent({
|
|||||||
w = (e.changedTouches[0].pageX -imgDomWH.left)
|
w = (e.changedTouches[0].pageX -imgDomWH.left)
|
||||||
h = (e.changedTouches[0].pageX -imgDomWH.left)*num
|
h = (e.changedTouches[0].pageX -imgDomWH.left)*num
|
||||||
width = w+'px'
|
width = w+'px'
|
||||||
height = w*num+'px'
|
// height = w*num+'px'
|
||||||
}else if(this.direction == 'top'){
|
}else if(this.direction == 'top'){
|
||||||
num = width/height
|
num = width/height
|
||||||
this.frontBack.front[this.imgDomIndex].style.top = 'auto'
|
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)
|
h = (this.frontBack.front[this.imgDomIndex].centers.top - e.changedTouches[0].pageY)
|
||||||
|
|
||||||
height = h+'px'
|
height = h+'px'
|
||||||
width = h*num+'px'
|
// width = h*num+'px'
|
||||||
}else if(this.direction == 'bottom'){
|
}else if(this.direction == 'bottom'){
|
||||||
num = width/height
|
num = width/height
|
||||||
h = (e.changedTouches[0].pageY -imgDomWH.top)
|
h = (e.changedTouches[0].pageY -imgDomWH.top)
|
||||||
height = h+'px'
|
height = h+'px'
|
||||||
width = h*num+'px'
|
// width = h*num+'px'
|
||||||
}else if(this.direction == 'left'){
|
}else if(this.direction == 'left'){
|
||||||
w = (this.frontBack.front[this.imgDomIndex].centers.left - e.changedTouches[0].pageX)
|
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.left = 'auto'
|
||||||
this.frontBack.front[this.imgDomIndex].style.right = this.frontBack.front[this.imgDomIndex].centers.right+'px'
|
this.frontBack.front[this.imgDomIndex].style.right = this.frontBack.front[this.imgDomIndex].centers.right+'px'
|
||||||
width = w+'px'
|
width = w+'px'
|
||||||
height = w*num+'px'
|
// height = w*num+'px'
|
||||||
}
|
}
|
||||||
//判断尺寸是否到边
|
//判断尺寸是否到边
|
||||||
this.frontBack.front[this.imgDomIndex].style.width = width
|
this.frontBack.front[this.imgDomIndex].style.width = width
|
||||||
@@ -403,12 +403,13 @@ export default defineComponent({
|
|||||||
imageCategory1 = arr[1].imageCategory
|
imageCategory1 = arr[1].imageCategory
|
||||||
}
|
}
|
||||||
arr.forEach((i)=>{
|
arr.forEach((i)=>{
|
||||||
let imageCategory = i.imageCategory.split('_')[0]
|
|
||||||
if(item.id == i.id){
|
if(item.id == i.id){
|
||||||
let y = ((i?.style?.top.replace(/px/g,'')*ratio).toFixed(0) - i?.position[0])
|
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 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
|
// let scale = i?.imageSize?Number(((i?.style?.width.replace(/px/g,'')*ratio)/(i?.imageSize[0]/i.scale)).toFixed(2)):1
|
||||||
item.scale = scale
|
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 top = y == 0 ? item.offset[1]:y+item.offset[1]
|
||||||
let left = x == 0 ? item.offset[0]:x+item.offset[0]
|
let left = x == 0 ? item.offset[0]:x+item.offset[0]
|
||||||
item.offset = [left,top]
|
item.offset = [left,top]
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ export default {
|
|||||||
GetStarted:'开始设计',
|
GetStarted:'开始设计',
|
||||||
Start:'开始',
|
Start:'开始',
|
||||||
Edit:'编辑',
|
Edit:'编辑',
|
||||||
|
Reset:'重置',
|
||||||
Design:'设计',
|
Design:'设计',
|
||||||
Redesign:'重新设计',
|
Redesign:'重新设计',
|
||||||
GeneratedDesign:'生成的设计',
|
GeneratedDesign:'生成的设计',
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ export default {
|
|||||||
GetStarted:'Get Started',
|
GetStarted:'Get Started',
|
||||||
Start:'Start',
|
Start:'Start',
|
||||||
Edit:'Edit',
|
Edit:'Edit',
|
||||||
|
Reset:'Reset',
|
||||||
Design:'Design',
|
Design:'Design',
|
||||||
Redesign:'Redesign',
|
Redesign:'Redesign',
|
||||||
GeneratedDesign:'Generated Design',
|
GeneratedDesign:'Generated Design',
|
||||||
|
|||||||
@@ -185,7 +185,6 @@ const UploadFilesModule : Module<UploadFiles,RootState> = {
|
|||||||
state.printboard = [...state.printboardFiles,...state.printGenerateFiles,...state.printMaterialFiles]
|
state.printboard = [...state.printboardFiles,...state.printGenerateFiles,...state.printMaterialFiles]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
setColorboardList(state,colorBoards){
|
setColorboardList(state,colorBoards){
|
||||||
state.colorBoards = colorBoards
|
state.colorBoards = colorBoards
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -33,6 +33,9 @@
|
|||||||
<div class="button_first button_margin" @click="recollection()">
|
<div class="button_first button_margin" @click="recollection()">
|
||||||
{{ $t('HomeView.Edit') }}
|
{{ $t('HomeView.Edit') }}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="button_first button_margin" @click="resetCollection()">
|
||||||
|
{{ $t('HomeView.Reset') }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="left_info_content scroll_style">
|
<div class="left_info_content scroll_style">
|
||||||
<div class="left_info_content_body" ref="collection_canvas">
|
<div class="left_info_content_body" ref="collection_canvas">
|
||||||
@@ -556,6 +559,13 @@ export default defineComponent({
|
|||||||
collectionModal.recollection();
|
collectionModal.recollection();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
resetCollection(){
|
||||||
|
this.store.commit("clearAllData");
|
||||||
|
this.store.commit("clearAllCollection");
|
||||||
|
this.store.commit("setAllBoardDataChoose",{});
|
||||||
|
this.store.commit("clearShowSketchboard",{});
|
||||||
|
|
||||||
|
},
|
||||||
//完成设计
|
//完成设计
|
||||||
finishCollection() {
|
finishCollection() {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
|
|||||||
@@ -529,6 +529,7 @@ export default defineComponent({
|
|||||||
this.store.commit("clearAllData");
|
this.store.commit("clearAllData");
|
||||||
this.store.commit("clearAllCollection");
|
this.store.commit("clearAllCollection");
|
||||||
this.store.commit("setAllBoardDataChoose",{});
|
this.store.commit("setAllBoardDataChoose",{});
|
||||||
|
this.store.commit("clearShowSketchboard",{});
|
||||||
this.$router.push("/home");
|
this.$router.push("/home");
|
||||||
},
|
},
|
||||||
//获取当前语言
|
//获取当前语言
|
||||||
|
|||||||
Reference in New Issue
Block a user