修复bug
This commit is contained in:
@@ -20,7 +20,6 @@
|
|||||||
<span>{{ $t('DesignDetailAlter.Library') }}</span>
|
<span>{{ $t('DesignDetailAlter.Library') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{designType}}
|
|
||||||
<div v-show="openClick == 2" class="detail_Library">
|
<div v-show="openClick == 2" class="detail_Library">
|
||||||
<div class="select_block">
|
<div class="select_block">
|
||||||
<a-select
|
<a-select
|
||||||
|
|||||||
@@ -291,6 +291,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init(){
|
init(){
|
||||||
|
this.designOpenrtion = true
|
||||||
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
|
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
|
||||||
this.currentFullBodyView = designItemDetail.currentFullBodyView?designItemDetail.currentFullBodyView:designItemDetail.designItemUrl
|
this.currentFullBodyView = designItemDetail.currentFullBodyView?designItemDetail.currentFullBodyView:designItemDetail.designItemUrl
|
||||||
if(designItemDetail.others.length == 0){
|
if(designItemDetail.others.length == 0){
|
||||||
@@ -298,36 +299,40 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
//设置前片后片
|
//设置前片后片
|
||||||
this.operationCurrent = Object.assign({},this.current)
|
this.operationCurrent = Object.assign({},this.current)
|
||||||
this.designOpenrtion = true
|
|
||||||
this.clearModal()
|
this.clearModal()
|
||||||
this.overallSingle = this.current.printObject.ifSingle?true:false
|
|
||||||
this.ifListOver()
|
|
||||||
let printList = JSON.parse(JSON.stringify(this.current.printObject.prints))
|
let printList = JSON.parse(JSON.stringify(this.current.printObject.prints))
|
||||||
this.setprintList(printList)
|
this.setprintList(printList)
|
||||||
|
|
||||||
|
this.overallSingle = this.exhibitionOpenrtionList.overall.length>0?false:this.exhibitionOpenrtionList.single.length>0?true:false
|
||||||
|
this.ifListOver()
|
||||||
if(this.$parent.exhibitionList.print)this.designOpenrtionList = JSON.parse(JSON.stringify(this.$parent.exhibitionList.print))
|
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))
|
if(this.$parent.elementsList)this.designList = JSON.parse(JSON.stringify(this.$parent.printsList))
|
||||||
if(this.overallSingle == false && this.designOpenrtionList.length > 0){
|
// if(this.overallSingle == false && this.designOpenrtionList.length > 0){
|
||||||
this.designOpenrtionList[0].checked = true
|
// this.designOpenrtionList[0].checked = true
|
||||||
}else if(this.overallSingle == false && this.designOpenrtionList.length == 0){
|
// }else if(this.overallSingle == false && this.designOpenrtionList.length == 0){
|
||||||
this.setpitch(this.designList[0],0)
|
// this.setpitch(this.designList[0],0)
|
||||||
}
|
// }
|
||||||
let skecth = new Image
|
let skecth = new Image
|
||||||
skecth.src = this.current.path
|
|
||||||
skecth.onload=()=>{
|
skecth.onload=()=>{
|
||||||
this.sketch.width = skecth.width/10+'rem'
|
this.sketch.width = skecth.width/10+'rem'
|
||||||
this.sketch.height = skecth.height/10+'rem'
|
this.sketch.height = skecth.height/10+'rem'
|
||||||
skecth.remove()
|
skecth.remove()
|
||||||
}
|
}
|
||||||
if(this.exhibitionOpenrtionList.overall.length > 0 && !this.overallSingle){
|
skecth.src = this.current.path
|
||||||
|
if(this.exhibitionOpenrtionList.overall.length > 0){
|
||||||
let str = 'overall'
|
let str = 'overall'
|
||||||
this.exhibitionOpenrtionList[str].forEach((item,index)=>{
|
this.exhibitionOpenrtionList[str].forEach((item,index)=>{
|
||||||
this.setTemplate(item,index,str)
|
this.setTemplate(item,index,str)
|
||||||
|
this.designOpenrtionList.forEach((openrtItem)=>{
|
||||||
|
if(item.minIOPath == openrtItem.minIOPath)openrtItem.checked=true
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}else if(!this.overallSingle){
|
|
||||||
let str = 'overall'
|
|
||||||
this.setOverallPosition(0,str)
|
|
||||||
}
|
}
|
||||||
if(this.exhibitionOpenrtionList.single.length > 0 && this.overallSingle){
|
// else if(!this.overallSingle){
|
||||||
|
// let str = 'overall'
|
||||||
|
// this.setOverallPosition(0,str)
|
||||||
|
// }
|
||||||
|
if(this.exhibitionOpenrtionList.single.length > 0){
|
||||||
let str = 'single'
|
let str = 'single'
|
||||||
this.exhibitionOpenrtionList[str].forEach((item,index)=>{
|
this.exhibitionOpenrtionList[str].forEach((item,index)=>{
|
||||||
this.setTemplate(item,index,str)
|
this.setTemplate(item,index,str)
|
||||||
@@ -633,6 +638,8 @@ export default defineComponent({
|
|||||||
await this.setPrintWH(item.path)
|
await this.setPrintWH(item.path)
|
||||||
this.designOpenrtionList
|
this.designOpenrtionList
|
||||||
let sketch = document.getElementsByClassName("designOpenrtion_modal")[0]?.getElementsByClassName('designOpenrtion_sketch')[0]
|
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 sketchNum = this.sketch.width.replace(/rem/g,'')*10/sketch.offsetWidth
|
||||||
let scale
|
let scale
|
||||||
scale = (this.print.width.replace(/px/g,'')*sketchNum/this.print.width.replace(/px/g,''))
|
scale = (this.print.width.replace(/px/g,'')*sketchNum/this.print.width.replace(/px/g,''))
|
||||||
@@ -645,7 +652,7 @@ export default defineComponent({
|
|||||||
if(sketch.offsetHeight < item.location[1]/sketchNum){
|
if(sketch.offsetHeight < item.location[1]/sketchNum){
|
||||||
top = sketch.offsetHeight +'px'
|
top = sketch.offsetHeight +'px'
|
||||||
}
|
}
|
||||||
this.systemDesignerPercentage = item.scale?item.scale*100:30
|
if(str == 'overall')this.systemDesignerPercentage = item.scale?item.scale*100:30
|
||||||
this.printStyleList[str][index]={
|
this.printStyleList[str][index]={
|
||||||
centers:{
|
centers:{
|
||||||
left:0,
|
left:0,
|
||||||
@@ -666,6 +673,9 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
designOpenrtionBtn:false
|
designOpenrtionBtn:false
|
||||||
}
|
}
|
||||||
|
sketchImg.remove()
|
||||||
|
}
|
||||||
|
sketchImg.src = sketch.src
|
||||||
},
|
},
|
||||||
setOverallPosition(index,str){
|
setOverallPosition(index,str){
|
||||||
nextTick(()=>{
|
nextTick(()=>{
|
||||||
|
|||||||
@@ -292,6 +292,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init(){
|
init(){
|
||||||
|
this.designOpenrtion = true
|
||||||
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
|
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
|
||||||
this.currentFullBodyView = designItemDetail.currentFullBodyView? designItemDetail.currentFullBodyView:designItemDetail.designItemUrl
|
this.currentFullBodyView = designItemDetail.currentFullBodyView? designItemDetail.currentFullBodyView:designItemDetail.designItemUrl
|
||||||
if(designItemDetail.others.length == 0){
|
if(designItemDetail.others.length == 0){
|
||||||
@@ -299,36 +300,40 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
//设置前片后片
|
//设置前片后片
|
||||||
this.operationCurrent = Object.assign({},this.current)
|
this.operationCurrent = Object.assign({},this.current)
|
||||||
this.designOpenrtion = true
|
|
||||||
this.clearModal()
|
this.clearModal()
|
||||||
this.overallSingle = this.current.printObject.ifSingle?true:false
|
|
||||||
this.ifListOver()
|
|
||||||
let printList = JSON.parse(JSON.stringify(this.current.printObject.prints))
|
let printList = JSON.parse(JSON.stringify(this.current.printObject.prints))
|
||||||
this.setprintList(printList)
|
this.setprintList(printList)
|
||||||
|
|
||||||
|
this.overallSingle = this.exhibitionOpenrtionList.overall.length>0?false:this.exhibitionOpenrtionList.single.length>0?true:false
|
||||||
|
this.ifListOver()
|
||||||
if(this.$parent.exhibitionList.print)this.designOpenrtionList = JSON.parse(JSON.stringify(this.$parent.exhibitionList.print))
|
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))
|
if(this.$parent.elementsList)this.designList = JSON.parse(JSON.stringify(this.$parent.printsList))
|
||||||
if(this.overallSingle == false && this.designOpenrtionList.length > 0){
|
// if(this.overallSingle == false && this.designOpenrtionList.length > 0){
|
||||||
this.designOpenrtionList[0].checked = true
|
// this.designOpenrtionList[0].checked = true
|
||||||
}else if(this.overallSingle == false && this.designOpenrtionList.length == 0){
|
// }else if(this.overallSingle == false && this.designOpenrtionList.length == 0){
|
||||||
this.setpitch(this.designList[0],0)
|
// this.setpitch(this.designList[0],0)
|
||||||
}
|
// }
|
||||||
let skecth = new Image
|
let skecth = new Image
|
||||||
skecth.src = this.current.path
|
|
||||||
skecth.onload=()=>{
|
skecth.onload=()=>{
|
||||||
this.sketch.width = skecth.width/10+'rem'
|
this.sketch.width = skecth.width/10+'rem'
|
||||||
this.sketch.height = skecth.height/10+'rem'
|
this.sketch.height = skecth.height/10+'rem'
|
||||||
skecth.remove()
|
skecth.remove()
|
||||||
}
|
}
|
||||||
if(this.exhibitionOpenrtionList.overall.length > 0 && !this.overallSingle){
|
skecth.src = this.current.path
|
||||||
|
if(this.exhibitionOpenrtionList.overall.length > 0){
|
||||||
let str = 'overall'
|
let str = 'overall'
|
||||||
this.exhibitionOpenrtionList[str].forEach((item,index)=>{
|
this.exhibitionOpenrtionList[str].forEach((item,index)=>{
|
||||||
this.setTemplate(item,index,str)
|
this.setTemplate(item,index,str)
|
||||||
|
this.designOpenrtionList.forEach((openrtItem)=>{
|
||||||
|
if(item.minIOPath == openrtItem.minIOPath)openrtItem.checked=true
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}else if(!this.overallSingle){
|
|
||||||
let str = 'overall'
|
|
||||||
this.setOverallPosition(0,str)
|
|
||||||
}
|
}
|
||||||
if(this.exhibitionOpenrtionList.single.length > 0 && this.overallSingle){
|
// else if(!this.overallSingle){
|
||||||
|
// let str = 'overall'
|
||||||
|
// this.setOverallPosition(0,str)
|
||||||
|
// }
|
||||||
|
if(this.exhibitionOpenrtionList.single.length > 0){
|
||||||
let str = 'single'
|
let str = 'single'
|
||||||
this.exhibitionOpenrtionList[str].forEach((item,index)=>{
|
this.exhibitionOpenrtionList[str].forEach((item,index)=>{
|
||||||
this.setTemplate(item,index,str)
|
this.setTemplate(item,index,str)
|
||||||
@@ -366,8 +371,6 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
systemDesigner(num) {
|
systemDesigner(num) {
|
||||||
let DesignPrintOperationParent = this.$parent
|
|
||||||
DesignPrintOperationParent.systemDesignerPercentage = num
|
|
||||||
},
|
},
|
||||||
formatter(value) {
|
formatter(value) {
|
||||||
return `${value*3}%`;
|
return `${value*3}%`;
|
||||||
@@ -430,7 +433,7 @@ export default defineComponent({
|
|||||||
location:[0,0],
|
location:[0,0],
|
||||||
ifSingle:true,
|
ifSingle:true,
|
||||||
})
|
})
|
||||||
this.refetchTemplate(currentIndex,false)
|
this.refetchTemplate(currentIndex,true)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//设置移动
|
//设置移动
|
||||||
@@ -581,9 +584,6 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
//随机重置图片顺序
|
//随机重置图片顺序
|
||||||
refetchTemplate(index,boor) {
|
refetchTemplate(index,boor) {
|
||||||
// let scale = (Math.trunc(Math.random()*15)+1)*.1
|
|
||||||
let rotateZ1 = Math.trunc(Math.random()*360)+1
|
|
||||||
let rotateZ2 = Math.trunc(Math.random()*360)+1
|
|
||||||
let sketch = document.getElementsByClassName("designOpenrtionMobile_modal")[0]?.getElementsByClassName('designOpenrtionMobile_sketch')[0]
|
let sketch = document.getElementsByClassName("designOpenrtionMobile_modal")[0]?.getElementsByClassName('designOpenrtionMobile_sketch')[0]
|
||||||
let width
|
let width
|
||||||
let scale
|
let scale
|
||||||
@@ -638,6 +638,8 @@ export default defineComponent({
|
|||||||
await this.setPrintWH(item.path)
|
await this.setPrintWH(item.path)
|
||||||
this.designOpenrtionList
|
this.designOpenrtionList
|
||||||
let sketch = document.getElementsByClassName("designOpenrtionMobile_modal")[0]?.getElementsByClassName('designOpenrtionMobile_sketch')[0]
|
let sketch = document.getElementsByClassName("designOpenrtionMobile_modal")[0]?.getElementsByClassName('designOpenrtionMobile_sketch')[0]
|
||||||
|
let sketchImg = new Image()
|
||||||
|
sketchImg.onload = ()=>{
|
||||||
let sketchNum = this.sketch.width.replace(/rem/g,'')*10/sketch.offsetWidth
|
let sketchNum = this.sketch.width.replace(/rem/g,'')*10/sketch.offsetWidth
|
||||||
let scale
|
let scale
|
||||||
scale = (this.print.width.replace(/px/g,'')*sketchNum/this.print.width.replace(/px/g,''))
|
scale = (this.print.width.replace(/px/g,'')*sketchNum/this.print.width.replace(/px/g,''))
|
||||||
@@ -650,7 +652,7 @@ export default defineComponent({
|
|||||||
if(sketch.offsetHeight < item.location[1]/sketchNum){
|
if(sketch.offsetHeight < item.location[1]/sketchNum){
|
||||||
top = sketch.offsetHeight +'px'
|
top = sketch.offsetHeight +'px'
|
||||||
}
|
}
|
||||||
this.systemDesignerPercentage = item.scale?item.scale*100:30
|
if(str == 'overall')this.systemDesignerPercentage = item.scale?item.scale*100:30
|
||||||
this.printStyleList[str][index]={
|
this.printStyleList[str][index]={
|
||||||
centers:{
|
centers:{
|
||||||
left:0,
|
left:0,
|
||||||
@@ -671,6 +673,9 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
designOpenrtionBtn:false
|
designOpenrtionBtn:false
|
||||||
}
|
}
|
||||||
|
sketchImg.remove()
|
||||||
|
}
|
||||||
|
sketchImg.src = sketch.src
|
||||||
|
|
||||||
},
|
},
|
||||||
setOverallPosition(index,str){
|
setOverallPosition(index,str){
|
||||||
@@ -813,6 +818,7 @@ export default defineComponent({
|
|||||||
designItemDetail.currentFullBodyView = this.designItemDetailTS.rv.currentFullBodyView
|
designItemDetail.currentFullBodyView = this.designItemDetailTS.rv.currentFullBodyView
|
||||||
designItemDetail.clothes[index].printObject.ifSingle = this.overallSingle
|
designItemDetail.clothes[index].printObject.ifSingle = this.overallSingle
|
||||||
designItemDetail.clothes[index].layersObject = this.designItemDetailTS.rv.clothes[index].layersObject
|
designItemDetail.clothes[index].layersObject = this.designItemDetailTS.rv.clothes[index].layersObject
|
||||||
|
designItemDetail.clothes[index].undividedLayer = this.designItemDetailTS.rv.clothes[index].undividedLayer
|
||||||
designItemDetail.clothes[index].trims = this.designItemDetailTS.rv.clothes[index].trims
|
designItemDetail.clothes[index].trims = this.designItemDetailTS.rv.clothes[index].trims
|
||||||
designItemDetail.clothes[index].printObject.prints = this.setOkData
|
designItemDetail.clothes[index].printObject.prints = this.setOkData
|
||||||
// designItemDetail.clothes[index].printObject.prints = this.computeZindex()
|
// designItemDetail.clothes[index].printObject.prints = this.computeZindex()
|
||||||
|
|||||||
Reference in New Issue
Block a user