优化代码

This commit is contained in:
RuoYi
2018-04-25 22:16:41 +08:00
parent e384582504
commit 4bb10357f6
15 changed files with 50 additions and 72 deletions

View File

@ -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);
});
}