Merge branch 'master' of https://gitee.com/y_project/RuoYi
This commit is contained in:
commit
311118d37e
|
|
@ -0,0 +1,50 @@
|
||||||
|
若依系统开发环境搭建手册
|
||||||
|
1. 准备工作
|
||||||
|
1.1 前置环境准备 -- -- 安装Maven
|
||||||
|
若依基于Maven管理项目的构建,需要先安装好相应的版本。
|
||||||
|
1.2 开发工具
|
||||||
|
若依系统采用Eclipse作为开发工具。但不局限于Eclipse。此处仅介绍在Eclipse搭建开发环境所需的操作。
|
||||||
|
2. 开发环境搭建
|
||||||
|
2.1 开发工具的配置
|
||||||
|
2.1.1 配置Maven
|
||||||
|
进入Window->Preferences->Maven->Installations页面,设置已经安装好的Maven
|
||||||
|
|
||||||
|
2.1.2 配置Maven仓库路径
|
||||||
|
进入Window->Preferences->Maven->User Settings页面,配置仓库路径
|
||||||
|
|
||||||
|
2.1.4 关闭校验
|
||||||
|
进入Window->Preferences->Validation页面,勾选"Suspend all validators",关闭校验
|
||||||
|
|
||||||
|
2.2 导入工程
|
||||||
|
通过Eclipse导入工程,步骤如下:
|
||||||
|
(1)点击左侧项目区域 -- >Import...
|
||||||
|
|
||||||
|
(2)选择RuoYi
|
||||||
|
|
||||||
|
(3)点击Finish
|
||||||
|
|
||||||
|
(4)RuoYi的代码就被导出到Eclipse中了,此时可以在工程视图中看到。
|
||||||
|
|
||||||
|
3. 运行若依系统
|
||||||
|
3.1 必要的配置
|
||||||
|
3.1.1 修改数据库连接
|
||||||
|
编辑src/main/ resources目录下的application-druid.yml 文件,修改数据库地址账号信息。
|
||||||
|
执行sql/ ry_20180423.sql,quartz.sql 两个文件 日期随版本变化
|
||||||
|
3.1.2 开发环境配置
|
||||||
|
编辑src/main/ resources目录下的application.yml 文件,
|
||||||
|
默认端口为80
|
||||||
|
|
||||||
|
3.1.3 代码生成配置
|
||||||
|
编辑src/main/ resources目录下的application.yml 文件,
|
||||||
|
|
||||||
|
默认为module,根据实际情况修改即可。
|
||||||
|
|
||||||
|
注:如对模板有特殊需求,可自行修改。编辑src/main/ resources/templates/vm目录下
|
||||||
|
|
||||||
|
3.2 启动及验证
|
||||||
|
启动RuoYiApplication.java 出现如下图表示启动成功
|
||||||
|
|
||||||
|
打开浏览器,输入:http://localhost:80/
|
||||||
|
若能正确展示登录页面,并能成功登录,登录后菜单及页面展示正常,则表明环境搭建成功。
|
||||||
|
默认密码为 admin/admin123
|
||||||
|
|
||||||
|
|
@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="selectTableByName" parameterType="String" resultMap="TableInfoResult">
|
<select id="selectTableByName" parameterType="String" resultMap="TableInfoResult">
|
||||||
select table_name, table_comment, create_time, update_time
|
select table_name, table_comment, create_time, update_time
|
||||||
from information_schema.tables
|
from information_schema.tables
|
||||||
where table_name like 'sys_%' and table_schema = (select database())
|
where table_comment <![CDATA[ <> ]]> '' and table_schema = (select database())
|
||||||
and table_name = #{tableName}
|
and table_name = #{tableName}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,10 +65,7 @@ _ajax_save = function(url, data) {
|
||||||
};
|
};
|
||||||
|
|
||||||
//对jquery的ajax方法再次封装
|
//对jquery的ajax方法再次封装
|
||||||
_ajax = function(url, data, type, r) {
|
_ajax = function(url, data, type) {
|
||||||
if (!r) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var config = {
|
var config = {
|
||||||
url: url,
|
url: url,
|
||||||
type: type,
|
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) {
|
function formatDate(_date, _pattern) {
|
||||||
var date = new Date(_date);
|
var date = new Date(_date);
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ $(function(){
|
||||||
}, function () {
|
}, function () {
|
||||||
callBack(true);
|
callBack(true);
|
||||||
}, function () {
|
}, function () {
|
||||||
callBack(false)
|
// callBack(false)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 关闭窗体
|
// 关闭窗体
|
||||||
|
|
|
||||||
|
|
@ -69,15 +69,15 @@ function statusTools(row) {
|
||||||
|
|
||||||
/*调度任务-停用*/
|
/*调度任务-停用*/
|
||||||
function stop(obj, jobId) {
|
function stop(obj, jobId) {
|
||||||
$.modalConfirm("确认要停用吗?", function(r) {
|
$.modalConfirm("确认要停用吗?", function() {
|
||||||
_ajax(prefix + "/changeStatus/", { "jobId": jobId, "status": 1 }, "post", r);
|
_ajax(prefix + "/changeStatus/", { "jobId": jobId, "status": 1 }, "post");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/*调度任务-启用*/
|
/*调度任务-启用*/
|
||||||
function start(obj, jobId) {
|
function start(obj, jobId) {
|
||||||
$.modalConfirm("确认要启用吗?", function(r) {
|
$.modalConfirm("确认要启用吗?", function() {
|
||||||
_ajax(prefix + "/changeStatus/", { "jobId": jobId, "status": 0 }, "post", r);
|
_ajax(prefix + "/changeStatus/", { "jobId": jobId, "status": 0 }, "post");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -95,8 +95,8 @@ function edit(jobId) {
|
||||||
|
|
||||||
// 单条删除
|
// 单条删除
|
||||||
function remove(id) {
|
function remove(id) {
|
||||||
$.modalConfirm("确定要删除选中调度任务吗?", function(r) {
|
$.modalConfirm("确定要删除选中调度任务吗?", function() {
|
||||||
_ajax(prefix + "/remove/" + id, "", "post", r);
|
_ajax(prefix + "/remove/" + id, "", "post");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -107,8 +107,8 @@ function batchRemove() {
|
||||||
$.modalMsg("请选择要删除的数据", "warning");
|
$.modalMsg("请选择要删除的数据", "warning");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) {
|
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
|
||||||
_ajax(prefix + '/batchRemove', { "ids": rows }, "post", r);
|
_ajax(prefix + '/batchRemove', { "ids": rows }, "post");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,8 @@ $(function() {
|
||||||
|
|
||||||
// 单条删除
|
// 单条删除
|
||||||
function remove(jobLogId) {
|
function remove(jobLogId) {
|
||||||
$.modalConfirm("确定要删除选中岗位吗?", function(r) {
|
$.modalConfirm("确定要删除选中岗位吗?", function() {
|
||||||
_ajax(prefix + "/remove/" + jobLogId, "", "post", r);
|
_ajax(prefix + "/remove/" + jobLogId, "", "post");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -71,7 +71,7 @@ function batchRemove() {
|
||||||
$.modalMsg("请选择要删除的数据", "warning");
|
$.modalMsg("请选择要删除的数据", "warning");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) {
|
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
|
||||||
_ajax(prefix + '/batchRemove', { "ids": rows }, "post", r);
|
_ajax(prefix + '/batchRemove', { "ids": rows }, "post");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ function batchRemove() {
|
||||||
$.modalMsg("请选择要删除的数据", "warning");
|
$.modalMsg("请选择要删除的数据", "warning");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) {
|
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
|
||||||
_ajax(prefix + '/batchRemove', { "ids": rows }, "post", r);
|
_ajax(prefix + '/batchRemove', { "ids": rows }, "post");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,8 @@ $(function() {
|
||||||
|
|
||||||
// 单条强退
|
// 单条强退
|
||||||
function forceLogout(id) {
|
function forceLogout(id) {
|
||||||
$.modalConfirm("确定要强制选中用户下线吗?", function(r) {
|
$.modalConfirm("确定要强制选中用户下线吗?", function() {
|
||||||
_ajax(prefix + "/forceLogout/" + id, "", "post", r);
|
_ajax(prefix + "/forceLogout/" + id, "", "post");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -74,7 +74,7 @@ function batchForceLogout() {
|
||||||
$.modalMsg("请选择要删除的数据", "warning");
|
$.modalMsg("请选择要删除的数据", "warning");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) {
|
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
|
||||||
_ajax(prefix + '/batchForceLogout', { "ids": rows }, "post", r);
|
_ajax(prefix + '/batchForceLogout', { "ids": rows }, "post");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ function batchRemove() {
|
||||||
$.modalMsg("请选择要删除的数据", "warning");
|
$.modalMsg("请选择要删除的数据", "warning");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) {
|
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
|
||||||
_ajax(prefix + '/batchRemove', { "ids": rows }, "post", r);
|
_ajax(prefix + '/batchRemove', { "ids": rows }, "post");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,8 +73,8 @@ function detail(id) {
|
||||||
|
|
||||||
//单条删除
|
//单条删除
|
||||||
function remove(id) {
|
function remove(id) {
|
||||||
$.modalConfirm("确定要删除选中字典数据吗?", function(r) {
|
$.modalConfirm("确定要删除选中字典数据吗?", function() {
|
||||||
_ajax(prefix + "/remove/" + id, "", "post", r);
|
_ajax(prefix + "/remove/" + id, "", "post");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -85,7 +85,7 @@ function batchRemove() {
|
||||||
$.modalMsg("请选择要删除的数据", "warning");
|
$.modalMsg("请选择要删除的数据", "warning");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) {
|
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
|
||||||
_ajax(prefix + '/batchRemove', { "ids": rows }, "post", r);
|
_ajax(prefix + '/batchRemove', { "ids": rows }, "post");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,8 +71,8 @@ function detail(dictId) {
|
||||||
|
|
||||||
//单条删除
|
//单条删除
|
||||||
function remove(id) {
|
function remove(id) {
|
||||||
$.modalConfirm("确定要删除选中字典吗?", function(r) {
|
$.modalConfirm("确定要删除选中字典吗?", function() {
|
||||||
_ajax(prefix + "/remove/" + id, "", "post", r);
|
_ajax(prefix + "/remove/" + id, "", "post");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -83,7 +83,7 @@ function batchRemove() {
|
||||||
$.modalMsg("请选择要删除的数据", "warning");
|
$.modalMsg("请选择要删除的数据", "warning");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) {
|
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
|
||||||
_ajax(prefix + '/batchRemove', { "ids": rows }, "post", r);
|
_ajax(prefix + '/batchRemove', { "ids": rows }, "post");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,8 @@ function edit(postId) {
|
||||||
|
|
||||||
// 单条删除
|
// 单条删除
|
||||||
function remove(id) {
|
function remove(id) {
|
||||||
$.modalConfirm("确定要删除选中岗位吗?", function(r) {
|
$.modalConfirm("确定要删除选中岗位吗?", function() {
|
||||||
_ajax(prefix + "/remove/" + id, "", "post", r);
|
_ajax(prefix + "/remove/" + id, "", "post");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -76,7 +76,7 @@ function batchRemove() {
|
||||||
$.modalMsg("请选择要删除的数据", "warning");
|
$.modalMsg("请选择要删除的数据", "warning");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) {
|
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
|
||||||
_ajax(prefix + '/batchRemove', { "ids": rows }, "post", r);
|
_ajax(prefix + '/batchRemove', { "ids": rows }, "post");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,8 @@ function edit(roleId) {
|
||||||
|
|
||||||
// 单条删除
|
// 单条删除
|
||||||
function remove(id) {
|
function remove(id) {
|
||||||
$.modalConfirm("确定要删除选中角色吗?", function(r) {
|
$.modalConfirm("确定要删除选中角色吗?", function() {
|
||||||
_ajax(prefix + "/remove/" + id, "", "post", r);
|
_ajax(prefix + "/remove/" + id, "", "post");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -76,7 +76,7 @@ function batchRemove() {
|
||||||
$.modalMsg("请选择要删除的数据", "warning");
|
$.modalMsg("请选择要删除的数据", "warning");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) {
|
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
|
||||||
_ajax(prefix + '/batchRemove', { "ids": rows }, "post", r);
|
_ajax(prefix + '/batchRemove', { "ids": rows }, "post");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -114,8 +114,8 @@ function dept() {
|
||||||
|
|
||||||
/*用户管理-删除*/
|
/*用户管理-删除*/
|
||||||
function remove(userId) {
|
function remove(userId) {
|
||||||
$.modalConfirm("确定要删除选中用户吗?", function(r) {
|
$.modalConfirm("确定要删除选中用户吗?", function() {
|
||||||
_ajax(prefix + "/remove/" + userId, "", "post", r);
|
_ajax(prefix + "/remove/" + userId, "", "post");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -144,7 +144,7 @@ function batchRemove() {
|
||||||
$.modalMsg("请选择要删除的数据", "warning");
|
$.modalMsg("请选择要删除的数据", "warning");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) {
|
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
|
||||||
_ajax(prefix + '/batchRemove', { "ids": rows }, "post", r);
|
_ajax(prefix + '/batchRemove', { "ids": rows }, "post");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,11 +34,9 @@ $(function() {
|
||||||
|
|
||||||
// 生成代码
|
// 生成代码
|
||||||
function genCode(tableName) {
|
function genCode(tableName) {
|
||||||
$.modalConfirm("确定要生成" + tableName + "表代码吗?", function(r) {
|
$.modalConfirm("确定要生成" + tableName + "表代码吗?", function() {
|
||||||
if (!r) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
location.href = prefix + "/genCode/" + tableName;
|
location.href = prefix + "/genCode/" + tableName;
|
||||||
|
layer.msg('执行成功,正在生成代码请稍后…', {icon: 1});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -49,10 +47,7 @@ function batchGenCode() {
|
||||||
$.modalMsg("请选择要生成的数据", "warning");
|
$.modalMsg("请选择要生成的数据", "warning");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.modalConfirm("确认要生成选中的" + rows.length + "条数据吗?", function(r) {
|
$.modalConfirm("确认要生成选中的" + rows.length + "条数据吗?", function() {
|
||||||
if (!r) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
location.href = prefix + "/batchGenCode?tables=" + JSON.stringify(rows);
|
location.href = prefix + "/batchGenCode?tables=" + JSON.stringify(rows);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,5 +10,5 @@ $("#form-${classname}-add").validate({
|
||||||
});
|
});
|
||||||
|
|
||||||
function add() {
|
function add() {
|
||||||
_ajax_post("/${moduleName}/${classname}/save", $('#form-${classname}-add').serialize());
|
_ajax_save("/${moduleName}/${classname}/save", $('#form-${classname}-add').serialize());
|
||||||
}
|
}
|
||||||
|
|
@ -38,8 +38,8 @@ function edit(${primaryKey.attrname}) {
|
||||||
|
|
||||||
// 单条删除
|
// 单条删除
|
||||||
function remove(id) {
|
function remove(id) {
|
||||||
$.modalConfirm("确定要删除选中${tableComment}吗?", function(r) {
|
$.modalConfirm("确定要删除选中${tableComment}吗?", function() {
|
||||||
_ajax(prefix + "/remove/" + id, "", "post", r);
|
_ajax(prefix + "/remove/" + id, "", "post");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -50,7 +50,7 @@ function batchRemove() {
|
||||||
$.modalMsg("请选择要删除的数据", "warning");
|
$.modalMsg("请选择要删除的数据", "warning");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) {
|
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
|
||||||
_ajax(prefix + '/batchRemove', { "ids": rows }, "post", r);
|
_ajax(prefix + '/batchRemove', { "ids": rows }, "post");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue