Browse Source

commit

master
hhx 3 years ago
parent
commit
a5186fa739
  1. 3
      04.系统编码/App/Content/scripts/beijing/app.js
  2. 2
      04.系统编码/App/Content/scripts/beijing/info-point.js
  3. 2
      04.系统编码/App/Content/scripts/beijing/lat-lng-switch.js
  4. 14
      04.系统编码/App/Content/scripts/beijing/map.js
  5. 38
      04.系统编码/App/Content/scripts/beijing/realtime-panel.js
  6. 2
      04.系统编码/App/Content/scripts/beijing/select-point.js
  7. 5
      04.系统编码/App/Content/scripts/menggu/app.js
  8. 16
      04.系统编码/App/Content/scripts/menggu/map.js
  9. 40
      04.系统编码/App/Content/scripts/menggu/realtime-panel.js
  10. 17
      04.系统编码/App/Content/scripts/system-management/config-management/index.js
  11. 9
      04.系统编码/App/Content/scripts/system-management/org-management/index.js
  12. 303
      04.系统编码/App/Content/scripts/system-management/statistic-analysis/index.js
  13. 4
      04.系统编码/App/Content/scripts/system-management/user-management/edit.js
  14. 10
      04.系统编码/App/Content/scripts/system-management/user-management/index.js
  15. 7
      04.系统编码/App/Content/scripts/tiananmen/app.js
  16. 4
      04.系统编码/App/Content/scripts/tiananmen/map.js
  17. 22
      04.系统编码/App/Content/styles/common.css
  18. 15
      04.系统编码/App/Content/styles/index.css
  19. 2
      04.系统编码/App/Views/Beijing/Controls/RealtimeTabPage.cshtml
  20. 14
      04.系统编码/App/Views/Beijing/Index.cshtml
  21. 16
      04.系统编码/App/Views/Menggu/Controls/RealtimeTabPage.cshtml
  22. 14
      04.系统编码/App/Views/Menggu/Index.cshtml
  23. 8
      04.系统编码/App/Views/StatisticAnalysis/Index.cshtml

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

@ -24,7 +24,7 @@
var width = $(window).width();
var height = $(window).height();
$('.main').width(width - 286);
$('.main').width(width - (this.IsShrink ? 0 : 286));
$('.main').height(height - 54);
$('.right').height(height - 54);
@ -80,6 +80,7 @@
$('.real-btn').removeClass('real-btn-toggle');
$('.shadow').removeClass('shadow-toggle');
}
this.Map.CenterMap(39.90, 116.40);
};
};

2
04.系统编码/App/Content/scripts/beijing/info-point.js

@ -18,7 +18,7 @@
this.HideDialog = function () {
$('#dialog-info-point').hide();
$('#map').css('cursor', 'grab');
$('#map').css('cursor', '-webkit-grab');
this.Parent.isMark = false;
};

2
04.系统编码/App/Content/scripts/beijing/lat-lng-switch.js

@ -97,7 +97,6 @@
this.onSecondSwitchClick = function () {
var decimal = $('#second-decimal').val();
$('#second-decimal').removeClass('error');
console.log(decimal.length)
if (decimal.trim() === '' || Number(decimal) > 180 || Number(decimal) < 0) {
this.showError($('#second-decimal'));
@ -152,6 +151,7 @@
this.HideDialog = function () {
$('#dialog-lat-lng-switch').hide();
$('#map').css('cursor', '-webkit-grab');
this.Parent.isSwitch = false;
};

14
04.系统编码/App/Content/scripts/beijing/map.js

@ -61,13 +61,13 @@ var Map = function (parent) {
this.lineColor = null;
this.lineWidth = null;
this.currentButton = {
cursorSelected: true,
markSelected: true,
drawLineSelected: true,
clearSelected: true,
tagSelected: true,
switchSelected: true,
exportSelected: true
cursorSelected: false,
markSelected: false,
drawLineSelected: false,
clearSelected: false,
tagSelected: false,
switchSelected: false,
exportSelected: false
};
this.ForecastPoints = null;

38
04.系统编码/App/Content/scripts/beijing/realtime-panel.js

@ -15,6 +15,7 @@
this.Startup = function () {
this.ResultList.Startup();
this.InitReleaseTime();
this.InputChange();
this.OnFileOnchange('#param-upload');
this.OnFileOnchange('#file-input');
@ -309,7 +310,7 @@
this.getLngLatDegree = function (degree, minute, second) {
var str = parseFloat(minute) + parseFloat(second / 60);
var value = parseFloat(str / 60) + parseFloat(degree);
return value;
return value.toFixed(6);
};
this.getLngLatDecimal = function (value) {
@ -452,11 +453,46 @@
$('#lat-decimal').show();
$('#lng-degrees').hide();
$('#lat-degrees').hide();
$('.degree-text').hide();
} else {
$('#lng-decimal').hide();
$('#lat-decimal').hide();
$('#lng-degrees').show();
$('#lat-degrees').show();
$('.degree-text').show();
}
};
this.InputChange = function () {
$('#lng-degree').on('change', this.checkInput.bind(this, $('#lng-minute'), $('#lng-second'), 180));
$('#lng-minute').on('change', this.checkInput.bind(this, $('#lng-degree'), $('#lng-second'), 60));
$('#lng-second').on('change', this.checkInput.bind(this, $('#lng-degree'), $('#lng-minute'), 60));
$('#lat-degree').on('change', this.checkInput.bind(this, $('#lat-minute'), $('#lng-second'), 180));
$('#lat-minute').on('change', this.checkInput.bind(this, $('#lat-degree'), $('#lng-second'), 60));
$('#lat-second').on('change', this.checkInput.bind(this, $('#lat-degree'), $('#lng-minute'), 60));
};
this.checkInput = function (value1, value2, maxNumber, event) {
$('#lng-degree-text').text('');
$('#lng-degree-text').removeClass('degree-text-error');
if ($(event.target).val().trim() === '' || value1.val().trim() === '' || value2.val().trim() === '' || $(event.target).val() > maxNumber || $(event.target).val() < 0) {
$('#lng-degree-text').text('请输入正确的值。');
$('#lng-degree-text').addClass('degree-text-error');
return;
}
if ($(event.target).attr('id') === 'lng-degree')
$('#lng-degree-text').text(this.getLngLatDegree($(event.target).val(), value1.val(), value2.val()));
else if ($(event.target).attr('id') === 'lng-minute')
$('#lng-degree-text').text(this.getLngLatDegree(value1.val(), $(event.target).val(), value2.val()));
else if ($(event.target).attr('id') === 'lng-second')
$('#lng-degree-text').text(this.getLngLatDegree(value1.val(), value2.val(), $(event.target).val()));
else if ($(event.target).attr('id') === 'lat-degree')
$('#lng-degree-text').text(this.getLngLatDegree($(event.target).val(), value1.val(), value2.val()));
else if ($(event.target).attr('id') === 'lat-minute')
$('#lng-degree-text').text(this.getLngLatDegree(value1.val(), $(event.target).val(), value2.val()));
else if ($(event.target).attr('id') === 'lat-second')
$('#lng-degree-text').text(this.getLngLatDegree(value1.val(), value2.val(), $(event.target).val()));
}
};

2
04.系统编码/App/Content/scripts/beijing/select-point.js

@ -16,7 +16,7 @@
this.HideDialog = function () {
$('#dialog-select-point').hide();
$('#map').css('cursor', 'grab');
$('#map').css('cursor', '-webkit-grab');
this.Parent.isSelected = false;
};

5
04.系统编码/App/Content/scripts/menggu/app.js

@ -22,7 +22,7 @@
var width = $(window).width();
var height = $(window).height();
$('.main').width(width - 280);
$('.main').width(width - (this.IsShrink ? 0 : 286));
$('.main').height(height - 54);
$('.right').height(height - 54);
@ -72,12 +72,13 @@
$('.real-btn').addClass('real-btn-toggle');
$('.shadow').addClass('shadow-toggle');
} else {
$('.main').width(width - 280);
$('.main').width(width - 286);
$('.shrink').removeClass('shrink-toggle');
$('.right').removeClass('right-toggle');
$('.real-btn').removeClass('real-btn-toggle');
$('.shadow').removeClass('shadow-toggle');
}
this.Map.CenterMap(40.854662, 111.746303, 7);
}
};

16
04.系统编码/App/Content/scripts/menggu/map.js

@ -29,12 +29,12 @@ var Map = function (parent) {
this.lineColor = null;
this.lineWidth = null;
this.currentButton = {
cursorSelected: true,
markSelected: true,
drawLineSelected: true,
clearSelected: true,
tagSelected: true,
exportSelected: true
cursorSelected: false,
markSelected: false,
drawLineSelected: false,
clearSelected: false,
tagSelected: false,
exportSelected: false
};
this.InfoPoint = new InfoPoint(this);
@ -78,8 +78,8 @@ var Map = function (parent) {
this.map.on('mousemove', this.OnMapMove.bind(this));
};
this.CenterMap = function (lat, lng) {
this.map.setView([lat, lng], 11);
this.CenterMap = function (lat, lng, zoom) {
this.map.setView([lat, lng], zoom);
};
this.OnMapMove = function (e) {

40
04.系统编码/App/Content/scripts/menggu/realtime-panel.js

@ -8,6 +8,7 @@
this.Startup = function () {
this.ResultList.Startup();
this.InitReleaseTime();
this.InputChange();
$('#calc-btn').on('click', this.OnCalcButtonClick.bind(this));
$('#reset-btn').on('click', this.OnResetButtonClick.bind(this));
@ -236,7 +237,7 @@
this.TaskInfo.Id = taskId;
this.TaskInfo.Result = result;
this.Parent.Map.CenterMap(lat, lon);
this.Parent.Map.CenterMap(lat, lon, 11);
this.AddTask(this.TaskInfo.Id);
this.LoadData(result);
}.bind(this)
@ -291,7 +292,7 @@
this.getLngLat = function (degree, minute, second) {
var str = parseFloat(minute) + parseFloat(second / 60);
var value = parseFloat(str / 60) + parseFloat(degree);
return value;
return value.toFixed(6);
};
this.OnTypeSelectClick = function (event) {
@ -303,11 +304,46 @@
$('#lat-decimal').show();
$('#lng-degrees').hide();
$('#lat-degrees').hide();
$('.degree-text').hide();
} else {
$('#lng-decimal').hide();
$('#lat-decimal').hide();
$('#lng-degrees').show();
$('#lat-degrees').show();
$('.degree-text').show();
}
};
this.InputChange = function () {
$('#lng-degree').on('change', this.checkInput.bind(this, $('#lng-minute'), $('#lng-second'), 180));
$('#lng-minute').on('change', this.checkInput.bind(this, $('#lng-degree'), $('#lng-second'), 60));
$('#lng-second').on('change', this.checkInput.bind(this, $('#lng-degree'), $('#lng-minute'), 60));
$('#lat-degree').on('change', this.checkInput.bind(this, $('#lat-minute'), $('#lng-second'), 180));
$('#lat-minute').on('change', this.checkInput.bind(this, $('#lat-degree'), $('#lng-second'), 60));
$('#lat-second').on('change', this.checkInput.bind(this, $('#lat-degree'), $('#lng-minute'), 60));
};
this.checkInput = function (value1, value2, maxNumber, event) {
$('#lng-degree-text').text('');
$('#lng-degree-text').removeClass('degree-text-error');
if ($(event.target).val().trim() === '' || value1.val().trim() === '' || value2.val().trim() === '' || $(event.target).val() > maxNumber || $(event.target).val() < 0) {
$('#lng-degree-text').text('请输入正确的值。');
$('#lng-degree-text').addClass('degree-text-error');
return;
}
if ($(event.target).attr('id') === 'lng-degree')
$('#lng-degree-text').text(this.getLngLat($(event.target).val(), value1.val(), value2.val()));
else if ($(event.target).attr('id') === 'lng-minute')
$('#lng-degree-text').text(this.getLngLat(value1.val(), $(event.target).val(), value2.val()));
else if ($(event.target).attr('id') === 'lng-second')
$('#lng-degree-text').text(this.getLngLat(value1.val(), value2.val(), $(event.target).val()));
else if ($(event.target).attr('id') === 'lat-degree')
$('#lng-degree-text').text(this.getLngLat($(event.target).val(), value1.val(), value2.val()));
else if ($(event.target).attr('id') === 'lat-minute')
$('#lng-degree-text').text(this.getLngLat(value1.val(), $(event.target).val(), value2.val()));
else if ($(event.target).attr('id') === 'lat-second')
$('#lng-degree-text').text(this.getLngLat(value1.val(), value2.val(), $(event.target).val()));
}
};

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

@ -8,6 +8,7 @@
this.Startup = function () {
$('#manage').addClass('active');
this.RedirectPage();
this.ReLayout();
this.InitDataGrid();
this.ReLoadTableData();
@ -21,6 +22,14 @@
window.onresize = this.ReLayout.bind(this);
};
this.RedirectPage = function () {
var user = document.getElementById('user-info');
if (user.getAttribute('class') === 'user-login')
window.location.href = '/User/Login';
else
return;
};
this.ReLayout = function () {
var width = $(window).width();
var height = $(window).height();
@ -30,6 +39,14 @@
this.formatLastColumn();
};
this.RedirectPage = function () {
var user = document.getElementById('user-info');
if (user.getAttribute('class') === 'user-login')
window.location.href = '/User/Login';
else
return;
};
this.InitDataGrid = function () {
$('#task-grid').datagrid({
columns: [[

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

@ -7,6 +7,7 @@
this.Startup = function () {
$('#manage').addClass('active');
this.RedirectPage();
this.ReLayout();
this.InitDataGrid();
this.ReLoadTableData();
@ -24,6 +25,14 @@
window.onresize = this.ReLayout.bind(this);
};
this.RedirectPage = function () {
var user = document.getElementById('user-info');
if (user.getAttribute('class') === 'user-login')
window.location.href = '/User/Login';
else
return;
};
this.ReLayout = function () {
var width = $(window).width();
var height = $(window).height();

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

@ -5,6 +5,7 @@
this.Startup = function () {
$('#manage').addClass('active');
this.RedirectPage();
this.ReLayout();
this.InitDate();
@ -15,13 +16,20 @@
window.onresize = this.ReLayout.bind(this);
};
this.RedirectPage = function () {
var user = document.getElementById('user-info');
if (user.getAttribute('class') === 'user-login')
window.location.href = '/User/Login';
else
return;
};
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.formatLastColumn();
};
this.OnStatisticTypeClick = function (event) {
@ -30,7 +38,6 @@
};
this.OnQueryButtonClick = function () {
//this.ReLoadTableData();
this.ReloadChartData();
};
@ -41,12 +48,16 @@
url: '/StatisticAnalysis/Query',
data: this.GetParams(),
success: function (result) {
console.log(JSON.parse(result).rows)
var rows = JSON.parse(result).rows;
var type = this.GetParams().typeCode === 'user' ? 'column' : 'spline';
var name = this.GetParams().typeCode === 'user' ? '根据用户' : '根据机构';
var xAxises = this.GetSeries(JSON.parse(result).rows).xAxises;
var values = this.GetSeries(JSON.parse(result).rows).series;
var xAxises = this.GetSeries(rows, name).xAxises;
var values = this.GetSeries(rows, name).series;
var pieData = this.GetSeries(rows, name).pieData;
var series = this.GetElementSerie(type, name, values);
this.InitChart(series, xAxises, JSON.parse(result).rows);
this.InitChart(series, xAxises, rows, name);
this.InitPieChart(pieData, name);
}.bind(this)
});
};
@ -55,33 +66,59 @@
return {
type: type,
name: name,
data: values,
pointWidth: 30
data: values
};
};
this.GetSeries = function (result) {
this.GetSeries = function (result, name) {
var series = [];
var xAxises = [];
var count = [];
var pieData = [];
result.forEach(function (item, index) {
var time = moment(item.LastComputeTime).format("YYYY-MM-DD");
xAxises.push(time);
count.push(item.ComputeCount);
}.bind(this));
result.forEach(function (item, index) {
var sum = count.reduce(function (prev, next) {
return prev + next;
});
xAxises.push(name === '根据用户' ? item.UserName : item.OrgName);
series.push(item.ComputeCount);
});
pieData.push({
name: name === '根据用户' ? item.UserName : item.OrgName,
y: this.formatDecimal(String(item.ComputeCount / sum) / 100) * 100
})
}.bind(this))
return {
series: series,
xAxises: xAxises
xAxises: xAxises,
pieData: pieData
};
};
this.InitChart = function (series, xAxises, values) {
this.formatDecimal = function (value) {
console.log(value)
value = value.toString()
let index = value.indexOf('.')
if (index !== -1) {
value = value.substring(0, 5 + index + 1)
} else {
value = value.substring(0)
}
return parseFloat(value).toFixed(5)
};
this.InitChart = function (series, xAxises, values, name) {
Highcharts.chart('chart', {
chart: {
backgroundColor: '#002145'
backgroundColor: '#052a50'
},
title: {
text: this.GetParams().fromTime + ' 至 ' + this.GetParams().toTime,
text: moment(this.GetParams().fromTime).format('YYYY年MM月DD日') + ' 至 ' + moment(this.GetParams().toTime).format('YYYY年MM月DD日') + name.slice(2) + '计算次数',
style: {
color: '#ffffff',
fontFamily: '微软雅黑'
@ -91,6 +128,7 @@
text: '计算次数',
style: {
color: '#ffffff',
fontSize: '14px',
fontFamily: '微软雅黑'
},
verticalAlign: 'top',
@ -106,10 +144,12 @@
labels: {
style: {
color: '#ffffff',
fontSize: '14px',
fontFamily: '微软雅黑'
},
},
lineColor: '#234979'
lineColor: '#234979',
crosshair: true
},
yAxis: {
title: {
@ -118,48 +158,69 @@
labels: {
style: {
color: '#ffffff',
fontSize: '14px',
fontFamily: '微软雅黑'
},
},
gridLineColor: '#234979'
},
tooltip: {
useHTML: true,
crosshair: true,
backgroundColor: '#002145',
shadow: true,
style: {
color: '#ffffff',
fontSize: '14px',
fontFamily: '微软雅黑'
},
formatter: function () {
return '<b>' + this.x + '</b>' + '<br/>' +
return '<b style="margin-bottom: 5px">' + this.x + '</b>' + '<br/>' +
'计算次数:' + '<b>' + this.y + '</b>' + '次' + '<br/>' +
'计算用户:' + app.GetNames(values, this.x);
'最后计算时间:' + app.GetNames(values, this.x, name);
}
},
legend: {
itemStyle: {
color: '#ffffff',
fontSize: '14px',
fontFamily: '微软雅黑'
},
itemHoverStyle: {
color: '#ffffff',
fontSize: '14px',
fontFamily: '微软雅黑'
}
},
plotOptions: {
column: {
pointWidth: 30,
borderRadius: 3,
borderColor: ''
},
series: {
color: {
linearGradient: {
x1: 0,
y1: 0,
x2: 0,
y2: 1
},
stops: [
[0, '#266cb9'],
[1, '#00d5f6']
]
}
}
},
series: [series]
});
};
this.GetNames = function (values, time) {
var names = [];
var result = values.filter(function (item) {
return moment(item.LastComputeTime).format("YYYY-MM-DD") === time;
});
result.forEach(function (item, index) {
names.push(item.UserName);
});
return names.join('、');
this.GetNames = function (values, name, type) {
var time = values.find(function (item) {
return (type === '根据用户' ? item.UserName : item.OrgName) === name;
}).LastComputeTime;
return moment(time).format('YYYY-MM-DD');
};
this.ReLoadTableData = function () {
@ -174,6 +235,81 @@
});
};
this.InitPieChart = function (series, name) {
var firstColors = ['#00d5f6', '#dc9884', '#8c83dc', '#e4e189', '#97e6af', '#7aa9da', '#b7d2ff', '#88f187', '#e3ea79', '#e29f6f'];
var lastColors = ['#266cb9', '#bd3d17', '#3324a9', '#b3ae15', '#229625', '#1538e4', '#b7d2ff', '#3ac720', '#cad619', '#d2691f'];
var chart = Highcharts.chart('pie-chart', {
chart: {
backgroundColor: '#052a50',
type: 'pie'
},
title: {
text: moment(this.GetParams().fromTime).format('YYYY年MM月DD日') + ' 至 ' + moment(this.GetParams().toTime).format('YYYY年MM月DD日') + name.slice(2) + '统计占比',
style: {
color: '#ffffff',
fontFamily: '微软雅黑'
}
},
credits: {
enabled: false
},
tooltip: {
headerFormat: '<b>{point.key}</b></br>',
pointFormat: '{series.name}: <b>{point.percentage:.2f}%</b>',
useHTML: true,
crosshair: true,
backgroundColor: '#002145',
style: {
color: '#ffffff',
fontSize: '14px',
fontFamily: '微软雅黑'
}
},
legend: {
itemStyle: {
color: '#ffffff',
fontFamily: '微软雅黑'
},
itemHoverStyle: {
color: '#ffffff',
fontSize: '14px',
fontFamily: '微软雅黑'
}
},
plotOptions: {
pie: {
allowPointSelect: true,
borderWidth: 0,
cursor: 'pointer',
dataLabels: {
enabled: false
},
showInLegend: true
}
},
series: [{
name: name + '占比',
data: series
}]
},function (chart) {
SetGradientColor(chart);
});
function SetGradientColor(chart) {
var pointsList = chart.series[0].points;
for (var i = 0; i < pointsList.length; i++) {
chart.series[0].points[i].update({
color: {
linearGradient: { x1: 0, y1: 1, x2: 0, y2: 0 }, //横向渐变效果 如果将x2和y2值交换将会变成纵向渐变效果
stops: [
[0, Highcharts.Color(firstColors[i]).setOpacity(1).get('rgba')],
[1, lastColors[i]]
]
}
});
}
}
};
this.InitDate = function () {
$('#from-date').datebox({
panelAlign: 'right',
@ -214,91 +350,6 @@
$("#from-date").datebox('setValue', moment().add(-30, 'days').format('YYYY/MM/DD'));
};
this.InitDataGrid = function () {
this.statisticGrid.datagrid({
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' }
]],
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) {
if (data.total === 0) {
var body = $('.datagrid-body');
body.addClass('null-data-body');
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');
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) {
return '<span>{0}</span>'.format(moment(time).format('YYYY/MM/DD HH:mm:ss'));
};
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.GetParams = function () {
return {
typeCode: $('.statistic-type span.active').attr('type'),
@ -308,32 +359,6 @@
rows: 1000
};
};
this.OnAddButtonClick = function () {
this.onEditButtonClick = function () {
this.EditDialog.Show(this.selectedRow);
};
this.AddDialog.Show();
};
this.onDeleteButtonClick = function () {
$('.dialog-delete').show();
$('.dialog-clear h2').text('确定删除名为「{0}」的账户吗?'.format(this.selectedRow.Name));
};
this.CloseDeleteDialog = function () {
$('.dialog-delete').hide();
};
this.OnTableGridBeforeLoad = function () {
this.statisticGrid.datagrid('getPager').pagination({
beforePageText: '第',
afterPageText: '页&nbsp;&nbsp;&nbsp;共{pages}页',
displayMsg: '当前显示{from}-{to}条记录&nbsp;&nbsp;&nbsp;共{total}条记录',
layout: ['list', 'sep', 'first', 'prev', 'sep', 'manual', 'sep', 'next', 'last', 'sep', 'refresh', 'info']
});
};
};
var app = null;

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

@ -15,7 +15,7 @@
$('#edit-dialog').show();
$("#username").textbox('setValue', data.RealName);
$("#account").textbox('setValue', data.LoginName);
$("#password").textbox('setValue', data.LoginPassWord);
$("#password").textbox('setValue', data.LoginPassword);
parseInt($('#sex span').eq(0).attr('gender')) === data.Gender ? $('#sex span').eq(0).addClass('active') : $('#sex span').eq(0).removeClass('active');
parseInt($('#sex span').eq(1).attr('gender')) === data.Gender ? $('#sex span').eq(1).addClass('active') : $('#sex span').eq(1).removeClass('active');
};
@ -74,7 +74,7 @@
this.User.Gender = parseInt($('#sex span.active').attr('gender'));
this.User.RealName = $("#username").textbox('getValue');
this.User.LoginName = $('#account').textbox('getValue');
this.User.LoginPassWord = $('#password').textbox('getValue');
this.User.LoginPassword = $('#password').textbox('getValue');
this.EditUser();
this.HideDialog();

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

@ -8,6 +8,7 @@
this.Startup = function () {
$('#manage').addClass('active');
this.RedirectPage();
this.ReLayout();
this.InitOrgList();
this.InitDataGrid();
@ -27,6 +28,14 @@
window.onresize = this.ReLayout.bind(this);
};
this.RedirectPage = function () {
var user = document.getElementById('user-info');
if (user.getAttribute('class') === 'user-login')
window.location.href = '/User/Login';
else
return;
};
this.ReLayout = function () {
var width = $(window).width();
var height = $(window).height();
@ -145,6 +154,7 @@
}
this.OnTaskSelected = function (index, row) {
console.log(row)
this.selectedRow = row;
$('.datagrid-btable tr').removeClass('datagrid-row-selected');
$('.datagrid-btable tr').eq(index).addClass('datagrid-row-selected');

7
04.系统编码/App/Content/scripts/tiananmen/app.js

@ -20,10 +20,10 @@
var width = $(window).width();
var height = $(window).height();
$('.main').width(width - 286);
$('.main').width(width - (this.IsShrink ? 0 : 286));
$('.main').height(height - 54);
$('.right').height(height - 54);
$('.calc-list').height(height - 380);
$('.calc-list').height(height - 370);
};
this.RedirectPage = function () {
@ -65,11 +65,12 @@
$('.right').addClass('right-toggle');
$('.btn-group').addClass('real-btn-toggle');
} else {
$('.main').width(width - 280);
$('.main').width(width - 286);
$('.shrink').removeClass('shrink-toggle');
$('.right').removeClass('right-toggle');
$('.btn-group').removeClass('real-btn-toggle');
}
this.Map.CenterMap();
}
};

4
04.系统编码/App/Content/scripts/tiananmen/map.js

@ -48,6 +48,10 @@ var Map = function (parent) {
L.marker([39.908, 116.396], { icon: this.icon }).addTo(this.map);
};
this.CenterMap = function () {
this.map.setView([39.915, 116.404], 9);
};
this.ReloadData = function (time) {
// Create points layer
if (this.PointsLayer !== null)

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

@ -325,7 +325,7 @@
}
.system-management {
height: calc(100vh - 58px);
height: calc(100vh - 54px);
background: #002145;
}
@ -492,7 +492,6 @@
.delete-user-dialog .dialog-title h2 {
background: none !important;
padding-left: 14px;
}
.delete-user-dialog .dialog-btn {
@ -807,8 +806,25 @@
}
.chart {
width: 98%;
height: calc(100vh - 120px);
margin-top: 10px;
margin: 0 auto;
display: flex;
align-items: center;
}
.chart-item {
width: 60%;
height: 500px;
padding: 10px;
background: #052a50;
border-radius: 3px;
box-shadow: 0 0 10px rgba(93, 144, 210, 0.25) inset;
}
.chart-item:last-of-type {
width: 39%;
margin-left: 1%;
}
::-webkit-scrollbar {

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

@ -304,6 +304,17 @@
width: 47px;
}
.degree-text {
padding-left: 112px;
margin-top: -5px;
margin-bottom: 10px;
display: none;
}
.degree-text-error {
color: #f70000;
}
.reset-input input {
width: 73px;
}
@ -351,7 +362,6 @@
.realtime-btn {
display: inline-block;
margin-left: 0;
height: 30px;
}
.label-shade {
@ -815,7 +825,7 @@
.dialog-delete .dialog-content {
width: 380px;
height: 137px;
border: 1px solid #234979;
}
.dialog-title {
@ -1175,6 +1185,7 @@
border: solid 1px gray;
border-radius: 3px;
padding: 1px 4px;
color: #3a3a3a;
}
.time-label {

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

@ -22,6 +22,7 @@
<input type="text" id="lng-second" value="36">
</div>
</div>
<div class="degree-text" id="lng-degree-text">100.9</div>
<div class="param-text clearfix">
<label>纬度:</label>
<div class="param-input decimal-param-input fl" id="lat-decimal">
@ -34,6 +35,7 @@
<input type="text" id="lat-second" value="24">
</div>
</div>
<div class="degree-text" id="lng-degree-text">36.94</div>
<div class="param-text clearfix">
<label>高度(米):</label>
<div class="param-input fl">

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

@ -27,43 +27,43 @@
<span class="latlng"></span>
<div class="control-btn-groups">
<div class="control-item control-active-item">
<div class="control-item">
<span title="鼠标选点" class="icon" name="cursor-select" index="0">
<img src="~/Content/images/control-select.png" />
</span>
<span class="text" id="select-point-button">鼠标选点...</span>
</div>
<div class="control-item control-active-item">
<div class="control-item">
<span title="信息点标绘" class="icon" name="point-mark" index="1">
<img src="~/Content/images/control-mark.png" />
</span>
<span class="text" id="mark-button">信息点标绘...</span>
</div>
<div class="control-item control-active-item">
<div class="control-item">
<span title="画线" class="icon" name="draw-line" index="2">
<img src="~/Content/images/control-draw-line.png" />
</span>
<span class="text" id="draw-button">画线...</span>
</div>
<div class="control-item control-active-item control-clear-item">
<div class="control-item control-clear-item">
<span title="清除" class="icon" name="clear" index="3">
<img src="~/Content/images/control-clear.png" />
</span>
<span class="text" id="clear-button">清除...</span>
</div>
<div class="control-item control-active-item control-tag-item">
<div class="control-item control-tag-item">
<span title="时间标签" class="icon" name="tag" index="4">
<img src="~/Content/images/control-tag.png" />
</span>
<span class="text" id="label-switch">时间标签...</span>
</div>
<div class="control-item control-active-item">
<div class="control-item">
<span title="经纬度转换" class="icon" name="switch" index="5">
<img src="~/Content/images/icon-switch.png" />
</span>
<span class="text" id="switch-button">经纬度转换...</span>
</div>
<div class="control-item control-active-item">
<div class="control-item">
<span title="导出图片" class="icon" name="export" index="6">
<img src="~/Content/images/control-export.png" />
</span>

16
04.系统编码/App/Views/Menggu/Controls/RealtimeTabPage.cshtml

@ -5,7 +5,7 @@
<div class="param-content">
<div class="param-text clearfix">
<label>经纬度类型:</label>
<div class="type-select fl">
<div class="type-select tab">
<span class="active" type="decimal">小数</span>
<span type="degree">度分秒</span>
</div>
@ -16,22 +16,24 @@
<input type="text" id="longitude" value="111.746303">
</div>
<div class="param-input degree-param-input fl" id="lng-degrees" style="display: none">
<input type="text" id="lng-degree" value="111">
<input type="text" id="lng-minute" value="44">
<input type="text" id="lng-second" value="46.69">
<input type="text" onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" id="lng-degree" value="111">
<input type="text" onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" id="lng-minute" value="44">
<input type="text" onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" id="lng-second" value="46.69">
</div>
</div>
<div class="degree-text" id="lng-degree-text">111.746303</div>
<div class="param-text clearfix">
<label>纬度:</label>
<div class="param-input decimal-param-input fl" id="lat-decimal">
<input type="text" id="latitude" value="40.854662">
</div>
<div class="param-input degree-param-input fl" id="lat-degrees" style="display: none">
<input type="text" id="lat-degree" value="40">
<input type="text" id="lat-minute" value="51">
<input type="text" id="lat-second" value="16.78">
<input type="text" onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" id="lat-degree" value="40">
<input type="text" onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" id="lat-minute" value="51">
<input type="text" onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" id="lat-second" value="16.78">
</div>
</div>
<div class="degree-text" id="lat-degree-text">40.854662</div>
<div class="param-text clearfix">
<label>高度(米):</label>
<div class="param-input fl">

14
04.系统编码/App/Views/Menggu/Index.cshtml

@ -26,43 +26,43 @@
<span class="latlng"></span>
<div class="control-btn-groups">
<div class="control-item control-active-item">
<div class="control-item">
<span title="鼠标选点" class="icon" name="cursor-select" index="0">
<img src="~/Content/images/control-select.png" />
</span>
<span class="text" id="select-point-button">鼠标选点...</span>
</div>
<div class="control-item control-active-item">
<div class="control-item">
<span title="信息点标绘" class="icon" name="point-mark" index="1">
<img src="~/Content/images/control-mark.png" />
</span>
<span class="text" id="mark-button">信息点标绘...</span>
</div>
<div class="control-item control-active-item">
<div class="control-item">
<span title="画线" class="icon" name="draw-line" index="2">
<img src="~/Content/images/control-draw-line.png" />
</span>
<span class="text" id="draw-button">画线...</span>
</div>
<div class="control-item control-active-item control-clear-item">
<div class="control-item control-clear-item">
<span title="清除" class="icon" name="clear" index="3">
<img src="~/Content/images/control-clear.png" />
</span>
<span class="text" id="clear-button">清除...</span>
</div>
<div class="control-item control-active-item control-tag-item">
<div class="control-item control-tag-item">
<span title="时间标签" class="icon" name="tag" index="4">
<img src="~/Content/images/control-tag.png" />
</span>
<span class="text" id="label-switch">时间标签...</span>
</div>
<div class="control-item control-active-item">
<div class="control-item">
<span title="经纬度转换" class="icon" name="switch" index="5">
<img src="~/Content/images/icon-switch.png" />
</span>
<span class="text" id="switch-button">经纬度转换...</span>
</div>
<div class="control-item control-active-item">
<div class="control-item">
<span title="导出图片" class="icon" name="export" index="5">
<img src="~/Content/images/control-export.png" />
</span>

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

@ -38,10 +38,10 @@
</div>
<button type="button" class="btn query-btn" id="query-btn">查询</button>
</div>
@*<div class="table manage-table statistic-table">
<table id="task-grid"></table>
</div>*@
<div class="chart" id="chart"></div>
<div class="chart">
<div class="chart-item" id="chart"></div>
<div class="chart-item" id="pie-chart"></div>
</div>
</div>
</div>

Loading…
Cancel
Save