diff --git a/04.系统编码/.vs/BeijingSafeguard/v15/.suo b/04.系统编码/.vs/BeijingSafeguard/v15/.suo index bd29354..09137f7 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-wal b/04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-wal index e0867f3..8a0feaf 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 b/04.系统编码/App/App.csproj index c68cf85..65530f2 100644 --- a/04.系统编码/App/App.csproj +++ b/04.系统编码/App/App.csproj @@ -130,6 +130,7 @@ + @@ -212,6 +213,7 @@ + @@ -344,6 +346,7 @@ + diff --git a/04.系统编码/App/Content/images/calendar_arrows.png b/04.系统编码/App/Content/images/calendar_arrows.png new file mode 100644 index 0000000..430c4ad Binary files /dev/null and b/04.系统编码/App/Content/images/calendar_arrows.png differ diff --git a/04.系统编码/App/Content/scripts/beijing/history-panel.js b/04.系统编码/App/Content/scripts/beijing/history-panel.js index f40f064..a5a854e 100644 --- a/04.系统编码/App/Content/scripts/beijing/history-panel.js +++ b/04.系统编码/App/Content/scripts/beijing/history-panel.js @@ -41,6 +41,7 @@ $('#start-date').datetimebox({ panelWidth: 190, panelHeight: 230, + panelAlign: 'right', showSeconds: false, currentText: '现在' }); @@ -48,6 +49,7 @@ $('#end-date').datetimebox({ panelWidth: 190, panelHeight: 230, + panelAlign: 'right', showSeconds: false, currentText: '现在' }); diff --git a/04.系统编码/App/Content/scripts/beijing/realtime-panel.js b/04.系统编码/App/Content/scripts/beijing/realtime-panel.js index c26f74f..165e0d2 100644 --- a/04.系统编码/App/Content/scripts/beijing/realtime-panel.js +++ b/04.系统编码/App/Content/scripts/beijing/realtime-panel.js @@ -28,6 +28,7 @@ $('#release-date').datetimebox({ panelWidth: 190, panelHeight: 230, + panelAlign: 'right', showSeconds: false, currentText: '现在' }); diff --git a/04.系统编码/App/Content/scripts/menggu/history-panel.js b/04.系统编码/App/Content/scripts/menggu/history-panel.js index 87eaf42..8d5e249 100644 --- a/04.系统编码/App/Content/scripts/menggu/history-panel.js +++ b/04.系统编码/App/Content/scripts/menggu/history-panel.js @@ -41,6 +41,7 @@ $('#start-date').datetimebox({ panelWidth: 190, panelHeight: 230, + panelAlign: 'right', showSeconds: false, currentText: '现在' }); @@ -48,6 +49,7 @@ $('#end-date').datetimebox({ panelWidth: 190, panelHeight: 230, + panelAlign: 'right', showSeconds: false, currentText: '现在' }); diff --git a/04.系统编码/App/Content/scripts/menggu/realtime-panel.js b/04.系统编码/App/Content/scripts/menggu/realtime-panel.js index 635c5b3..faa41f0 100644 --- a/04.系统编码/App/Content/scripts/menggu/realtime-panel.js +++ b/04.系统编码/App/Content/scripts/menggu/realtime-panel.js @@ -18,6 +18,7 @@ $('#release-date').datetimebox({ panelWidth: 190, panelHeight: 230, + panelAlign: 'right', showSeconds: false, currentText: '现在' }); diff --git a/04.系统编码/App/Content/scripts/system-management/statistic-analysis/index.js b/04.系统编码/App/Content/scripts/system-management/statistic-analysis/index.js new file mode 100644 index 0000000..afb27f4 --- /dev/null +++ b/04.系统编码/App/Content/scripts/system-management/statistic-analysis/index.js @@ -0,0 +1,169 @@ +var App = function () { + + this.data = { + "total": 20, + "rows": [{ Id: 1, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 2, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 3, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 4, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 5, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 6, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 7, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 8, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 9, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 10, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 11, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 12, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 13, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 14, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 15, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 16, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 17, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 18, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 19, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 20, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 21, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 22, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 23, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 24, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 25, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 26, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 27, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 28, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 29, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 30, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 31, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 32, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 33, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 34, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 35, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 36, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 37, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 38, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }, + { Id: 39, Name: "张三", CalcNumber: 11, CalcTime: '2021/12/15 10:00:00' }] + }; + this.selectedRow = []; + + this.Startup = function () { + this.ReLayout(); + this.InitDate(); + this.InitDataGrid(); + + $('#manage').addClass('active'); + + window.onresize = this.ReLayout.bind(this); + }; + + this.ReLayout = function () { + var width = $(window).width(); + var height = $(window).height(); + + $('.manage-table, .manage-table .datagrid').width(width - 247); + $('.manage-table, .manage-table .datagrid').height(height - 109); + }; + + this.InitDate = function () { + $('#from-date').datetimebox({ + panelWidth: 190, + panelAlign: 'right', + panelHeight: 230, + showSeconds: true, + currentText: '现在', + onSelect: function (date) { + var startTime = date.getTime(); + var endDate = $('#to-date').val(); + + if (endDate) { + var endTime = new Date(endDate).getTime(); + if (startTime > endTime) + alert('开始日期不能大于结束日期,请重新选择。'); + } + } + }); + + $('#to-date').datetimebox({ + panelWidth: 190, + panelHeight: 230, + panelAlign: 'right', + showSeconds: true, + currentText: '现在', + onSelect: function (date) { + var endTime = date.getTime(); + var startDate = $('#from-date').val(); + + if (startDate) { + var startTime = new Date(startDate).getTime(); + if (startTime > endTime) + alert('结束日期不能小于开始日期,请重新选择。'); + } + } + }); + + $("#from-date").datetimebox('setValue', moment().add(-30, 'days').format('YYYY/MM/DD HH:mm')); + }; + + this.InitDataGrid = function () { + $('#task-grid').datagrid({ + columns: [[ + { field: 'Name', title: '姓名', align: 'center', width: 10 }, + { field: 'CalcNumber', title: '计算次数', align: 'center', width: 10 }, + { field: 'CalcTime', title: '最后计算时间', align: 'left', width: 70 } + ]], + striped: true, + singleSelect: false, + fitColumns: true, + fit: true, + scrollbarSize: 0, + pagination: true, + onSelect: this.OnTaskSelected.bind(this), + onUnselect: this.OnTaskUnselected.bind(this) + }); + + $('#task-grid').datagrid('loadData', this.data); + }; + + this.formatText = function (value) { + return value === 1 ? '已启用' : '已禁用'; + }; + + this.OnTaskSelected = function (index, row) { + this.selectedRow = row; + $('.datagrid-btable tr').removeClass('datagrid-row-selected'); + $('.datagrid-btable tr').eq(index).addClass('datagrid-row-selected'); + + //set buttons disabled state + $('#edit-btn').prop('disabled', row === null); + $('#delete-btn').prop('disabled', row === null); + $('#enable-btn').prop('disabled', row.isEnable !== 1 ? null : true); + $('#disable-btn').prop('disabled', row.isEnable === 1 ? null : true); + }; + + this.OnTaskUnselected = function (index, row) { + $('#edit-btn').prop('disabled', true); + $('#delete-btn').prop('disabled', true); + $('#enable-btn').prop('disabled', true); + $('#disable-btn').prop('disabled', true); + }; + + this.OnAddButtonClick = function () { + this.AddDialog.Show(); + }; + + this.onEditButtonClick = function () { + this.EditDialog.Show(this.selectedRow); + }; + + this.onDeleteButtonClick = function () { + $('.dialog-delete').show(); + $('.dialog-clear h2').text('确定删除名为「{0}」的账户吗?'.format(this.selectedRow.Name)); + }; + + this.CloseDeleteDialog = function () { + $('.dialog-delete').hide(); + }; +}; + +$(document).ready(function () { + var app = new App(); + app.Startup(); +}); \ No newline at end of file diff --git a/04.系统编码/App/Content/styles/common.css b/04.系统编码/App/Content/styles/common.css index a75b22d..7541d81 100644 --- a/04.系统编码/App/Content/styles/common.css +++ b/04.系统编码/App/Content/styles/common.css @@ -229,6 +229,11 @@ background-color: #dddddd } +.statistic-table .datagrid-header td:last-of-type .datagrid-cell:after, +.statistic-table .datagrid-body .datagrid-row td:last-of-type .datagrid-cell:after { + left: 180px; +} + .manage-table .datagrid-body .datagrid-row:last-of-type td { border-bottom: 1px solid #dddddd; } @@ -310,17 +315,6 @@ border-bottom: 1px solid #e7e7e7; } -.combo-p{ - left: auto!important; - right: 12px; -} - -.combo-p:nth-last-of-type(2), -.combo-p:last-child, -.combo-p:nth-of-type(3){ - right: 18px; -} - .system-management { height: calc(100vh - 58px) } @@ -432,6 +426,30 @@ background-position-x: 7px; } +.statistic-toolbar { + padding-right: 10px; + align-items: center; + justify-content: flex-end; +} + +.statistic-toolbar .query-btn { + height: 28px; + margin-left: 10px; + padding: 0 16px; + line-height: 28px; + border-radius: 3px; + color: #ffffff; + background: linear-gradient(to bottom, #febd52, #faa71c); +} + +.statistic-toolbar .tip { + margin: 0 6px; +} + +.statistic-toolbar .query-btn:hover { + color: #ffffff +} + .delete-user-dialog .dialog-title h2 { background: none !important; padding-left: 14px; @@ -658,4 +676,20 @@ .manage-dialog .modal-footer .cancel-btn:hover { color: #3a3a3a; +} + +.calendar-prevmonth { + background: url(../images/calendar_arrows.png) no-repeat -18px -2px; +} + +.calendar-prevyear { + background: url(../images/calendar_arrows.png) no-repeat -1px -2px; +} + +.calendar-nextmonth { + background: url("../images/calendar_arrows.png") no-repeat -34px -2px; +} + +.calendar-nextyear { + background: url(../images/calendar_arrows.png) no-repeat -49px -2px; } \ No newline at end of file diff --git a/04.系统编码/App/Controllers/StatisticAnalysisController.cs b/04.系统编码/App/Controllers/StatisticAnalysisController.cs new file mode 100644 index 0000000..0c020f9 --- /dev/null +++ b/04.系统编码/App/Controllers/StatisticAnalysisController.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; + +namespace Pingchuan.BeijingSafeguard.App.Controllers +{ + public class StatisticAnalysisController : Controller + { + // GET: StatisticAnalysis + public ActionResult Index() + { + return View(); + } + } +} \ No newline at end of file diff --git a/04.系统编码/App/Views/ConfigManagement/Index.cshtml b/04.系统编码/App/Views/ConfigManagement/Index.cshtml index 891f573..e90a968 100644 --- a/04.系统编码/App/Views/ConfigManagement/Index.cshtml +++ b/04.系统编码/App/Views/ConfigManagement/Index.cshtml @@ -6,6 +6,9 @@
    +
  • + 统计分析 +
  • 用户管理
  • diff --git a/04.系统编码/App/Views/OrgManagement/Index.cshtml b/04.系统编码/App/Views/OrgManagement/Index.cshtml index e6ce645..5928b6b 100644 --- a/04.系统编码/App/Views/OrgManagement/Index.cshtml +++ b/04.系统编码/App/Views/OrgManagement/Index.cshtml @@ -6,6 +6,9 @@
      +
    • + 统计分析 +
    • 用户管理
    • diff --git a/04.系统编码/App/Views/Shared/_Layout.cshtml b/04.系统编码/App/Views/Shared/_Layout.cshtml index 06b0941..379c38e 100644 --- a/04.系统编码/App/Views/Shared/_Layout.cshtml +++ b/04.系统编码/App/Views/Shared/_Layout.cshtml @@ -38,7 +38,7 @@
    欢迎,@(ViewBag.LoginUser != null ? ViewBag.LoginUser.RealName : "未登录") - 系统管理 + 系统管理 退出
    diff --git a/04.系统编码/App/Views/StatisticAnalysis/Index.cshtml b/04.系统编码/App/Views/StatisticAnalysis/Index.cshtml new file mode 100644 index 0000000..1b553ef --- /dev/null +++ b/04.系统编码/App/Views/StatisticAnalysis/Index.cshtml @@ -0,0 +1,43 @@ + +@{ + ViewBag.Title = "系统分析"; +} + +
    +
    + +
    +
    +
    + 起止日期 +
    + +
    + +
    + +
    + +
    +
    +
    +
    +
    +
    + +@section scripts { + +} diff --git a/04.系统编码/App/Views/UserManagement/Index.cshtml b/04.系统编码/App/Views/UserManagement/Index.cshtml index 4a079f1..7ca3b6d 100644 --- a/04.系统编码/App/Views/UserManagement/Index.cshtml +++ b/04.系统编码/App/Views/UserManagement/Index.cshtml @@ -6,6 +6,9 @@
      +
    • + 统计分析 +
    • 用户管理
    • diff --git a/04.系统编码/App/bin/Pingchuan.BeijingSafeguard.App.dll b/04.系统编码/App/bin/Pingchuan.BeijingSafeguard.App.dll index d729a00..2d2b1e9 100644 Binary files a/04.系统编码/App/bin/Pingchuan.BeijingSafeguard.App.dll and b/04.系统编码/App/bin/Pingchuan.BeijingSafeguard.App.dll differ diff --git a/04.系统编码/App/bin/Pingchuan.BeijingSafeguard.App.pdb b/04.系统编码/App/bin/Pingchuan.BeijingSafeguard.App.pdb index 4ca1521..d678043 100644 Binary files a/04.系统编码/App/bin/Pingchuan.BeijingSafeguard.App.pdb and b/04.系统编码/App/bin/Pingchuan.BeijingSafeguard.App.pdb differ diff --git a/04.系统编码/App/obj/Debug/App.csproj.CoreCompileInputs.cache b/04.系统编码/App/obj/Debug/App.csproj.CoreCompileInputs.cache index 0726f01..4b2dcc1 100644 --- a/04.系统编码/App/obj/Debug/App.csproj.CoreCompileInputs.cache +++ b/04.系统编码/App/obj/Debug/App.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -bdde16ab3ba11b51894227e99d7630dc755cd8b3 +5be2802cb302f48c6e7c74de77d206b583824ff2 diff --git a/04.系统编码/App/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/04.系统编码/App/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 78608a3..a44273f 100644 Binary files a/04.系统编码/App/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/04.系统编码/App/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/04.系统编码/App/obj/Debug/Pingchuan.BeijingSafeguard.App.dll b/04.系统编码/App/obj/Debug/Pingchuan.BeijingSafeguard.App.dll index d729a00..2d2b1e9 100644 Binary files a/04.系统编码/App/obj/Debug/Pingchuan.BeijingSafeguard.App.dll and b/04.系统编码/App/obj/Debug/Pingchuan.BeijingSafeguard.App.dll differ diff --git a/04.系统编码/App/obj/Debug/Pingchuan.BeijingSafeguard.App.pdb b/04.系统编码/App/obj/Debug/Pingchuan.BeijingSafeguard.App.pdb index 4ca1521..d678043 100644 Binary files a/04.系统编码/App/obj/Debug/Pingchuan.BeijingSafeguard.App.pdb and b/04.系统编码/App/obj/Debug/Pingchuan.BeijingSafeguard.App.pdb differ