Browse Source

commit

master
hhx 3 years ago
parent
commit
0fac1e30f7
  1. BIN
      04.系统编码/.vs/BeijingSafeguard/v15/.suo
  2. BIN
      04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-shm
  3. BIN
      04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-wal
  4. 2
      04.系统编码/App/App.csproj.user
  5. 34
      04.系统编码/App/Content/scripts/system-management/statistic-analysis/index.js
  6. 68
      04.系统编码/App/Content/styles/common.css
  7. 6
      04.系统编码/App/Views/StatisticAnalysis/Index.cshtml

BIN
04.系统编码/.vs/BeijingSafeguard/v15/.suo

Binary file not shown.

BIN
04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-shm

Binary file not shown.

BIN
04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-wal

Binary file not shown.

2
04.系统编码/App/App.csproj.user

@ -2,7 +2,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<ProjectView>ShowAllFiles</ProjectView>
<ProjectView>ProjectFiles</ProjectView>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort>44332</IISExpressSSLPort>

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

@ -8,7 +8,8 @@
this.ReLayout();
this.InitDate();
this.InitDataGrid();
$('.statistic-type span').on('click', this.OnStatisticTypeClick.bind(this));
$('#query-btn').on('click', this.OnQueryButtonClick.bind(this));
$('#query-btn').trigger('click');
@ -24,6 +25,11 @@
this.formatLastColumn();
};
this.OnStatisticTypeClick = function (event) {
$('.statistic-type span').removeClass("active");
$(event.target).addClass("active");
};
this.OnQueryButtonClick = function () {
this.ReLoadTableData();
};
@ -33,6 +39,7 @@
method: "POST",
url: '/StatisticAnalysis/Query',
queryParams: {
typeCode: $('.statistic-type span.active').attr('type'),
fromTime: $("#from-date").datetimebox('getValue'),
toTime: $("#to-date").datetimebox('getValue'),
}
@ -84,6 +91,7 @@
columns: [[
{ field: 'UserName', title: '姓名', align: 'center', width: 120 },
{ field: 'OrgName', title: '所属机构', align: 'left', width: 180 },
{ field: 'OrgName2', title: '机构名称', align: 'left', width: 180, hidden: 'true' },
{ field: 'ComputeCount', title: '计算次数', align: 'center', width: 100 },
{ field: 'LastComputeTime', title: '最后计算时间', align: 'center', width: 160, formatter: this.formatTime.bind(this) },
{ field: 'Null', title: '', align: 'left' }
@ -106,18 +114,38 @@
body.append('<div class="null-data"><span></span><p>暂无数据</p></div>');
}
if ($('.statistic-type span.active').attr('type') === 'user') {
this.statisticGrid.datagrid('showColumn', 'UserName');
this.statisticGrid.datagrid('showColumn', 'OrgName');
this.statisticGrid.datagrid('hideColumn', 'OrgName2');
}
else {
this.statisticGrid.datagrid('hideColumn', 'UserName');
this.statisticGrid.datagrid('hideColumn', 'OrgName');
this.statisticGrid.datagrid('showColumn', 'OrgName2');
}
this.formatLastColumn();
}.bind(this)
});
};
this.formatLastColumn = function () {
var type = $('.statistic-type span.active').attr('type');
var width = $('.container').width();
var headerTable = $('.datagrid-header');
var bodyTable = $('.datagrid-body');
var headerTd = headerTable.find('td:last');
headerTd.css('width', (width - 562) + 'px');
bodyTable.find('tr').find('td:last').css('width', (width - 562) + 'px');
var clipWidth = type === 'user' ? 562 : 442;
headerTd.css('width', (width - clipWidth) + 'px');
bodyTable.find('tr').find('td:last').css('width', (width - clipWidth) + 'px');
};
this.toggleUserColuum = function () {
if ($('.statistic-type span.active').attr('type') === 'user')
this.statisticGrid.datagrid('showColumn', 'UserName');
else
this.statisticGrid.datagrid('hideColumn', 'UserName');
};
this.formatTime = function (time) {

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

@ -219,10 +219,10 @@
overflow: visible;
}
.user-table .datagrid-header td:nth-of-type(9):after,
.statistic-table .datagrid-header td:nth-of-type(4):after,
.org-table .datagrid-header td:nth-of-type(2):after,
.config-table .datagrid-header td:nth-of-type(4):after {
.user-table .datagrid-header td:nth-last-child(-n+2):after,
.statistic-table .datagrid-header td:nth-last-child(-n+2):after,
.org-table .datagrid-header td:nth-last-child(-n+2):after,
.config-table .datagrid-header td:nth-last-child(-n+2):after {
content: '';
width: 10000px;
height: 28px;
@ -232,15 +232,15 @@
background: linear-gradient(to bottom, #ffffff, #f5f5f5, #eaeaea);
}
.statistic-table .datagrid-header td:nth-of-type(4):after {
.statistic-table .datagrid-header td:nth-last-child(-n+2):after {
left: 161px;
}
.org-table .datagrid-header td:nth-of-type(2):after {
.org-table .datagrid-header td:nth-last-child(-n+2):after {
left: 180px;
}
.config-table .datagrid-header td:nth-of-type(4):after {
.config-table .datagrid-header td:nth-last-child(-n+2):after {
left: 201px;
}
@ -462,6 +462,44 @@
justify-content: flex-end;
}
.statistic-toolbar .statistic-type {
margin-right: 5px;
overflow: hidden;
display: flex;
}
.statistic-toolbar .statistic-type span {
padding: 0 16px;
cursor: pointer;
line-height: 28px;
text-align: center;
border-style: solid;
border-color: #d2d2d2;
border-width: 1px 0 1px 0;
background: linear-gradient(to bottom, #fefefe, #dcdcdc);
}
.statistic-toolbar .statistic-type span:first-of-type {
border-left: 1px solid #d2d2d2;
border-radius: 3px 0 0 3px;
}
.statistic-toolbar .statistic-type span:last-of-type {
border-right: 1px solid #d2d2d2;
border-radius: 0 3px 3px 0;
}
.statistic-toolbar .statistic-type span.active {
background: #fdb846;
border-color: #fdb846;
color: #ffffff;
}
.statistic-toolbar .statistic-type span:first-of-type.active,
.statistic-toolbar .statistic-type span:last-of-type.active {
border-color: #fdb846;
}
.statistic-toolbar .easyui-datetimebox {
width: 150px;
}
@ -627,14 +665,6 @@
background: linear-gradient(to bottom, #fefefe, #dcdcdc);
}
.manage-dialog .modal-body .row .col .passwordbox-open {
background: url("../images/password-open.png") no-repeat center center;
}
.manage-dialog .modal-body .row .col .passwordbox-close {
background: url("../images/password-close.png") no-repeat center center;
}
.manage-dialog .modal-body .row .col .sex-select span:first-of-type {
border-left: 1px solid #d2d2d2;
}
@ -654,6 +684,14 @@
border-color: #fdb846;
}
.manage-dialog .modal-body .row .col .passwordbox-open {
background: url("../images/password-open.png") no-repeat center center;
}
.manage-dialog .modal-body .row .col .passwordbox-close {
background: url("../images/password-close.png") no-repeat center center;
}
.manage-dialog .modal-body .row .col .textbox {
width: 100%;
line-height: 28px;

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

@ -22,6 +22,12 @@
</div>
<div class="container">
<div class="toolbar statistic-toolbar">
<span class="tip">统计类型</span>
<div class="statistic-type">
<span class="active" type="user">根据用户</span>
<span type="org">根据机构</span>
</div>
<span class="tip">起止时间</span>
<div class="date-input">
<input class="easyui-datetimebox" id="from-date" data-options="editable:false" value=" ">

Loading…
Cancel
Save