|
|
@ -30,7 +30,6 @@ |
|
|
|
this.ReLayout = function () { |
|
|
|
var width = $(window).width(); |
|
|
|
var height = $(window).height(); |
|
|
|
|
|
|
|
$('.manage-table, .manage-table .datagrid').width(width -247); |
|
|
|
$('.manage-table, .manage-table .datagrid').height(height - 109); |
|
|
|
}; |
|
|
@ -65,10 +64,12 @@ |
|
|
|
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 }, |
|
|
|
{ field: 'LoginPassWord', title: '登录密码', align: 'center', width: 10, formatter: this.formatPassword.bind(this) }, |
|
|
|
{ field: 'ComputeCount', title: '登录次数', align: 'center', width: 10 }, |
|
|
|
{ field: 'CreateTime', title: '最后登录时间', align: 'left', width: 60, formatter: this.formatTime.bind(this) } |
|
|
|
{ field: 'LastComputeTime', title: '最后计算时间', align: 'center', width: 15}, |
|
|
|
{ field: 'CreateTime', title: '最后登录时间', align: 'left', width: 35, formatter: this.formatTime.bind(this) } |
|
|
|
]], |
|
|
|
striped: true, |
|
|
|
singleSelect: false, |
|
|
@ -108,11 +109,22 @@ |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
this.formatPassword = function (password) { |
|
|
|
var len = password.length - 2; |
|
|
|
var symbol = ''; |
|
|
|
for (var i = 0; i < len; i++) { |
|
|
|
symbol += '*'; |
|
|
|
} |
|
|
|
return password.substring(0, 1) + symbol + password.substring(password.length - 1); |
|
|
|
}; |
|
|
|
|
|
|
|
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.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'); |
|
|
@ -147,7 +159,7 @@ |
|
|
|
|
|
|
|
this.onDeleteButtonClick = function () { |
|
|
|
$('.dialog-delete').show(); |
|
|
|
$('.dialog-clear h2').text('确定删除名为「{0}」的账户吗?'.format(this.selectedRow.RealName)); |
|
|
|
$('.dialog-clear h2').text('确定删除名为「{0}」的用户吗?'.format(this.selectedRow.RealName)); |
|
|
|
}; |
|
|
|
|
|
|
|
this.OnSureOfDeleteButtonClick = function () { |
|
|
|