From 9406669f1cb7ffde4175d004d5b1b6519d6857ff Mon Sep 17 00:00:00 2001 From: DXC Date: Tue, 26 May 2026 08:34:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=A5=E5=9B=BE=E6=90=9C=E5=9B=BE?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E8=AF=A6=E6=83=85=E4=BC=98=E5=85=88=E7=94=A8?= =?UTF-8?q?=20spec=5Fmodel=20=E8=B7=B3=E8=BD=AC=E7=89=A9=E6=96=99=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=87=AA=E5=8A=A8=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inventory-web/src/components/ImageSearchDialog.vue | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/inventory-web/src/components/ImageSearchDialog.vue b/inventory-web/src/components/ImageSearchDialog.vue index 902f91e..22aae49 100644 --- a/inventory-web/src/components/ImageSearchDialog.vue +++ b/inventory-web/src/components/ImageSearchDialog.vue @@ -203,14 +203,13 @@ const handleUse = (item: ImageSearchItem) => { } const handleView = (item: ImageSearchItem) => { - // 从 business_data 获取跳转 URL - const url = item.business_data?.url - if (url) { - router.push(url) + const biz = item.business_data + if (biz?.spec_model) { + router.push({ path: '/material/index', query: { keyword: biz.spec_model } }) + } else if (biz?.url) { + router.push(biz.url) } else { - // 兜底:使用 product_name 作为 keyword 搜索 - ElMessage.info(`未找到详情页链接,已将 "${item.product_name}" 作为关键词搜索`) - emit('view', item) + ElMessage.warning('无法定位目标页面') } handleClose() }