付款页面新增按钮
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
<img src="../../assets/images/homePage/cuowu.svg" alt="">
|
||||
</li>
|
||||
</ul>
|
||||
<div></div>
|
||||
<!-- <div></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -261,7 +261,7 @@ export default defineComponent({
|
||||
if(this.$parent.exhibitionList.elements)this.designSelectElementsList = JSON.parse(JSON.stringify(this.$parent.exhibitionList.elements))
|
||||
if(this.$parent.elementsList)this.designElementsList = JSON.parse(JSON.stringify(this.$parent.elementsList))
|
||||
let skecth = new Image
|
||||
skecth.src = this.current.path
|
||||
skecth.src = this.current.undividedLayer || this.current.path
|
||||
skecth.onload=()=>{
|
||||
this.sketch.width = skecth.width/10+'rem'
|
||||
this.sketch.height = skecth.height/10+'rem'
|
||||
@@ -526,8 +526,10 @@ export default defineComponent({
|
||||
top:top,
|
||||
right:"auto",
|
||||
bottom:"auto",
|
||||
width:this.print.width.replace(/px/g,'')/sketchNum*item.scale+'px',
|
||||
height:this.print.height.replace(/px/g,'')/sketchNum*item.scale+'px',
|
||||
// width:this.print.width.replace(/px/g,'')/sketchNum*item.scale+'px',
|
||||
// height:this.print.height.replace(/px/g,'')/sketchNum*item.scale+'px',
|
||||
width:sketch.offsetWidth*item.scale[0]+'px',
|
||||
height:sketch.offsetHeight*item.scale[1]+'px',
|
||||
zIndex:zIndex++
|
||||
},
|
||||
transform:{
|
||||
@@ -565,7 +567,7 @@ export default defineComponent({
|
||||
let location
|
||||
for (let index = 0; index < arr.length; index++) {
|
||||
await this.setPrintWH(this.exhibitionElementsList[index].path)
|
||||
scale = (arr[index].style.width.replace(/px/g,'')*sketchNum/this.print.width.replace(/px/g,''))
|
||||
scale = [arr[index].style.width.replace(/px/g,'')/sketch.offsetWidth,(arr[index].style.height.replace(/px/g,'')/sketch.offsetHeight)]
|
||||
location = [arr[index].style.left.replace(/px/g,'')*sketchNum,arr[index].style.top.replace(/px/g,'')*sketchNum]
|
||||
let obj = {
|
||||
angle : arr[index].transform.rotateZ,
|
||||
|
||||
@@ -108,12 +108,12 @@
|
||||
</div>
|
||||
<img :src="operationCurrent?.undividedLayer?operationCurrent.undividedLayer:operationCurrent.path" alt="" class="designOpenrtion_sketch">
|
||||
<div class="designOpenrtion_btn">
|
||||
<ul v-if="overallSingle" v-for="item,index in printStyleList[stateOverallSingle]" :key="item" :class="{active:item?.designOpenrtionBtn?item?.designOpenrtionBtn:false}" class="designOpenrtion_Mousingle" :style="item.style" @mousedown.stop="itemMoveMousedown(index,getMousePosition($event,false))" @touchstart.passive="itemMoveMousedown(index,getMousePosition($event,true))">
|
||||
<ul v-if="overallSingle" v-for="item,index in printStyleList[stateOverallSingle]" :key="item" :class="{active:item?.designOpenrtionBtn?item?.designOpenrtionBtn:false}" class="designOpenrtion_Mousingle" :style="item?.style" @mousedown.stop="itemMoveMousedown(index,getMousePosition($event,false))" @touchstart.passive="itemMoveMousedown(index,getMousePosition($event,true))">
|
||||
<li class="designOpenrtion_btn_top" @mousedown.stop="itemSizeMousedown('top',getMousePosition($event,false))" @touchstart.passive="itemSizeMousedown('top',getMousePosition($event,true))"></li>
|
||||
<li class="designOpenrtion_btn_bottom" @mousedown.stop="itemSizeMousedown('bottom',getMousePosition($event,false))" @touchstart.passive="itemSizeMousedown('bottom',getMousePosition($event,true))"></li>
|
||||
<li class="designOpenrtion_btn_left" @mousedown.stop="itemSizeMousedown('left',getMousePosition($event,false))" @touchstart.passive="itemSizeMousedown('left',getMousePosition($event,true))"></li>
|
||||
<li class="designOpenrtion_btn_right" @mousedown.stop="itemSizeMousedown('right',getMousePosition($event,false))" @touchstart.passive="itemSizeMousedown('right',getMousePosition($event,true))"></li>
|
||||
<li class="designOpenrtion_rotote" v-rotote.stop="[index,item.transform]"></li>
|
||||
<li class="designOpenrtion_rotote" v-rotote.stop="[index,item?.transform]"></li>
|
||||
<li class="designOpenrtion_delete" @click.stop="deletePrint">
|
||||
<img src="../../assets/images/homePage/cuowu.svg" alt="">
|
||||
</li>
|
||||
@@ -122,7 +122,7 @@
|
||||
<ul v-if="!overallSingle && printStyleList[stateOverallSingle][0]" class="designOpenrtion_Mouoverall active" :style="'left:'+printStyleList[stateOverallSingle][0]?.style?.left+';top:'+printStyleList[stateOverallSingle][0]?.style?.top+';'" @mousedown.stop="itemMoveMousedown(0,getMousePosition($event,false))" @touchstart.passive="itemMoveMousedown(0,getMousePosition($event,true))">
|
||||
<i class="fi fi-rr-arrows animtion1"></i>
|
||||
<i class="fi fi-rr-arrows animtion2"></i>
|
||||
<li class="designOpenrtion_rotote" v-rotote.stop="[0,printStyleList[stateOverallSingle][0].transform]"></li>
|
||||
<li class="designOpenrtion_rotote" v-rotote.stop="[0,printStyleList[stateOverallSingle][0]?.transform]"></li>
|
||||
|
||||
|
||||
|
||||
@@ -330,7 +330,7 @@ export default defineComponent({
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
async init(){
|
||||
this.designOpenrtion = true
|
||||
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
|
||||
this.currentFullBodyView = designItemDetail.currentFullBodyView?designItemDetail.currentFullBodyView:designItemDetail.designItemUrl
|
||||
@@ -348,12 +348,16 @@ export default defineComponent({
|
||||
if(this.$parent.exhibitionList.print)this.designOpenrtionList = JSON.parse(JSON.stringify(this.$parent.exhibitionList.print))
|
||||
if(this.$parent.elementsList)this.designList = JSON.parse(JSON.stringify(this.$parent.printsList))
|
||||
let skecth = new Image
|
||||
skecth.onload=()=>{
|
||||
this.sketch.width = skecth.width/10+'rem'
|
||||
this.sketch.height = skecth.height/10+'rem'
|
||||
skecth.remove()
|
||||
}
|
||||
skecth.src = this.current.path
|
||||
skecth.src = this.current.undividedLayer || this.current.path
|
||||
await new Promise((resolve, reject) => {
|
||||
skecth.onload=()=>{
|
||||
this.sketch.width = skecth.width/10+'rem'
|
||||
this.sketch.height = skecth.height/10+'rem'
|
||||
skecth.remove()
|
||||
resolve()
|
||||
}
|
||||
})
|
||||
|
||||
if(this.exhibitionOpenrtionList.overall.length > 0){
|
||||
let str = 'overall'
|
||||
this.exhibitionOpenrtionList[str].forEach((item,index)=>{
|
||||
@@ -449,7 +453,7 @@ export default defineComponent({
|
||||
location:[0,0],
|
||||
ifSingle:false,
|
||||
}
|
||||
this.systemDesignerPercentage = item.scale?item.scale*100:30
|
||||
this.systemDesignerPercentage = (item.scale?.[0] && !item.ifSingle)?item.scale[0]*100:30
|
||||
}else{
|
||||
this.printStyleList[this.stateOverallSingle].push(JSON.parse(JSON.stringify(this.currentPrintStyleList)))
|
||||
let currentIndex = this.printStyleList[this.stateOverallSingle].length-1
|
||||
@@ -460,7 +464,7 @@ export default defineComponent({
|
||||
minIOPath:item.minIOPath,
|
||||
path:item.path,
|
||||
priority:1,
|
||||
scale:1,
|
||||
scale:[1,1],
|
||||
location:[0,0],
|
||||
ifSingle:true,
|
||||
})
|
||||
@@ -705,39 +709,44 @@ export default defineComponent({
|
||||
let sketch = document.getElementsByClassName("designOpenrtion_modal")[0]?.getElementsByClassName('designOpenrtion_sketch')[0]
|
||||
let sketchImg = new Image()
|
||||
sketchImg.onload = ()=>{
|
||||
let sketchNum = this.sketch.width.replace(/rem/g,'')*10/sketch.offsetWidth
|
||||
let scale
|
||||
scale = (this.print.width.replace(/px/g,'')*sketchNum/this.print.width.replace(/px/g,''))
|
||||
let zIndex = 1
|
||||
let left = item.location[0]/sketchNum+'px'
|
||||
let top = item.location[1]/sketchNum+'px'
|
||||
if(sketch.offsetWidth < item.location[0]/sketchNum){
|
||||
left = sketch.offsetWidth +'px'
|
||||
}
|
||||
if(sketch.offsetHeight < item.location[1]/sketchNum){
|
||||
top = sketch.offsetHeight +'px'
|
||||
}
|
||||
if(str == 'overall')this.systemDesignerPercentage = item.scale?item.scale*100:30
|
||||
this.printStyleList[str][index]={
|
||||
centers:{
|
||||
left:0,
|
||||
top:0,
|
||||
},
|
||||
style:{
|
||||
left:left,
|
||||
top:top,
|
||||
right:"auto",
|
||||
bottom:"auto",
|
||||
width:this.print.width.replace(/px/g,'')/sketchNum*item.scale+'px',
|
||||
height:this.print.height.replace(/px/g,'')/sketchNum*item.scale+'px',
|
||||
zIndex:zIndex++
|
||||
},
|
||||
transform:{
|
||||
// scale:scale<.2?.2:scale,//0.2-3
|
||||
rotateZ:item.angle,
|
||||
},
|
||||
designOpenrtionBtn:false
|
||||
}
|
||||
nextTick(()=>{
|
||||
let sketchNum = this.sketch.width.replace(/rem/g,'')*10/sketch.offsetWidth
|
||||
let scale
|
||||
scale = (this.print.width.replace(/px/g,'')*sketchNum/this.print.width.replace(/px/g,''))
|
||||
let zIndex = 1
|
||||
let left = item.location[0]/sketchNum+'px'
|
||||
let top = item.location[1]/sketchNum+'px'
|
||||
if(sketch.offsetWidth < item.location[0]/sketchNum){
|
||||
left = sketch.offsetWidth +'px'
|
||||
}
|
||||
if(sketch.offsetHeight < item.location[1]/sketchNum){
|
||||
top = sketch.offsetHeight +'px'
|
||||
}
|
||||
if(str == 'overall')this.systemDesignerPercentage = item.scale?.[0]?item.scale[0]*100:30
|
||||
this.printStyleList[str][index]={
|
||||
centers:{
|
||||
left:0,
|
||||
top:0,
|
||||
},
|
||||
style:{
|
||||
left:left,
|
||||
top:top,
|
||||
right:"auto",
|
||||
bottom:"auto",
|
||||
// width:this.print.width.replace(/px/g,'')/sketchNum*item.scale[0]+'px',
|
||||
// height:this.print.height.replace(/px/g,'')/sketchNum*item.scale[1]+'px',
|
||||
width:sketch.offsetWidth*item.scale[0]+'px',
|
||||
height:sketch.offsetHeight*item.scale[1]+'px',
|
||||
zIndex:zIndex++
|
||||
},
|
||||
transform:{
|
||||
// scale:scale<.2?.2:scale,//0.2-3
|
||||
rotateZ:item.angle,
|
||||
},
|
||||
designOpenrtionBtn:false
|
||||
}
|
||||
})
|
||||
|
||||
sketchImg.remove()
|
||||
}
|
||||
sketchImg.src = sketch.src
|
||||
@@ -799,21 +808,22 @@ export default defineComponent({
|
||||
let scale
|
||||
let location
|
||||
for (let index = 0; index < arr.length; index++) {
|
||||
if(!this.overallSingle){
|
||||
scale = this.systemDesignerPercentage/100
|
||||
if(this.stateOverallSingle == 'overall'){
|
||||
// if(!this.overallSingle){
|
||||
scale =[ this.systemDesignerPercentage/100, this.systemDesignerPercentage/100]
|
||||
let overallScale = (arr[index].style.width.replace(/px/g,'')*sketchNum/this.print.width.replace(/px/g,''))
|
||||
let x = Number(arr[index].style.left.replace(/px/g,''))
|
||||
let y = Number(arr[index].style.top.replace(/px/g,''))
|
||||
// let x = (Number(arr[index].style.left.replace(/px/g,'')) + Number(arr[index].style.width.replace(/px/g,''))/2)*sketchNum
|
||||
// let y = (Number(arr[index].style.top.replace(/px/g,'')) + Number(arr[index].style.height.replace(/px/g,''))/2)*sketchNum
|
||||
let width = Number(this.print.width.replace(/px/g,''))*scale/5/2
|
||||
let height = Number(this.print.height.replace(/px/g,''))*scale/5/2
|
||||
let width = Number(this.print.width.replace(/px/g,''))*scale[0]/5/2
|
||||
let height = Number(this.print.height.replace(/px/g,''))*scale[0]/5/2
|
||||
location = [(x*sketchNum) ,(y*sketchNum)]
|
||||
// location = [(x*sketchNum) - width/sketchNum/2 ,(y*sketchNum) - height/sketchNum/2]
|
||||
|
||||
// location = [(x*sketchNum) ,(y*sketchNum)]
|
||||
location = [(x*sketchNum) - width/sketchNum/2 ,(y*sketchNum) - height/sketchNum/2]
|
||||
}else{
|
||||
await this.setPrintWH(this.exhibitionOpenrtionList[this.stateOverallSingle][index].path)
|
||||
scale = (arr[index].style.width.replace(/px/g,'')*sketchNum/this.print.width.replace(/px/g,''))
|
||||
scale = [arr[index].style.width.replace(/px/g,'')/sketch.offsetWidth,(arr[index].style.height.replace(/px/g,'')/sketch.offsetHeight)]
|
||||
location = [arr[index].style.left.replace(/px/g,'')*sketchNum,arr[index].style.top.replace(/px/g,'')*sketchNum]
|
||||
}
|
||||
let obj = {
|
||||
|
||||
@@ -515,6 +515,7 @@ export default defineComponent({
|
||||
for (let index = 0; index < rv.clothes.length; index++) {
|
||||
if(rv.clothes[index].id === item.id && !rv.clothes[index].similarity){
|
||||
item.layersObject = rv.clothes[index].layersObject
|
||||
item.undividedLayer = rv.clothes[index].undividedLayer
|
||||
item.priority = rv.clothes[index].layersObject[0].priority
|
||||
rv.clothes[index].similarity = true
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user