ui转css接口界面
parent
fdfe16cf9e
commit
d9d4b86960
|
@ -146,54 +146,56 @@ function on_click_ddl(){
|
|||
<ul class="nav nav-tabs" style="font-size: 12px;">
|
||||
<li> <a href="#gincurd" data-toggle="tab">gin接口代码生成工具</a></li>
|
||||
<li> <a href="#ddl2sql" data-toggle="tab">sql ddl转代码和文档</a></li>
|
||||
<li> <a href="#ui2css" data-toggle="tab">qt ui文件自动生成css</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-8 tab-content" >
|
||||
<div class="tab-pane fade in active" id="gincurd">
|
||||
<p style="display: block;font-size: 20px ; text-align: center;">
|
||||
gin接口代码CURD生成工具
|
||||
</p>
|
||||
<div class="tab-pane fade in active" id="gincurd">
|
||||
<p style="display: block;font-size: 20px ; text-align: center;">
|
||||
gin接口代码CURD生成工具
|
||||
</p>
|
||||
|
||||
<form action="" class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label for="interface" class="col-sm-2 control-label">模型名称</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="interface" placeholder="输入接口名字">
|
||||
</div>
|
||||
<form action="" class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label for="interface" class="col-sm-2 control-label">模型名称</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="interface" placeholder="输入接口名字">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="interface" class="col-sm-2 control-label">通用返回值</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="return_value" placeholder="输出值">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox">分页查找
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox">批量更新
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox">GORM
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="button" class="btn btn-default" onclick="on_click()">生成</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row" style="width: 100%">
|
||||
<div class="col-md-2" >
|
||||
</div>
|
||||
<textarea id="out" class="col-md-10" style="background: #bbbbbb;height: 600px;" >
|
||||
</textarea>
|
||||
<div class="form-group">
|
||||
<label for="interface" class="col-sm-2 control-label">通用返回值</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="return_value" placeholder="输出值">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox">分页查找
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox">批量更新
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox">GORM
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="button" class="btn btn-default" onclick="on_click()">生成</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row" style="width: 100%">
|
||||
<div class="col-md-2" >
|
||||
</div>
|
||||
<textarea id="out" class="col-md-10" style="background: #bbbbbb;height: 600px;" >
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade in" id="ddl2sql">
|
||||
<p style="display: block;font-size: 20px ; text-align: center;">
|
||||
|
@ -205,21 +207,21 @@ function on_click_ddl(){
|
|||
输入ddl:
|
||||
</div>
|
||||
<textarea id="ddl" class="col-md-10" style="background: #bbbbbb;height: 600px;" >
|
||||
CREATE TABLE `doc` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`type` int(11) NULL DEFAULT NULL,
|
||||
`content` longblob NULL,
|
||||
`author` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`create_time` datetime(0) NULL DEFAULT NULL,
|
||||
`update_time` datetime(0) NULL DEFAULT NULL,
|
||||
`delete_time` datetime(0) NULL DEFAULT NULL,
|
||||
`version` float(255, 0) NULL DEFAULT 0,
|
||||
`is_public` int(1) UNSIGNED ZEROFILL NULL DEFAULT 0,
|
||||
`deleted` int(1) NULL DEFAULT 0,
|
||||
`origin_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 390 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;</textarea>
|
||||
CREATE TABLE `doc` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`type` int(11) NULL DEFAULT NULL,
|
||||
`content` longblob NULL,
|
||||
`author` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`create_time` datetime(0) NULL DEFAULT NULL,
|
||||
`update_time` datetime(0) NULL DEFAULT NULL,
|
||||
`delete_time` datetime(0) NULL DEFAULT NULL,
|
||||
`version` float(255, 0) NULL DEFAULT 0,
|
||||
`is_public` int(1) UNSIGNED ZEROFILL NULL DEFAULT 0,
|
||||
`deleted` int(1) NULL DEFAULT 0,
|
||||
`origin_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 390 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;</textarea>
|
||||
</div>
|
||||
<div class="row" style="width: 50%;display: inline-block;margin-left: 30px;">
|
||||
<div class="col-md-2" style="margin-left: -10px;">
|
||||
|
@ -237,7 +239,49 @@ CREATE TABLE `doc` (
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade in active" id="ui2css">
|
||||
<p style="display: block;font-size: 20px ; text-align: center;">
|
||||
qt .ui文件转css文件
|
||||
</p>
|
||||
<form id="form1" class="form-horizontal" action="{{openapi}}openapi/ui2css" target="frame1"
|
||||
method="post" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<label for="interface" class="col-sm-3 control-label">ui布局文件</label>
|
||||
<div class="col-sm-3">
|
||||
<p><input type="file" name="ui"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="button" class="btn btn-default" onclick="upload()" >生成</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- 其实我们可以把iframe标签隐藏掉 -->
|
||||
<script type="text/javascript">
|
||||
function upload() {
|
||||
$("#form1").submit();
|
||||
var t = setInterval(function() {
|
||||
//获取iframe标签里body元素里的文字。即服务器响应过来的"上传成功"或"上传失败"
|
||||
var word = $("iframe[name='frame1']").contents().find("body").text();
|
||||
if (word != "") {
|
||||
alert(word); //弹窗提示是否上传成功
|
||||
clearInterval(t); //清除定时器
|
||||
}
|
||||
console.log(word)
|
||||
|
||||
}, 1000);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="row" style="width: 100%; margin-top: 10px;">
|
||||
<div class="col-md-2" >
|
||||
</div>
|
||||
<iframe name="frame1" frameborder="0" class="col-md-10" style="background: #bbbbbb;height: 600px;">
|
||||
</iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue