测试打开detail位置信息不对问题
This commit is contained in:
@@ -129,6 +129,7 @@ export default defineComponent({
|
||||
|
||||
file.designType = res.data.designType
|
||||
file.level2Type = type;
|
||||
file.resData.level2Type = type;
|
||||
file.minIOPath = file.resData.minIOPath
|
||||
let fileList = detailData.uploadList.filter(
|
||||
(v:any) => v.status === "done"
|
||||
|
||||
@@ -326,7 +326,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
let ratio = detailData.frontBack.body.layersObject[0].imageSize[0]/parentNode.width
|
||||
|
||||
console.log(ratio,detailData.frontBack.body.layersObject[0].imageSize[0],parentNode.width)
|
||||
// let arr:any = sort(detailData.frontBack.front)
|
||||
let arr:any = sort(JSON.parse(JSON.stringify(detailData.frontBack.front)))
|
||||
let num = 10
|
||||
@@ -346,6 +346,7 @@ export default defineComponent({
|
||||
state = true
|
||||
let y = ((arr[index]?.style?.top.replace(/px/g,'')*ratio).toFixed(0) as any - arr[index]?.position[0])
|
||||
let x = ((arr[index]?.style?.left.replace(/px/g,'')*ratio).toFixed(0) as any - arr[index]?.position[1])
|
||||
console.log(value.layersObject,x,y,ratio)
|
||||
let scaleWidth = arr[index]?.imageSize?Number(((arr[index]?.style?.width.replace(/px/g,'')*ratio)/(arr[index]?.imageSize[0]/arr[index].scale[0])).toFixed(2)):1
|
||||
let scaleHeight = arr[index]?.imageSize?Number(((arr[index]?.style?.height.replace(/px/g,'')*ratio)/(arr[index]?.imageSize[1]/arr[index].scale[1])).toFixed(2)):1
|
||||
// let widthScale = (arr[index].style.width.replace(/px/g,'')/arr[index].style.height.replace(/px/g,'')).toFixed(2)
|
||||
|
||||
@@ -398,10 +398,10 @@ export default defineComponent({
|
||||
homeMainData.openType = Object.keys(query)[0]
|
||||
homeMainData.openTypeChild = query[Object.keys(query)[0]]
|
||||
}
|
||||
if((query?.id || query?.history) && !await getIdExistToHistory()){
|
||||
router.push('/home')
|
||||
return
|
||||
}
|
||||
// if((query?.id || query?.history) && !await getIdExistToHistory()){
|
||||
// router.push('/home')
|
||||
// return
|
||||
// }
|
||||
}else{
|
||||
homeMainData.openType = ''
|
||||
homeMainData.openTypeChild = ''
|
||||
|
||||
Reference in New Issue
Block a user