From fa9d138094e2ffabf7b053e73779d1204097ce75 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期二, 11 二月 2025 11:49:46 +0800
Subject: [PATCH] 产品结构树: 1、实现文档功能的删除功能 设备结构树: 1、实现获取对应设备的已发送的NC程序列表 2、实现设备层级导入NC程序功能 3、实现设备关联的已发送NC程序功能的删除功能

---
 src/views/dnc/common/ImportFileModal.vue |   22 ++++++++++------------
 1 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/src/views/dnc/common/ImportFileModal.vue b/src/views/dnc/common/ImportFileModal.vue
index d5d1af0..b058e42 100644
--- a/src/views/dnc/common/ImportFileModal.vue
+++ b/src/views/dnc/common/ImportFileModal.vue
@@ -59,12 +59,14 @@
         if (treeNodeInfo) {
           attributionId = treeNodeInfo.treeKey
           attributionType = treeNodeInfo.type
+          if (attributionType === 5 || attributionType === 6) docClassCode = 'NC'
+          else if (attributionType === 4) docClassCode = 'SEND'
+          else docClassCode = 'OTHER'
         } else {
           attributionId = tableRowInfo.attributionId
           attributionType = tableRowInfo.attributionType
+          docClassCode = tableRowInfo.param
         }
-        if (attributionType === 5 || attributionType === 6) docClassCode = 'NC'
-        else docClassCode = 'OTHER'
         this.uploadParams = Object.assign({}, { attributionId, attributionType, docClassCode })
         this.visible = true
       },
@@ -78,7 +80,7 @@
         this.isUploadMultiple = false
         console.log('tableRowInfo', tableRowInfo)
         this.uploadParams = Object.assign({}, {
-          id: tableRowInfo.docId,
+          docId: tableRowInfo.docId,
           attributionId: tableRowInfo.attributionId,
           docClassCode: tableRowInfo.param
         })
@@ -97,11 +99,9 @@
         return false
       },
 
-      /**
-       * 鐐瑰嚮涓婁紶鑷虫湇鍔″櫒鎸夐挳鏃惰Е鍙�
-       */
+      // 鐐瑰嚮涓婁紶鑷虫湇鍔″櫒鎸夐挳鏃惰Е鍙�
       handleUpload() {
-        const { fileList, $notification, isUploadMultiple, uploadParams, $bus } = this
+        const { fileList, $notification, isUploadMultiple, uploadParams, $bus, handleModalClose } = this
         this.uploading = true
         let uploadedFileCount = 0
         let uploadSuccessFileCount = 0
@@ -118,7 +118,7 @@
             params = Object.assign({}, { params: uploadParams, formData })
           } else {
             apiMethod = dncApi.documentVersionUpdateApi
-            params = Object.assign({}, { id: uploadParams.id, formData })
+            params = Object.assign({}, { docId: uploadParams.docId, formData })
           }
           apiMethod(params)
             .then(res => {
@@ -151,7 +151,7 @@
                   $bus.$emit('reloadDocumentListData', uploadParams)
                   if (!isUploadMultiple) {
                     $bus.$emit('reloadMainBottomTableData', 'documentVersion')
-                    this.visible = false //鏃犳硶杩炵画鍏ュ簱澶氫釜鐗堟湰鍥犳鍏ュ簱鎴愬姛鍚庡嵆鍙��鍑虹獥鍙�
+                    handleModalClose() //鏃犳硶杩炵画鍏ュ簱澶氫釜鐗堟湰鍥犳鍏ュ簱鎴愬姛鍚庡嵆鍙��鍑虹獥鍙�
                   }
                 }
                 this.uploading = false
@@ -171,9 +171,7 @@
         this.fileList = newFileList
       },
 
-      /**
-       * 鎺у埗鏂囦欢涓婁紶绐楀彛鍏抽棴骞舵竻绌烘枃浠跺垪琛�
-       */
+      // 鎺у埗鏂囦欢涓婁紶绐楀彛鍏抽棴骞舵竻绌烘枃浠跺垪琛�
       handleModalClose() {
         this.visible = false
         this.fileList = []

--
Gitblit v1.9.3