Browse Source

commit

master
hehongxing 3 years ago
parent
commit
b37d5834f1
  1. 46
      04.系统编码/App/Content/scripts/system-management/statistic-analysis/index.js
  2. 2
      04.系统编码/App/Content/styles/index.css

46
04.系统编码/App/Content/scripts/system-management/statistic-analysis/index.js

@ -134,8 +134,8 @@
pieSeries.push({
name: name === '根据用户' ? item.UserName : item.OrgName,
y: this.formatDecimal(String(item.ComputeCount / sum) / 100) * 100
})
}.bind(this))
});
}.bind(this));
return {
max: max,
@ -146,14 +146,14 @@
};
this.formatDecimal = function (value) {
value = value.toString()
let index = value.indexOf('.')
value = value.toString();
let index = value.indexOf('.');
if (index !== -1) {
value = value.substring(0, 5 + index + 1)
value = value.substring(0, 5 + index + 1);
} 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) {
@ -191,7 +191,7 @@
color: '#ffffff',
fontSize: '14px',
fontFamily: '微软雅黑'
},
}
},
lineColor: '#234979',
crosshair: true
@ -206,7 +206,7 @@
color: '#ffffff',
fontSize: '14px',
fontFamily: '微软雅黑'
},
}
},
gridLineColor: '#234979'
},
@ -257,7 +257,7 @@
fontSize: '14px',
fontFamily: '微软雅黑'
}
},
}
},
series: {
color: {
@ -286,8 +286,6 @@
};
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', {
chart: {
backgroundColor: 'rgba(0, 0, 0, 0)',
@ -340,6 +338,9 @@
fontSize: '14px',
fontFamily: '微软雅黑',
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
@ -356,8 +357,8 @@
color: {
linearGradient: { x1: 0, y1: 1, x2: 0, y2: 0 },
stops: [
[0, Highcharts.Color(firstColors[i]).setOpacity(1).get('rgba')],
[1, lastColors[i]]
[0, Highcharts.Color(i === 0 ? '#00d5f6' : '#fafafa').setOpacity(1).get('rgba')],
[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 () {
$('#from-date').datebox({
panelAlign: 'right',
@ -420,20 +428,20 @@
};
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 () {
return ''
}
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');
headerTd.css('width', width - 1130 + 'px');
bodyTable.find('tr').find('td:last').css('width', width - 1130 + 'px');
};
};

2
04.系统编码/App/Content/styles/index.css

@ -1207,7 +1207,7 @@
position: absolute;
top: 5px;
right: 5px;
background: url(../images/clear.png) no-repeat center/cover;
background: url(../images/clear-gray.png) no-repeat center/cover;
}
.compare-time-label {

Loading…
Cancel
Save