|  |  | @ -29,7 +29,7 @@ | 
			
		
	
		
			
				
					|  |  |  |         var height = $(window).height(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         $('.manage-table, .manage-table .datagrid').width(width - 267); | 
			
		
	
		
			
				
					|  |  |  |         $('.manage-table, .manage-table .datagrid').height(height - 435); | 
			
		
	
		
			
				
					|  |  |  |         $('.manage-table, .manage-table .datagrid').height(height - 535); | 
			
		
	
		
			
				
					|  |  |  |     }; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     this.OnStatisticTypeClick = function (event) { | 
			
		
	
	
		
			
				
					|  |  | @ -39,6 +39,62 @@ | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     this.OnQueryButtonClick = function () { | 
			
		
	
		
			
				
					|  |  |  |         this.ReloadChartData(); | 
			
		
	
		
			
				
					|  |  |  |         this.ReloadGridData(); | 
			
		
	
		
			
				
					|  |  |  |         this.InitDataGrid(); | 
			
		
	
		
			
				
					|  |  |  |         this.ReLoadTableData(); | 
			
		
	
		
			
				
					|  |  |  |     }; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     this.ReloadGridData = function () { | 
			
		
	
		
			
				
					|  |  |  |         $.ajax({ | 
			
		
	
		
			
				
					|  |  |  |             type: "POST", | 
			
		
	
		
			
				
					|  |  |  |             dataType: 'text', | 
			
		
	
		
			
				
					|  |  |  |             url: '/Task/GetList', | 
			
		
	
		
			
				
					|  |  |  |             data: { | 
			
		
	
		
			
				
					|  |  |  |                 fromDate: this.GetParams().fromTime, | 
			
		
	
		
			
				
					|  |  |  |                 toDate: this.GetParams().toTime | 
			
		
	
		
			
				
					|  |  |  |             }, | 
			
		
	
		
			
				
					|  |  |  |             success: function (result) { | 
			
		
	
		
			
				
					|  |  |  |                 console.log(JSON.parse(result)) | 
			
		
	
		
			
				
					|  |  |  |             }.bind(this) | 
			
		
	
		
			
				
					|  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |     }; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     this.ReLoadTableData = function () { | 
			
		
	
		
			
				
					|  |  |  |         this.statisticGrid.datagrid({ | 
			
		
	
		
			
				
					|  |  |  |             method: "POST", | 
			
		
	
		
			
				
					|  |  |  |             url: '/Task/GetList', | 
			
		
	
		
			
				
					|  |  |  |             queryParams: { | 
			
		
	
		
			
				
					|  |  |  |                 fromDate: this.GetParams().fromTime, | 
			
		
	
		
			
				
					|  |  |  |                 toDate: this.GetParams().toTime | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |     }; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     this.InitDataGrid = function () { | 
			
		
	
		
			
				
					|  |  |  |         this.statisticGrid.datagrid({ | 
			
		
	
		
			
				
					|  |  |  |             columns: [[ | 
			
		
	
		
			
				
					|  |  |  |                 { field: 'UserName', title: '用户名', align: 'center', width: 120 }, | 
			
		
	
		
			
				
					|  |  |  |                 { field: 'CreateTime', title: '提交时间', align: 'center', width: 180, formatter: this.formatTime.bind(this) }, | 
			
		
	
		
			
				
					|  |  |  |                 { field: 'ReleaseTime', title: '反馈时间', align: 'center', width: 180, formatter: this.formatTime.bind(this) }, | 
			
		
	
		
			
				
					|  |  |  |                 { field: 'Params', title: '参数', align: 'center', width: 550, formatter: this.formatParams.bind(this) }, | 
			
		
	
		
			
				
					|  |  |  |                 { field: 'OrgName', title: '计算状态', align: 'center', width: 100, formatter: this.formatState.bind(this) }, | 
			
		
	
		
			
				
					|  |  |  |                 { field: 'Null', title: '', align: 'left' } | 
			
		
	
		
			
				
					|  |  |  |             ]], | 
			
		
	
		
			
				
					|  |  |  |             striped: true, | 
			
		
	
		
			
				
					|  |  |  |             singleSelect: false, | 
			
		
	
		
			
				
					|  |  |  |             fit: true, | 
			
		
	
		
			
				
					|  |  |  |             scrollbarSize: 0, | 
			
		
	
		
			
				
					|  |  |  |             pagination: true, | 
			
		
	
		
			
				
					|  |  |  |             pageNumber: 1, | 
			
		
	
		
			
				
					|  |  |  |             pageSize: 50, | 
			
		
	
		
			
				
					|  |  |  |             pageList: [10, 20, 50, 100, 150, 200], | 
			
		
	
		
			
				
					|  |  |  |             //onSelect: this.OnTaskSelected.bind(this),
 | 
			
		
	
		
			
				
					|  |  |  |             //onUnselect: this.OnTaskUnselected.bind(this),
 | 
			
		
	
		
			
				
					|  |  |  |             //onBeforeLoad: this.OnTableGridBeforeLoad.bind(this),
 | 
			
		
	
		
			
				
					|  |  |  |             onLoadSuccess: function (data) { | 
			
		
	
		
			
				
					|  |  |  |                 this.formatLastColumn(); | 
			
		
	
		
			
				
					|  |  |  |             }.bind(this) | 
			
		
	
		
			
				
					|  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |     }; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     this.ReloadChartData = function () { | 
			
		
	
	
		
			
				
					|  |  | @ -49,7 +105,6 @@ | 
			
		
	
		
			
				
					|  |  |  |             data: this.GetParams(), | 
			
		
	
		
			
				
					|  |  |  |             success: function (result) { | 
			
		
	
		
			
				
					|  |  |  |                 var rows = JSON.parse(result).rows; | 
			
		
	
		
			
				
					|  |  |  |                 console.log(rows) | 
			
		
	
		
			
				
					|  |  |  |                 var type = this.GetParams().typeCode === 'user' ? 'column' : 'spline';  | 
			
		
	
		
			
				
					|  |  |  |                 var name = this.GetParams().typeCode === 'user' ? '根据用户' : '根据机构'; | 
			
		
	
		
			
				
					|  |  |  |                 var xAxises = this.GetSeries(rows, name).xAxises; | 
			
		
	
	
		
			
				
					|  |  | @ -375,6 +430,27 @@ | 
			
		
	
		
			
				
					|  |  |  |             rows: 1000 | 
			
		
	
		
			
				
					|  |  |  |         }; | 
			
		
	
		
			
				
					|  |  |  |     }; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     this.formatTime = function (time) { | 
			
		
	
		
			
				
					|  |  |  |         return '<span>{0}</span>'.format(moment(time).format('YYYY/MM/DD HH:mm:ss')); | 
			
		
	
		
			
				
					|  |  |  |     }; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     this.formatParams = function (params, row) { | 
			
		
	
		
			
				
					|  |  |  |         return '<span>{0}(经度)、{1}(纬度)、{2}米(高度)、{3}分钟(模拟时长)、{4}分钟(分段时长)</span>'.format(row.Longitude, row.Latitude, row.Height, row.SimulatedDuration, row.SimulatedInterval) | 
			
		
	
		
			
				
					|  |  |  |     }; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     this.formatState = function () { | 
			
		
	
		
			
				
					|  |  |  |         return '' | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     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 - 1130) + 'px'); | 
			
		
	
		
			
				
					|  |  |  |         bodyTable.find('tr').find('td:last').css('width', (width - 1130) + 'px'); | 
			
		
	
		
			
				
					|  |  |  |     }; | 
			
		
	
		
			
				
					|  |  |  | }; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | var app = null; | 
			
		
	
	
		
			
				
					|  |  | 
 |