From 7e4c95dee70b72cf582e086816589cbd776d8af4 Mon Sep 17 00:00:00 2001
From: 李喆(开发组) <lzhe@yxqiche.com>
Date: 星期二, 22 七月 2025 11:30:02 +0800
Subject: [PATCH] 1

---
 src/views/wel/index.vue |   59 +++++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 39 insertions(+), 20 deletions(-)

diff --git a/src/views/wel/index.vue b/src/views/wel/index.vue
index 060e8d0..a89c268 100644
--- a/src/views/wel/index.vue
+++ b/src/views/wel/index.vue
@@ -57,14 +57,14 @@
 </template>
 
 <script>
-
+import { ElMessage } from 'element-plus';
 export default {
   data() {
     return {
       upgradeModal: false,
       file: null,
       fileContent: "",
-      isSM: false,  //鏄惁鏄秹瀵嗙綉 锛屽伐鎺х綉5涓紝娑夊瘑缃�4涓�
+      isSM: true,  //鏄惁鏄秹瀵嗙綉 锛屽伐鎺х綉5涓紝娑夊瘑缃�4涓�
       isShowTabs: true,
       nodeTypeList: [],
       fileList: [],
@@ -175,8 +175,7 @@
               label: 'dictValue',
               value: 'dictKey',
             },
-            disabled: true,
-            display: false
+            disabled: true
           },
           {
             label: '璁惧锛堟満搴婏級',
@@ -496,6 +495,9 @@
       var formData = new FormData();
       formData.append('file', this.file);
       formData.append('nodeId', this.id);
+      if(this.isRepeatUpload) {
+        formData.append('cofirm','1');
+      }
       Object.keys(this.uploadmodalForm).forEach(key => {
         formData.append(key, this.uploadmodalForm[key]);
       });
@@ -504,11 +506,33 @@
         url: '/blade-mdm/program/ncfile/upload',
         method: 'post',
         data: formData,
-      }).then(
-        res => {
+      }).then(res => {
           this.loading = false;
-          this.uploadmodalBox = false;
-          this.addLocalTreeNode(row.id);  //閲嶆柊鍔犺浇涓嬩竴绾�
+          if(res.data.code == 2) {
+            this.$confirm('鏂囦欢鍚嶅凡瀛樺湪锛岀‘瀹氫笂浼犲悧?', '鎻愮ず', {
+              distinguishCancelAndClose: true,
+              confirmButtonText: '纭畾',
+              cancelButtonText: '鍙栨秷',
+              type: 'warning'
+            }).then(() => {
+              this.isRepeatUpload = true;
+              this.uploadmodalSubmit(row,done);
+            }).catch(action => {
+              this.isRepeatUpload = false;
+              this.$message({
+                type: 'info',
+                message:'鍙栨秷涓婁紶'
+              })
+            });
+          }else if(res.data.success) {
+            this.isRepeatUpload = false;
+            this.uploadmodalBox = false;
+            this.$message({type: 'success',message: '鎿嶄綔鎴愬姛!'});
+            this.addLocalTreeNode(row.id);  //閲嶆柊鍔犺浇涓嬩竴绾�
+          }else {
+            this.isRepeatUpload = false;
+            alert(1)
+          }
           done();
         }
       );
@@ -606,11 +630,6 @@
         this.selectedColumn.name = "";
         this.selectedColumn.id = "";
         this.modalForm = this.selectedColumn;
-      }
-      if(this.modalForm.nodeType == 20) {
-        this.modalOption.column[0].display = true;
-      }else {
-        this.modalOption.column[0].display = false;
       }
       this.modalBox = true;
     },
@@ -728,13 +747,13 @@
         this.nodeTypeList = res.data.data;
       }
     );
-    //鍒ゆ柇鐗堟湰  0:娑夊瘑缃戯紝1:宸ユ帶缃戯紱//宸ユ帶缃�5涓紝娑夊瘑缃�4涓�  
-    axios({url: '/blade-mdm/system/param/getValue?paramKey=networkType',method: 'get'}).then(res => {
-        if(res.data.data === "0") {
-          this.isSM = true;
-        }
-      }
-    );
+    //鍒ゆ柇鐗堟湰  0:娑夊瘑缃戯紝1:宸ユ帶缃戯紱//宸ユ帶缃�5涓紝娑夊瘑缃�4涓�  ,宸ユ帶缃戝彇娑�
+    // axios({url: '/blade-mdm/system/param/getValue?paramKey=networkType',method: 'get'}).then(res => {
+    //     if(res.data.data === "0") {
+    //       this.isSM = true;
+    //     }
+    //   }
+    // );
   }
 };
 </script>

--
Gitblit v1.9.3