From 0d27c826c71c323ff605cd27a53bbc5a0c96f752 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期四, 05 六月 2025 15:18:37 +0800
Subject: [PATCH] 修改文件名称展示效果  修改文件对应页签展示

---
 src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue |  297 +++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 188 insertions(+), 109 deletions(-)

diff --git a/src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue b/src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue
index 5f1a973..142d54b 100644
--- a/src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue
+++ b/src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue
@@ -1,27 +1,37 @@
 <template>
-  <div v-if="currentLevelInfo.type!==4">
-    <a-tabs v-model="activeTabKey" v-if="Object.keys(currentLevelInfo).length>0" @change="handleTabChange">
-      <a-tab-pane :key="1" tab="灞炴�т俊鎭�" v-if="currentLevelInfo.type===1">
+  <div style="height: 100%">
+    <a-tabs style="height: 100%" v-model="activeTabKey" v-if="Object.keys(currentLevelInfo).length>0"
+            @change="handleTabChange">
+      <a-tab-pane :key="1" tab="灞炴�т俊鎭�" v-if="+currentLevelInfo.type===1">
         <ProductInfo :currentLevelDetails="currentLevelInfo.entity" :size="containerSize"/>
       </a-tab-pane>
 
-      <a-tab-pane :key="1" tab="灞炴�т俊鎭�" v-if="currentLevelInfo.type===2">
+      <a-tab-pane :key="1" tab="灞炴�т俊鎭�" v-if="+currentLevelInfo.type===2">
         <ComponentInfo :currentLevelDetails="currentLevelInfo.entity" :size="containerSize"/>
       </a-tab-pane>
 
-      <a-tab-pane :key="1" tab="闆朵欢灞炴��" v-if="currentLevelInfo.type===3">
+      <a-tab-pane :key="1" tab="闆朵欢灞炴��" v-if="+currentLevelInfo.type===3">
         <PartInfo :currentLevelDetails="currentLevelInfo.entity" :size="containerSize"/>
       </a-tab-pane>
 
-      <a-tab-pane :key="1" tab="宸ュ簭灞炴��" v-if="currentLevelInfo.type===5">
+      <a-tab-pane :key="1" tab="灞炴�т俊鎭�" v-if="+currentLevelInfo.type===4">
+        <ProcessSpecVersionInfo :currentLevelDetails="currentLevelInfo.entity" :size="containerSize"/>
+      </a-tab-pane>
+
+      <a-tab-pane :key="1" tab="宸ュ簭灞炴��" v-if="+currentLevelInfo.type===5">
         <ProcessInfo :currentLevelDetails="currentLevelInfo.entity" :size="containerSize"/>
       </a-tab-pane>
 
-      <a-tab-pane :key="1" tab="宸ユ灞炴��" v-if="currentLevelInfo.type===6">
+      <a-tab-pane :key="1" tab="宸ユ灞炴��" v-if="+currentLevelInfo.type===6">
         <ProcessStepInfo :currentLevelDetails="currentLevelInfo.entity" :size="containerSize"/>
       </a-tab-pane>
 
-      <template v-if="currentLevelInfo.hasOwnProperty('attributionType')">
+      <a-tab-pane :key="1" tab="璁惧鍒楄〃" v-if="currentLevelInfo.hasOwnProperty('deviceManagementId')">
+        <UseDeviceCustomTypeEquipmentTableList ref="useTypeEquipmentTableListRef"
+                                               :currentLevelDetails="currentLevelInfo" :size="containerSize"/>
+      </a-tab-pane>
+
+      <template v-if="currentLevelInfo.hasOwnProperty('docId')">
         <a-tab-pane :key="1" tab="鏂囨。灞炴��">
           <DocumentInfo :currentLevelDetails="currentLevelInfo" :size="containerSize"/>
         </a-tab-pane>
@@ -37,10 +47,24 @@
                                     :size="containerSize"/>
         </a-tab-pane>
 
-        <a-tab-pane :key="4" tab="浣跨敤璁惧" v-if="currentLevelInfo.attributionType===5">
+        <a-tab-pane :key="4" tab="浣跨敤璁惧" v-if="currentLevelInfo.classificationId_dictText==='nc'">
           <UseDocumentEquipmentTableList ref="useDocumentEquipmentTableRef" :currentDocumentInfo="currentLevelInfo"
                                          :size="containerSize"/>
         </a-tab-pane>
+
+        <a-tab-pane :key="5" tab="鍒�鍏峰垪琛�" v-if="currentLevelInfo.classificationId_dictText==='nc'">
+          <CutterTableList ref="cutterTableListRef" :currentLevelInfo="currentLevelInfo" :size="containerSize"/>
+        </a-tab-pane>
+
+        <a-tab-pane :key="6" tab="瀹$璇︽儏">
+          <DocumentInfoFlow ref="flowTableListRef" :currentLevelDetails="currentLevelInfo" :size="containerSize"/>
+        </a-tab-pane>
+
+        <a-tab-pane :key="7" tab="鎵规鍒楄〃" v-if="currentLevelInfo.classificationId_dictText==='nc'">
+          <GuideCardBatchList ref="guideCardBatchInfoRef" :guideCardBatchInfo="currentLevelInfo" :size="containerSize"/>
+        </a-tab-pane>
+
+
       </template>
     </a-tabs>
 
@@ -49,115 +73,170 @@
 </template>
 
 <script>
-  import ProductInfo from './Product/ProductInfo'
-  import ComponentInfo from './Component/ComponentInfo'
-  import PartInfo from './Part/PartInfo'
-  import ProcessInfo from './Process/ProcessInfo'
-  import DocumentInfo from '../../../common/DocumentInfo'
-  import DocumentVersionTableList from '../../../common/DocumentVersionTableList'
-  import UseDocumentEquipmentTableList from './Document/UseNcDocumentEquipmentTableList'
-  import ProcessStepInfo from './ProcessStep/ProcessStepInfo'
-  import FilePreview from '../../../common/FilePreview'
-  import TableContextMenu from '../../../common/TableContextMenu'
+import ProductInfo from './Product/ProductInfo'
+import ComponentInfo from './Component/ComponentInfo'
+import PartInfo from './Part/PartInfo'
+import ProcessInfo from './Process/ProcessInfo'
+import ProcessStepInfo from './ProcessStep/ProcessStepInfo'
+import CutterTableList from './Cutter/CutterTableList'
+import DocumentInfo from '../../../common/DocumentInfo'
+import DocumentInfoFlow from '../../../common/DocumentInfoFlow.vue'
+import DocumentVersionTableList from '../../../common/DocumentVersionTableList'
+import UseDocumentEquipmentTableList from './Document/UseNcDocumentEquipmentTableList'
+import FilePreview from '../../../common/FilePreview'
+import TableContextMenu from '../../../common/TableContextMenu'
+import UseDeviceCustomTypeEquipmentTableList
+  from '@views/dnc/base/modules/ProductStructure/DeviceCustomType/UseDeviceCustomTypeEquipmentTableList.vue'
+import ProcessSpecVersionInfo
+  from '@views/dnc/base/modules/ProductStructure/ProcessSpecVersion/ProcessSpecVersionInfo.vue'
+import { getAction } from '@/api/manage'
+import GuideCardBatchList from '@views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchList.vue'
 
-  export default {
-    name: 'ProductStructureMainBottom',
-    components: {
-      TableContextMenu,
-      FilePreview,
-      ProcessStepInfo,
-      UseDocumentEquipmentTableList,
-      DocumentVersionTableList,
-      DocumentInfo,
-      ProcessInfo,
-      PartInfo,
-      ProductInfo,
-      ComponentInfo
-    },
-    data() {
-      return {
-        activeTabKey: 1,
-        containerSize: 'small',
-        currentLevelInfo: {},
-        currentRightClickedTableRowInfo: {},
-        hasLoadedDataTabKeyArray: []
-      }
-    },
-    created() {
-      this.$bus.$on('sendCurrentClickedDocumentInfo', this.receiveCurrentLevelInfo)
-      this.$bus.$on('sendCurrentTreeNodeInfo', this.receiveCurrentLevelInfo)
-      this.$bus.$on('reloadMainBottomTableData', this.reloadMainBottomTableData)
-    },
-    methods: {
-      /**
-       * 鎺ユ敹鏍戠粍浠朵互鍙婅〃鏍间紶鏉ョ殑褰撳墠閫変腑鎴栫偣鍑荤殑椤逛俊鎭�
-       * @param levelInfo 褰撳墠灞傜骇淇℃伅
-       */
-      receiveCurrentLevelInfo(levelInfo) {
-        this.currentLevelInfo = levelInfo
-        this.activeTabKey = 1
-        this.hasLoadedDataTabKeyArray = []
-      },
-
-      handleTabChange(activeTabKey) {
-        if (!this.hasLoadedDataTabKeyArray.includes(activeTabKey)) {
-          switch (activeTabKey) {
-            case 2:
-              this.$nextTick(() => this.$refs.filePreviewRef.getFilePreviewByApi())
-              break
-            case 3:
-              this.$nextTick(() => this.$refs.documentVersionTableRef.loadData())
-              break
-            case 4:
-              this.$nextTick(() => this.$refs.useDocumentEquipmentTableRef.loadData())
-              break
-            default:
-          }
-          // 闃绘鎺ュ彛鍦ㄥ悓涓�鏂囨。涓�娆$偣鍑诲唴澶氭瑙﹀彂
-          this.hasLoadedDataTabKeyArray.push(activeTabKey)
+export default {
+  name: 'ProductStructureMainBottom',
+  components: {
+    GuideCardBatchList,
+    ProcessSpecVersionInfo,
+    UseDeviceCustomTypeEquipmentTableList,
+    CutterTableList,
+    TableContextMenu,
+    FilePreview,
+    ProcessStepInfo,
+    UseDocumentEquipmentTableList,
+    DocumentVersionTableList,
+    DocumentInfo,
+    DocumentInfoFlow,
+    ProcessInfo,
+    PartInfo,
+    ProductInfo,
+    ComponentInfo
+  },
+  data() {
+    return {
+      activeTabKey: 1,
+      containerSize: 'small',
+      isProcessHasCutterList: false,
+      isProcessStepHasCutterList: false,
+      currentLevelInfo: {},
+      currentRightClickedTableRowInfo: {},
+      hasLoadedDataTabKeyArray: []
+    }
+  },
+  created() {
+    this.$bus.$on('sendCurrentClickedDocumentInfo', this.receiveCurrentLevelInfo)
+    this.$bus.$on('sendCurrentClickedTypeInfo', this.receiveCurrentLevelInfo)
+    this.$bus.$on('sendCurrentTreeNodeInfo', this.receiveCurrentLevelInfo)
+    this.$bus.$on('reloadMainBottomTableData', this.reloadMainBottomTableData)
+    this.getCutterListDisplayPermission('dnc_cutter_process', 'isProcessHasCutterList')
+    this.getCutterListDisplayPermission('dnc_cutter_step', 'isProcessStepHasCutterList')
+  },
+  methods: {
+    /**
+     * 鑾峰彇鍒�鍏峰垪琛ㄥ湪宸ュ簭鍜屽伐姝ュ眰绾х殑灞曠ず鏉冮檺
+     * @param settingKey 鍚勫眰绾у睍绀烘潈闄恔ey
+     * @param dataProperty 缁勪欢data涓殑灞炴�у�肩敤鏉ユ帶鍒舵槸鍚﹀睍绀�
+     */
+    getCutterListDisplayPermission(settingKey, dataProperty) {
+      getAction(`/system/sysParams/query/by/settingKey?settingKey=${settingKey}`).then(res => {
+        if (res.success) {
+          this[dataProperty] = res.result.settingValue === '1'
         }
-      },
+      })
+    },
 
-      // 閲婃斁鏂囦欢棰勮鎺ュ彛
-      releaseFilePreviewApi() {
-        // 濡傛灉宸茬粡棰勮杩囨鏂囨。锛屽彲鍦ㄦ鏂囨。褰撳墠鐗堟湰鍙戠敓鏀瑰彉鍚庡啀娆¢瑙堟柊鐗堟湰鍐呭
-        if (this.hasLoadedDataTabKeyArray.includes(2)) this.hasLoadedDataTabKeyArray = this.hasLoadedDataTabKeyArray.filter(item => item !== 2)
-      },
+    /**
+     * 鎺ユ敹鏍戠粍浠朵互鍙婅〃鏍间紶鏉ョ殑褰撳墠閫変腑鎴栫偣鍑荤殑椤逛俊鎭�
+     * @param levelInfo 褰撳墠灞傜骇淇℃伅
+     */
+    receiveCurrentLevelInfo(levelInfo) {
+      this.currentLevelInfo = levelInfo
+      this.activeTabKey = 1
+      this.$nextTick(() => {
+        if (this.$refs.useTypeEquipmentTableListRef) {
+          this.$refs.useTypeEquipmentTableListRef.setQueryParamAndLoadData()
+          this.hasLoadedDataTabKeyArray.push(this.activeTabKey)
+          return
+        }
+      })
+      this.hasLoadedDataTabKeyArray = []
+    },
 
-      /**
-       * 鎺у埗鍙抽敭鑿滃崟寮�鍚�
-       * @param record 褰撳墠琛ㄦ牸琛屼俊鎭�
-       */
-      handleTableContextMenuOpen(record) {
-        this.currentRightClickedTableRowInfo = Object.assign({}, record)
-        this.$refs.tableContextMenuRef.currentMenuLevel = record.param
-        this.$refs.tableContextMenuRef.menuStyle.top = event.clientY + 'px'
-        this.$refs.tableContextMenuRef.menuStyle.left = event.clientX + 'px'
-        this.$refs.tableContextMenuRef.menuVisible = true
-        document.body.addEventListener('click', this.handleMenuClose)
-      },
-
-      /**
-       * 鎺у埗鍙抽敭鑿滃崟鐐瑰嚮鍏抽棴
-       */
-      handleMenuClose() {
-        this.$refs.tableContextMenuRef.menuVisible = false
-        document.body.removeEventListener('click', this.handleMenuClose)
-      },
-
-      reloadMainBottomTableData(tableName) {
-        if (this.$refs[tableName + 'TableRef']) this.$refs[tableName + 'TableRef'].loadData()
+    /**
+     * tab鏍忓垏鎹㈡椂瑙﹀彂
+     * @param activeTabKey 褰撳墠婵�娲荤殑tabKey
+     */
+    handleTabChange(activeTabKey) {
+      if (!this.hasLoadedDataTabKeyArray.includes(activeTabKey)) {
+        switch (activeTabKey) {
+          case 2:
+            if (this.currentLevelInfo.hasOwnProperty('attributionType')) {
+              console.log('ref', this.$refs.filePreviewRef)
+              this.$nextTick(() => this.$refs.filePreviewRef.getFilePreviewByApi())
+            } else {
+              this.$nextTick(() => this.$refs.cutterTableListRef.setQueryParamAndLoadData(1))
+            }
+            break
+          case 3:
+            this.$nextTick(() => this.$refs.documentVersionTableRef.loadData())
+            break
+          case 4:
+            this.$nextTick(() => this.$refs.useDocumentEquipmentTableRef.loadData())
+            break
+          case 5:
+            this.$nextTick(() => this.$refs.cutterTableListRef.setQueryParamAndLoadData(1))
+            break
+          case 6:
+            this.$nextTick(() => this.$refs.flowTableListRef.getAllApproveData())
+            break
+          case 7:
+            this.$nextTick(() => this.$refs.guideCardBatchInfoRef.getGuideCardBatchList())
+          default:
+        }
+        // 闃绘鎺ュ彛鍦ㄥ悓涓�鏂囨。涓�娆$偣鍑诲唴澶氭瑙﹀彂
+        this.hasLoadedDataTabKeyArray.push(activeTabKey)
       }
+    },
+
+    // 閲婃斁鏂囦欢棰勮鎺ュ彛
+    releaseFilePreviewApi() {
+      // 濡傛灉宸茬粡棰勮杩囨鏂囨。锛屽彲鍦ㄦ鏂囨。褰撳墠鐗堟湰鍙戠敓鏀瑰彉鍚庡啀娆¢瑙堟柊鐗堟湰鍐呭
+      if (this.hasLoadedDataTabKeyArray.includes(2)) this.hasLoadedDataTabKeyArray = this.hasLoadedDataTabKeyArray.filter(item => item !== 2)
+    },
+
+    /**
+     * 鎺у埗鍙抽敭鑿滃崟寮�鍚�
+     * @param record 褰撳墠琛ㄦ牸琛屼俊鎭�
+     */
+    handleTableContextMenuOpen(record) {
+      this.currentRightClickedTableRowInfo = Object.assign({}, record)
+      this.$refs.tableContextMenuRef.currentMenuLevel = record.param
+      this.$refs.tableContextMenuRef.menuStyle.top = event.clientY + 'px'
+      this.$refs.tableContextMenuRef.menuStyle.left = event.clientX + 'px'
+      this.$refs.tableContextMenuRef.menuVisible = true
+      document.body.addEventListener('click', this.handleMenuClose)
+    },
+
+    /**
+     * 鎺у埗鍙抽敭鑿滃崟鐐瑰嚮鍏抽棴
+     */
+    handleMenuClose() {
+      this.$refs.tableContextMenuRef.menuVisible = false
+      document.body.removeEventListener('click', this.handleMenuClose)
+    },
+
+    reloadMainBottomTableData(tableName) {
+      if (this.$refs[tableName + 'TableRef']) this.$refs[tableName + 'TableRef'].loadData()
     }
   }
+}
 </script>
 
 <style scoped>
-  /deep/ .ant-tabs-content {
-    height: calc(100% - 65px);
-  }
+/deep/ .ant-tabs-content {
+  height: calc(100% - 65px);
+}
 
-  /deep/ .ant-tabs-tabpane {
-    overflow: auto;
-  }
+/deep/ .ant-tabs-tabpane {
+  overflow: hidden auto;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3