Merge branch 'dev_vite' of http://18.167.251.121:10003/aidlab/aida_front into dev_vite
This commit is contained in:
@@ -545,6 +545,7 @@ export default defineComponent({
|
||||
await detailDom.canvasBox.privewDetail()
|
||||
await upDateFrontBackSketch()
|
||||
saveCanvasJSONToSession()
|
||||
await uploadSelectDetail()
|
||||
detailData.loadingShow = false
|
||||
}
|
||||
}
|
||||
@@ -672,22 +673,16 @@ export default defineComponent({
|
||||
if(detailData.isEditPattern.value == 'canvasEditor'){
|
||||
// await detailDom.canvasBox.saveCanvas()
|
||||
const allInfo = await (detailDom.canvasBox as any).getCanvasElement()
|
||||
if(allInfo.trims?.length > 0){
|
||||
// detailData.selectDetail.trims.prints = allInfo.trims
|
||||
let value = {
|
||||
data:allInfo.trims,
|
||||
str:'element'
|
||||
}
|
||||
store.commit('DesignDetail/setNewDetail',value)
|
||||
let trimsValue = {
|
||||
data:allInfo.trims || [],
|
||||
str:'element'
|
||||
}
|
||||
if(allInfo.prints?.length > 0){
|
||||
// detailData.selectDetail.printObject.prints = allInfo.prints
|
||||
let value = {
|
||||
data:allInfo.prints,
|
||||
str:'print'
|
||||
}
|
||||
store.commit('DesignDetail/setNewDetail',value)
|
||||
store.commit('DesignDetail/setNewDetail',trimsValue)
|
||||
let printValue = {
|
||||
data:allInfo.prints || [],
|
||||
str:'print'
|
||||
}
|
||||
store.commit('DesignDetail/setNewDetail',printValue)
|
||||
if(allInfo.color?.color?.rgba){
|
||||
let canvasColor = allInfo.color.color;
|
||||
let colorData:any = await getColorName(allInfo.color.color?.rgba)
|
||||
@@ -713,8 +708,61 @@ export default defineComponent({
|
||||
if(detailData.currentDetailType == 'color'){
|
||||
detailData.detailLeftColorKey++
|
||||
}
|
||||
}else{
|
||||
let value = {
|
||||
data:{},
|
||||
str:'color'
|
||||
}
|
||||
store.commit('DesignDetail/setNewDetail',value)
|
||||
}
|
||||
}
|
||||
}
|
||||
const uploadSelectDetail = async ()=>{//更新选中的detail
|
||||
// await detailDom.canvasBox.saveCanvas()
|
||||
const allInfo = await (detailDom.canvasBox as any).getCanvasElement()
|
||||
let color:any = {}
|
||||
if(allInfo.color?.color?.rgba){
|
||||
let canvasColor = allInfo.color.color;
|
||||
let colorData:any = await getColorName(allInfo.color.color?.rgba)
|
||||
color = {
|
||||
hsv:{
|
||||
h:colorData.h,
|
||||
s:colorData.s,
|
||||
v:colorData.v,
|
||||
},
|
||||
name:colorData.name,
|
||||
tcx:colorData.tcx,
|
||||
rgba:canvasColor.rgba,
|
||||
hex:rgbaToHex([canvasColor.rgba.r,canvasColor.rgba.g,canvasColor.rgba.b]),
|
||||
}
|
||||
if(canvasColor.gradient){
|
||||
color.gradient = canvasColor.gradient
|
||||
}
|
||||
if(detailData.currentDetailType == 'color'){
|
||||
detailData.detailLeftColorKey++
|
||||
}
|
||||
}
|
||||
if(detailData.isEditPattern.value !== 'canvasEditor'){
|
||||
delete detailData.selectDetail.newDetail
|
||||
detailData.selectDetail.trims.prints = allInfo.trims || []
|
||||
detailData.selectDetail.printObject.prints = allInfo.prints || []
|
||||
detailData.selectDetail.color = color
|
||||
}else{
|
||||
if(detailData.currentDetailType == 'color'){
|
||||
delete detailData.selectDetail.newDetail.color
|
||||
detailData.selectDetail.color = color
|
||||
}
|
||||
if(detailData.currentDetailType == 'print'){
|
||||
delete detailData.selectDetail.newDetail.print
|
||||
detailData.selectDetail.printObject.prints = allInfo.prints || []
|
||||
}
|
||||
if(detailData.currentDetailType == 'element'){
|
||||
delete detailData.selectDetail.newDetail.element
|
||||
detailData.selectDetail.trims.prints = allInfo.trims || []
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
const canvasReload = async ()=>{
|
||||
if(detailData.isEditPattern.value){
|
||||
|
||||
@@ -14,7 +14,12 @@
|
||||
<div ref="moveableContainer" class="moveableContainer"></div>
|
||||
</div>
|
||||
<div class="designOpenrtion_imgMask" v-if="!frontBack?.body?.path">
|
||||
<img :src="selectDetail?.undividedLayerWithSinglePrint || selectDetail?.undividedLayer || selectDetail?.path" style="object-fit: cover;" alt="">
|
||||
<div class="designOpenrtion_print">
|
||||
<img v-if="frontBack.back?.[0].imageUrl" :src="frontBack.back?.[0].imageUrl" style="object-fit: cover;" alt="">
|
||||
</div>
|
||||
<div class="detail_modal_item_front" style="position: relative;">
|
||||
<img :src="frontBack.front?.[0].imageUrl || selectDetail?.path" style="object-fit: cover;" alt="">
|
||||
</div>
|
||||
<!-- <img @load="setSelectSketch()" :src="designDetail?.currentFullBodyView || selectDetail?.undividedLayer" style="object-fit: cover;" alt=""> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user