Merge branch 'dev_vite' of http://18.167.251.121:10003/aidlab/aida_front into dev_vite

This commit is contained in:
李志鹏
2026-01-19 11:07:06 +08:00
8 changed files with 618 additions and 306 deletions

View File

@@ -116,7 +116,7 @@ export default defineComponent({
getCanvasIfEdit:inject('getCanvasIfEdit')as any,
canvasInstance:null as any,
canvasJSON:'',
hideCanvas: computed(()=>store.state.Workspace.projectPath !== route.fullPath),
hideCanvas: computed(()=>(store.state.Workspace.projectPath !== route.fullPath && props.isEditPattern)),
otherData:computed(()=>({
canvasId: store.state.DesignDetail.selectDetail.canvasId,
color: store.state.DesignDetail.selectDetail.color,
@@ -213,7 +213,6 @@ export default defineComponent({
wH = [1,domHeight/imgHeight]
// detailData.canvasConfig.width = img.width * wH[1]
// detailData.canvasConfig.height = domHeight
console.log(detailData.canvasConfig,'===============')
detailData.canvasConfig.width = img.width
detailData.canvasConfig.height = img.height
@@ -343,7 +342,6 @@ export default defineComponent({
// }
const canvasLoadJsonSuccess = async ()=>{
let otherData = await props.updateOtherLayers()
await updateOtherLayers(otherData)
await setUndivideLayer()
}
@@ -369,7 +367,6 @@ export default defineComponent({
width:props.sketchSize.width,
height:props.sketchSize.height,
}).then((rv)=>{
console.log(rv,'======')
detailData.selectDetail.undividedLayer = rv
})
// }
@@ -402,26 +399,28 @@ export default defineComponent({
const sessionCanvasList = sessionStorage.getItem('canvasList');
const canvasList = sessionCanvasList ? JSON.parse(sessionCanvasList) : []
let canvasIndex = canvasList.findIndex(item => item.id === detailData.selectDetail.id);
if(canvasIndex>1){
if(canvasIndex>-1){
detailData.canvasJSON = canvasList[canvasIndex].canvasJSON
}
if(detailData.selectDetail.canvasId){
detailData.isShowMark = true
await new Promise((resolve, reject) => {
let value = {
module:'designItemDetail',
id:detailData.selectDetail.canvasId,
}
Https.axiosPost(Https.httpUrls.exportSearch, value)
.then((rv) => {
detailData.canvasJSON = rv
resolve('')
}else{
if(detailData.selectDetail.canvasId){
detailData.isShowMark = true
await new Promise((resolve, reject) => {
let value = {
module:'designItemDetail',
id:detailData.selectDetail.canvasId,
}
Https.axiosPost(Https.httpUrls.exportSearch, value)
.then((rv) => {
detailData.canvasJSON = rv
resolve('')
})
.catch((rv) => {
resolve(null)
});
})
.catch((rv) => {
resolve(null)
});
})
}
}
setCanvas(detailData.selectDetail.path).then(()=>{
detailData.canvasLoad = true
})