commit
This commit is contained in:
@@ -13,10 +13,10 @@
|
||||
</div>
|
||||
<div class="print_left">
|
||||
<!-- <img :src="current.path" :title="current.type"> -->
|
||||
<img :src="current?.printObject?.path" v-if="current?.printObject?.path && current?.printObject?.path != 'none'">
|
||||
<img :src="current?.printObject?.prints?.[0]?.path" v-if="current?.printObject?.prints?.[0]?.path">
|
||||
<div src="@/assets/images/homePage/null_img.png" v-else ></div>
|
||||
<div
|
||||
v-show="current?.printObject?.path && current?.printObject?.path != 'none'"
|
||||
v-show="current?.printObject?.prints?.[0]?.path"
|
||||
class="delete_file_block"
|
||||
@click="deleteFile"
|
||||
>
|
||||
@@ -35,7 +35,7 @@
|
||||
class="habit_Overal_Single_text"
|
||||
:class="{ active: !overallSingle }"
|
||||
>
|
||||
Overal
|
||||
Overall
|
||||
</div>
|
||||
<a-switch @click="setOveralSingle" v-model:checked="overallSingle" />
|
||||
<div
|
||||
@@ -57,8 +57,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="result_apparel_print_img">
|
||||
<img v-show="type_==1" class="result_appare_img" :src="sketchImg?.id_?sketchImg?.path:current?.layersObject?.[1]?.imageUrl" :title="current?.type">
|
||||
<img v-show="type_==2" class="result_print_img" :src="current?.layersObject?.[1]?.imageUrl" :title="current?.type" @click="setPrint">
|
||||
<img v-show="type_==1" class="result_appare_img" :src="sketchImg?.id_?sketchImg?.path:current?.path" :title="current?.type">
|
||||
<img v-show="type_==2" class="result_print_img" :src="current?.path" :title="current?.type" @click="setPrint">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -82,7 +82,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="type_ == 1 || type_ == 3" @click.stop="setPreview" class="subitOkPreviewBtn">preview</div>
|
||||
<div v-show="type_ == 2" @click.stop="setPrint" class="subitOkPreviewBtn">Layout</div>
|
||||
<div v-if="type_ == 2 && current?.printObject?.prints?.[0]?.path != null" @click.stop="setPrint" class="subitOkPreviewBtn">Layout</div>
|
||||
<div v-else-if="type_ == 2 && current?.printObject?.prints?.[0]?.path == null" @click.stop="setPreview" class="subitOkPreviewBtn">preview</div>
|
||||
<div class="mark_loading" v-show="loadingShow">
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
@@ -111,7 +112,7 @@ export default defineComponent({
|
||||
let sketchImg = ref({})
|
||||
//印花
|
||||
let overallSingle = ref(false)
|
||||
let systemDesignerPercentage = ref(0)
|
||||
let systemDesignerPercentage = ref(30)
|
||||
|
||||
//颜色
|
||||
let colorList = ref([{},{},{},{},{},{},{},{}])
|
||||
@@ -144,14 +145,14 @@ export default defineComponent({
|
||||
// this.current = JSON.parse(JSON.stringify(this.currentItem))
|
||||
this.type_ = num
|
||||
this.colorList[this.selectIndex] = this.$parent.selectColor
|
||||
this.overallSingle = this.current.printObject.ifSingle
|
||||
this.systemDesignerPercentage = this.current.printObject.scale*100
|
||||
this.overallSingle = this.current?.printObject?.ifSingle == null?false:this.current?.printObject?.ifSingle
|
||||
this.systemDesignerPercentage = this.current?.printObject?.scale?this.current?.printObject?.scale:.3*100
|
||||
},
|
||||
//模型
|
||||
setSketchImg(v){
|
||||
this.sketchImg.id_ = v.id
|
||||
this.sketchImg.path = v.url
|
||||
console.log(this.sketchImg);
|
||||
this.sketchImg.minIOPath = v.minIOPath
|
||||
},
|
||||
//印花
|
||||
systemDesigner(num) {
|
||||
@@ -164,7 +165,7 @@ export default defineComponent({
|
||||
return `${value*3}%`;
|
||||
},
|
||||
setPrint(){
|
||||
if(this.current.printObject.path && this.current?.printObject?.path != 'none'){
|
||||
if(this.current.printObject.prints[0].path){
|
||||
let DesignPrintOperation = this.$refs.DesignPrintOperation
|
||||
DesignPrintOperation.init()
|
||||
}else{
|
||||
@@ -177,11 +178,8 @@ export default defineComponent({
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
//颜色
|
||||
selectColorItem(index,color){
|
||||
|
||||
let hex
|
||||
let parent = this.$parent
|
||||
this.selectIndex = index
|
||||
@@ -213,44 +211,61 @@ export default defineComponent({
|
||||
setPreview(){
|
||||
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
|
||||
let index
|
||||
let data = this.store.state.DesignDetailModule.designPreviewData
|
||||
let data = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designPreviewData))
|
||||
designItemDetail.clothes.forEach((v,ind)=>{
|
||||
if(v.id == this.current.id){
|
||||
index = ind
|
||||
}
|
||||
})
|
||||
if(this.type_ == 1){
|
||||
data.designSingleItemDTOList[0].id = this.sketchImg.id_? this.sketchImg.id_:this.current.id_
|
||||
data.designSingleItemDTOList[0].path =this.sketchImg.path? this.sketchImg.path: this.current.path
|
||||
data.designSingleItemDTOList[index].id = this.sketchImg.id_? this.sketchImg.id_:this.current.id_
|
||||
data.designSingleItemDTOList[index].path =this.sketchImg.minIOPath? this.sketchImg.minIOPath: this.current.minIOPath
|
||||
// data.designSingleItemDTOList[index].printObject.prints = []
|
||||
// this.current?.printObject?.path == null ? [] : [{
|
||||
// location:[0,0],
|
||||
// angle:0,
|
||||
// priority:1,
|
||||
// path:this.current?.printObject?.path?this.current.printObject.path :'',
|
||||
// minIOPath:this.current?.printObject?.minIOPath?this.current.printObject.minIOPath :'',
|
||||
// }],
|
||||
// data.designSingleItemDTOList[index].printObject.ifSingle = false
|
||||
}else if(this.type_ == 2){
|
||||
this.setPrint()
|
||||
return
|
||||
data.designSingleItemDTOList[index].printObject.ifSingle = false
|
||||
data.designSingleItemDTOList[index].printObject.prints = []
|
||||
}else if(this.type_ == 3){
|
||||
let color = `${this.$parent.selectColor.rgba.r} ${this.$parent.selectColor.rgba.g} ${this.$parent.selectColor.rgba.b}`
|
||||
data.designSingleItemDTOList[0].color = color
|
||||
data.designSingleItemDTOList[index].color = color
|
||||
}
|
||||
// let priority = designItemDetail.clothes.map((v)=>{
|
||||
// return v.type
|
||||
// })
|
||||
data.timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone
|
||||
this.loadingShow = true
|
||||
console.log(data,'data');
|
||||
Https.axiosPost(Https.httpUrls.designSingle, data).then(
|
||||
(rv) => {
|
||||
console.log(rv,'rv');
|
||||
this.store.commit("setDesignPreviewData", data);
|
||||
designItemDetail.clothes[index].color = rv.clothes[0].color
|
||||
designItemDetail.clothes[index].printObject.path = rv.clothes[0].printObject.path
|
||||
designItemDetail.clothes[index].layersObject = rv.clothes[0].layersObject
|
||||
designItemDetail.currentFullBodyView = rv.currentFullBodyView
|
||||
designItemDetail.clothes[index].color = rv.clothes[index].color
|
||||
designItemDetail.clothes[index].printObject = rv.clothes[index].printObject
|
||||
designItemDetail.clothes[index].layersObject = rv.clothes[index].layersObject
|
||||
designItemDetail.clothes[index].minIOPath = rv.clothes[index].minIOPath
|
||||
designItemDetail.clothes[index].path = rv.clothes[index].path
|
||||
// rv.clothes[0].layersObject.forEach((v)=>{
|
||||
// designItemDetail.clothes[index].layersObject[0].imageUrl = rv.clothes[0].layersObject[0].imageUrl
|
||||
// designItemDetail.clothes[index].layersObject[0].maskUrl = rv.clothes[0].layersObject[0].maskUrl
|
||||
// designItemDetail.clothes[index].layersObject[1].imageUrl = rv.clothes[0].layersObject[1].imageUrl
|
||||
// designItemDetail.clothes[index].layersObject[1].maskUrl = rv.clothes[0].layersObject[1].maskUrl
|
||||
// })
|
||||
designItemDetail.clothes.forEach((item,index)=>{
|
||||
let a
|
||||
// console.log(this.store.state.DesignDetailModule.designItemDetail.clothes[index].layersObject[0].id);
|
||||
if(item.layersObject[0].imageCategory.indexOf("back") == -1){
|
||||
a = item.layersObject[0]
|
||||
item.layersObject[0] = item.layersObject[1]
|
||||
item.layersObject[1] = a
|
||||
}
|
||||
item.layersObject[0].id = this.store.state.DesignDetailModule.designItemDetail.clothes[index].layersObject[0].id
|
||||
item.layersObject[1].id = this.store.state.DesignDetailModule.designItemDetail.clothes[index].layersObject[1].id
|
||||
})
|
||||
this.loadingShow = false
|
||||
this.store.commit("setDesignItemDetail", designItemDetail);
|
||||
console.log(designItemDetail,rv);
|
||||
this.store.commit("setDesignPreviewData", data);
|
||||
}
|
||||
).catch(res=>{
|
||||
this.loadingShow = false
|
||||
@@ -297,6 +312,8 @@ export default defineComponent({
|
||||
height: auto;
|
||||
max-height: 35rem;
|
||||
margin-top: 2rem;
|
||||
width: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
.result_print_img{
|
||||
transform: scale(.85);
|
||||
|
||||
Reference in New Issue
Block a user