|
@@ -30,7 +30,7 @@
|
|
</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-success multiple disabled" onclick="javascript:batchGenCode()" shiro:hasPermission="tool:gen:code">
|
|
<i class="fa fa-download"></i> 生成
|
|
<i class="fa fa-download"></i> 生成
|
|
@@ -45,7 +45,7 @@
|
|
<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>
|
|
@@ -59,7 +59,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",
|
|
@@ -128,11 +128,12 @@
|
|
actions.push('<a class="btn btn-primary btn-xs ' + codeFlag + '" href="javascript:void(0)" onclick="genCode(\'' + row.tableName + '\',\'' + row.genType + '\')"><i class="fa fa-bug"></i>生成代码</a> ');
|
|
actions.push('<a class="btn btn-primary btn-xs ' + codeFlag + '" href="javascript:void(0)" onclick="genCode(\'' + row.tableName + '\',\'' + row.genType + '\')"><i class="fa fa-bug"></i>生成代码</a> ');
|
|
return actions.join('');
|
|
return actions.join('');
|
|
}
|
|
}
|
|
- }]
|
|
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
};
|
|
};
|
|
$.table.init(options);
|
|
$.table.init(options);
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+
|
|
// 预览代码
|
|
// 预览代码
|
|
function preview(tableId) {
|
|
function preview(tableId) {
|
|
var preViewUrl = prefix + "/preview/" + tableId;
|
|
var preViewUrl = prefix + "/preview/" + tableId;
|
|
@@ -161,7 +162,7 @@
|
|
$.modal.closeLoading();
|
|
$.modal.closeLoading();
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
// 生成代码
|
|
// 生成代码
|
|
function genCode(tableName, genType) {
|
|
function genCode(tableName, genType) {
|
|
$.modal.confirm("确定要生成" + tableName + "表代码吗?", function() {
|
|
$.modal.confirm("确定要生成" + tableName + "表代码吗?", function() {
|
|
@@ -173,7 +174,7 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
// 批量生成代码
|
|
// 批量生成代码
|
|
function batchGenCode() {
|
|
function batchGenCode() {
|
|
var rows = $.table.selectColumns("tableName");
|
|
var rows = $.table.selectColumns("tableName");
|
|
@@ -186,7 +187,7 @@
|
|
layer.msg('执行成功,正在生成代码请稍后…', { icon: 1 });
|
|
layer.msg('执行成功,正在生成代码请稍后…', { icon: 1 });
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
// 导入表结构
|
|
// 导入表结构
|
|
function importTable() {
|
|
function importTable() {
|
|
var importTableUrl = prefix + "/importTable";
|
|
var importTableUrl = prefix + "/importTable";
|
|
@@ -194,4 +195,4 @@
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
</body>
|
|
</body>
|
|
-</html>
|
|
|
|
|
|
+</html>
|