|
|
@ -32,6 +32,7 @@ |
|
|
|
var height = $(window).height(); |
|
|
|
$('.manage-table, .manage-table .datagrid').width(width -247); |
|
|
|
$('.manage-table, .manage-table .datagrid').height(height - 109); |
|
|
|
this.formatLastColumn(); |
|
|
|
}; |
|
|
|
|
|
|
|
this.InitOrgList = function () { |
|
|
@ -63,17 +64,16 @@ |
|
|
|
this.InitDataGrid = function () { |
|
|
|
this.userGrid.datagrid({ |
|
|
|
columns: [[ |
|
|
|
{ field: 'RealName', title: '姓名', align: 'center', width: 10 }, |
|
|
|
{ field: 'OrgName', title: '所属机构', align: 'center', width: 10 }, |
|
|
|
{ field: 'LoginName', title: '登录账户', align: 'center', width: 10 }, |
|
|
|
{ field: 'LoginPassWord', title: '登录密码', align: 'center', width: 10, formatter: this.formatPassword.bind(this) }, |
|
|
|
{ field: 'ComputeCount', title: '登录次数', align: 'center', width: 10 }, |
|
|
|
{ field: 'LastComputeTime', title: '最后计算时间', align: 'center', width: 15}, |
|
|
|
{ field: 'CreateTime', title: '最后登录时间', align: 'left', width: 35, formatter: this.formatTime.bind(this) } |
|
|
|
{ field: 'RealName', title: '姓名', align: 'center', width: 120 }, |
|
|
|
{ field: 'OrgName', title: '所属机构', align: 'center', width: 120 }, |
|
|
|
{ field: 'LoginName', title: '登录账户', align: 'center', width: 120 }, |
|
|
|
{ field: 'LoginPassWord', title: '登录密码', align: 'center', width: 120, formatter: this.formatPassword.bind(this) }, |
|
|
|
{ field: 'ComputeCount', title: '登录次数', align: 'center', width: 100 }, |
|
|
|
{ field: 'LastComputeTime', title: '最后计算时间', align: 'center', width: 170, formatter: this.formatLastTime.bind(this)}, |
|
|
|
{ field: 'CreateTime', title: '最后登录时间', align: 'left', formatter: this.formatTime.bind(this) } |
|
|
|
]], |
|
|
|
striped: true, |
|
|
|
singleSelect: false, |
|
|
|
fitColumns: true, |
|
|
|
fit: true, |
|
|
|
scrollbarSize: 0, |
|
|
|
pagination: true, |
|
|
@ -90,10 +90,21 @@ |
|
|
|
body.addClass('null-data-body'); |
|
|
|
body.append('<div class="null-data"><span></span><p>暂无数据</p></div>'); |
|
|
|
} |
|
|
|
} |
|
|
|
this.formatLastColumn(); |
|
|
|
}.bind(this) |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
this.formatLastColumn = function () { |
|
|
|
var width = $('.container').width(); |
|
|
|
var headerTable = $('.datagrid-header'); |
|
|
|
var bodyTable = $('.datagrid-body'); |
|
|
|
var headerTd = headerTable.find('td:last'); |
|
|
|
headerTd.css('width', (width - 753) + 'px'); |
|
|
|
bodyTable.find('tr').find('td:last').css('width', (width - 753) + 'px'); |
|
|
|
//bodyTd.eq(headerTd.length - 2).css('width', '172px');
|
|
|
|
}; |
|
|
|
|
|
|
|
this.onQueryButtonClick = function () { |
|
|
|
var orgId = $('#org-list').combobox('getValue') === '' ? 0 : $('#org-list').combobox('getValue'); |
|
|
|
this.ReLoadTableData(orgId); |
|
|
@ -119,12 +130,15 @@ |
|
|
|
}; |
|
|
|
|
|
|
|
this.formatTime = function (time) { |
|
|
|
console.log(moment(time).format('YYYY/MM/DD HH:mm:ss')) |
|
|
|
return '<span>{0}</span>'.format(moment(time).format('YYYY/MM/DD HH:mm:ss')); |
|
|
|
}; |
|
|
|
|
|
|
|
this.formatLastTime = function (time) { |
|
|
|
var value = time === null ? '-' : format(moment(time).format('YYYY/MM/DD HH:mm:ss')); |
|
|
|
return '<span>{0}</span>'.format(value); |
|
|
|
}; |
|
|
|
|
|
|
|
this.OnTaskSelected = function (index, row) { |
|
|
|
console.log(row) |
|
|
|
this.selectedRow = row; |
|
|
|
$('.datagrid-btable tr').removeClass('datagrid-row-selected'); |
|
|
|
$('.datagrid-btable tr').eq(index).addClass('datagrid-row-selected'); |
|
|
|