From 09891cea3bd0c4c6182a786c302dc20921f07ccd Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期二, 11 二月 2025 18:01:50 +0800
Subject: [PATCH] 设备结构树: 1、实现点击设备关联NC程序展示文档详细信息、文件内容预览以及文档内容对比功能 2、实现设备层级导入已接收NC程序功能 全局: 1、解决类似文档出库弹窗在路由跳转后点击后会同时出现多个问题

---
 src/views/dnc/base/modules/DeviceStructure/DeviceStructureMainBottom.vue |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/views/dnc/base/modules/DeviceStructure/DeviceStructureMainBottom.vue b/src/views/dnc/base/modules/DeviceStructure/DeviceStructureMainBottom.vue
index 308ce66..5de5c43 100644
--- a/src/views/dnc/base/modules/DeviceStructure/DeviceStructureMainBottom.vue
+++ b/src/views/dnc/base/modules/DeviceStructure/DeviceStructureMainBottom.vue
@@ -1,10 +1,10 @@
 <template>
   <a-tabs style="height: 100%" v-model="activeTabKey" @change="handleTabChange">
-    <a-tab-pane :key="1" tab="璁惧灞炴��" v-if="currentTreeNodeInfo.equipmentId">
+    <a-tab-pane :key="1" tab="璁惧灞炴��" v-if="currentTreeNodeInfo.type===2&&!currentDocumentInfo.docId">
       <DeviceInfo :currentLevelDetails="currentTreeNodeInfo.entity" :size="containerSize"/>
     </a-tab-pane>
 
-    <template v-else>
+    <template v-if="currentDocumentInfo.docId">
       <a-tab-pane :key="1" tab="鏂囨。灞炴��">
         <DocumentInfo :currentLevelDetails="currentDocumentInfo" :size="containerSize"/>
       </a-tab-pane>
@@ -55,6 +55,14 @@
         hasLoadedDataTabKeyArray: []
       }
     },
+    watch: {
+      currentTreeNodeInfo: {
+        handler(value) {
+          this.currentDocumentInfo = {}
+        },
+        immediate: true
+      }
+    },
     created() {
       this.$bus.$on('sendCurrentClickedDocumentInfo', this.receiveCurrentDocumentInfo)
       this.$bus.$on('reloadMainBottomTableData', this.reloadMainBottomTableData)

--
Gitblit v1.9.3