diff --git a/src/components/CadModelViewer.vue b/src/components/CadModelViewer.vue index 7282e4c..652c579 100644 --- a/src/components/CadModelViewer.vue +++ b/src/components/CadModelViewer.vue @@ -1,129 +1,228 @@ - + \ No newline at end of file diff --git a/src/components/PlmModelDrawer.vue b/src/components/PlmModelDrawer.vue index 83b1bfe..851c96e 100644 --- a/src/components/PlmModelDrawer.vue +++ b/src/components/PlmModelDrawer.vue @@ -14,7 +14,7 @@ 首次查看可能需要 30 秒~数分钟 - + { const maxAttempts = 90 - for (let i = 0; i < maxAttempts; i++) { + for (let i = 0; i < maxAttempts; i++) { const res = await plmModelApi.getPreview(query) + if (res.status === 'ready' || res.status === 'failed' || res.status === 'not_found') { return res } @@ -86,7 +87,7 @@ async function open(ctx: PlmModelOpenContext) { resultMeta.value = null previewUrl.value = '' error.value = '' - converting.value = false + converting.value = true loading.value = true visible.value = true @@ -98,8 +99,10 @@ async function open(ctx: PlmModelOpenContext) { processPlanId: ctx.processPlanId, dispatchId: ctx.dispatchId, }) + resultMeta.value = res - + + if (res.status === 'ready' && res.previewUrl) { previewUrl.value = res.previewUrl } else {