Browse Source

commit

master
hhx 3 years ago
parent
commit
ce3550bfda
  1. 80
      04.系统编码/App/Content/scripts/system-management/statistic-analysis/index.js
  2. 24
      04.系统编码/App/Content/styles/common.css
  3. 2
      04.系统编码/App/Views/StatisticAnalysis/Index.cshtml

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

@ -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;

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

@ -207,7 +207,7 @@
}
.statistic-table .datagrid-header td:nth-last-child(-n+2):after {
left: 161px;
left: 120px;
}
.org-table .datagrid-header td:nth-last-child(-n+2):after {
@ -308,8 +308,10 @@
}
.statistic-table {
background: red;
margin: 0 auto;
background: #052a50;
border-radius: 3px;
border: 1px solid #234979;
}
.tooltip-content {
@ -813,7 +815,7 @@
.chart {
width: calc(100% - 20px);
height: 300px;
height: 400px;
margin: 10px;
display: flex;
align-items: center;
@ -823,9 +825,10 @@
width: 60%;
height: 100%;
padding: 10px;
background: #052a50;
background: #002145;
border-radius: 3px;
box-shadow: 0 0 10px rgba(93, 144, 210, 0.25) inset;
border: 1px solid #234979;
}
.chart-item:last-of-type {
@ -833,19 +836,6 @@
margin-left: 10px;
}
.default-chart {
/*width: 100%;
height: 100%;*/
}
.pie-chart {
/*width: 350px;
height: 350px;
position: absolute;
top: 40px;
right: 0;*/
}
.highcharts-title {
line-height: 28px;
text-align: center;

2
04.系统编码/App/Views/StatisticAnalysis/Index.cshtml

@ -49,6 +49,6 @@
</div>
@section scripts {
<script src="~/Content/scripts/system-management/statistic-analysis/index.js"></script>
<script src="~/Content/thirds/highcharts.js"></script>
<script src="~/Content/scripts/system-management/statistic-analysis/index.js"></script>
}
Loading…
Cancel
Save