diff --git a/04.系统编码/.vs/BeijingSafeguard/v15/.suo b/04.系统编码/.vs/BeijingSafeguard/v15/.suo index f9b5085..6635d6c 100644 Binary files a/04.系统编码/.vs/BeijingSafeguard/v15/.suo and b/04.系统编码/.vs/BeijingSafeguard/v15/.suo differ diff --git a/04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-shm b/04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-shm index 1684185..7e79430 100644 Binary files a/04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-shm and b/04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-shm differ diff --git a/04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-wal b/04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-wal index 08ca39b..20aa480 100644 Binary files a/04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-wal and b/04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-wal differ diff --git a/04.系统编码/App/App.csproj.user b/04.系统编码/App/App.csproj.user index fc4fb1d..ee02a05 100644 --- a/04.系统编码/App/App.csproj.user +++ b/04.系统编码/App/App.csproj.user @@ -2,7 +2,7 @@ Debug|Any CPU - ShowAllFiles + ProjectFiles true 44332 diff --git a/04.系统编码/App/Content/scripts/system-management/statistic-analysis/index.js b/04.系统编码/App/Content/scripts/system-management/statistic-analysis/index.js index 32e8931..beba716 100644 --- a/04.系统编码/App/Content/scripts/system-management/statistic-analysis/index.js +++ b/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('

暂无数据

'); } + 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) { diff --git a/04.系统编码/App/Content/styles/common.css b/04.系统编码/App/Content/styles/common.css index e2d40f0..5c070d2 100644 --- a/04.系统编码/App/Content/styles/common.css +++ b/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; diff --git a/04.系统编码/App/Views/StatisticAnalysis/Index.cshtml b/04.系统编码/App/Views/StatisticAnalysis/Index.cshtml index 0dec61c..17d4012 100644 --- a/04.系统编码/App/Views/StatisticAnalysis/Index.cshtml +++ b/04.系统编码/App/Views/StatisticAnalysis/Index.cshtml @@ -22,6 +22,12 @@
+ 统计类型 +
+ 根据用户 + 根据机构 +
+ 起止时间