Browse Source

commit

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

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

@ -128,14 +128,14 @@
var sum = count.reduce(function (prev, next) { return prev + next; });
max = count.reduce(function (prev, cur) { return Math.max(prev, cur); });
xAxises.push(name === '根据用户' ? item.UserName : item.OrgName);
defaultSeries.push(item.ComputeCount);
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');
};
};

26
04.系统编码/App/Content/styles/common.css

@ -331,11 +331,11 @@
word-break: break-all;
}
.tooltip-content span {
width: 110px;
text-align: right;
display: inline-block;
}
.tooltip-content span {
width: 110px;
text-align: right;
display: inline-block;
}
.line {
width: 100%;
@ -734,14 +734,14 @@
position: relative;
}
.null-data-body .null-data {
width: 128px;
position: absolute;
top: 50%;
left: 50%;
text-align: center;
transform: translate(-50%, -50%);
}
.null-data-body .null-data {
width: 128px;
position: absolute;
top: 50%;
left: 50%;
text-align: center;
transform: translate(-50%, -50%);
}
.null-data-body .null-data span {
width: 128px;

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

@ -155,13 +155,13 @@
position: relative;
}
.second-title h2 {
line-height: 30px;
}
.second-title h2 {
line-height: 30px;
}
.second-title .switch {
top: 7px;
}
.second-title .switch {
top: 7px;
}
.calc-title h2 {
background: url("../images/icon-calc.png") no-repeat left center;
@ -187,9 +187,9 @@
border-bottom: 0;
}
.forecast-title h2 {
background: url("../images/icon-forecast.png") no-repeat left center;
}
.forecast-title h2 {
background: url("../images/icon-forecast.png") no-repeat left center;
}
.param {
display: none;
@ -426,9 +426,9 @@
background: linear-gradient(#087cd6, #003c7e);
}
.label-list a.active:hover i {
background: url(../images/clear.png) no-repeat center/cover;
}
.label-list a.active:hover i {
background: url(../images/clear.png) no-repeat center/cover;
}
.import-control {
position: relative;
@ -436,27 +436,27 @@
cursor: pointer;
}
.import-control input {
width: 86px;
height: 32px;
}
.import-control input {
width: 86px;
height: 32px;
}
.import-control button {
margin-left: 0;
}
.import-control button {
margin-left: 0;
}
.all-label-list {
padding-top: 10px;
}
.all-label-list a {
margin: 0 0 10px 10px;
}
.all-label-list a {
margin: 0 0 10px 10px;
}
.all-label-list h2 {
padding-bottom: 10px;
text-align: center;
}
.all-label-list h2 {
padding-bottom: 10px;
text-align: center;
}
.clac-title {
position: relative;
@ -488,14 +488,14 @@
margin-bottom: 10px;
}
.forecast-text span {
float: left;
}
.forecast-text span {
float: left;
}
.forecast-text span:first-child {
width: 70px;
text-align: right
}
.forecast-text span:first-child {
width: 70px;
text-align: right
}
.forecast-refresh span {
line-height: 33px;
@ -549,12 +549,12 @@
background: linear-gradient(#febc50, #faa71c);
}
.export:hover,
.draw:hover,
.clear-btn:hover,
.info-mark:hover {
color: #ffffff;
}
.export:hover,
.draw:hover,
.clear-btn:hover,
.info-mark:hover {
color: #ffffff;
}
.draw {
top: 20px;
@ -632,11 +632,11 @@
height: calc(100vh - 491px);
}
.result-list ul {
position: relative;
height: calc(100% - 285px);
border-top: 0;
}
.result-list ul {
position: relative;
height: calc(100% - 285px);
border-top: 0;
}
.slider-list {
position: relative;
@ -1201,14 +1201,14 @@
cursor: default;
}
.time-label a.close-button {
width: 8px;
height: 8px;
position: absolute;
top: 5px;
right: 5px;
background: url(../images/clear.png) no-repeat center/cover;
}
.time-label a.close-button {
width: 8px;
height: 8px;
position: absolute;
top: 5px;
right: 5px;
background: url(../images/clear-gray.png) no-repeat center/cover;
}
.compare-time-label {
border: 1px solid blue;
@ -1216,13 +1216,13 @@
z-index: 999 !important
}
.compare-time-label span {
color: #ffffff;
}
.compare-time-label span {
color: #ffffff;
}
.compare-time-label a.close-button {
background: url(../images/clear-white.png) no-repeat center/cover;
}
.compare-time-label a.close-button {
background: url(../images/clear-white.png) no-repeat center/cover;
}
.center-label {
padding: 2px 0 0 5px;
@ -1268,79 +1268,79 @@
margin-left: 0 !important;
}
.info-point-content .info-point-block {
position: absolute;
transform: translateX(-50%);
}
.info-point-content .info-point-block {
position: absolute;
transform: translateX(-50%);
}
.info-point-content .info-point-top {
margin-bottom: 6px;
padding: 5px 30px 5px 10px;
border-radius: 3px;
position: relative;
cursor: default;
border: 1px solid #dddddd;
background-color: #ffffff;
}
.info-point-content .info-point-top {
margin-bottom: 6px;
padding: 5px 30px 5px 10px;
border-radius: 3px;
position: relative;
cursor: default;
border: 1px solid #dddddd;
background-color: #ffffff;
}
.info-point-content .info-point-top p {
color: #3a3a3a;
font-size: 14px;
white-space: nowrap;
}
.info-point-content .info-point-top .remove-info-point {
width: 30px;
height: 30px;
position: absolute;
top: 0px;
right: 0px;
z-index: 3000;
}
.info-point-content .info-point-top .remove-info-point span {
width: 10px;
height: 10px;
display: block;
margin: 10px auto 0 auto;
cursor: pointer;
background: url("../images/close-dialog.png") no-repeat center/cover;
}
.info-point-content .icon {
width: 32px;
height: 32px;
margin: 0 auto;
background: url("../images/markers/1.png") no-repeat center/cover;
}
.info-point-content .info-point-top p {
color: #3a3a3a;
font-size: 14px;
white-space: nowrap;
}
.info-point-content .icon2 {
background: url("../images/markers/2.png") no-repeat center/cover;
}
.info-point-content .info-point-top .remove-info-point {
width: 30px;
height: 30px;
position: absolute;
top: 0px;
right: 0px;
z-index: 3000;
}
.info-point-content .icon3 {
background: url("../images/markers/3.png") no-repeat center/cover;
}
.info-point-content .info-point-top .remove-info-point span {
width: 10px;
height: 10px;
display: block;
margin: 10px auto 0 auto;
cursor: pointer;
background: url("../images/close-dialog.png") no-repeat center/cover;
}
.info-point-content .icon4 {
background: url("../images/markers/4.png") no-repeat center/cover;
}
.info-point-content .icon {
width: 32px;
height: 32px;
margin: 0 auto;
background: url("../images/markers/1.png") no-repeat center/cover;
}
.info-point-content .icon5 {
background: url("../images/markers/5.png") no-repeat center/cover;
}
.info-point-content .icon2 {
background: url("../images/markers/2.png") no-repeat center/cover;
}
.info-point-content .icon6 {
background: url("../images/markers/6.png") no-repeat center/cover;
}
.info-point-content .icon3 {
background: url("../images/markers/3.png") no-repeat center/cover;
}
.info-point-content .icon7 {
background: url("../images/markers/7.png") no-repeat center/cover;
}
.info-point-content .icon4 {
background: url("../images/markers/4.png") no-repeat center/cover;
}
.info-point-content .icon8 {
background: url("../images/markers/8.png") no-repeat center/cover;
}
.info-point-content .icon5 {
background: url("../images/markers/5.png") no-repeat center/cover;
}
.info-point-content .icon6 {
background: url("../images/markers/6.png") no-repeat center/cover;
}
.info-point-content .icon7 {
background: url("../images/markers/7.png") no-repeat center/cover;
}
.info-point-content .icon8 {
background: url("../images/markers/8.png") no-repeat center/cover;
}
.shrink {
width: 12px;

Loading…
Cancel
Save