|
@ -134,8 +134,8 @@ |
|
|
pieSeries.push({ |
|
|
pieSeries.push({ |
|
|
name: name === '根据用户' ? item.UserName : item.OrgName, |
|
|
name: name === '根据用户' ? item.UserName : item.OrgName, |
|
|
y: this.formatDecimal(String(item.ComputeCount / sum) / 100) * 100 |
|
|
y: this.formatDecimal(String(item.ComputeCount / sum) / 100) * 100 |
|
|
}) |
|
|
}); |
|
|
}.bind(this)) |
|
|
}.bind(this)); |
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|
max: max, |
|
|
max: max, |
|
@ -146,14 +146,14 @@ |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
this.formatDecimal = function (value) { |
|
|
this.formatDecimal = function (value) { |
|
|
value = value.toString() |
|
|
value = value.toString(); |
|
|
let index = value.indexOf('.') |
|
|
let index = value.indexOf('.'); |
|
|
if (index !== -1) { |
|
|
if (index !== -1) { |
|
|
value = value.substring(0, 5 + index + 1) |
|
|
value = value.substring(0, 5 + index + 1); |
|
|
} else { |
|
|
} else { |
|
|
value = value.substring(0) |
|
|
value = value.substring(0); |
|
|
} |
|
|
} |
|
|
return parseFloat(value).toFixed(5) |
|
|
return parseFloat(value).toFixed(5); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
this.InitChart = function (series, xAxises, values, name, max) { |
|
|
this.InitChart = function (series, xAxises, values, name, max) { |
|
@ -191,7 +191,7 @@ |
|
|
color: '#ffffff', |
|
|
color: '#ffffff', |
|
|
fontSize: '14px', |
|
|
fontSize: '14px', |
|
|
fontFamily: '微软雅黑' |
|
|
fontFamily: '微软雅黑' |
|
|
}, |
|
|
} |
|
|
}, |
|
|
}, |
|
|
lineColor: '#234979', |
|
|
lineColor: '#234979', |
|
|
crosshair: true |
|
|
crosshair: true |
|
@ -206,7 +206,7 @@ |
|
|
color: '#ffffff', |
|
|
color: '#ffffff', |
|
|
fontSize: '14px', |
|
|
fontSize: '14px', |
|
|
fontFamily: '微软雅黑' |
|
|
fontFamily: '微软雅黑' |
|
|
}, |
|
|
} |
|
|
}, |
|
|
}, |
|
|
gridLineColor: '#234979' |
|
|
gridLineColor: '#234979' |
|
|
}, |
|
|
}, |
|
@ -257,7 +257,7 @@ |
|
|
fontSize: '14px', |
|
|
fontSize: '14px', |
|
|
fontFamily: '微软雅黑' |
|
|
fontFamily: '微软雅黑' |
|
|
} |
|
|
} |
|
|
}, |
|
|
} |
|
|
}, |
|
|
}, |
|
|
series: { |
|
|
series: { |
|
|
color: { |
|
|
color: { |
|
@ -286,8 +286,6 @@ |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
this.InitPieChart = function (series, name) { |
|
|
this.InitPieChart = function (series, name) { |
|
|
var firstColors = ['#00d5f6', '#97e6af', '#e4e189', '#dc9884', '#8c83dc', '#7aa9da', '#b7d2ff', '#88f187', '#e3ea79', '#e29f6f']; |
|
|
|
|
|
var lastColors = ['#266cb9', '#229625', '#b3ae15', '#bd3d17', '#3324a9', '#1538e4', '#b7d2ff', '#3ac720', '#cad619', '#d2691f']; |
|
|
|
|
|
Highcharts.chart('pie-chart', { |
|
|
Highcharts.chart('pie-chart', { |
|
|
chart: { |
|
|
chart: { |
|
|
backgroundColor: 'rgba(0, 0, 0, 0)', |
|
|
backgroundColor: 'rgba(0, 0, 0, 0)', |
|
@ -340,6 +338,9 @@ |
|
|
fontSize: '14px', |
|
|
fontSize: '14px', |
|
|
fontFamily: '微软雅黑', |
|
|
fontFamily: '微软雅黑', |
|
|
textOutline: 'none' |
|
|
textOutline: 'none' |
|
|
|
|
|
}, |
|
|
|
|
|
formatter: function () { |
|
|
|
|
|
return '<span style="color: ' + (typeof this.color === 'string' ? this.color : this.color.stops[1][1]) + '">' + this.point.name + '</span>'; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
showInLegend: false |
|
|
showInLegend: false |
|
@ -356,8 +357,8 @@ |
|
|
color: { |
|
|
color: { |
|
|
linearGradient: { x1: 0, y1: 1, x2: 0, y2: 0 }, |
|
|
linearGradient: { x1: 0, y1: 1, x2: 0, y2: 0 }, |
|
|
stops: [ |
|
|
stops: [ |
|
|
[0, Highcharts.Color(firstColors[i]).setOpacity(1).get('rgba')], |
|
|
[0, Highcharts.Color(i === 0 ? '#00d5f6' : '#fafafa').setOpacity(1).get('rgba')], |
|
|
[1, lastColors[i]] |
|
|
[1, i === 0 ? '#266cb9' : app.GetRandomColor()] |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
@ -365,6 +366,13 @@ |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
this.GetRandomColor = function () { |
|
|
|
|
|
var r = Math.floor(Math.random() * 255); |
|
|
|
|
|
var g = Math.floor(Math.random() * 255); |
|
|
|
|
|
var b = Math.floor(Math.random() * 255); |
|
|
|
|
|
return "rgb(" + r + ',' + g + ',' + b + ")"; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
this.InitDate = function () { |
|
|
this.InitDate = function () { |
|
|
$('#from-date').datebox({ |
|
|
$('#from-date').datebox({ |
|
|
panelAlign: 'right', |
|
|
panelAlign: 'right', |
|
@ -420,20 +428,20 @@ |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
this.formatParams = function (params, row) { |
|
|
this.formatParams = function (params, row) { |
|
|
return '<span>{0}(经度)、{1}(纬度)、{2}米(高度)、{3}分钟(模拟时长)、{4}分钟(分段时长)</span>'.format(row.Longitude, row.Latitude, row.Height, row.SimulatedDuration, row.SimulatedInterval) |
|
|
return '<span>{0}(经度)、{1}(纬度)、{2}米(高度)、{3}分钟(模拟时长)、{4}分钟(分段时长)</span>'.format(row.Longitude, row.Latitude, row.Height, row.SimulatedDuration, row.SimulatedInterval); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
this.formatState = function () { |
|
|
this.formatState = function () { |
|
|
return '' |
|
|
return ''; |
|
|
} |
|
|
}; |
|
|
|
|
|
|
|
|
this.formatLastColumn = function () { |
|
|
this.formatLastColumn = function () { |
|
|
var width = $('.container').width(); |
|
|
var width = $('.container').width(); |
|
|
var headerTable = $('.datagrid-header'); |
|
|
var headerTable = $('.datagrid-header'); |
|
|
var bodyTable = $('.datagrid-body'); |
|
|
var bodyTable = $('.datagrid-body'); |
|
|
var headerTd = headerTable.find('td:last'); |
|
|
var headerTd = headerTable.find('td:last'); |
|
|
headerTd.css('width', (width - 1130) + 'px'); |
|
|
headerTd.css('width', width - 1130 + 'px'); |
|
|
bodyTable.find('tr').find('td:last').css('width', (width - 1130) + 'px'); |
|
|
bodyTable.find('tr').find('td:last').css('width', width - 1130 + 'px'); |
|
|
}; |
|
|
}; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|