代码优化,减少一些js警告的提示。建议设置IDE忽略一些无关紧要的警告提示。
This commit is contained in:
@@ -18,8 +18,8 @@ $('#dataGrid').dataGrid({
|
||||
for(c in table.columnList){
|
||||
if(c.attrName == table.treeViewNameAttrName){
|
||||
%>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', index:'a.${c.columnName}', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '( '+row.${table.treeViewCodeAttrName}+' ) '+'<a href="\${ctx}/${urlPrefix}/form?${idParam}" class="btnList" data-title="\${text('${isQueryTpl?'查看':'编辑'}${functionNameSimple}')}">'+(val||row.id)+'</a>';
|
||||
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', index:'a.${c.columnName}', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '( '+row.${table.treeViewCodeAttrName}+' ) '+'<a href="\${ctx}/${urlPrefix}/form?${idParam}" class="btnList" data-title="\${text("${isQueryTpl?'查看':'编辑'}${functionNameSimple}")}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
<%
|
||||
firstColumn = false;
|
||||
@@ -41,55 +41,55 @@ $('#dataGrid').dataGrid({
|
||||
else if(firstColumn){
|
||||
firstColumn = false;
|
||||
%>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', index:'a.${c.columnName}', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="\${ctx}/${urlPrefix}/form?${idParam}" class="btnList" data-title="\${text('${isQueryTpl?'查看':'编辑'}${functionNameSimple}')}">'+(val||row.id)+'</a>';
|
||||
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', index:'a.${c.columnName}', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="\${ctx}/${urlPrefix}/form?${idParam}" class="btnList" data-title="\${text("${isQueryTpl?'查看':'编辑'}${functionNameSimple}")}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
<% }else if(c.showType == 'select' || c.showType == 'select_multiple' || c.showType == 'checkbox' || c.showType == 'radio'){ %>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', index:'a.${c.columnName}', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(\${@DictUtils.getDictListJson('${c.optionMap['dictType']}')}, val, '\${text('未知')}', true);
|
||||
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', index:'a.${c.columnName}', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(\${@DictUtils.getDictListJson('${c.optionMap['dictType']}')}, val, '\${text("未知")}', true);
|
||||
}},
|
||||
<% }else if(c.showType == "userselect" || c.showType == "officeselect" || c.showType == "areaselect"){ %>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName2}', index:'a.${c.columnName}', width:150, align:"center"},
|
||||
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName2}', index:'a.${c.columnName}', width:150, align:"center"},
|
||||
<% }else{
|
||||
if (@StringUtils.inString(c.attrType, 'java.util.Date', 'Integer', 'Long')){
|
||||
%>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', index:'a.${c.columnName}', width:150, align:"center"},
|
||||
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', index:'a.${c.columnName}', width:150, align:"center"},
|
||||
<%
|
||||
}else if (@StringUtils.inString(c.attrType, 'Float', 'Double')){
|
||||
%>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', index:'a.${c.columnName}', width:150, align:"right", formatter: function(val, obj, row, act){
|
||||
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', index:'a.${c.columnName}', width:150, align:"right", formatter: function(val, obj, row, act){
|
||||
return js.formatNumber(val, 2, false, ''); // 数值类型格式化 (原始数值, 小数位数, 是否千分位, 默认值,金额情况下设置0.00);
|
||||
}},
|
||||
<%
|
||||
}else {
|
||||
%>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', index:'a.${c.columnName}', width:150, align:"left"},
|
||||
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', index:'a.${c.columnName}', width:150, align:"left"},
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
%>
|
||||
{header:'\${text('操作')}', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
{header:'\${text("操作")}', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
<% if(isQueryTpl){ %>
|
||||
actions.push('<a href="\${ctx}/${urlPrefix}/form?${idParam}" class="btnList" title="\${text('查看${functionNameSimple}')}"><i class="fa fa-file-text-o"></i></a> ');
|
||||
actions.push('<a href="\${ctx}/${urlPrefix}/form?${idParam}" class="btnList" title="\${text("查看${functionNameSimple}")}"><i class="fa fa-file-text-o"></i></a> ');
|
||||
<% }else{ %>
|
||||
\<% if(hasPermi('${permissionPrefix}:edit')){ %>
|
||||
actions.push('<a href="\${ctx}/${urlPrefix}/form?${idParam}" class="btnList" title="\${text('编辑${functionNameSimple}')}"><i class="fa fa-pencil"></i></a> ');
|
||||
actions.push('<a href="\${ctx}/${urlPrefix}/form?${idParam}" class="btnList" title="\${text("编辑${functionNameSimple}")}"><i class="fa fa-pencil"></i></a> ');
|
||||
<% if(@ObjectUtils.toBoolean(table.optionMap['isHaveDisableEnable'])){ %>
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="\${ctx}/${urlPrefix}/disable?${idParam}" class="btnList" title="\${text('停用${functionNameSimple}')}" data-confirm="\${text('确认要停用该${functionNameSimple}吗?')}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
actions.push('<a href="\${ctx}/${urlPrefix}/disable?${idParam}" class="btnList" title="\${text("停用${functionNameSimple}")}" data-confirm="\${text("确认要停用该${functionNameSimple}吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
}
|
||||
if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="\${ctx}/${urlPrefix}/enable?${idParam}" class="btnList" title="\${text('启用${functionNameSimple}')}" data-confirm="\${text('确认要启用该${functionNameSimple}吗?')}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
actions.push('<a href="\${ctx}/${urlPrefix}/enable?${idParam}" class="btnList" title="\${text("启用${functionNameSimple}")}" data-confirm="\${text("确认要启用该${functionNameSimple}吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
<% } %>
|
||||
<% if(@ObjectUtils.toBoolean(table.optionMap['isHaveDelete'])){ %>
|
||||
actions.push('<a href="\${ctx}/${urlPrefix}/delete?${idParam}" class="btnList" title="\${text('删除${functionNameSimple}')}" data-confirm="\${text('确认要删除该${functionNameSimple}<% if(table.isTreeEntity){ %>及所有子${functionNameSimple}<% } %>吗?')}"<% if(table.isTreeEntity){ %> data-deltreenode="'+row.id+'"<% } %>><i class="fa fa-trash-o"></i></a> ');
|
||||
actions.push('<a href="\${ctx}/${urlPrefix}/delete?${idParam}" class="btnList" title="\${text("删除${functionNameSimple}")}" data-confirm="\${text("确认要删除该${functionNameSimple}<% if(table.isTreeEntity){ %>及所有子${functionNameSimple}<% } %>吗?")}"<% if(table.isTreeEntity){ %> data-deltreenode="'+row.id+'"<% } %>><i class="fa fa-trash-o"></i></a> ');
|
||||
<% } %>
|
||||
<% if(table.isTreeEntity){ %>
|
||||
actions.push('<a href="\${ctx}/${urlPrefix}/form?parentCode='+row.id+'" class="btnList" title="\${text('新增下级${functionNameSimple}')}"><i class="fa fa-plus-square"></i></a> ');
|
||||
actions.push('<a href="\${ctx}/${urlPrefix}/form?parentCode='+row.id+'" class="btnList" title="\${text("新增下级${functionNameSimple}")}"><i class="fa fa-plus-square"></i></a> ');
|
||||
<% } %>
|
||||
\<% } %>
|
||||
<% } %>
|
||||
|
||||
@@ -26,7 +26,7 @@ for (c in child.columnList){
|
||||
// 如果是外键,父级的主键
|
||||
if(child.parentExists && child.parentTableFkName == c.columnName){
|
||||
%>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', editable:true, hidden:true},
|
||||
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', editable:true, hidden:true},
|
||||
<%
|
||||
continue;
|
||||
}
|
||||
@@ -49,15 +49,15 @@ for (c in child.columnList){
|
||||
}
|
||||
// 输出列字段
|
||||
if(c.showType == 'input'){
|
||||
%> {header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', width:150, editable:true, edittype:'text', editoptions:{${attrs}'class':'form-control${cssClass}'}},
|
||||
%> {header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', width:150, editable:true, edittype:'text', editoptions:{${attrs}'class':'form-control${cssClass}'}},
|
||||
<%
|
||||
}else if(c.showType == 'textarea'){
|
||||
%>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', width:150, editable:true, edittype:'textarea', editoptions:{${attrs}'class':'form-control${cssClass}', 'rows':'1'}},
|
||||
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', width:150, editable:true, edittype:'textarea', editoptions:{${attrs}'class':'form-control${cssClass}', 'rows':'1'}},
|
||||
<%
|
||||
}else if(c.showType == 'select' || c.showType == 'select_multiple' || c.showType == 'radio' || c.showType == 'checkbox'){
|
||||
%>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', width:100,
|
||||
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', width:100,
|
||||
editable:true, edittype:'select', editoptions:{<%if (c.showType == 'select_multiple' || c.showType == 'checkbox'){ %>multiple:true, <% } %>'class':'form-control${cssClass}',
|
||||
items: $.merge([<%if (!(c.showType == 'select_multiple' || c.showType == 'checkbox')){ %>{dictLabel:' ',dictValue:''}<% } %>], \${@DictUtils.getDictListJson('${c.optionMap['dictType']}')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
@@ -69,7 +69,7 @@ for (c in child.columnList){
|
||||
}else if(c.showType == 'date' || c.showType == 'datetime'){
|
||||
var isTime = (c.showType == 'datetime');
|
||||
%>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', width:150,
|
||||
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', width:150,
|
||||
formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'Y-m-d${isTime?' H:i:s':''}'},
|
||||
editable:true, edittype:'text', editoptions:{'class':'form-control Wdate${cssClass}', 'readonly':'true',
|
||||
dataInit: function(element){ $(element).on('focus', function(){
|
||||
@@ -80,7 +80,7 @@ for (c in child.columnList){
|
||||
<%
|
||||
}else if(c.showType == 'userselect'){
|
||||
treeselectExists = true; %>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.simpleAttrName}', width:150,
|
||||
{header:'\${text("${c.columnLabel}")}', name:'${c.simpleAttrName}', width:150,
|
||||
formatter: function(val, obj, row, act){
|
||||
return js.val(row, '${c.attrName}')+'|'+js.val(row, '${c.attrName2}');
|
||||
}, editable: true, edittype: "custom", editoptions: {
|
||||
@@ -98,7 +98,7 @@ for (c in child.columnList){
|
||||
}else if(c.showType == 'officeselect'){
|
||||
treeselectExists = true;
|
||||
%>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.simpleAttrName}', width:150,
|
||||
{header:'\${text("${c.columnLabel}")}', name:'${c.simpleAttrName}', width:150,
|
||||
formatter: function(val, obj, row, act){
|
||||
return js.val(row, '${c.attrName}')+'|'+js.val(row, '${c.attrName2}');
|
||||
}, editable: true, edittype: "custom", editoptions: {
|
||||
@@ -116,7 +116,7 @@ for (c in child.columnList){
|
||||
}else if(c.showType == 'areaselect'){
|
||||
treeselectExists = true;
|
||||
%>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.simpleAttrName}', width:150,
|
||||
{header:'\${text("${c.columnLabel}")}', name:'${c.simpleAttrName}', width:150,
|
||||
formatter: function(val, obj, row, act){
|
||||
return js.val(row, '${c.attrName}')+'|'+js.val(row, '${c.attrName2}');
|
||||
}, editable: true, edittype: "custom", editoptions: {
|
||||
@@ -135,17 +135,17 @@ for (c in child.columnList){
|
||||
}
|
||||
if (table.tplCategory != 'query'){
|
||||
%>
|
||||
{header:'\${text('操作')}', name:'actions', width:80, sortable:false, fixed:true, formatter: function(val, obj, row, act){
|
||||
{header:'\${text("操作")}', name:'actions', width:80, sortable:false, fixed:true, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
if (val == 'new'){
|
||||
actions.push('<a href="#" onclick="js.confirm(\'\${text('你确认要删除这条数据吗?')}\', function(){$(\'#${@StringUtils.uncap(child.className)}DataGrid\').dataGrid(\'delRowData\',\''+obj.rowId+'\')});return false;"><i class="fa fa-trash-o"></i></a> ');
|
||||
actions.push('<a href="#" onclick="js.confirm(\'\${text("你确认要删除这条数据吗?")}\', function(){$(\'#${@StringUtils.uncap(child.className)}DataGrid\').dataGrid(\'delRowData\',\''+obj.rowId+'\')});return false;"><i class="fa fa-trash-o"></i></a> ');
|
||||
}else{
|
||||
actions.push('<a href="#" onclick="js.confirm(\'\${text('你确认要删除这条数据吗?')}\', function(){$(\'#${@StringUtils.uncap(child.className)}DataGrid\').dataGrid(\'setRowData\',\''+obj.rowId+'\',null,{display:\'none\'})});$(\'#'+obj.rowId+'_status\').val(\''+Global.STATUS_DELETE+'\');return false;"><i class="fa fa-trash-o"></i></a> ');
|
||||
actions.push('<a href="#" onclick="js.confirm(\'\${text("你确认要删除这条数据吗?")}\', function(){$(\'#${@StringUtils.uncap(child.className)}DataGrid\').dataGrid(\'setRowData\',\''+obj.rowId+'\',null,{display:\'none\'})});$(\'#'+obj.rowId+'_status\').val(\''+Global.STATUS_DELETE+'\');return false;"><i class="fa fa-trash-o"></i></a> ');
|
||||
}
|
||||
return actions.join('');
|
||||
}, editoptions: {defaultValue: 'new'}}
|
||||
<% }else{ %>
|
||||
{header:'\${text('操作')}', name:'actions', hidden: true}
|
||||
{header:'\${text("操作")}', name:'actions', hidden: true}
|
||||
<% } %>
|
||||
],
|
||||
|
||||
|
||||
@@ -58,29 +58,29 @@
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text('公司名称')}', name:'companyName', index:'a.company_name', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '( '+row.viewCode+' ) '+'<a href="${ctx}/sys/company/form?companyCode='+row.companyCode+'" class="btnList" data-title="${text('编辑公司')}">'+(val||row.id)+'</a>';
|
||||
{header:'${text("公司名称")}', name:'companyName', index:'a.company_name', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '( '+row.viewCode+' ) '+'<a href="${ctx}/sys/company/form?companyCode='+row.companyCode+'" class="btnList" data-title="${text("编辑公司")}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{header:'${text('公司全称')}', name:'fullName', index:'a.full_name', width:200, align:"left"},
|
||||
{header:'${text('排序号')}', name:'treeSort', index:'a.tree_sort', width:80, align:"center"},
|
||||
{header:'${text('归属区域')}', name:'area.treeNames', index:'a.areaCode', width:200, align:"center"},
|
||||
{header:'${text('更新时间')}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
|
||||
{header:'${text('备注信息')}', name:'remarks', index:'a.remarks', width:200, align:"left"},
|
||||
{header:'${text('状态')}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
|
||||
{header:'${text("公司全称")}', name:'fullName', index:'a.full_name', width:200, align:"left"},
|
||||
{header:'${text("排序号")}', name:'treeSort', index:'a.tree_sort', width:80, align:"center"},
|
||||
{header:'${text("归属区域")}', name:'area.treeNames', index:'a.areaCode', width:200, align:"center"},
|
||||
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
|
||||
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:200, align:"left"},
|
||||
{header:'${text("状态")}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
|
||||
}},
|
||||
{header:'${text('操作')}', name:'actions', width:130, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
{header:'${text("操作")}', name:'actions', width:130, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
<% if(hasPermi('sys:company:edit')){ %>
|
||||
actions.push('<a href="${ctx}/sys/company/form?companyCode='+row.companyCode+'" class="btnList" title="${text('编辑公司')}"><i class="fa fa-pencil"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/company/form?companyCode='+row.companyCode+'" class="btnList" title="${text("编辑公司")}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/sys/company/disable?companyCode='+row.companyCode+'" class="btnList" title="${text('停用公司')}" data-confirm="${text('确认要停用该公司吗?')}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/company/disable?companyCode='+row.companyCode+'" class="btnList" title="${text("停用公司")}" data-confirm="${text("确认要停用该公司吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
}
|
||||
if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="${ctx}/sys/company/enable?companyCode='+row.companyCode+'" class="btnList" title="${text('启用公司')}" data-confirm="${text('确认要启用该公司吗?')}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/company/enable?companyCode='+row.companyCode+'" class="btnList" title="${text("启用公司")}" data-confirm="${text("确认要启用该公司吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/sys/company/delete?companyCode='+row.companyCode+'" class="btnList" title="${text('删除公司')}" data-confirm="${text('确认要删除该公司及所有子公司吗?')}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/company/form?parentCode='+row.id+'" class="btnList" title="${text('新增下级公司')}"><i class="fa fa-plus-square"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/company/delete?companyCode='+row.companyCode+'" class="btnList" title="${text("删除公司")}" data-confirm="${text("确认要删除该公司及所有子公司吗?")}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/company/form?parentCode='+row.id+'" class="btnList" title="${text("新增下级公司")}"><i class="fa fa-plus-square"></i></a> ');
|
||||
<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
|
||||
@@ -64,31 +64,31 @@
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text('机构名称')}', name:'officeName', index:'a.office_name', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '( '+row.viewCode+' ) '+'<a href="${ctx}/sys/office/form?officeCode='+row.officeCode+'" class="btnList" data-title="${text('编辑机构')}">'+(val||row.id)+'</a>';
|
||||
{header:'${text("机构名称")}', name:'officeName', index:'a.office_name', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '( '+row.viewCode+' ) '+'<a href="${ctx}/sys/office/form?officeCode='+row.officeCode+'" class="btnList" data-title="${text("编辑机构")}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{header:'${text('机构全称')}', name:'fullName', index:'a.full_name', width:200, align:"left"},
|
||||
{header:'${text('排序号')}', name:'treeSort', index:'a.tree_sort', width:80, align:"center"},
|
||||
{header:'${text('机构类型')}', name:'officeType', index:'a.office_type', width:100, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_office_type')}, val, '${text('未知')}', true);
|
||||
{header:'${text("机构全称")}', name:'fullName', index:'a.full_name', width:200, align:"left"},
|
||||
{header:'${text("排序号")}', name:'treeSort', index:'a.tree_sort', width:80, align:"center"},
|
||||
{header:'${text("机构类型")}', name:'officeType', index:'a.office_type', width:100, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_office_type')}, val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text('更新时间')}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
|
||||
{header:'${text('备注信息')}', name:'remarks', index:'a.remarks', width:200, align:"left"},
|
||||
{header:'${text('状态')}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '${text('未知')}', true);
|
||||
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
|
||||
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:200, align:"left"},
|
||||
{header:'${text("状态")}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text('操作')}', name:'actions', width:150, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
{header:'${text("操作")}', name:'actions', width:150, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
<% if(hasPermi('sys:office:edit')){ %>
|
||||
actions.push('<a href="${ctx}/sys/office/form?officeCode='+row.officeCode+'" class="btnList" title="${text('编辑机构')}"><i class="fa fa-pencil"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/office/form?officeCode='+row.officeCode+'" class="btnList" title="${text("编辑机构")}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/sys/office/disable?officeCode='+row.officeCode+'" class="btnList" title="${text('停用机构')}" data-confirm="${text('确认要停用该机构吗?')}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/office/disable?officeCode='+row.officeCode+'" class="btnList" title="${text("停用机构")}" data-confirm="${text("确认要停用该机构吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
}
|
||||
if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="${ctx}/sys/office/enable?officeCode='+row.officeCode+'" class="btnList" title="${text('启用机构')}" data-confirm="${text('确认要启用该机构吗?')}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/office/enable?officeCode='+row.officeCode+'" class="btnList" title="${text("启用机构")}" data-confirm="${text("确认要启用该机构吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/sys/office/delete?officeCode='+row.officeCode+'" class="btnList" title="${text('删除机构')}" data-confirm="${text('确认要删除该机构及所有子机构吗?')}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/office/form?parentCode='+row.id+'" class="btnList" title="${text('新增下级机构')}"><i class="fa fa-plus-square"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/office/delete?officeCode='+row.officeCode+'" class="btnList" title="${text("删除机构")}" data-confirm="${text("确认要删除该机构及所有子机构吗?")}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/office/form?parentCode='+row.id+'" class="btnList" title="${text("新增下级机构")}"><i class="fa fa-plus-square"></i></a> ');
|
||||
<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
|
||||
@@ -55,30 +55,30 @@
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text('岗位名称')}', name:'postName', index:'a.post_name', width:200, align:"center", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="${ctx}/sys/post/form?postCode='+row.postCode+'" class="btnList" data-title="${text('编辑岗位')}">'+(val||row.id)+'</a>';
|
||||
{header:'${text("岗位名称")}', name:'postName', index:'a.post_name', width:200, align:"center", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="${ctx}/sys/post/form?postCode='+row.postCode+'" class="btnList" data-title="${text("编辑岗位")}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{header:'${text('岗位编码')}', name:'postCode', index:'a.post_code', width:200, align:"center"},
|
||||
{header:'${text('排序号')}', name:'postSort', index:'a.post_sort', width:80, align:"center"},
|
||||
{header:'${text('岗位分类')}', name:'postType', index:'a.post_type', width:100, align:"center", formatter: function(val, obj, row, act){
|
||||
{header:'${text("岗位编码")}', name:'postCode', index:'a.post_code', width:200, align:"center"},
|
||||
{header:'${text("排序号")}', name:'postSort', index:'a.post_sort', width:80, align:"center"},
|
||||
{header:'${text("岗位分类")}', name:'postType', index:'a.post_type', width:100, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_post_type')}, val, '未知', true);
|
||||
}},
|
||||
{header:'${text('更新时间')}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
|
||||
{header:'${text('备注信息')}', name:'remarks', index:'a.remarks', width:200, align:"left"},
|
||||
{header:'${text('状态')}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
|
||||
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
|
||||
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:200, align:"left"},
|
||||
{header:'${text("状态")}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
|
||||
}},
|
||||
{header:'${text('操作')}', name:'actions', width:130, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
{header:'${text("操作")}', name:'actions', width:130, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
<% if(hasPermi('sys:post:edit')){ %>
|
||||
actions.push('<a href="${ctx}/sys/post/form?postCode='+row.postCode+'" class="btnList" title="${text('编辑岗位')}"><i class="fa fa-pencil"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/post/form?postCode='+row.postCode+'" class="btnList" title="${text("编辑岗位")}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/sys/post/disable?postCode='+row.postCode+'" class="btnList" title="${text('停用岗位')}" data-confirm="${text('确认要停用该岗位吗?')}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/post/disable?postCode='+row.postCode+'" class="btnList" title="${text("停用岗位")}" data-confirm="${text("确认要停用该岗位吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
}
|
||||
if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="${ctx}/sys/post/enable?postCode='+row.postCode+'" class="btnList" title="${text('启用岗位')}" data-confirm="${text('确认要启用该岗位吗?')}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/post/enable?postCode='+row.postCode+'" class="btnList" title="${text("启用岗位")}" data-confirm="${text("确认要启用该岗位吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/sys/post/delete?postCode='+row.postCode+'" class="btnList" title="${text('删除岗位')}" data-confirm="${text('确认要删除该岗位吗?')}"><i class="fa fa-trash-o"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/post/delete?postCode='+row.postCode+'" class="btnList" title="${text("删除岗位")}" data-confirm="${text("确认要删除该岗位吗?")}"><i class="fa fa-trash-o"></i></a> ');
|
||||
<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
|
||||
@@ -180,8 +180,8 @@ var roleGrid = $("#roleGrid").dataGrid({
|
||||
{name:'isAll',value:'true'} <% // 显示所有角色(与上方两个条件互斥) %>
|
||||
],
|
||||
columnModel: [
|
||||
{header:'${text('角色名称')}', name:'name', sortable:false, width:100, align:"center"},
|
||||
{header:'${text('角色编码')}', name:'id', sortable:false, width:100, align:"center"}
|
||||
{header:'${text("角色名称")}', name:'name', sortable:false, width:100, align:"center"},
|
||||
{header:'${text("角色编码")}', name:'id', sortable:false, width:100, align:"center"}
|
||||
],
|
||||
showCheckbox: true,
|
||||
autoGridHeight: function(){
|
||||
|
||||
@@ -220,8 +220,8 @@ var roleGrid = $("#roleGrid").dataGrid({
|
||||
{name:'ctrlPermi',value:'2'}
|
||||
],
|
||||
columnModel: [
|
||||
{header:'${text('角色名称')}', name:'name', sortable:false, width:100, align:"center"},
|
||||
{header:'${text('角色编码')}', name:'id', sortable:false, width:100, align:"center"}
|
||||
{header:'${text("角色名称")}', name:'name', sortable:false, width:100, align:"center"},
|
||||
{header:'${text("角色编码")}', name:'id', sortable:false, width:100, align:"center"}
|
||||
],
|
||||
showCheckbox: true,
|
||||
autoGridHeight: function(){
|
||||
|
||||
@@ -107,47 +107,47 @@
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text('登录账号')}', name:'loginCode', index:'a.login_code', width:200, align:"center", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="${ctx}/sys/empUser/form?userCode='+row.userCode+'&op=edit" class="btnList" data-title="${text('编辑用户')}">'+(val||row.id)+'</a>';
|
||||
{header:'${text("登录账号")}', name:'loginCode', index:'a.login_code', width:200, align:"center", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="${ctx}/sys/empUser/form?userCode='+row.userCode+'&op=edit" class="btnList" data-title="${text("编辑用户")}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{header:'${text('用户昵称')}', name:'userName', index:'a.user_name', width:200, align:"center"},
|
||||
{header:'${text('员工姓名')}', name:'refName', index:'a.ref_name', width:200, align:"center"},
|
||||
{header:'${text('归属机构')}', name:'employee.office.officeName', index:'o.office_name', width:200, align:"center"},
|
||||
{header:'${text('归属公司')}', name:'employee.company.companyName', index:'c.company_name', width:200, align:"center"},
|
||||
{header:'${text('电子邮箱')}', name:'email', index:'a.email', width:200, align:"center"},
|
||||
{header:'${text('手机号码')}', name:'mobile', index:'a.mobile', width:200, align:"center"},
|
||||
{header:'${text('办公电话')}', name:'phone', index:'a.phone', width:200, align:"center"},
|
||||
{header:'${text('更新时间')}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
|
||||
{header:'${text('状态')}', name:'status', index:'a.status', width:140, align:"center", formatter: function(val, obj, row, act){
|
||||
{header:'${text("用户昵称")}', name:'userName', index:'a.user_name', width:200, align:"center"},
|
||||
{header:'${text("员工姓名")}', name:'refName', index:'a.ref_name', width:200, align:"center"},
|
||||
{header:'${text("归属机构")}', name:'employee.office.officeName', index:'o.office_name', width:200, align:"center"},
|
||||
{header:'${text("归属公司")}', name:'employee.company.companyName', index:'c.company_name', width:200, align:"center"},
|
||||
{header:'${text("电子邮箱")}', name:'email', index:'a.email', width:200, align:"center"},
|
||||
{header:'${text("手机号码")}', name:'mobile', index:'a.mobile', width:200, align:"center"},
|
||||
{header:'${text("办公电话")}', name:'phone', index:'a.phone', width:200, align:"center"},
|
||||
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
|
||||
{header:'${text("状态")}', name:'status', index:'a.status', width:140, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
|
||||
}},
|
||||
{header:'${text('操作')}', name:'actions', width:260, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
{header:'${text("操作")}', name:'actions', width:260, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
<% if(hasPermi('sys:empUser:edit')){ %>
|
||||
actions.push('<a href="${ctx}/sys/empUser/form?userCode='+row.userCode+'&op=edit" class="btnList" title="${text('编辑用户')}"><i class="fa fa-pencil"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/empUser/form?userCode='+row.userCode+'&op=edit" class="btnList" title="${text("编辑用户")}"><i class="fa fa-pencil"></i></a> ');
|
||||
<% } %>
|
||||
<% if(hasPermi('sys:empUser:updateStatus')){ %>
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/sys/empUser/disable?userCode='+row.userCode+'" class="btnList" title="${text('停用用户')}" data-confirm="${text('确认要停用该用户吗?')}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/empUser/disable?userCode='+row.userCode+'" class="btnList" title="${text("停用用户")}" data-confirm="${text("确认要停用该用户吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
}
|
||||
if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="${ctx}/sys/empUser/enable?userCode='+row.userCode+'" class="btnList" title="${text('启用用户')}" data-confirm="${text('确认要启用该用户吗?')}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/empUser/enable?userCode='+row.userCode+'" class="btnList" title="${text("启用用户")}" data-confirm="${text("确认要启用该用户吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
<% } %>
|
||||
<% if(hasPermi('sys:empUser:edit')){ %>
|
||||
actions.push('<a href="${ctx}/sys/empUser/delete?userCode='+row.userCode+'" class="btnList" title="${text('删除用户')}" data-confirm="${text('确认要删除该用户吗?')}"><i class="fa fa-trash-o"></i></a> ');
|
||||
actions.push('<a href="${ctx}/sys/empUser/delete?userCode='+row.userCode+'" class="btnList" title="${text("删除用户")}" data-confirm="${text("确认要删除该用户吗?")}"><i class="fa fa-trash-o"></i></a> ');
|
||||
<% } %>
|
||||
<% if(hasPermi('sys:empUser:authRole,sys:empUser:authDataScope,sys:empUser:resetpwd', 'or')){ %>
|
||||
actions.push('<a href="javascript:" class="btnMore" title="${text('更多操作')}"><i class="fa fa-chevron-circle-right"></i></a> ');
|
||||
actions.push('<a href="javascript:" class="btnMore" title="${text("更多操作")}"><i class="fa fa-chevron-circle-right"></i></a> ');
|
||||
actions.push('<div class="moreItems">');
|
||||
<% if(hasPermi('sys:empUser:authRole')){ %>
|
||||
actions.push('<a href="${ctx}/sys/empUser/form?userCode='+row.userCode+'&op=auth" class="btn btn-default btn-xs btnList" title="${text('用户分配角色')}"><i class="fa fa-check-square-o"></i> ${text('分配角色')}</a> ');
|
||||
actions.push('<a href="${ctx}/sys/empUser/form?userCode='+row.userCode+'&op=auth" class="btn btn-default btn-xs btnList" title="${text("用户分配角色")}"><i class="fa fa-check-square-o"></i> ${text("分配角色")}</a> ');
|
||||
<% } %>
|
||||
<% if(hasPermi('sys:empUser:authDataScope')){ %>
|
||||
actions.push('<a href="${ctx}/sys/empUser/formAuthDataScope?userCode='+row.userCode+'" class="btn btn-default btn-xs btnList" title="${text('用户分配数据权限')}"><i class="fa fa-check-circle-o"></i> ${text('数据权限')}</a> ');
|
||||
actions.push('<a href="${ctx}/sys/empUser/formAuthDataScope?userCode='+row.userCode+'" class="btn btn-default btn-xs btnList" title="${text("用户分配数据权限")}"><i class="fa fa-check-circle-o"></i> ${text("数据权限")}</a> ');
|
||||
<% } %>
|
||||
<% if(hasPermi('sys:empUser:resetpwd')){ %>
|
||||
actions.push('<a href="${ctx}/sys/empUser/resetpwd?userCode='+row.userCode+'" class="btn btn-default btn-xs btnList" title="${text('用户密码重置')}" data-confirm="${text('确认要将该用户密码重置到初始状态吗?')}"><i class="fa fa-reply-all"></i> ${text('重置密码')}</a> ');
|
||||
actions.push('<a href="${ctx}/sys/empUser/resetpwd?userCode='+row.userCode+'" class="btn btn-default btn-xs btnList" title="${text("用户密码重置")}" data-confirm="${text("确认要将该用户密码重置到初始状态吗?")}"><i class="fa fa-reply-all"></i> ${text("重置密码")}</a> ');
|
||||
<% } %>
|
||||
actions.push('</div>');
|
||||
<% } %>
|
||||
|
||||
@@ -82,16 +82,16 @@ var selectData = ${isNotBlank(selectData!) ? selectData! : "{\}"},
|
||||
selectNum = 0, dataGrid = $('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text('登录账号')}', name:'loginCode', index:'a.login_code', width:200, align:"center"},
|
||||
{header:'${text('用户昵称')}', name:'userName', index:'a.user_name', width:200, align:"center"},
|
||||
{header:'${text('员工姓名')}', name:'refName', index:'a.ref_name', width:200, align:"center"},
|
||||
{header:'${text('归属机构')}', name:'employee.office.officeName', index:'o.office_name', width:200, align:"center"},
|
||||
{header:'${text('归属公司')}', name:'employee.company.companyName', index:'c.company_name', width:200, align:"center"},
|
||||
{header:'${text('电子邮箱')}', name:'email', index:'a.email', width:200, align:"center"},
|
||||
{header:'${text('手机号码')}', name:'mobile', index:'a.mobile', width:200, align:"center"},
|
||||
{header:'${text('办公电话')}', name:'phone', index:'a.phone', width:200, align:"center"},
|
||||
{header:'${text('更新时间')}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
|
||||
{header:'${text('状态')}', name:'status', index:'a.status', width:140, align:"center", formatter: function(val, obj, row, act){
|
||||
{header:'${text("登录账号")}', name:'loginCode', index:'a.login_code', width:200, align:"center"},
|
||||
{header:'${text("用户昵称")}', name:'userName', index:'a.user_name', width:200, align:"center"},
|
||||
{header:'${text("员工姓名")}', name:'refName', index:'a.ref_name', width:200, align:"center"},
|
||||
{header:'${text("归属机构")}', name:'employee.office.officeName', index:'o.office_name', width:200, align:"center"},
|
||||
{header:'${text("归属公司")}', name:'employee.company.companyName', index:'c.company_name', width:200, align:"center"},
|
||||
{header:'${text("电子邮箱")}', name:'email', index:'a.email', width:200, align:"center"},
|
||||
{header:'${text("手机号码")}', name:'mobile', index:'a.mobile', width:200, align:"center"},
|
||||
{header:'${text("办公电话")}', name:'phone', index:'a.phone', width:200, align:"center"},
|
||||
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
|
||||
{header:'${text("状态")}', name:'status', index:'a.status', width:140, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
|
||||
}},
|
||||
{header:'行数据', name:'rowData', hidden:true, formatter: function(val, obj, row, act){
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
<span class="required hide">*</span> ${text('日期时间')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="testDatetime" readonly="true" maxlength="20" class="form-control Wdate"
|
||||
dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
|
||||
dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -204,11 +204,11 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
columnModel: [
|
||||
{header:'状态', name:'status', editable:true, hidden:true},
|
||||
{header:'主键', name:'id', editable:true, hidden:true},
|
||||
{header:'${text('排序号')}', name:'testSort', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'11', 'class':'form-control digits'}},
|
||||
{header:'${text('父表主键')}', name:'testData.id', editable:true, hidden:true},
|
||||
{header:'${text('单行文本')}', name:'testInput', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'200', 'class':'form-control'}},
|
||||
{header:'${text('多行文本')}', name:'testTextarea', width:150, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}},
|
||||
{header:'${text('下拉框')}', name:'testSelect', width:100,
|
||||
{header:'${text("排序号")}', name:'testSort', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'11', 'class':'form-control digits'}},
|
||||
{header:'${text("父表主键")}', name:'testData.id', editable:true, hidden:true},
|
||||
{header:'${text("单行文本")}', name:'testInput', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'200', 'class':'form-control'}},
|
||||
{header:'${text("多行文本")}', name:'testTextarea', width:150, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}},
|
||||
{header:'${text("下拉框")}', name:'testSelect', width:100,
|
||||
editable:true, edittype:'select', editoptions:{'class':'form-control',
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
@@ -216,7 +216,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'${text('下拉多选')}', name:'testSelectMultiple', width:100,
|
||||
{header:'${text("下拉多选")}', name:'testSelectMultiple', width:100,
|
||||
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
@@ -224,7 +224,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'${text('单选框')}', name:'testRadio', width:100,
|
||||
{header:'${text("单选框")}', name:'testRadio', width:100,
|
||||
editable:true, edittype:'select', editoptions:{'class':'form-control',
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
@@ -232,7 +232,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'${text('复选框')}', name:'testCheckbox', width:100,
|
||||
{header:'${text("复选框")}', name:'testCheckbox', width:100,
|
||||
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
@@ -240,23 +240,23 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'${text('日期选择')}', name:'testDate', width:150,
|
||||
{header:'${text("日期选择")}', name:'testDate', width:150,
|
||||
formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'Y-m-d'},
|
||||
editable:true, edittype:'text', editoptions:{'class':'form-control Wdate', 'readonly':'true',
|
||||
dataInit: function(element){ $(element).on('focus', function(){
|
||||
WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});
|
||||
WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});
|
||||
});
|
||||
}}
|
||||
},
|
||||
{header:'${text('日期时间')}', name:'testDatetime', width:150,
|
||||
{header:'${text("日期时间")}', name:'testDatetime', width:150,
|
||||
formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'Y-m-d H:i:s'},
|
||||
editable:true, edittype:'text', editoptions:{'class':'form-control Wdate', 'readonly':'true',
|
||||
dataInit: function(element){ $(element).on('focus', function(){
|
||||
WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});
|
||||
WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:true});
|
||||
});
|
||||
}}
|
||||
},
|
||||
{header:'${text('用户选择')}', name:'testUser', width:150,
|
||||
{header:'${text("用户选择")}', name:'testUser', width:150,
|
||||
formatter: function(val, obj, row, act){
|
||||
return js.val(row, 'testUser.userCode')+'|'+js.val(row, 'testUser.userName');
|
||||
}, editable: true, edittype: "custom", editoptions: {
|
||||
@@ -270,7 +270,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'${text('机构选择')}', name:'testOffice', width:150,
|
||||
{header:'${text("机构选择")}', name:'testOffice', width:150,
|
||||
formatter: function(val, obj, row, act){
|
||||
return js.val(row, 'testOffice.officeCode')+'|'+js.val(row, 'testOffice.officeName');
|
||||
}, editable: true, edittype: "custom", editoptions: {
|
||||
@@ -284,7 +284,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'${text('区域选择')}', name:'testAreaCode', width:150,
|
||||
{header:'${text("区域选择")}', name:'testAreaCode', width:150,
|
||||
formatter: function(val, obj, row, act){
|
||||
return js.val(row, 'testAreaCode')+'|'+js.val(row, 'testAreaName');
|
||||
}, editable: true, edittype: "custom", editoptions: {
|
||||
@@ -298,12 +298,12 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'${text('操作')}', name:'actions', width:80, sortable:false, fixed:true, formatter: function(val, obj, row, act){
|
||||
{header:'${text("操作")}', name:'actions', width:80, sortable:false, fixed:true, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
if (val == 'new'){
|
||||
actions.push('<a href="#" onclick="js.confirm(\'${text('你确认要删除这条数据吗?')}\', function(){$(\'#testDataChildDataGrid\').dataGrid(\'delRowData\',\''+obj.rowId+'\')});return false;"><i class="fa fa-trash-o"></i></a> ');
|
||||
actions.push('<a href="#" onclick="js.confirm(\'${text("你确认要删除这条数据吗?")}\', function(){$(\'#testDataChildDataGrid\').dataGrid(\'delRowData\',\''+obj.rowId+'\')});return false;"><i class="fa fa-trash-o"></i></a> ');
|
||||
}else{
|
||||
actions.push('<a href="#" onclick="js.confirm(\'${text('你确认要删除这条数据吗?')}\', function(){$(\'#testDataChildDataGrid\').dataGrid(\'setRowData\',\''+obj.rowId+'\',null,{display:\'none\'})});$(\'#'+obj.rowId+'_status\').val(\''+Global.STATUS_DELETE+'\');return false;"><i class="fa fa-trash-o"></i></a> ');
|
||||
actions.push('<a href="#" onclick="js.confirm(\'${text("你确认要删除这条数据吗?")}\', function(){$(\'#testDataChildDataGrid\').dataGrid(\'setRowData\',\''+obj.rowId+'\',null,{display:\'none\'})});$(\'#'+obj.rowId+'_status\').val(\''+Global.STATUS_DELETE+'\');return false;"><i class="fa fa-trash-o"></i></a> ');
|
||||
}
|
||||
return actions.join('');
|
||||
}, editoptions: {defaultValue: 'new'}}
|
||||
|
||||
@@ -118,56 +118,56 @@
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text('单行文本')}', name:'testInput', index:'a.test_input', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="${ctx}/test/testData/form?id='+row.id+'" class="btnList" data-title="${text('编辑数据')}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{header:'${text('多行文本')}', name:'testTextarea', index:'a.test_textarea', width:150, align:"left"},
|
||||
{header:'${text('下拉框')}', name:'testSelect', index:'a.test_select', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text('未知')}', true);
|
||||
}},
|
||||
{header:'${text('下拉多选')}', name:'testSelectMultiple', index:'a.test_select_multiple', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text('未知')}', true);
|
||||
}},
|
||||
{header:'${text('单选框')}', name:'testRadio', index:'a.test_radio', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text('未知')}', true);
|
||||
}},
|
||||
{header:'${text('复选框')}', 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, '${text('未知')}', true);
|
||||
}},
|
||||
{header:'${text('日期选择')}', name:'testDate', index:'a.test_date', width:150, align:"center"},
|
||||
{header:'${text('日期时间')}', name:'testDatetime', index:'a.test_datetime', width:150, align:"center"},
|
||||
{header:'${text('用户选择')}', name:'testUser.userName', index:'a.test_user_code', width:150, align:"center"},
|
||||
{header:'${text('机构选择')}', name:'testOffice.officeName', index:'a.test_office_code', width:150, align:"center"},
|
||||
{header:'${text('区域选择')}', name:'testAreaName', index:'a.test_area_code', width:150, align:"center"},
|
||||
{header:'${text('区域名称')}', name:'testAreaName', index:'a.test_area_name', width:150, align:"left"},
|
||||
{header:'${text('状态')}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text('未知')}', true);
|
||||
}},
|
||||
{header:'${text('创建时间')}', name:'createDate', index:'a.create_date', width:150, align:"center"},
|
||||
{header:'${text('备注信息')}', name:'remarks', index:'a.remarks', width:150, align:"left"},
|
||||
{header:'${text('操作')}', name:'actions', width:200, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
<% if(hasPermi('test:testData:edit')){ %>
|
||||
actions.push('<a href="${ctx}/test/testData/form?id='+row.id+'" class="btnList" title="${text('编辑数据')}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/test/testData/disable?id='+row.id+'" class="btnList" title="${text('停用数据')}" data-confirm="${text('确认要停用该数据吗?')}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
}
|
||||
if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="${ctx}/test/testData/enable?id='+row.id+'" class="btnList" title="${text('启用数据')}" data-confirm="${text('确认要启用该数据吗?')}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/test/testData/delete?id='+row.id+'" class="btnList" title="${text('删除数据')}" data-confirm="${text('确认要删除该数据吗?')}"><i class="fa fa-trash-o"></i></a> ');
|
||||
<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
// 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
});
|
||||
<script>
|
||||
// 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text("单行文本")}', name:'testInput', index:'a.test_input', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="${ctx}/test/testData/form?id='+row.id+'" class="btnList" data-title="${text("编辑数据")}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{header:'${text("多行文本")}', name:'testTextarea', index:'a.test_textarea', width:150, align:"left"},
|
||||
{header:'${text("下拉框")}', name:'testSelect', index:'a.test_select', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("下拉多选")}', name:'testSelectMultiple', index:'a.test_select_multiple', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("单选框")}', name:'testRadio', index:'a.test_radio', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("复选框")}', 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, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("日期选择")}', name:'testDate', index:'a.test_date', width:150, align:"center"},
|
||||
{header:'${text("日期时间")}', name:'testDatetime', index:'a.test_datetime', width:150, align:"center"},
|
||||
{header:'${text("用户选择")}', name:'testUser.userName', index:'a.test_user_code', width:150, align:"center"},
|
||||
{header:'${text("机构选择")}', name:'testOffice.officeName', index:'a.test_office_code', width:150, align:"center"},
|
||||
{header:'${text("区域选择")}', name:'testAreaName', index:'a.test_area_code', width:150, align:"center"},
|
||||
{header:'${text("区域名称")}', name:'testAreaName', index:'a.test_area_name', width:150, align:"left"},
|
||||
{header:'${text("状态")}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', width:150, align:"center"},
|
||||
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:150, align:"left"},
|
||||
{header:'${text("操作")}', name:'actions', width:200, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
<% if(hasPermi('test:testData:edit')){ %>
|
||||
actions.push('<a href="${ctx}/test/testData/form?id='+row.id+'" class="btnList" title="${text("编辑数据")}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/test/testData/disable?id='+row.id+'" class="btnList" title="${text("停用数据")}" data-confirm="${text("确认要停用该数据吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
}
|
||||
if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="${ctx}/test/testData/enable?id='+row.id+'" class="btnList" title="${text("启用数据")}" data-confirm="${text("确认要启用该数据吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/test/testData/delete?id='+row.id+'" class="btnList" title="${text("删除数据")}" data-confirm="${text("确认要删除该数据吗?")}"><i class="fa fa-trash-o"></i></a> ');
|
||||
<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
// 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -23,27 +23,27 @@
|
||||
class="" allowClear="true" canSelectRoot="true" canSelectParent="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required ">*</span> ${text('节点编码')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:hidden path="isNewRecord"/>
|
||||
<#form:input path="treeCode" maxlength="64" readonly="${!testTree.isNewRecord}" class="form-control required abc"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required ">*</span> ${text('节点编码')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:hidden path="isNewRecord"/>
|
||||
<#form:input path="treeCode" maxlength="64" readonly="${!testTree.isNewRecord}" class="form-control required abc"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required ">*</span> ${text('节点名称')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="treeName" maxlength="200" class="form-control required"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required ">*</span> ${text('节点名称')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="treeName" maxlength="200" class="form-control required"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
@@ -53,9 +53,9 @@
|
||||
<#form:input path="treeSort" class="form-control required digits"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
@@ -69,7 +69,7 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">图片上传:</label>
|
||||
<label class="control-label col-sm-2">${text('图片上传')}:</label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadImage" bizKey="${testTree.id}" bizType="testTree_image"
|
||||
uploadType="image" class="" readonly="false"/>
|
||||
@@ -80,7 +80,7 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">附件上传:</label>
|
||||
<label class="control-label col-sm-2">${text('附件上传')}:</label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadFile" bizKey="${testTree.id}" bizType="testTree_file"
|
||||
uploadType="all" class="" readonly="false"/>
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
<a href="#" class="btn btn-default" id="btnExpandTreeNode" title="${text('展开一级')}"><i class="fa fa-angle-double-down"></i> ${text('展开')}</a>
|
||||
<a href="#" class="btn btn-default" id="btnCollapseTreeNode" title="${text('折叠全部')}"><i class="fa fa-angle-double-up"></i> ${text('折叠')}</a>
|
||||
<% if(hasPermi('test:testTree:edit')){ %>
|
||||
<a href="${ctx}/test/testTree/form" class="btn btn-default btnTool" title="${text('新增数据')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
|
||||
<a href="#" class="btn btn-default" id="btnFixTreeData" title="修复树表数据(包含字段:parentCodes、treeLeaf、treeLevel、treeSorts、treeNames)"><i class="fa fa-refresh"></i> 修复</a>
|
||||
<% } %>
|
||||
<a href="${ctx}/test/testTree/form" class="btn btn-default btnTool" title="${text('新增数据')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
|
||||
<a href="#" class="btn btn-default" id="btnFixTreeData" title="修复树表数据(包含字段:parentCodes、treeLeaf、treeLevel、treeSorts、treeNames)"><i class="fa fa-refresh"></i> 修复</a>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@@ -30,12 +30,12 @@
|
||||
<div class="control-inline">
|
||||
<#form:input path="remarks" maxlength="500" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('状态')}:</label>
|
||||
<div class="control-inline width-120">
|
||||
<#form:select path="status" dictType="sys_search_status" blankOption="true" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('状态')}:</label>
|
||||
<div class="control-inline width-120">
|
||||
<#form:select path="status" dictType="sys_search_status" blankOption="true" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
@@ -47,50 +47,50 @@
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text('节点名称')}', 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="${text('编辑数据')}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{header:'${text('本级排序号')}', name:'treeSort', index:'a.tree_sort', width:150, align:"center"},
|
||||
{header:'${text('节点名称')}', name:'treeName', index:'a.tree_name', width:150, align:"left"},
|
||||
{header:'${text('状态')}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text('未知')}', true);
|
||||
}},
|
||||
{header:'${text('创建时间')}', name:'createDate', index:'a.create_date', width:150, align:"center"},
|
||||
{header:'${text('备注信息')}', name:'remarks', index:'a.remarks', width:150, align:"left"},
|
||||
{header:'${text('操作')}', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
<% if(hasPermi('test:testTree:edit')){ %>
|
||||
actions.push('<a href="${ctx}/test/testTree/form?treeCode='+row.treeCode+'" class="btnList" title="${text('编辑数据')}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/test/testTree/disable?treeCode='+row.treeCode+'" class="btnList" title="${text('停用数据')}" data-confirm="${text('确认要停用该数据吗?')}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
}
|
||||
if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="${ctx}/test/testTree/enable?treeCode='+row.treeCode+'" class="btnList" title="${text('启用数据')}" data-confirm="${text('确认要启用该数据吗?')}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/test/testTree/delete?treeCode='+row.treeCode+'" class="btnList" title="${text('删除数据')}" data-confirm="${text('确认要删除该数据及所有子数据吗?')}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a> ');
|
||||
actions.push('<a href="${ctx}/test/testTree/form?parentCode='+row.id+'" class="btnList" title="${text('新增下级数据')}"><i class="fa fa-plus-square"></i></a> ');
|
||||
<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
treeGrid: true, // 启用树结构表格
|
||||
defaultExpandLevel: 0, // 默认展开的层次
|
||||
expandNodeClearPostData: 'treeName,remarks,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据) // 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// 修复树表数据(包含字段:parentCodes、treeLeaf、treeLevel、treeSorts、treeNames)
|
||||
$("#btnFixTreeData").click(function(){
|
||||
js.ajaxSubmit("${ctx}/test/testTree/fixTreeData", function(data){
|
||||
js.showMessage(data.message);
|
||||
});
|
||||
return false;
|
||||
});
|
||||
<script>
|
||||
// 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text("节点名称")}', 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="${text("编辑数据")}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{header:'${text("本级排序号")}', name:'treeSort', index:'a.tree_sort', width:150, align:"center"},
|
||||
{header:'${text("节点名称")}', name:'treeName', index:'a.tree_name', width:150, align:"left"},
|
||||
{header:'${text("状态")}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', width:150, align:"center"},
|
||||
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:150, align:"left"},
|
||||
{header:'${text("操作")}', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
<% if(hasPermi('test:testTree:edit')){ %>
|
||||
actions.push('<a href="${ctx}/test/testTree/form?treeCode='+row.treeCode+'" class="btnList" title="${text("编辑数据")}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/test/testTree/disable?treeCode='+row.treeCode+'" class="btnList" title="${text("停用数据")}" data-confirm="${text("确认要停用该数据吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
}
|
||||
if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="${ctx}/test/testTree/enable?treeCode='+row.treeCode+'" class="btnList" title="${text("启用数据")}" data-confirm="${text("确认要启用该数据吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/test/testTree/delete?treeCode='+row.treeCode+'" class="btnList" title="${text("删除数据")}" data-confirm="${text("确认要删除该数据及所有子数据吗?")}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a> ');
|
||||
actions.push('<a href="${ctx}/test/testTree/form?parentCode='+row.id+'" class="btnList" title="${text("新增下级数据")}"><i class="fa fa-plus-square"></i></a> ');
|
||||
<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
treeGrid: true, // 启用树结构表格
|
||||
defaultExpandLevel: 0, // 默认展开的层次
|
||||
expandNodeClearPostData: 'treeName,remarks,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据) // 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// 修复树表数据(包含字段:parentCodes、treeLeaf、treeLevel、treeSorts、treeNames)
|
||||
$("#btnFixTreeData").click(function(){
|
||||
js.ajaxSubmit("${ctx}/test/testTree/fixTreeData", function(data){
|
||||
js.showMessage(data.message);
|
||||
});
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user