From 363592eb2c5020ff7ef9747b9aa22bc793ad3297 Mon Sep 17 00:00:00 2001 From: gaoshp <291585735@qq.com> Date: 星期二, 22 七月 2025 22:56:11 +0800 Subject: [PATCH] 123 --- src/views/wel/index.vue | 38 +++++++++++++++++++++++++++++++------- 1 files changed, 31 insertions(+), 7 deletions(-) diff --git a/src/views/wel/index.vue b/src/views/wel/index.vue index e1b132b..a89c268 100644 --- a/src/views/wel/index.vue +++ b/src/views/wel/index.vue @@ -57,7 +57,7 @@ </template> <script> - +import { ElMessage } from 'element-plus'; export default { data() { return { @@ -495,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]); }); @@ -503,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(); } ); @@ -677,7 +702,6 @@ params: obj, }).then( res => { - console.log(res.data,111) this.loading = false; resolve(res.data.data); } @@ -723,7 +747,7 @@ this.nodeTypeList = res.data.data; } ); - //鍒ゆ柇鐗堟湰 0:娑夊瘑缃戯紝1:宸ユ帶缃戯紱//宸ユ帶缃�5涓紝娑夊瘑缃�4涓� + //鍒ゆ柇鐗堟湰 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; -- Gitblit v1.9.3