@@ -75,6 +75,8 @@ public class BaseGenerator {
.replace("@@templateKey@@", data.getString("templateKey"))
.replace("@@TemplateKey@@", toUpperCaseFirstOne(data.getString("templateKey")))
.replace("@@templateKeyName@@", data.getString("templateKeyName"))
- .replace("@@TEMPLATECODE@@", data.getString("templateCode").toUpperCase());
+ .replace("@@TEMPLATECODE@@", data.getString("templateCode").toUpperCase())
+ .replace("@@searchCode@@", data.getString("searchCode").toUpperCase())
+ .replace("@@searchName@@", data.getString("searchName").toUpperCase());
}
@@ -5,10 +5,25 @@
<div class="ibox-title">
<h5>@@templateName@@信息</h5>
<div class="ibox-tools" style="top:10px;">
- <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAdd@@TemplateCode@@Modal()">
- <i class="glyphicon glyphicon-plus"></i>
- 添加@@templateName@@
- </button>
+ <form>
+ <div class="form-row">
+ <div class="col-8 input-group input-group-sm">
+ <input type="text" placeholder="请填写@@searchName@@" class=" form-control" v-model="@@templateCode@@ManageInfo.@@searchCode@@">
+ <div class="input-group-prepend">
+ <button type="button" class="btn btn-primary btn-sm" v-on:click="_query@@TemplateCode@@Method()">
+ <i class="glyphicon glyphicon-search"></i> 马上查询</button>
+ </div>
+
+ <div class="col">
+ <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAdd@@TemplateCode@@Modal()">
+ <i class="glyphicon glyphicon-plus"></i>
+ 添加@@templateName@@
+ </button>
+ </form>
</div>
<div class="ibox-content">
@@ -9,7 +9,8 @@
@@templateCode@@ManageInfo:{
@@templateCode@@s:[],
total:0,
- records:1
+ records:1,
+ @@searchCode@@:''
},
_initMethod:function(){
@@ -58,6 +59,10 @@
_openDelete@@TemplateCode@@Model:function(_@@templateCode@@){
vc.emit('delete@@TemplateCode@@','openDelete@@TemplateCode@@Modal',_@@templateCode@@);
+ },
+ _query@@TemplateCode@@Method:function(){
+ vc.component._list@@TemplateCode@@s(DEFAULT_PAGE, DEFAULT_ROWS);
});
@@ -3,6 +3,8 @@
"templateCode":"mapping",
"templateKey":"id",
"templateKeyName":"编码ID",
+ "searchCode": "name",
+ "searchName": "名称",
"columns":[
{
"code":"domain",
@@ -8,7 +8,7 @@
<insert id="saveMappingInfo" parameterType="Map">
<![CDATA[
insert into c_mapping(
- domain,name,remark,id,``key``,value) values (
+ domain,name,remark,id,`key`,value) values (
#{domain},#{name},#{remark},#{id},#{key},#{value}
)
]]>