提交 | 用户 | 时间
|
71e81e
|
1 |
@layout("/common/_container.html",{title:"代码生成",js:["/assets/modular/gen/gen.js"]}){ |
懒 |
2 |
|
|
3 |
<div class="layui-body-header"> |
|
4 |
<span class="layui-body-header-title">代码生成</span> |
|
5 |
</div> |
|
6 |
|
|
7 |
<div class="layui-fluid"> |
|
8 |
<div class="layui-row layui-col-space15"> |
|
9 |
<div class="layui-col-lg12"> |
|
10 |
<div class="layui-card"> |
|
11 |
<div class="layui-card-body"> |
|
12 |
<div class="layui-form" lay-filter="genForm"> |
|
13 |
<div class="layui-form-item"> |
|
14 |
<label class="layui-form-label">作者</label> |
|
15 |
<div class="layui-input-block"> |
|
16 |
<input type="text" id="author" name="author" lay-verify="title" autocomplete="off" placeholder="代码生成注释的作者" class="layui-input"> |
|
17 |
</div> |
|
18 |
</div> |
|
19 |
<div class="layui-form-item"> |
|
20 |
<label class="layui-form-label"> |
|
21 |
项目包名称 |
|
22 |
<i class="layui-icon layui-icon-tips" lay-tips="具体到模块包"></i> |
|
23 |
</label> |
|
24 |
<div class="layui-input-block"> |
|
25 |
<input type="text" id="proPackage" name="proPackage" lay-verify="title" autocomplete="off" placeholder="项目包名称,例如:cn.stylefeng.guns.modular.demos" class="layui-input"> |
|
26 |
</div> |
|
27 |
</div> |
|
28 |
<div class="layui-form-item"> |
|
29 |
<label class="layui-form-label"> |
|
30 |
模块名称 |
|
31 |
<i class="layui-icon layui-icon-tips" lay-tips="利用模块名称来为业务分类,本字段可为空"></i> |
|
32 |
</label> |
|
33 |
<div class="layui-input-block"> |
|
34 |
<input type="text" id="modularName" name="modularName" lay-verify="title" autocomplete="off" placeholder="模块名称" class="layui-input"> |
|
35 |
</div> |
|
36 |
</div> |
|
37 |
<div class="layui-form-item"> |
|
38 |
<label class="layui-form-label"> |
|
39 |
表前缀移除 |
|
40 |
<i class="layui-icon layui-icon-tips" lay-tips="移除表的前缀关键字"></i> |
|
41 |
</label> |
|
42 |
<div class="layui-input-block"> |
|
43 |
<input type="text" id="removePrefix" name="removePrefix" lay-verify="title" autocomplete="off" placeholder="表前缀移除" class="layui-input"> |
|
44 |
</div> |
|
45 |
</div> |
|
46 |
<div class="layui-form-item"> |
|
47 |
<label class="layui-form-label">数据源选择</label> |
|
48 |
<div class="layui-input-block"> |
|
49 |
<select id="dataSourceId" name="dataSourceId" lay-filter="dataSourceId"> |
|
50 |
<option value=""></option> |
|
51 |
@for(item in dataSources!){ |
|
52 |
<option value="${item.dbId}">${item.dbName}</option> |
|
53 |
@} |
|
54 |
</select> |
|
55 |
</div> |
|
56 |
</div> |
|
57 |
<div class="layui-form-item"> |
|
58 |
<label class="layui-form-label"> |
|
59 |
生成位置 |
|
60 |
<i class="layui-icon layui-icon-tips" lay-tips="生成好的代码存放位置"></i> |
|
61 |
</label> |
|
62 |
<div class="layui-input-block"> |
|
63 |
<input type="radio" name="genLocation" value="DEFAULT_PATH" title="文件默认的下载路径" checked> |
|
64 |
<input type="radio" name="genLocation" value="PROJECT_PATH" title="下载并生成到本项目"> |
|
65 |
</div> |
|
66 |
</div> |
|
67 |
<div class="layui-form-item"> |
|
68 |
<label class="layui-form-label"> |
|
69 |
版本选择 |
|
70 |
<i class="layui-icon layui-icon-tips" lay-tips="微服务版本可用于生成单独的controller,entity,mapper,service"></i> |
|
71 |
</label> |
|
72 |
<div class="layui-input-block"> |
|
73 |
<input type="radio" name="version" value="single" title="Guns单体版本" lay-filter="versionChecked" checked> |
|
74 |
<input type="radio" name="version" value="micro" title="Guns-Cloud微服务版本" lay-filter="versionChecked"> |
|
75 |
</div> |
|
76 |
</div> |
|
77 |
|
|
78 |
<!-- microDiv 选择微服务才出现--> |
|
79 |
<div id="microDiv"> |
|
80 |
<div class="layui-form-item"> |
|
81 |
<label class="layui-form-label"> |
|
82 |
swaager |
|
83 |
<i class="layui-icon layui-icon-tips" lay-tips="开启则在controller和model实体上生成swagger用的注解"></i> |
|
84 |
</label> |
|
85 |
<div class="layui-input-block"> |
|
86 |
<input type="radio" name="swagger" value="Y" title="开启"> |
|
87 |
<input type="radio" name="swagger" value="N" title="关闭" checked> |
|
88 |
</div> |
|
89 |
</div> |
|
90 |
<div class="layui-form-item"> |
|
91 |
<label class="layui-form-label"> |
|
92 |
远程接口 |
|
93 |
<i class="layui-icon layui-icon-tips" lay-tips="开启则生成feign远程接口的api和provider的生成"></i></label> |
|
94 |
<div class="layui-input-block"> |
|
95 |
<input type="radio" name="remote" value="Y" title="开启" checked> |
|
96 |
<input type="radio" name="remote" value="N" title="关闭"> |
|
97 |
</div> |
|
98 |
</div> |
|
99 |
</div> |
|
100 |
<div class="layui-form-item"> |
|
101 |
<label class="layui-form-label">选择表</label> |
|
102 |
<div class="layui-input-block"> |
|
103 |
<table class="layui-hide" id="dbTableList" lay-filter="dbTableList"></table> |
|
104 |
</div> |
|
105 |
</div> |
|
106 |
<div class="layui-form-item"> |
|
107 |
<div class="layui-input-block"> |
|
108 |
<button class="layui-btn" id="execute">生成代码</button> |
|
109 |
<button type="reset" class="layui-btn layui-btn-primary">重置</button> |
|
110 |
</div> |
|
111 |
</div> |
|
112 |
</div> |
|
113 |
</div> |
|
114 |
</div> |
|
115 |
</div> |
|
116 |
</div> |
|
117 |
</div> |
|
118 |
|
|
119 |
<script type="text/html" id="tableBar"> |
|
120 |
<a class="layui-btn layui-btn-xs layui-hide" name="con-btn" id="{{d.tableName}}_opt" lay-event="conditionEdit"> |
|
121 |
字段配置 |
|
122 |
</a> |
|
123 |
</script> |
|
124 |
|
|
125 |
<script type="text/html" id="switchTpl"> |
|
126 |
<div class="layui-hide" id="{{d.tableName}}_jt" name="jumpTypeDiv"> |
|
127 |
<input type="checkbox" name="jumpType" value="{{d.tableName}}" lay-skin="switch" lay-text="是|否" lay-filter="jumpTypeFilter"> |
|
128 |
</div> |
|
129 |
</script> |
|
130 |
|
|
131 |
@} |