diff --git a/src/main/resources/mybatis/tool/GenMapper.xml b/src/main/resources/mybatis/tool/GenMapper.xml index d075824da..bc6ddd59f 100644 --- a/src/main/resources/mybatis/tool/GenMapper.xml +++ b/src/main/resources/mybatis/tool/GenMapper.xml @@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/src/main/resources/static/ruoyi/js/common.js b/src/main/resources/static/ruoyi/js/common.js index 4166ca7c5..1738d2db6 100644 --- a/src/main/resources/static/ruoyi/js/common.js +++ b/src/main/resources/static/ruoyi/js/common.js @@ -65,10 +65,7 @@ _ajax_save = function(url, data) { }; //对jquery的ajax方法再次封装 -_ajax = function(url, data, type, r) { - if (!r) { - return; - } +_ajax = function(url, data, type) { var config = { url: url, type: type, @@ -102,20 +99,6 @@ function handleSuccess(result) { } } -$(document).ready(function() { - $(".onoffswitch-checkbox").on('click', function(){ - clickSwitch() - }); - - var clickSwitch = function() { - if ($(".onoffswitch-checkbox").is(':checked')) { - alert("在ON的状态下"); - } else { - alert("在OFF的状态下"); - } - }; -}); - /** 时间格式化 */ function formatDate(_date, _pattern) { var date = new Date(_date); diff --git a/src/main/resources/static/ruoyi/js/ry-ui.js b/src/main/resources/static/ruoyi/js/ry-ui.js index 48991cfc9..25ecf5a28 100644 --- a/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/src/main/resources/static/ruoyi/js/ry-ui.js @@ -51,7 +51,7 @@ $(function(){ }, function () { callBack(true); }, function () { - callBack(false) + // callBack(false) }); } // 关闭窗体 diff --git a/src/main/resources/static/ruoyi/monitor/job/job.js b/src/main/resources/static/ruoyi/monitor/job/job.js index adcc48ea9..e89861c90 100644 --- a/src/main/resources/static/ruoyi/monitor/job/job.js +++ b/src/main/resources/static/ruoyi/monitor/job/job.js @@ -69,15 +69,15 @@ function statusTools(row) { /*调度任务-停用*/ function stop(obj, jobId) { - $.modalConfirm("确认要停用吗?", function(r) { - _ajax(prefix + "/changeStatus/", { "jobId": jobId, "status": 1 }, "post", r); + $.modalConfirm("确认要停用吗?", function() { + _ajax(prefix + "/changeStatus/", { "jobId": jobId, "status": 1 }, "post"); }) } /*调度任务-启用*/ function start(obj, jobId) { - $.modalConfirm("确认要启用吗?", function(r) { - _ajax(prefix + "/changeStatus/", { "jobId": jobId, "status": 0 }, "post", r); + $.modalConfirm("确认要启用吗?", function() { + _ajax(prefix + "/changeStatus/", { "jobId": jobId, "status": 0 }, "post"); }) } @@ -95,8 +95,8 @@ function edit(jobId) { // 单条删除 function remove(id) { - $.modalConfirm("确定要删除选中调度任务吗?", function(r) { - _ajax(prefix + "/remove/" + id, "", "post", r); + $.modalConfirm("确定要删除选中调度任务吗?", function() { + _ajax(prefix + "/remove/" + id, "", "post"); }) } @@ -107,8 +107,8 @@ function batchRemove() { $.modalMsg("请选择要删除的数据", "warning"); return; } - $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) { - _ajax(prefix + '/batchRemove', { "ids": rows }, "post", r); + $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() { + _ajax(prefix + '/batchRemove', { "ids": rows }, "post"); }); } diff --git a/src/main/resources/static/ruoyi/monitor/job/jobLog.js b/src/main/resources/static/ruoyi/monitor/job/jobLog.js index c87e898cd..cd9ccb426 100644 --- a/src/main/resources/static/ruoyi/monitor/job/jobLog.js +++ b/src/main/resources/static/ruoyi/monitor/job/jobLog.js @@ -59,8 +59,8 @@ $(function() { // 单条删除 function remove(jobLogId) { - $.modalConfirm("确定要删除选中岗位吗?", function(r) { - _ajax(prefix + "/remove/" + jobLogId, "", "post", r); + $.modalConfirm("确定要删除选中岗位吗?", function() { + _ajax(prefix + "/remove/" + jobLogId, "", "post"); }) } @@ -71,7 +71,7 @@ function batchRemove() { $.modalMsg("请选择要删除的数据", "warning"); return; } - $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) { - _ajax(prefix + '/batchRemove', { "ids": rows }, "post", r); + $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() { + _ajax(prefix + '/batchRemove', { "ids": rows }, "post"); }); } diff --git a/src/main/resources/static/ruoyi/monitor/logininfor/logininfor.js b/src/main/resources/static/ruoyi/monitor/logininfor/logininfor.js index 5ea55f99e..3aa99e0f4 100644 --- a/src/main/resources/static/ruoyi/monitor/logininfor/logininfor.js +++ b/src/main/resources/static/ruoyi/monitor/logininfor/logininfor.js @@ -55,7 +55,7 @@ function batchRemove() { $.modalMsg("请选择要删除的数据", "warning"); return; } - $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) { - _ajax(prefix + '/batchRemove', { "ids": rows }, "post", r); + $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() { + _ajax(prefix + '/batchRemove', { "ids": rows }, "post"); }); } diff --git a/src/main/resources/static/ruoyi/monitor/online/online.js b/src/main/resources/static/ruoyi/monitor/online/online.js index 858e58fa4..10b3f90da 100644 --- a/src/main/resources/static/ruoyi/monitor/online/online.js +++ b/src/main/resources/static/ruoyi/monitor/online/online.js @@ -62,8 +62,8 @@ $(function() { // 单条强退 function forceLogout(id) { - $.modalConfirm("确定要强制选中用户下线吗?", function(r) { - _ajax(prefix + "/forceLogout/" + id, "", "post", r); + $.modalConfirm("确定要强制选中用户下线吗?", function() { + _ajax(prefix + "/forceLogout/" + id, "", "post"); }) } @@ -74,7 +74,7 @@ function batchForceLogout() { $.modalMsg("请选择要删除的数据", "warning"); return; } - $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) { - _ajax(prefix + '/batchForceLogout', { "ids": rows }, "post", r); + $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() { + _ajax(prefix + '/batchForceLogout', { "ids": rows }, "post"); }); } diff --git a/src/main/resources/static/ruoyi/monitor/operlog/operlog.js b/src/main/resources/static/ruoyi/monitor/operlog/operlog.js index 2956f5961..2647c9db9 100644 --- a/src/main/resources/static/ruoyi/monitor/operlog/operlog.js +++ b/src/main/resources/static/ruoyi/monitor/operlog/operlog.js @@ -70,7 +70,7 @@ function batchRemove() { $.modalMsg("请选择要删除的数据", "warning"); return; } - $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) { - _ajax(prefix + '/batchRemove', { "ids": rows }, "post", r); + $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() { + _ajax(prefix + '/batchRemove', { "ids": rows }, "post"); }); } diff --git a/src/main/resources/static/ruoyi/system/dict/data/data.js b/src/main/resources/static/ruoyi/system/dict/data/data.js index 9c78e455e..fbb044a8b 100644 --- a/src/main/resources/static/ruoyi/system/dict/data/data.js +++ b/src/main/resources/static/ruoyi/system/dict/data/data.js @@ -73,8 +73,8 @@ function detail(id) { //单条删除 function remove(id) { - $.modalConfirm("确定要删除选中字典数据吗?", function(r) { - _ajax(prefix + "/remove/" + id, "", "post", r); + $.modalConfirm("确定要删除选中字典数据吗?", function() { + _ajax(prefix + "/remove/" + id, "", "post"); }) } @@ -85,7 +85,7 @@ function batchRemove() { $.modalMsg("请选择要删除的数据", "warning"); return; } - $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) { - _ajax(prefix + '/batchRemove', { "ids": rows }, "post", r); + $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() { + _ajax(prefix + '/batchRemove', { "ids": rows }, "post"); }); } diff --git a/src/main/resources/static/ruoyi/system/dict/type/type.js b/src/main/resources/static/ruoyi/system/dict/type/type.js index 2bd5de01a..1a2249238 100644 --- a/src/main/resources/static/ruoyi/system/dict/type/type.js +++ b/src/main/resources/static/ruoyi/system/dict/type/type.js @@ -71,8 +71,8 @@ function detail(dictId) { //单条删除 function remove(id) { - $.modalConfirm("确定要删除选中字典吗?", function(r) { - _ajax(prefix + "/remove/" + id, "", "post", r); + $.modalConfirm("确定要删除选中字典吗?", function() { + _ajax(prefix + "/remove/" + id, "", "post"); }) } @@ -83,7 +83,7 @@ function batchRemove() { $.modalMsg("请选择要删除的数据", "warning"); return; } - $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) { - _ajax(prefix + '/batchRemove', { "ids": rows }, "post", r); + $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() { + _ajax(prefix + '/batchRemove', { "ids": rows }, "post"); }); } diff --git a/src/main/resources/static/ruoyi/system/post/post.js b/src/main/resources/static/ruoyi/system/post/post.js index 9d02b7d24..937276e10 100644 --- a/src/main/resources/static/ruoyi/system/post/post.js +++ b/src/main/resources/static/ruoyi/system/post/post.js @@ -64,8 +64,8 @@ function edit(postId) { // 单条删除 function remove(id) { - $.modalConfirm("确定要删除选中岗位吗?", function(r) { - _ajax(prefix + "/remove/" + id, "", "post", r); + $.modalConfirm("确定要删除选中岗位吗?", function() { + _ajax(prefix + "/remove/" + id, "", "post"); }) } @@ -76,7 +76,7 @@ function batchRemove() { $.modalMsg("请选择要删除的数据", "warning"); return; } - $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) { - _ajax(prefix + '/batchRemove', { "ids": rows }, "post", r); + $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() { + _ajax(prefix + '/batchRemove', { "ids": rows }, "post"); }); } diff --git a/src/main/resources/static/ruoyi/system/role/role.js b/src/main/resources/static/ruoyi/system/role/role.js index 9754ec40f..e1fff7732 100644 --- a/src/main/resources/static/ruoyi/system/role/role.js +++ b/src/main/resources/static/ruoyi/system/role/role.js @@ -64,8 +64,8 @@ function edit(roleId) { // 单条删除 function remove(id) { - $.modalConfirm("确定要删除选中角色吗?", function(r) { - _ajax(prefix + "/remove/" + id, "", "post", r); + $.modalConfirm("确定要删除选中角色吗?", function() { + _ajax(prefix + "/remove/" + id, "", "post"); }) } @@ -76,7 +76,7 @@ function batchRemove() { $.modalMsg("请选择要删除的数据", "warning"); return; } - $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) { - _ajax(prefix + '/batchRemove', { "ids": rows }, "post", r); + $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() { + _ajax(prefix + '/batchRemove', { "ids": rows }, "post"); }); } diff --git a/src/main/resources/static/ruoyi/system/user/user.js b/src/main/resources/static/ruoyi/system/user/user.js index 32f1598ab..8eb4a12b0 100644 --- a/src/main/resources/static/ruoyi/system/user/user.js +++ b/src/main/resources/static/ruoyi/system/user/user.js @@ -114,8 +114,8 @@ function dept() { /*用户管理-删除*/ function remove(userId) { - $.modalConfirm("确定要删除选中用户吗?", function(r) { - _ajax(prefix + "/remove/" + userId, "", "post", r); + $.modalConfirm("确定要删除选中用户吗?", function() { + _ajax(prefix + "/remove/" + userId, "", "post"); }) } @@ -144,7 +144,7 @@ function batchRemove() { $.modalMsg("请选择要删除的数据", "warning"); return; } - $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) { - _ajax(prefix + '/batchRemove', { "ids": rows }, "post", r); + $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() { + _ajax(prefix + '/batchRemove', { "ids": rows }, "post"); }); } diff --git a/src/main/resources/static/ruoyi/tool/gen/gen.js b/src/main/resources/static/ruoyi/tool/gen/gen.js index 49a0a5afc..608eff1ae 100644 --- a/src/main/resources/static/ruoyi/tool/gen/gen.js +++ b/src/main/resources/static/ruoyi/tool/gen/gen.js @@ -34,11 +34,9 @@ $(function() { // 生成代码 function genCode(tableName) { - $.modalConfirm("确定要生成" + tableName + "表代码吗?", function(r) { - if (!r) { - return; - } + $.modalConfirm("确定要生成" + tableName + "表代码吗?", function() { location.href = prefix + "/genCode/" + tableName; + layer.msg('执行成功,正在生成代码请稍后…', {icon: 1}); }) } @@ -49,10 +47,7 @@ function batchGenCode() { $.modalMsg("请选择要生成的数据", "warning"); return; } - $.modalConfirm("确认要生成选中的" + rows.length + "条数据吗?", function(r) { - if (!r) { - return; - } + $.modalConfirm("确认要生成选中的" + rows.length + "条数据吗?", function() { location.href = prefix + "/batchGenCode?tables=" + JSON.stringify(rows); }); } diff --git a/src/main/resources/templates/vm/js/list.js.vm b/src/main/resources/templates/vm/js/list.js.vm index a34249f88..89d8daf22 100644 --- a/src/main/resources/templates/vm/js/list.js.vm +++ b/src/main/resources/templates/vm/js/list.js.vm @@ -38,8 +38,8 @@ function edit(${primaryKey.attrname}) { // 单条删除 function remove(id) { - $.modalConfirm("确定要删除选中${tableComment}吗?", function(r) { - _ajax(prefix + "/remove/" + id, "", "post", r); + $.modalConfirm("确定要删除选中${tableComment}吗?", function() { + _ajax(prefix + "/remove/" + id, "", "post"); }) } @@ -50,7 +50,7 @@ function batchRemove() { $.modalMsg("请选择要删除的数据", "warning"); return; } - $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) { - _ajax(prefix + '/batchRemove', { "ids": rows }, "post", r); + $.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() { + _ajax(prefix + '/batchRemove', { "ids": rows }, "post"); }); }