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