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

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

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

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

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

Loading…
Cancel
Save