Browse Source

commit

master
hhx 3 years ago
parent
commit
e958839c6d
  1. BIN
      04.系统编码/.vs/BeijingSafeguard/v15/.suo
  2. BIN
      04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-wal
  3. 3
      04.系统编码/App/App.csproj
  4. BIN
      04.系统编码/App/Content/images/null-data.png
  5. BIN
      04.系统编码/App/Content/images/toggle-left.png
  6. BIN
      04.系统编码/App/Content/images/toggle-right.png
  7. 16
      04.系统编码/App/Content/scripts/beijing/app.js
  8. 17
      04.系统编码/App/Content/scripts/system-management/config-management/edit-line-width.js
  9. 43
      04.系统编码/App/Content/scripts/system-management/config-management/index.js
  10. 3
      04.系统编码/App/Content/scripts/system-management/org-management/add.js
  11. 16
      04.系统编码/App/Content/scripts/system-management/org-management/edit.js
  12. 23
      04.系统编码/App/Content/scripts/system-management/org-management/index.js
  13. 11
      04.系统编码/App/Content/scripts/system-management/statistic-analysis/index.js
  14. 5
      04.系统编码/App/Content/scripts/system-management/user-management/add.js
  15. 7
      04.系统编码/App/Content/scripts/system-management/user-management/edit.js
  16. 26
      04.系统编码/App/Content/scripts/system-management/user-management/index.js
  17. 29
      04.系统编码/App/Content/styles/common.css
  18. 34
      04.系统编码/App/Content/styles/index.css
  19. 2
      04.系统编码/App/Views/Beijing/Index.cshtml
  20. 2
      04.系统编码/App/Views/ConfigManagement/Index.cshtml
  21. 2
      04.系统编码/App/Views/OrgManagement/EditDialog.cshtml

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

Binary file not shown.

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

Binary file not shown.

3
04.系统编码/App/App.csproj

@ -191,12 +191,15 @@
<Content Include="Content\images\map.jpg" />
<Content Include="Content\images\nav-bg-last.png" />
<Content Include="Content\images\nav-bg.png" />
<Content Include="Content\images\null-data.png" />
<Content Include="Content\images\quit-hover.png" />
<Content Include="Content\images\quit.png" />
<Content Include="Content\images\refresh-btn.png" />
<Content Include="Content\images\sure-btn.png" />
<Content Include="Content\images\TianAnMen.png" />
<Content Include="Content\images\time-icon.png" />
<Content Include="Content\images\toggle-left.png" />
<Content Include="Content\images\toggle-right.png" />
<Content Include="Content\images\user-icon.png" />
<Content Include="Content\scripts\config.js" />
<Content Include="Content\scripts\menggu\app.js" />

BIN
04.系统编码/App/Content/images/null-data.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
04.系统编码/App/Content/images/toggle-left.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
04.系统编码/App/Content/images/toggle-right.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

16
04.系统编码/App/Content/scripts/beijing/app.js

@ -2,6 +2,7 @@
this.Map = new Map(this);
this.RealtimePanel = new RealtimePanel(this);
this.HistoryPanel = new HistoryPanel(this);
this.IsShrink = false;
this.Startup = function () {
moment.locale();
@ -14,6 +15,7 @@
window.onresize = this.Relayout.bind(this);
$('#real-time').on('click', this.OnRealtimeTabClick.bind(this));
$('#history-time').on('click', this.OnHistoryTabClick.bind(this));
$('#shrink').on('click', this.OnShrinkClick.bind(this));
};
this.Relayout = function () {
@ -51,6 +53,20 @@
this.HideDialog = function () {
$('.dialog').hide();
};
this.OnShrinkClick = function () {
var width = $(window).width();
this.IsShrink = !this.IsShrink;
if (this.IsShrink) {
$('.main').width(width);
$('.shrink').addClass('shrink-toggle');
$('.right').addClass('right-toggle');
} else {
$('.main').width(width - 280);
$('.shrink').removeClass('shrink-toggle');
$('.right').removeClass('right-toggle');
}
}
};
$(document).ready(function () {

17
04.系统编码/App/Content/scripts/system-management/config-management/edit-line-width.js

@ -1,6 +1,7 @@
var EditLineWidth = function (parent) {
this.Parent = parent;
this.Dialog = $('#edit-line-width-dialog');
this.Config = {};
this.Setup = function () {
$("#width-sure-btn").on("click", this.OnSureButtonClick.bind(this));
@ -10,13 +11,29 @@
this.Show = function (data) {
this.Dialog.show();
console.log(data)
this.Config = data;
$("#width").textbox('setValue', data.Value);
};
this.OnSureButtonClick = function () {
this.Config.Value = $('#width').textbox('getValue');
this.UpdateLineWidth();
this.Dialog.hide();
};
this.UpdateLineWidth = function () {
$.ajax({
type: "POST",
dataType: 'text',
url: '/ConfigManagement/Update',
data: this.User,
success: function () {
this.Parent.ReLoadTableData();
}.bind(this)
});
};
this.HideDialog = function () {
this.Dialog.hide();
};

43
04.系统编码/App/Content/scripts/system-management/config-management/index.js

@ -1,11 +1,12 @@
var App = function () {
this.data = {
"total": 20,
"rows": [{ Id: 1, Name: '线条宽度', Value: "2", Unit: '像素' },
{ Id: 2, Name: '线条颜色', Value: "#ff0000", Unit: '-' },
{ Id: 3, Name: '定位图标', Value: "", Unit: '-' }]
};
//this.data = {
// "total": 20,
// "rows": [{ Id: 1, Name: '线条宽度', Value: "2", Unit: '像素' },
// { Id: 2, Name: '线条颜色', Value: "#ff0000", Unit: '-' },
// { Id: 3, Name: '定位图标', Value: "", Unit: '-' }]
//};
this.data = {};
this.selectedRow = [];
this.EditLineWidth = new EditLineWidth(this);
this.EditLineColor = new EditLineColor(this);
@ -38,9 +39,10 @@
this.InitDataGrid = function () {
$('#task-grid').datagrid({
columns: [[
{ field: 'Name', title: '名称', align: 'center', width: 10, formatter: this.formatIcon.bind(this) },
{ field: 'Value', title: '值', align: 'center', width: 10, formatter: this.formatIcon.bind(this) },
{ field: 'Unit', title: '单位', align: 'left', width: 70, formatter: this.formatIcon.bind(this) }
{ field: 'Id', title: '名称', align: 'center', width: 10 },
{ field: 'Value', title: '值', align: 'center', width: 10 },
{ field: 'Unit', title: '单位', align: 'center', width: 10, formatter: this.formatUnit.bind(this) },
{ field: 'Description', title: '描述', align: 'left', width: 60, formatter: this.formatDescription.bind(this) }
]],
striped: true,
singleSelect: false,
@ -59,17 +61,24 @@
url: '/ConfigManagement/Query',
data: {
pageIndex: 1,
pageSize: 100
pageSize: 1000
},
success: function (result) {
console.log(result)
$('#task-grid').datagrid('loadData', JSON.parse(result));
console.log(JSON.parse(result));
var value = JSON.parse(result);
this.data['total'] = value.length;
this.data['rows'] = value;
$('#task-grid').datagrid('loadData', this.data);
}.bind(this)
});
};
this.formatIcon = function (value) {
return value === "" ? '<img src="../Content/images/locate.png" />' : value;
this.formatUnit = function (value) {
return value === "像素" ? value : '-';
};
this.formatDescription = function (value) {
return '<span>{0}</span>'.format(value);
};
this.OnTaskSelected = function (index, row) {
@ -86,11 +95,11 @@
};
this.onEditButtonClick = function () {
if (this.selectedRow.Name === '线条宽度')
if (this.selectedRow.Id === 'line-width')
this.EditLineWidth.Show(this.selectedRow);
else if (this.selectedRow.Name === '线条颜色')
else if (this.selectedRow.Id === 'line-color')
this.EditLineColor.Show(this.selectedRow);
else if (this.selectedRow.Name === '定位图标')
else if (this.selectedRow.Id === 'marker-icon')
this.EditLocateIcon.Show(this.selectedRow);
};

3
04.系统编码/App/Content/scripts/system-management/org-management/add.js

@ -12,8 +12,8 @@
};
this.OnSureButtonClick = function () {
this.HideDialog();
this.AddOrg();
this.HideDialog();
};
this.AddOrg = function () {
@ -32,6 +32,7 @@
this.HideDialog = function () {
$('#add-dialog').hide();
this.clearInput();
};
this.clearInput = function () {

16
04.系统编码/App/Content/scripts/system-management/org-management/edit.js

@ -1,5 +1,6 @@
var EditDialog = function (parent) {
this.Parent = parent;
this.Org = {};
this.Setup = function () {
$("#edit-sure-btn").on("click", this.OnSureButtonClick.bind(this));
@ -8,13 +9,17 @@
};
this.Show = function (data) {
this.Org = data;
$('#edit-dialog').show();
$("#username").textbox('setValue', data.Name);
$("#org-name").textbox('setValue', data.Name);
};
this.OnSureButtonClick = function () {
this.HideDialog();
this.Org.Name = $('#org-name').textbox('getValue');
this.EditOrg();
this.HideDialog();
};
this.EditOrg = function () {
@ -22,9 +27,7 @@
type: "POST",
dataType: 'text',
url: '/OrgManagement/Update',
data: {
},
data: this.Org,
success: function () {
this.Parent.ReLoadTableData();
}.bind(this)
@ -33,9 +36,10 @@
this.HideDialog = function () {
$('#edit-dialog').hide();
this.clearInput();
};
this.clearInput = function () {
$("#username").textbox('setValue', '');
$("#org-name").textbox('setValue', '');
};
};

23
04.系统编码/App/Content/scripts/system-management/org-management/index.js

@ -50,6 +50,13 @@
onSelect: this.OnTaskSelected.bind(this),
onUnselect: this.OnTaskUnselected.bind(this),
onBeforeLoad: this.OnTableGridBeforeLoad.bind(this),
onLoadSuccess: function (data) {
if (data.total === 0) {
var body = $(this).data().datagrid.dc.body2;
body.addClass('null-data-body');
body.append('<div class="null-data"><span></span><p>暂无数据</p></div>');
}
}
});
};
@ -63,7 +70,6 @@
pageSize: 30
},
success: function (result) {
console.log(JSON.parse(result))
$('#task-grid').datagrid('loadData', JSON.parse(result));
}.bind(this)
});
@ -86,10 +92,7 @@
};
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.DisabledEvent();
};
this.OnTableGridBeforeLoad = function () {
@ -116,8 +119,9 @@
};
this.OnSureOfDeleteButtonClick = function () {
this.CloseDeleteDialog();
this.DeleteOrg();
this.CloseDeleteDialog();
this.DisabledEvent();
};
this.CloseDeleteDialog = function () {
@ -137,6 +141,13 @@
}.bind(this)
});
};
this.DisabledEvent = function () {
$('#edit-btn').prop('disabled', true);
$('#delete-btn').prop('disabled', true);
$('#enable-btn').prop('disabled', true);
$('#disable-btn').prop('disabled', true);
};
};
$(document).ready(function () {

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

@ -47,8 +47,8 @@
this.InitDate = function () {
$('#from-date').datetimebox({
panelWidth: 190,
panelAlign: 'right',
panelWidth: 200,
panelHeight: 230,
showSeconds: true,
currentText: '现在',
@ -103,7 +103,14 @@
pageList: [10, 20, 30],
onSelect: this.OnTaskSelected.bind(this),
onUnselect: this.OnTaskUnselected.bind(this),
onBeforeLoad: this.OnTableGridBeforeLoad.bind(this)
onBeforeLoad: this.OnTableGridBeforeLoad.bind(this),
onLoadSuccess: function (data) {
if (data.total === 0) {
var body = $(this).data().datagrid.dc.body2;
body.addClass('null-data-body');
body.append('<div class="null-data"><span></span><p>暂无数据</p></div>');
}
}
});
};

5
04.系统编码/App/Content/scripts/system-management/user-management/add.js

@ -29,6 +29,7 @@
valueField: 'Id',
textField: 'Name',
editable: false,
panelHeight: 'auto',
data: JSON.parse(result).rows
});
}.bind(this)
@ -58,7 +59,8 @@
url: '/UserManagement/Add',
data: this.getUserParams(),
success: function () {
this.Parent.ReLoadTableData();
this.Parent.ReLoadTableData(0);
$('#org-list').combobox('setValue', 0);
}.bind(this)
});
};
@ -68,6 +70,7 @@
$('#loginAccount').textbox('setValue', '');
$('#loginPassword').textbox('setValue', '');
$('#add-dialog-sex-select span').eq(0).addClass("active");
$('#add-dialog-sex-select span').eq(1).removeClass('active');
$('#add-dialog-org-list').combobox('setValue', '');
};

7
04.系统编码/App/Content/scripts/system-management/user-management/edit.js

@ -3,8 +3,6 @@
this.User = {};
this.Setup = function () {
this.InitOrgList();
$("#sex span").on("click", this.OnSexButtonClick.bind(this));
$("#edit-sure-btn").on("click", this.OnSureButtonClick.bind(this));
$("#edit-cancel-btn").on("click", this.HideDialog.bind(this));
@ -13,6 +11,7 @@
this.Show = function (data) {
this.User = data;
this.InitOrgList();
$('#edit-dialog').show();
$("#username").textbox('setValue', data.RealName);
$("#account").textbox('setValue', data.LoginName);
@ -31,10 +30,12 @@
pageSize: 10000
},
success: function (result) {
console.log(this.User.OrgId)
$('#edit-dialog-org-list').combobox({
valueField: 'Id',
textField: 'Name',
editable: false,
panelHeight: 'auto',
data: JSON.parse(result).rows
});
@ -72,7 +73,7 @@
url: '/UserManagement/Update',
data: this.User,
success: function () {
this.Parent.ReLoadTableData();
this.Parent.ReLoadTableData($('#org-list').combobox('getValue'));
}.bind(this)
});
};

26
04.系统编码/App/Content/scripts/system-management/user-management/index.js

@ -81,7 +81,14 @@
pageList: [30, 40, 50],
onSelect: this.OnTaskSelected.bind(this),
onUnselect: this.OnTaskUnselected.bind(this),
onBeforeLoad: this.OnTableGridBeforeLoad.bind(this)
onBeforeLoad: this.OnTableGridBeforeLoad.bind(this),
onLoadSuccess: function (data) {
if (data.total === 0) {
var body = $(this).data().datagrid.dc.body2;
body.addClass('null-data-body');
body.append('<div class="null-data"><span></span><p>暂无数据</p></div>');
}
}
});
};
@ -123,10 +130,7 @@
};
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.DisabledEvent();
};
this.OnTableGridBeforeLoad = function () {
@ -153,8 +157,9 @@
};
this.OnSureOfDeleteButtonClick = function () {
this.CloseDeleteDialog();
this.DeleteUser();
this.CloseDeleteDialog();
this.DisabledEvent();
};
this.CloseDeleteDialog = function () {
@ -170,10 +175,17 @@
id: this.selectedRow.Id
},
success: function () {
this.ReLoadTableData();
this.ReLoadTableData($('#org-list').combobox('getValue'));
}.bind(this)
});
};
this.DisabledEvent = function () {
$('#edit-btn').prop('disabled', true);
$('#delete-btn').prop('disabled', true);
$('#enable-btn').prop('disabled', true);
$('#disable-btn').prop('disabled', true);
};
};
$(document).ready(function () {

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

@ -234,6 +234,11 @@
left: 180px;
}
.config-table .datagrid-header td:last-of-type .datagrid-cell:after,
.config-table .datagrid-body .datagrid-row td:last-of-type .datagrid-cell:after {
left: 200px;
}
.manage-table .datagrid-body .datagrid-row:last-of-type td {
border-bottom: 1px solid #dddddd;
}
@ -437,6 +442,10 @@
justify-content: flex-end;
}
.statistic-toolbar .easyui-datetimebox {
width: 170px;
}
.statistic-toolbar .query-btn,
.user-toolbar .query-btn{
height: 28px;
@ -741,4 +750,24 @@
.calendar-nextyear {
background: url(../images/calendar_arrows.png) no-repeat -49px -2px;
}
.null-data-body {
position: relative;
}
.null-data-body .null-data {
width: 128px;
position: absolute;
top: 50%;
left: 50%;
text-align: center;
transform: translate(-50%, -50%);
}
.null-data-body .null-data span {
width: 128px;
height: 128px;
display: block;
background: url("../images/null-data.png") no-repeat;
}

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

@ -1,7 +1,8 @@
.main{
.main {
overflow: hidden;
position: relative;
background: #f0f1f3;
transition: all 0.5s;
}
.map{
@ -92,9 +93,10 @@
top: 58px;
right: 0;
z-index: 999;
-moz-box-shadow: 0 2px 5px rgba(0,0,0,0.3);
-webkit-box-shadow: 0 2px 5px rgba(0,0,0,0.3);
box-shadow: 0 2px 5px rgba(0,0,0,0.3);
-moz-box-shadow: 0 2px 5px rgba(0,0,0,0.23);
-webkit-box-shadow: 0 2px 5px rgba(0,0,0,0.23);
box-shadow: 0 2px 5px rgba(0,0,0,0.23);
transition: all 0.5s;
background: #f9f9f9;
}
@ -139,6 +141,11 @@
background: url(../images/bg-current.png) no-repeat center/cover;
}
.right-toggle {
right: -286px;
transition: all 0.5s;
}
.title {
position: relative;
padding-left: 10px;
@ -1089,4 +1096,23 @@
font-weight: bold;
border-radius: 3px;
background: #ee5067;
}
.shrink {
width: 16px;
height: 60px;
margin-top: -30px;
position: absolute;
top: 50%;
right: 286px;
z-index: 1000;
cursor: pointer;
transition: all 0.5s;
background: url("../images/toggle-right.png") no-repeat;
}
.shrink-toggle {
right: 0;
transition: all 0.5s;
background: url("../images/toggle-left.png") no-repeat;
}

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

@ -35,6 +35,8 @@
</div>
</div>
<div class="shrink" id="shrink"></div>
<div class="bg"></div>
<div class="dialog dialog-manage">

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

@ -26,7 +26,7 @@
<button type="button" class="btn edit-btn" id="edit-btn" disabled>编辑...</button>
</div>
</div>
<div class="table manage-table">
<div class="table manage-table config-table">
<table id="task-grid"></table>
</div>
</div>

2
04.系统编码/App/Views/OrgManagement/EditDialog.cshtml

@ -11,7 +11,7 @@
<div class="row">
<div class="col single-col">
<label>机构名称&nbsp;<span class="star">*</span></label>
<input type="text" id="username" class="easyui-textbox" prompt="请输入机构名称" />
<input type="text" id="org-name" class="easyui-textbox" prompt="请输入机构名称" />
</div>
</div>
</div>

Loading…
Cancel
Save