From 7bd762267b83afaa475f2e2b5ff5d31ecbbf9754 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 13 Oct 2020 17:58:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=8D=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/vm/vue/index-tree.vue.vm | 18 ++++++--------- .../src/main/resources/vm/vue/index.vue.vm | 18 ++++++--------- ruoyi-ui/src/views/monitor/job/index.vue | 20 +++++++---------- ruoyi-ui/src/views/monitor/job/log.vue | 4 ++-- ruoyi-ui/src/views/monitor/online/index.vue | 2 +- ruoyi-ui/src/views/system/config/index.vue | 24 +++++++------------- ruoyi-ui/src/views/system/dept/index.vue | 18 ++++++--------- ruoyi-ui/src/views/system/dict/data.vue | 18 ++++++--------- ruoyi-ui/src/views/system/dict/index.vue | 24 +++++++------------- ruoyi-ui/src/views/system/logininfor/index.vue | 4 ++-- ruoyi-ui/src/views/system/menu/index.vue | 18 ++++++--------- ruoyi-ui/src/views/system/notice/index.vue | 18 ++++++--------- ruoyi-ui/src/views/system/operlog/index.vue | 4 ++-- ruoyi-ui/src/views/system/post/index.vue | 18 ++++++--------- ruoyi-ui/src/views/system/role/index.vue | 26 +++++++++------------- ruoyi-ui/src/views/system/user/index.vue | 22 +++++++----------- .../src/views/system/user/profile/resetPwd.vue | 4 +--- .../src/views/system/user/profile/userAvatar.vue | 10 ++++----- .../src/views/system/user/profile/userInfo.vue | 4 +--- ruoyi-ui/src/views/tool/gen/index.vue | 4 ++-- 20 files changed, 106 insertions(+), 172 deletions(-) diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm index 10a9862..e139a13 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm +++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm @@ -420,19 +420,15 @@ export default { #end if (this.form.${pkColumn.javaField} != null) { update${BusinessName}(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("修改成功"); + this.open = false; + this.getList(); }); } else { add${BusinessName}(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("新增成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("新增成功"); + this.open = false; + this.getList(); }); } } @@ -449,7 +445,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) } } }; diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm index a34fad2..0965029 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm +++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm @@ -436,19 +436,15 @@ export default { #end if (this.form.${pkColumn.javaField} != null) { update${BusinessName}(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("修改成功"); + this.open = false; + this.getList(); }); } else { add${BusinessName}(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("新增成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("新增成功"); + this.open = false; + this.getList(); }); } } @@ -466,7 +462,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) }, /** 导出按钮操作 */ handleExport() { diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue index 8c148d4..7982125 100644 --- a/ruoyi-ui/src/views/monitor/job/index.vue +++ b/ruoyi-ui/src/views/monitor/job/index.vue @@ -402,7 +402,7 @@ export default { return runJob(row.jobId, row.jobGroup); }).then(() => { this.msgSuccess("执行成功"); - }).catch(function() {}); + }) }, /** 任务详细信息 */ handleView(row) { @@ -437,19 +437,15 @@ export default { if (valid) { if (this.form.jobId != undefined) { updateJob(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("修改成功"); + this.open = false; + this.getList(); }); } else { addJob(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("新增成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("新增成功"); + this.open = false; + this.getList(); }); } } @@ -467,7 +463,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) }, /** 导出按钮操作 */ handleExport() { diff --git a/ruoyi-ui/src/views/monitor/job/log.vue b/ruoyi-ui/src/views/monitor/job/log.vue index 4fa106c..842db03 100644 --- a/ruoyi-ui/src/views/monitor/job/log.vue +++ b/ruoyi-ui/src/views/monitor/job/log.vue @@ -263,7 +263,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) }, /** 清空按钮操作 */ handleClean() { @@ -276,7 +276,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("清空成功"); - }).catch(function() {}); + }) }, /** 导出按钮操作 */ handleExport() { diff --git a/ruoyi-ui/src/views/monitor/online/index.vue b/ruoyi-ui/src/views/monitor/online/index.vue index 802e4d1..c3a7fd3 100644 --- a/ruoyi-ui/src/views/monitor/online/index.vue +++ b/ruoyi-ui/src/views/monitor/online/index.vue @@ -116,7 +116,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("强退成功"); - }).catch(function() {}); + }) } } }; diff --git a/ruoyi-ui/src/views/system/config/index.vue b/ruoyi-ui/src/views/system/config/index.vue index 214bd83..7c2f3e9 100644 --- a/ruoyi-ui/src/views/system/config/index.vue +++ b/ruoyi-ui/src/views/system/config/index.vue @@ -304,19 +304,15 @@ export default { if (valid) { if (this.form.configId != undefined) { updateConfig(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("修改成功"); + this.open = false; + this.getList(); }); } else { addConfig(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("新增成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("新增成功"); + this.open = false; + this.getList(); }); } } @@ -334,7 +330,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) }, /** 导出按钮操作 */ handleExport() { @@ -345,11 +341,7 @@ export default { /** 清理缓存按钮操作 */ handleClearCache() { clearCache().then(response => { - if (response.code === 200) { - this.msgSuccess("清理成功"); - } else { - this.msgError(response.msg); - } + this.msgSuccess("清理成功"); }); } } diff --git a/ruoyi-ui/src/views/system/dept/index.vue b/ruoyi-ui/src/views/system/dept/index.vue index ae2aaaa..1a2b506 100644 --- a/ruoyi-ui/src/views/system/dept/index.vue +++ b/ruoyi-ui/src/views/system/dept/index.vue @@ -284,19 +284,15 @@ export default { if (valid) { if (this.form.deptId != undefined) { updateDept(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("修改成功"); + this.open = false; + this.getList(); }); } else { addDept(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("新增成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("新增成功"); + this.open = false; + this.getList(); }); } } @@ -313,7 +309,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) } } }; diff --git a/ruoyi-ui/src/views/system/dict/data.vue b/ruoyi-ui/src/views/system/dict/data.vue index 3e7463f..41eec58 100644 --- a/ruoyi-ui/src/views/system/dict/data.vue +++ b/ruoyi-ui/src/views/system/dict/data.vue @@ -304,19 +304,15 @@ export default { if (valid) { if (this.form.dictCode != undefined) { updateData(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("修改成功"); + this.open = false; + this.getList(); }); } else { addData(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("新增成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("新增成功"); + this.open = false; + this.getList(); }); } } @@ -334,7 +330,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) }, /** 导出按钮操作 */ handleExport() { diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/ruoyi-ui/src/views/system/dict/index.vue index abd1dc8..5791ec3 100644 --- a/ruoyi-ui/src/views/system/dict/index.vue +++ b/ruoyi-ui/src/views/system/dict/index.vue @@ -308,19 +308,15 @@ export default { if (valid) { if (this.form.dictId != undefined) { updateType(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("修改成功"); + this.open = false; + this.getList(); }); } else { addType(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("新增成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("新增成功"); + this.open = false; + this.getList(); }); } } @@ -338,7 +334,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) }, /** 导出按钮操作 */ handleExport() { @@ -349,11 +345,7 @@ export default { /** 清理缓存按钮操作 */ handleClearCache() { clearCache().then(response => { - if (response.code === 200) { - this.msgSuccess("清理成功"); - } else { - this.msgError(response.msg); - } + this.msgSuccess("清理成功"); }); } } diff --git a/ruoyi-ui/src/views/system/logininfor/index.vue b/ruoyi-ui/src/views/system/logininfor/index.vue index 2cf5237..5172c83 100644 --- a/ruoyi-ui/src/views/system/logininfor/index.vue +++ b/ruoyi-ui/src/views/system/logininfor/index.vue @@ -193,7 +193,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) }, /** 清空按钮操作 */ handleClean() { @@ -206,7 +206,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("清空成功"); - }).catch(function() {}); + }) }, /** 导出按钮操作 */ handleExport() { diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/ruoyi-ui/src/views/system/menu/index.vue index f8ce2f0..dcbff6b 100644 --- a/ruoyi-ui/src/views/system/menu/index.vue +++ b/ruoyi-ui/src/views/system/menu/index.vue @@ -367,19 +367,15 @@ export default { if (valid) { if (this.form.menuId != undefined) { updateMenu(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("修改成功"); + this.open = false; + this.getList(); }); } else { addMenu(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("新增成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("新增成功"); + this.open = false; + this.getList(); }); } } @@ -396,7 +392,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) } } }; diff --git a/ruoyi-ui/src/views/system/notice/index.vue b/ruoyi-ui/src/views/system/notice/index.vue index 4039ed7..86ca769 100644 --- a/ruoyi-ui/src/views/system/notice/index.vue +++ b/ruoyi-ui/src/views/system/notice/index.vue @@ -307,19 +307,15 @@ export default { if (valid) { if (this.form.noticeId != undefined) { updateNotice(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("修改成功"); + this.open = false; + this.getList(); }); } else { addNotice(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("新增成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("新增成功"); + this.open = false; + this.getList(); }); } } @@ -337,7 +333,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) } } }; diff --git a/ruoyi-ui/src/views/system/operlog/index.vue b/ruoyi-ui/src/views/system/operlog/index.vue index 041a8d3..eb987b4 100644 --- a/ruoyi-ui/src/views/system/operlog/index.vue +++ b/ruoyi-ui/src/views/system/operlog/index.vue @@ -283,7 +283,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) }, /** 清空按钮操作 */ handleClean() { @@ -296,7 +296,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("清空成功"); - }).catch(function() {}); + }) }, /** 导出按钮操作 */ handleExport() { diff --git a/ruoyi-ui/src/views/system/post/index.vue b/ruoyi-ui/src/views/system/post/index.vue index 0f6ca6e..061ea61 100644 --- a/ruoyi-ui/src/views/system/post/index.vue +++ b/ruoyi-ui/src/views/system/post/index.vue @@ -276,19 +276,15 @@ export default { if (valid) { if (this.form.postId != undefined) { updatePost(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("修改成功"); + this.open = false; + this.getList(); }); } else { addPost(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("新增成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("新增成功"); + this.open = false; + this.getList(); }); } } @@ -306,7 +302,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) }, /** 导出按钮操作 */ handleExport() { diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue index b948285..c99bd24 100644 --- a/ruoyi-ui/src/views/system/role/index.vue +++ b/ruoyi-ui/src/views/system/role/index.vue @@ -537,20 +537,16 @@ export default { if (this.form.roleId != undefined) { this.form.menuIds = this.getMenuAllCheckedKeys(); updateRole(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("修改成功"); + this.open = false; + this.getList(); }); } else { this.form.menuIds = this.getMenuAllCheckedKeys(); addRole(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("新增成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("新增成功"); + this.open = false; + this.getList(); }); } } @@ -561,11 +557,9 @@ export default { if (this.form.roleId != undefined) { this.form.deptIds = this.getDeptAllCheckedKeys(); dataScope(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - this.openDataScope = false; - this.getList(); - } + this.msgSuccess("修改成功"); + this.openDataScope = false; + this.getList(); }); } }, @@ -581,7 +575,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) }, /** 导出按钮操作 */ handleExport() { diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index af14830..70577a5 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -582,9 +582,7 @@ export default { cancelButtonText: "取消" }).then(({ value }) => { resetUserPwd(row.userId, value).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功,新密码是:" + value); - } + this.msgSuccess("修改成功,新密码是:" + value); }); }).catch(() => {}); }, @@ -594,19 +592,15 @@ export default { if (valid) { if (this.form.userId != undefined) { updateUser(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("修改成功"); + this.open = false; + this.getList(); }); } else { addUser(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("新增成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("新增成功"); + this.open = false; + this.getList(); }); } } @@ -624,7 +618,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) }, /** 导出按钮操作 */ handleExport() { diff --git a/ruoyi-ui/src/views/system/user/profile/resetPwd.vue b/ruoyi-ui/src/views/system/user/profile/resetPwd.vue index e39948e..1359717 100644 --- a/ruoyi-ui/src/views/system/user/profile/resetPwd.vue +++ b/ruoyi-ui/src/views/system/user/profile/resetPwd.vue @@ -57,9 +57,7 @@ export default { if (valid) { updateUserPwd(this.user.oldPassword, this.user.newPassword).then( response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - } + this.msgSuccess("修改成功"); } ); } diff --git a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue index 8f60085..ef0c213 100644 --- a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue +++ b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue @@ -125,12 +125,10 @@ export default { let formData = new FormData(); formData.append("avatarfile", data); uploadAvatar(formData).then(response => { - if (response.code === 200) { - this.open = false; - this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl; - store.commit('SET_AVATAR', this.options.img); - this.msgSuccess("修改成功"); - } + this.open = false; + this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl; + store.commit('SET_AVATAR', this.options.img); + this.msgSuccess("修改成功"); this.visible = false; }); }); diff --git a/ruoyi-ui/src/views/system/user/profile/userInfo.vue b/ruoyi-ui/src/views/system/user/profile/userInfo.vue index 0b1780d..d52137d 100644 --- a/ruoyi-ui/src/views/system/user/profile/userInfo.vue +++ b/ruoyi-ui/src/views/system/user/profile/userInfo.vue @@ -62,9 +62,7 @@ export default { this.$refs["form"].validate(valid => { if (valid) { updateUserProfile(this.user).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - } + this.msgSuccess("修改成功"); }); } }); diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue index 723ca1a..61061e1 100644 --- a/ruoyi-ui/src/views/tool/gen/index.vue +++ b/ruoyi-ui/src/views/tool/gen/index.vue @@ -270,7 +270,7 @@ export default { return synchDb(tableName); }).then(() => { this.msgSuccess("同步成功"); - }).catch(function() {}); + }) }, /** 打开导入表弹窗 */ openImportTable() { @@ -313,7 +313,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) } } };