不等比缩放

This commit is contained in:
X1627315083
2024-05-27 17:57:37 +08:00
parent 8e60a51d9f
commit 9efa1fa03a
13 changed files with 78 additions and 35 deletions

View File

@@ -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_==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">
<img v-for="item in current.layersObject" :src="item.imageUrl" alt="">
<img v-for="item in current?.layersObject" :src="item.imageUrl" alt="">
</div>
</div>
@@ -84,7 +84,7 @@
</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-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>
@@ -189,7 +189,7 @@ export default defineComponent({
this.type_ = num
this.colorList[this.selectIndex] = this.$parent.selectColor
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){
@@ -304,13 +304,16 @@ export default defineComponent({
}
}
})
index = index? index:0
if(!this.current.id){
data.designSingleItemDTOList[index].priority = zIndex+=1
if(index){
data.designSingleItemDTOList[index].priority = zIndex+=1
}
}
if(this.type_ == 1){
if(data.designSingleItemDTOList[index].path != this.sketchImg.minIOPath && this.sketchImg.id_){
data.designSingleItemDTOList[index].offset = [0,0]
data.designSingleItemDTOList[index].scale = 1
data.designSingleItemDTOList[index].scale = [1,1]
}
data.designSingleItemDTOList = this.soleId(data.designSingleItemDTOList,index)
this.sketchImg.id_ = data.designSingleItemDTOList[index].id