生成模板优化

This commit is contained in:
thinkgem
2018-02-07 21:04:18 +08:00
parent 23a849c815
commit 52f7248079
18 changed files with 48 additions and 209 deletions

View File

@@ -205,7 +205,7 @@ $("#testDataChildDataGrid").dataGrid({
{header:'状态', name:'status', editable:true, hidden:true},
{header:'主键', name:'id', editable:true, hidden:true},
{header:'排序号', name:'testSort', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'11', 'class':'form-control digits'}},
{header:'父表主键', name:'testDataId.id', editable:true, hidden:true},
{header:'父表主键', name:'testData.id', editable:true, hidden:true},
{header:'单行文本', name:'testInput', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'200', 'class':'form-control'}},
{header:'多行文本', name:'testTextarea', width:150, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}},
{header:'下拉框', name:'testSelect', width:100,
@@ -317,7 +317,7 @@ $("#testDataChildDataGrid").dataGrid({
// 编辑表格的提交数据参数
editGridInputFormListName: 'testDataChildList', // 提交的数据列表名
editGridInputFormListAttrs: 'status,id,testSort,testDataId.id,testInput,testTextarea,testSelect,testSelectMultiple,testRadio,testCheckbox,testDate,testDatetime,testUser.userCode,testOffice.officeCode,testAreaCode,testAreaName,', // 提交数据列表的属性字段
editGridInputFormListAttrs: 'status,id,testSort,testData.id,testInput,testTextarea,testSelect,testSelectMultiple,testRadio,testCheckbox,testDate,testDatetime,testUser.userCode,testOffice.officeCode,testAreaCode,testAreaName,', // 提交数据列表的属性字段
// 加载成功后执行事件
ajaxSuccess: function(data){

View File

@@ -139,8 +139,8 @@ $('#dataGrid').dataGrid({
{header:'复选框', name:'testCheckbox', index:'a.test_checkbox', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '未知', true);
}},
{header:'日期选择', name:'testDate', index:'a.test_date', width:150, align:"left"},
{header:'日期时间', name:'testDatetime', index:'a.test_datetime', width:150, align:"left"},
{header:'日期选择', name:'testDate', index:'a.test_date', width:150, align:"center"},
{header:'日期时间', name:'testDatetime', index:'a.test_datetime', width:150, align:"center"},
{header:'用户选择', name:'testUser.userName', index:'a.test_user_code', width:150, align:"center"},
{header:'部门选择', name:'testOffice.officeName', index:'a.test_office_code', width:150, align:"center"},
{header:'区域选择', name:'testAreaName', index:'a.test_area_code', width:150, align:"center"},
@@ -148,7 +148,7 @@ $('#dataGrid').dataGrid({
{header:'状态', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '未知', true);
}},
{header:'创建时间', name:'createDate', index:'a.create_date', width:150, align:"left"},
{header:'创建时间', name:'createDate', index:'a.create_date', width:150, align:"center"},
{header:'备注信息', name:'remarks', index:'a.remarks', width:150, align:"left"},
{header:'操作', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
var actions = [];

View File

@@ -51,7 +51,7 @@
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required ">*</span> 节点名:<i class="fa icon-question hide"></i></label>
<span class="required ">*</span> 节点名<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:input path="treeName" maxlength="200" class="form-control required"/>
</div>

View File

@@ -19,7 +19,7 @@
<#form:form id="searchForm" model="${testTree}" action="${ctx}/test/testTree/listData" method="post" class="form-inline hide"
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
<div class="form-group">
<label class="control-label">节点名:</label>
<label class="control-label">节点名</label>
<div class="control-inline">
<#form:input path="treeName" maxlength="200" class="form-control width-120"/>
</div>
@@ -51,17 +51,15 @@
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
{header:'父级编号', name:'parentCode', index:'a.parent_code', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
return '<a href="${ctx}/test/testTree/form?treeCode='+row.treeCode+'" class="btnList" data-title="编辑数据">'+(val||row.id)+'</a>';
{header:'节点名称', name:'treeName', index:'a.tree_name', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
return '( '+row.treeCode+' ) '+'<a href="${ctx}/test/testTree/form?treeCode='+row.treeCode+'" class="btnList" data-title="编辑数据">'+(val||row.id)+'</a>';
}},
{header:'所有父级编号', name:'parentCodes', index:'a.parent_codes', width:150, align:"left"},
{header:'本级排序号', name:'treeSort', index:'a.tree_sort', width:150, align:"left"},
{header:'全节点名', name:'treeNames', index:'a.tree_names', width:150, align:"left"},
{header:'树节点名', name:'treeName', index:'a.tree_name', width:150, align:"left"},
{header:'本级排序号', name:'treeSort', index:'a.tree_sort', width:150, align:"center"},
{header:'节点名称', name:'treeName', index:'a.tree_name', width:150, align:"left"},
{header:'状态', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '未知', true);
}},
{header:'创建时间', name:'createDate', index:'a.create_date', width:150, align:"left"},
{header:'创建时间', name:'createDate', index:'a.create_date', width:150, align:"center"},
{header:'备注信息', name:'remarks', index:'a.remarks', width:150, align:"left"},
{header:'操作', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
var actions = [];