代码优化,减少一些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){
|
||||
|
||||
Reference in New Issue
Block a user