Compare commits
3 Commits
6bee02dfa5
...
a1e0e19412
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1e0e19412 | ||
|
|
b10fd72008 | ||
|
|
a78056c898 |
@@ -190,7 +190,7 @@ export default defineComponent({
|
||||
watch(()=>detailData.selectDetail,async (newValue,oldValue)=>{
|
||||
detailData.imgDomIndex = detailData.frontBack.front.findIndex((item:any)=>item.id == newValue.id)
|
||||
if(newValue?.path)await getSketchSize()
|
||||
if(newValue?.id && oldValue?.id && (newValue.id != oldValue.id)){
|
||||
if(newValue?.id && (newValue.id != oldValue.id)){
|
||||
store.commit('DesignDetail/changeCanvasKey')
|
||||
}
|
||||
// privewDetail(oldValue)
|
||||
@@ -561,11 +561,10 @@ export default defineComponent({
|
||||
segmentImage(detailData.selectDetail.maskUrl,partialDesign,size).then(async (rv)=>{
|
||||
let front = detailData.frontBack.front[detailData.imgDomIndex]
|
||||
let back = detailData.frontBack.back[detailData.imgDomIndex]
|
||||
if(!front?.oldImageUrl)front.oldImageUrl = front.imageUrl
|
||||
if(!front?.oldMaskUrl)front.oldMaskUrl = front.maskUrl
|
||||
if(!back?.oldImageUrl)back.oldImageUrl = back.imageUrl
|
||||
if(!front?.oldMaskUrl)store.commit('DesignDetail/updataDetailItem',{maskUrl:front.oldMaskUrl})
|
||||
|
||||
front.oldImageUrl = ''
|
||||
front.oldMaskUrl = ''
|
||||
back.oldImageUrl = ''
|
||||
front.imageUrl = rv.targetFrontUrl
|
||||
back.imageUrl = rv.targetBackUrl
|
||||
store.commit('DesignDetail/canvasPreviewUpdata',{type:detailData.isEditPattern.value?'all':detailData.currentDetailType,callBack:setRevocation})
|
||||
@@ -775,36 +774,7 @@ export default defineComponent({
|
||||
window.removeEventListener('beforeunload',beforeunload)
|
||||
}
|
||||
window.addEventListener('beforeunload',beforeunload)
|
||||
// let url = Https.httpUrls.getDesignDetail + `?designItemId=34242&designPythonOutfitId=34004`
|
||||
// this.loadingShow = true
|
||||
// Https.axiosGet(url).then(
|
||||
// async (rv: any) => {
|
||||
// rv.clothes.forEach((item:any)=>{
|
||||
// let a
|
||||
// if(item.layersObject[0].imageCategory.indexOf("back") == -1){
|
||||
// a = item.layersObject[0]
|
||||
// item.layersObject[0] = item.layersObject[1]
|
||||
// item.layersObject[1] = a
|
||||
// }
|
||||
// if(item.printObject.prints == null){
|
||||
// item.printObject.prints = [{}]
|
||||
// }
|
||||
// })
|
||||
// this.store.commit('setDesignItemDetail',rv)
|
||||
// if(rv.others[0].printObject.path == null){
|
||||
// this.body = false
|
||||
// }else{
|
||||
// this.body = true
|
||||
// }
|
||||
// this.setImgSize()
|
||||
// this.generateHighDesignImg = rv.highDesignUrl
|
||||
// this.designShowPrview = 1
|
||||
// this.designDetailShow = true
|
||||
// this.loadingShow = false
|
||||
// }
|
||||
// ).catch(rv=>{
|
||||
// this.loadingShow = false
|
||||
// })
|
||||
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
:clothing-image-opts="{
|
||||
imageMode:'contains',
|
||||
}"
|
||||
:hideCanvas="hideCanvas"
|
||||
:hideCanvas="hideCanvas && !isEditPattern"
|
||||
ref="editCanvas">
|
||||
</editCanvas>
|
||||
<!-- <canvasContent ref="canvasContent"></canvasContent> -->
|
||||
@@ -34,7 +34,7 @@
|
||||
:clothing-image-opts="{
|
||||
imageMode:'contains',
|
||||
}"
|
||||
:hideCanvas="hideCanvas"
|
||||
:hideCanvas="hideCanvas && !isEditPattern"
|
||||
ref="editCanvasBackFront">
|
||||
</editCanvas>
|
||||
</div>
|
||||
@@ -117,7 +117,7 @@ export default defineComponent({
|
||||
getCanvasIfEdit:inject('getCanvasIfEdit')as any,
|
||||
canvasInstance:null as any,
|
||||
canvasJSON:'',
|
||||
hideCanvas: computed(()=>(store.state.Workspace.projectPath !== route.fullPath && props.isEditPattern)),
|
||||
hideCanvas: computed(()=>(store.state.Workspace.projectPath !== route.fullPath)),
|
||||
otherData:computed(()=>({
|
||||
canvasId: store.state.DesignDetail.selectDetail.canvasId,
|
||||
color: store.state.DesignDetail.selectDetail.color,
|
||||
@@ -339,7 +339,6 @@ export default defineComponent({
|
||||
const canvasLoadJsonSuccess = async ()=>{
|
||||
let otherData = await props.updateOtherLayers()
|
||||
await updateOtherLayers(otherData)
|
||||
|
||||
if(detailData.changeSketchUpdateFrontBack){
|
||||
await detailData.changeSketchUpdateFrontBack()
|
||||
detailData.changeSketchUpdateFrontBack = null
|
||||
|
||||
@@ -900,8 +900,8 @@ export default defineComponent({
|
||||
}
|
||||
const inputFillOffset = (offset:any)=>{
|
||||
let arr = editPrintElementData.printStyleList[props.type].overall
|
||||
let location = [offset.left * offset.size[0] / 100,offset.top * offset.size[1] / 100]
|
||||
arr[editPrintElementData.imgDomIndex].location = location
|
||||
arr[editPrintElementData.imgDomIndex].location = [offset.left * offset.size[0] / 100,offset.top * offset.size[1] / 100]
|
||||
console.log(arr[editPrintElementData.imgDomIndex].location)
|
||||
editPrintElementDom.pingpuRef.updataList([
|
||||
{
|
||||
action: ACTIONS.UPDATE,
|
||||
|
||||
@@ -102,6 +102,7 @@ export default defineComponent({
|
||||
}
|
||||
}).then((rv)=>{
|
||||
if(rv)store.commit('DesignDetail/setDesignColthes',item.id)
|
||||
console.log(JSON.parse(JSON.stringify(item)),'==========')
|
||||
})
|
||||
}
|
||||
const deleteDetailItem = (id:number)=>{
|
||||
|
||||
@@ -175,12 +175,12 @@ const DesignDetail : Module<DesignDetail,RootState> = {
|
||||
state.designDetail.clothes.forEach((item:any) => {
|
||||
if(item.id == data){
|
||||
state.selectDetail = item
|
||||
state.frontBack.front.forEach((v:any,index:any)=>{
|
||||
v.designOpenrtionBtn = false
|
||||
if(v.id == data){
|
||||
v.designOpenrtionBtn = true
|
||||
}
|
||||
})
|
||||
// state.frontBack.front.forEach((v:any,index:any)=>{
|
||||
// v.designOpenrtionBtn = false
|
||||
// if(v.id == data){
|
||||
// v.designOpenrtionBtn = true
|
||||
// }
|
||||
// })
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user