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 | 38 +++++++++++++++++++++++++++++++------- src/axios.js | 3 +-- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/src/axios.js b/src/axios.js index b339797..07ca7d6 100644 --- a/src/axios.js +++ b/src/axios.js @@ -113,7 +113,6 @@ const message = res.data.msg || res.data.error_description || '绯荤粺閿欒'; //濡傛灉鍦ㄧ櫧鍚嶅崟閲屽垯鑷catch閫昏緫澶勭悊 if (statusWhiteList.includes(status)) return Promise.reject(res); - // 濡傛灉鏄�401骞朵笖娌℃湁閲嶈瘯杩囷紝灏濊瘯鍒锋柊token if (status === 401 && !config._retry) { config._retry = true; @@ -203,7 +202,7 @@ } // 濡傛灉璇锋眰涓洪潪200鍒欓粯璁ょ粺涓�澶勭悊 - if (status !== 200) { + if (status !== 200 && status != 2) { ElMessage({ message: message, type: 'error', 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