Merge remote-tracking branch 'origin/StableVersion' into develop
This commit is contained in:
@@ -1306,6 +1306,7 @@ export default defineComponent({
|
||||
// display: block;
|
||||
overflow: initial !important;
|
||||
// width: 100%;
|
||||
text-align: center;
|
||||
.detail_modal_model{
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
|
||||
@@ -606,20 +606,22 @@ export default defineComponent({
|
||||
if(num == 1 || num == 2 || num == 4){
|
||||
this.clothesList = []
|
||||
this.getLibraryList()
|
||||
}else{
|
||||
this.store.state.UploadFilesModule.allBoardData?.colorBoards?.forEach((item,index) => {
|
||||
this.colorList[index+1] = {
|
||||
gradient:item.gradient,
|
||||
rgba:item.rgbValue,
|
||||
tcx:item.tcx,
|
||||
name:item.name,
|
||||
}
|
||||
if(item.gradient){
|
||||
this.colorList[index+1].gradient = item.gradient
|
||||
}else{
|
||||
delete this.colorList[index+1].gradient
|
||||
}
|
||||
})
|
||||
}
|
||||
this.store.state.UploadFilesModule.allBoardData?.colorBoards?.forEach((item,index) => {
|
||||
this.colorList[index+1] = {
|
||||
gradient:item.gradient,
|
||||
rgba:item.rgbValue,
|
||||
tcx:item.tcx,
|
||||
name:item.name,
|
||||
}
|
||||
if(item.gradient){
|
||||
this.colorList[index+1].gradient = item.gradient
|
||||
}else{
|
||||
delete this.colorList[index+1].gradient
|
||||
}
|
||||
})
|
||||
|
||||
let DesignDetailEnd = this.$refs.DesignDetailEnd
|
||||
DesignDetailEnd.init(num)
|
||||
this.workspaceCom = computed(()=>{
|
||||
@@ -774,16 +776,17 @@ export default defineComponent({
|
||||
//请求我的印花&&模型
|
||||
getLibraryList(){
|
||||
let level2Type = ''
|
||||
if(this.selectCode == 'Sketchboard' || this.selectCode == 'Printboard' || this.selectCode == 'DesignElements'){
|
||||
if(this.selectCode == 'Printboard' || this.selectCode == 'DesignElements'){
|
||||
level2Type = this.designType
|
||||
}else if(this.selectCode == 'Sketchboard'){
|
||||
level2Type = this.current.type
|
||||
}
|
||||
let type = this.body?this.current.type:level2Type
|
||||
let workspace = this.store.state.Workspace.workspace
|
||||
let data = {
|
||||
// level1Type:'Printboard',
|
||||
level1Type:this.selectCode,
|
||||
// level2Type:'Pattern',
|
||||
level2Type:type,
|
||||
level2Type:level2Type,
|
||||
modelSex:workspace?.sex,
|
||||
page:this.currentPage,
|
||||
pictureName:this.searchPictureName,
|
||||
|
||||
@@ -292,6 +292,7 @@ export default defineComponent({
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
this.designOpenrtion = true
|
||||
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
|
||||
this.currentFullBodyView = designItemDetail.currentFullBodyView?designItemDetail.currentFullBodyView:designItemDetail.designItemUrl
|
||||
if(designItemDetail.others.length == 0){
|
||||
@@ -299,36 +300,40 @@ export default defineComponent({
|
||||
}
|
||||
//设置前片后片
|
||||
this.operationCurrent = Object.assign({},this.current)
|
||||
this.designOpenrtion = true
|
||||
this.clearModal()
|
||||
this.overallSingle = this.current.printObject.ifSingle?true:false
|
||||
this.ifListOver()
|
||||
let printList = JSON.parse(JSON.stringify(this.current.printObject.prints))
|
||||
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.elementsList)this.designList = JSON.parse(JSON.stringify(this.$parent.printsList))
|
||||
if(this.overallSingle == false && this.designOpenrtionList.length > 0){
|
||||
this.designOpenrtionList[0].checked = true
|
||||
}else if(this.overallSingle == false && this.designOpenrtionList.length == 0){
|
||||
this.setpitch(this.designList[0],0)
|
||||
}
|
||||
// if(this.overallSingle == false && this.designOpenrtionList.length > 0){
|
||||
// this.designOpenrtionList[0].checked = true
|
||||
// }else if(this.overallSingle == false && this.designOpenrtionList.length == 0){
|
||||
// this.setpitch(this.designList[0],0)
|
||||
// }
|
||||
let skecth = new Image
|
||||
skecth.src = this.current.path
|
||||
skecth.onload=()=>{
|
||||
this.sketch.width = skecth.width/10+'rem'
|
||||
this.sketch.height = skecth.height/10+'rem'
|
||||
skecth.remove()
|
||||
}
|
||||
if(this.exhibitionOpenrtionList.overall.length > 0 && !this.overallSingle){
|
||||
skecth.src = this.current.path
|
||||
if(this.exhibitionOpenrtionList.overall.length > 0){
|
||||
let str = 'overall'
|
||||
this.exhibitionOpenrtionList[str].forEach((item,index)=>{
|
||||
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'
|
||||
this.exhibitionOpenrtionList[str].forEach((item,index)=>{
|
||||
this.setTemplate(item,index,str)
|
||||
@@ -633,39 +638,44 @@ export default defineComponent({
|
||||
await this.setPrintWH(item.path)
|
||||
this.designOpenrtionList
|
||||
let sketch = document.getElementsByClassName("designOpenrtion_modal")[0]?.getElementsByClassName('designOpenrtion_sketch')[0]
|
||||
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'
|
||||
}
|
||||
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
|
||||
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
|
||||
}
|
||||
sketchImg.remove()
|
||||
}
|
||||
sketchImg.src = sketch.src
|
||||
},
|
||||
setOverallPosition(index,str){
|
||||
nextTick(()=>{
|
||||
|
||||
@@ -293,6 +293,7 @@ export default defineComponent({
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
this.designOpenrtion = true
|
||||
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
|
||||
this.currentFullBodyView = designItemDetail.currentFullBodyView? designItemDetail.currentFullBodyView:designItemDetail.designItemUrl
|
||||
if(designItemDetail.others.length == 0){
|
||||
@@ -300,36 +301,40 @@ export default defineComponent({
|
||||
}
|
||||
//设置前片后片
|
||||
this.operationCurrent = Object.assign({},this.current)
|
||||
this.designOpenrtion = true
|
||||
this.clearModal()
|
||||
this.overallSingle = this.current.printObject.ifSingle?true:false
|
||||
this.ifListOver()
|
||||
let printList = JSON.parse(JSON.stringify(this.current.printObject.prints))
|
||||
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.elementsList)this.designList = JSON.parse(JSON.stringify(this.$parent.printsList))
|
||||
if(this.overallSingle == false && this.designOpenrtionList.length > 0){
|
||||
this.designOpenrtionList[0].checked = true
|
||||
}else if(this.overallSingle == false && this.designOpenrtionList.length == 0){
|
||||
this.setpitch(this.designList[0],0)
|
||||
}
|
||||
// if(this.overallSingle == false && this.designOpenrtionList.length > 0){
|
||||
// this.designOpenrtionList[0].checked = true
|
||||
// }else if(this.overallSingle == false && this.designOpenrtionList.length == 0){
|
||||
// this.setpitch(this.designList[0],0)
|
||||
// }
|
||||
let skecth = new Image
|
||||
skecth.src = this.current.path
|
||||
skecth.onload=()=>{
|
||||
this.sketch.width = skecth.width/10+'rem'
|
||||
this.sketch.height = skecth.height/10+'rem'
|
||||
skecth.remove()
|
||||
}
|
||||
if(this.exhibitionOpenrtionList.overall.length > 0 && !this.overallSingle){
|
||||
skecth.src = this.current.path
|
||||
if(this.exhibitionOpenrtionList.overall.length > 0){
|
||||
let str = 'overall'
|
||||
this.exhibitionOpenrtionList[str].forEach((item,index)=>{
|
||||
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'
|
||||
this.exhibitionOpenrtionList[str].forEach((item,index)=>{
|
||||
this.setTemplate(item,index,str)
|
||||
@@ -429,7 +434,7 @@ export default defineComponent({
|
||||
location:[0,0],
|
||||
ifSingle:true,
|
||||
})
|
||||
this.refetchTemplate(currentIndex,false)
|
||||
this.refetchTemplate(currentIndex,true)
|
||||
}
|
||||
},
|
||||
//设置移动
|
||||
@@ -580,9 +585,6 @@ export default defineComponent({
|
||||
},
|
||||
//随机重置图片顺序
|
||||
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 width
|
||||
let scale
|
||||
@@ -637,39 +639,44 @@ export default defineComponent({
|
||||
await this.setPrintWH(item.path)
|
||||
this.designOpenrtionList
|
||||
let sketch = document.getElementsByClassName("designOpenrtionMobile_modal")[0]?.getElementsByClassName('designOpenrtionMobile_sketch')[0]
|
||||
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'
|
||||
}
|
||||
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
|
||||
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
|
||||
}
|
||||
sketchImg.remove()
|
||||
}
|
||||
sketchImg.src = sketch.src
|
||||
|
||||
},
|
||||
setOverallPosition(index,str){
|
||||
|
||||
Reference in New Issue
Block a user