Pre Merge pull request !142 from 风立/master
This commit is contained in:
commit
37c1a209df
|
|
@ -23,6 +23,12 @@
|
||||||
<option th:each="table : ${genTables}" th:text="${table.tableComment}" th:value="${table.tableComment}"></option>
|
<option th:each="table : ${genTables}" th:text="${table.tableComment}" th:value="${table.tableComment}"></option>
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
表名称:<input name="tableName" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
表描述:<input name="tableComment" />
|
||||||
|
</li>
|
||||||
<li class="select-time">
|
<li class="select-time">
|
||||||
<label>表时间: </label>
|
<label>表时间: </label>
|
||||||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
|
||||||
|
|
@ -37,22 +43,22 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn-group-sm" id="toolbar" role="group">
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
<a class="btn btn-success multiple disabled" onclick="javascript:batchGenCode()" shiro:hasPermission="tool:gen:code">
|
<a class="btn btn-primary multiple disabled" onclick="batchGenCode()" shiro:hasPermission="tool:gen:code">
|
||||||
<i class="fa fa-download"></i> 生成
|
<i class="fa fa-bug"></i> 生成
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-info" onclick="importTable()">
|
<a class="btn btn-info" onclick="importTable()">
|
||||||
<i class="fa fa-upload"></i> 导入
|
<i class="fa fa-upload"></i> 导入
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-primary single disabled" onclick="$.operate.editTab()" shiro:hasPermission="tool:gen:edit">
|
<a class="btn btn-success single disabled" onclick="$.operate.editTab()" shiro:hasPermission="tool:gen:edit">
|
||||||
<i class="fa fa-edit"></i> 修改
|
<i class="fa fa-edit"></i> 修改
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="tool:gen:remove">
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="tool:gen:remove">
|
||||||
<i class="fa fa-remove"></i> 删除
|
<i class="fa fa-remove"></i> 删除
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-12 select-table table-striped">
|
<div class="col-sm-12 select-table table-striped">
|
||||||
<table id="bootstrap-table"></table>
|
<table id="bootstrap-table"></table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -66,7 +72,7 @@
|
||||||
var removeFlag = [[${@permission.hasPermi('tool:gen:remove')}]];
|
var removeFlag = [[${@permission.hasPermi('tool:gen:remove')}]];
|
||||||
var previewFlag = [[${@permission.hasPermi('tool:gen:preview')}]];
|
var previewFlag = [[${@permission.hasPermi('tool:gen:preview')}]];
|
||||||
var codeFlag = [[${@permission.hasPermi('tool:gen:code')}]];
|
var codeFlag = [[${@permission.hasPermi('tool:gen:code')}]];
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
var options = {
|
var options = {
|
||||||
url: prefix + "/list",
|
url: prefix + "/list",
|
||||||
|
|
@ -130,7 +136,7 @@
|
||||||
};
|
};
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 预览代码
|
// 预览代码
|
||||||
function preview(tableId) {
|
function preview(tableId) {
|
||||||
var preViewUrl = prefix + "/preview/" + tableId;
|
var preViewUrl = prefix + "/preview/" + tableId;
|
||||||
|
|
@ -159,7 +165,7 @@
|
||||||
$.modal.closeLoading();
|
$.modal.closeLoading();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 生成代码
|
// 生成代码
|
||||||
function genCode(tableName) {
|
function genCode(tableName) {
|
||||||
$.modal.confirm("确定要生成" + tableName + "表代码吗?", function() {
|
$.modal.confirm("确定要生成" + tableName + "表代码吗?", function() {
|
||||||
|
|
@ -167,7 +173,7 @@
|
||||||
layer.msg('执行成功,正在生成代码请稍后…', { icon: 1 });
|
layer.msg('执行成功,正在生成代码请稍后…', { icon: 1 });
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//批量生成代码
|
//批量生成代码
|
||||||
function batchGenCode() {
|
function batchGenCode() {
|
||||||
var rows = $.table.selectColumns("tableName");
|
var rows = $.table.selectColumns("tableName");
|
||||||
|
|
@ -180,13 +186,13 @@
|
||||||
layer.msg('执行成功,正在生成代码请稍后…', { icon: 1 });
|
layer.msg('执行成功,正在生成代码请稍后…', { icon: 1 });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导入表结构
|
// 导入表结构
|
||||||
function importTable() {
|
function importTable() {
|
||||||
var importTableUrl = prefix + "/importTable";
|
var importTableUrl = prefix + "/importTable";
|
||||||
$.modal.open("导入表结构", importTableUrl);
|
$.modal.open("导入表结构", importTableUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetPre() {
|
function resetPre() {
|
||||||
$.form.reset();
|
$.form.reset();
|
||||||
$("select[name='tableName']").val(null).trigger("change");
|
$("select[name='tableName']").val(null).trigger("change");
|
||||||
|
|
@ -194,4 +200,4 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,12 @@
|
||||||
<option th:each="table : ${dbTables}" th:text="${table.tableComment}" th:value="${table.tableComment}"></option>
|
<option th:each="table : ${dbTables}" th:text="${table.tableComment}" th:value="${table.tableComment}"></option>
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
表名称:<input name="tableName" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
表描述:<input name="tableComment" />
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fa fa-refresh"></i> 重置</a>
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
|
@ -31,7 +37,7 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-12 select-table table-striped">
|
<div class="col-sm-12 select-table table-striped">
|
||||||
<table id="bootstrap-table"></table>
|
<table id="bootstrap-table"></table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -41,7 +47,7 @@
|
||||||
<th:block th:include="include :: select2-js" />
|
<th:block th:include="include :: select2-js" />
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var prefix = ctx + "tool/gen";
|
var prefix = ctx + "tool/gen";
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
var options = {
|
var options = {
|
||||||
url: prefix + "/db/list",
|
url: prefix + "/db/list",
|
||||||
|
|
@ -88,7 +94,7 @@
|
||||||
};
|
};
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
});
|
});
|
||||||
|
|
||||||
/* 导入表结构-选择表结构-提交 */
|
/* 导入表结构-选择表结构-提交 */
|
||||||
function submitHandler() {
|
function submitHandler() {
|
||||||
var rows = $.table.selectColumns("tableName");
|
var rows = $.table.selectColumns("tableName");
|
||||||
|
|
@ -99,7 +105,7 @@
|
||||||
var data = {"tables": rows.join()};
|
var data = {"tables": rows.join()};
|
||||||
$.operate.save(prefix + "/importTable", data);
|
$.operate.save(prefix + "/importTable", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetPre() {
|
function resetPre() {
|
||||||
$.form.reset();
|
$.form.reset();
|
||||||
$("select[name='tableName']").val(null).trigger("change");
|
$("select[name='tableName']").val(null).trigger("change");
|
||||||
|
|
@ -107,4 +113,4 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -417,8 +417,8 @@ create table sys_oper_log (
|
||||||
oper_url varchar(255) default '' comment '请求URL',
|
oper_url varchar(255) default '' comment '请求URL',
|
||||||
oper_ip varchar(50) default '' comment '主机地址',
|
oper_ip varchar(50) default '' comment '主机地址',
|
||||||
oper_location varchar(255) default '' comment '操作地点',
|
oper_location varchar(255) default '' comment '操作地点',
|
||||||
oper_param varchar(2000) default '' comment '请求参数',
|
oper_param varchar(4000) default '' comment '请求参数',
|
||||||
json_result varchar(2000) default '' comment '返回参数',
|
json_result varchar(4000) default '' comment '返回参数',
|
||||||
status int(1) default 0 comment '操作状态(0正常 1异常)',
|
status int(1) default 0 comment '操作状态(0正常 1异常)',
|
||||||
error_msg varchar(2000) default '' comment '错误消息',
|
error_msg varchar(2000) default '' comment '错误消息',
|
||||||
oper_time datetime comment '操作时间',
|
oper_time datetime comment '操作时间',
|
||||||
|
|
@ -692,4 +692,4 @@ create table gen_table_column (
|
||||||
update_by varchar(64) default '' comment '更新者',
|
update_by varchar(64) default '' comment '更新者',
|
||||||
update_time datetime comment '更新时间',
|
update_time datetime comment '更新时间',
|
||||||
primary key (column_id)
|
primary key (column_id)
|
||||||
) engine=innodb auto_increment=1 comment = '代码生成业务表字段';
|
) engine=innodb auto_increment=1 comment = '代码生成业务表字段';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue