Compare commits

...

2 Commits

Author SHA1 Message Date
hehongxing 9ffadc2e0f Merge branch 'master' of http://112.124.40.88:5510/root/BeijingSafeguard 3 years ago
hehongxing 67316d5c9e commit 3 years ago
  1. 3
      04.系统编码/App/App.csproj
  2. 104769
      04.系统编码/App/Content/json/beijing/202106012241183.json
  3. 251
      04.系统编码/App/Content/json/beijing/202107151920657.json
  4. 10
      04.系统编码/App/Content/scripts/beijing/history-panel.js
  5. 60
      04.系统编码/App/Content/scripts/beijing/map.js
  6. 5
      04.系统编码/App/Content/scripts/beijing/realtime-panel.js
  7. 33465
      04.系统编码/App/Content/thirds/turf.min.js
  8. 1
      04.系统编码/App/Views/Beijing/Index.cshtml

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

@ -317,6 +317,7 @@
<Content Include="Content\thirds\niuniu-capture\niuniucapture.js" />
<Content Include="Content\thirds\sweetalert\sweetalert.css" />
<Content Include="Content\thirds\sweetalert\sweetalert.min.js" />
<Content Include="Content\thirds\turf.min.js" />
<Content Include="favicon.ico" />
<Content Include="Global.asax" />
<Content Include="Web.config">
@ -356,6 +357,8 @@
<Content Include="Content\thirds\bootstrap-3.4.1-dist\fonts\glyphicons-halflings-regular.ttf" />
<Content Include="Content\thirds\bootstrap-3.4.1-dist\fonts\glyphicons-halflings-regular.woff" />
<Content Include="Content\thirds\bootstrap-3.4.1-dist\fonts\glyphicons-halflings-regular.woff2" />
<Content Include="Content\json\beijing\202106012241183.json" />
<Content Include="Content\json\beijing\202107151920657.json" />
<None Include="packages.config" />
<Content Include="Views\Tiananmen\Index.cshtml" />
<Content Include="Views\User\Login.cshtml" />

104769
04.系统编码/App/Content/json/beijing/202106012241183.json

File diff suppressed because it is too large

251
04.系统编码/App/Content/json/beijing/202107151920657.json

@ -0,0 +1,251 @@
{
"backward":{
"points": [
[116.440, 39.881, 600,"20210715_191500"]
],
"average": [
[116.420, 39.870, 0.03726],
[116.420, 39.880, 106.55774],
[116.430, 39.870, 14.26173],
[116.430, 39.880, 135.51360],
[116.440, 39.870, 7.02340],
[116.440, 39.880, 15.97356],
[116.450, 39.870, 0.00932],
[116.450, 39.870, 0.00932]
],
"details": [
[
[116.420, 39.870, 0.03726],
[116.420, 39.880, 106.55775],
[116.430, 39.870, 14.26173],
[116.430, 39.880, 135.51361],
[116.440, 39.870, 7.02340],
[116.440, 39.880, 15.97356],
[116.450, 39.870, 0.00932],
[116.450, 39.870, 0.00932]
]
]
},
"forward":{
"points": [
[116.405, 39.889, 624,"20210715_192500"],
[116.386, 39.893, 616,"20210715_193000"],
[116.367, 39.897, 611,"20210715_193500"],
[116.344, 39.901, 612,"20210715_194000"],
[116.321, 39.904, 631,"20210715_194500"],
[116.298, 39.907, 666,"20210715_195000"]
],
"average": [
[116.270, 39.900, 0.00477],
[116.270, 39.910, 0.00376],
[116.280, 39.890, 0.01631],
[116.280, 39.900, 0.20133],
[116.280, 39.910, 0.13867],
[116.280, 39.920, 0.00890],
[116.290, 39.880, 0.00102],
[116.290, 39.890, 0.22348],
[116.290, 39.900, 1.82017],
[116.290, 39.910, 0.97581],
[116.290, 39.920, 0.03250],
[116.300, 39.880, 0.01018],
[116.300, 39.890, 0.79956],
[116.300, 39.900, 4.61286],
[116.300, 39.910, 1.77560],
[116.300, 39.920, 0.03008],
[116.310, 39.880, 0.02780],
[116.310, 39.890, 1.33336],
[116.310, 39.900, 5.73182],
[116.310, 39.910, 1.41731],
[116.310, 39.920, 0.01740],
[116.320, 39.880, 0.03524],
[116.320, 39.890, 1.80046],
[116.320, 39.900, 6.02707],
[116.320, 39.910, 0.86746],
[116.320, 39.920, 0.00546],
[116.330, 39.880, 0.04942],
[116.330, 39.890, 2.58672],
[116.330, 39.900, 5.79739],
[116.330, 39.910, 0.39977],
[116.330, 39.920, 0.00205],
[116.340, 39.880, 0.08055],
[116.340, 39.890, 3.72718],
[116.340, 39.900, 4.90489],
[116.340, 39.910, 0.15633],
[116.350, 39.880, 0.14160],
[116.350, 39.890, 5.35072],
[116.350, 39.900, 3.65362],
[116.350, 39.910, 0.04215],
[116.360, 39.880, 0.30090],
[116.360, 39.890, 7.15562],
[116.360, 39.900, 2.12420],
[116.360, 39.910, 0.00953],
[116.370, 39.880, 0.66041],
[116.370, 39.890, 8.49391],
[116.370, 39.900, 0.89092],
[116.370, 39.910, 0.00204],
[116.380, 39.880, 1.58139],
[116.380, 39.890, 8.64241],
[116.380, 39.900, 0.23682],
[116.390, 39.880, 3.72337],
[116.390, 39.890, 6.95276],
[116.390, 39.900, 0.02039],
[116.400, 39.880, 7.37731],
[116.400, 39.890, 3.53683],
[116.400, 39.900, 0.00068],
[116.410, 39.880, 10.66767],
[116.410, 39.890, 0.49442],
[116.420, 39.880, 4.51128],
[116.420, 39.890, 0.00204],
[116.420, 39.890, 0.00204]
],
"details": [
[
[116.390, 39.880, 0.33831],
[116.390, 39.890, 0.29747],
[116.400, 39.880, 22.90642],
[116.400, 39.890, 6.22961],
[116.410, 39.880, 62.90426],
[116.410, 39.890, 2.62430],
[116.420, 39.880, 27.06768],
[116.420, 39.890, 0.01225],
[116.360, 39.890, 0.00611 ]
],
[
[116.360, 39.890, 0.00611],
[116.370, 39.880, 0.15477],
[116.370, 39.890, 1.10570],
[116.370, 39.900, 0.00814],
[116.380, 39.880, 4.71534],
[116.380, 39.890, 19.40578],
[116.380, 39.900, 0.16480],
[116.390, 39.880, 21.10302],
[116.390, 39.890, 37.63776],
[116.390, 39.900, 0.07335],
[116.400, 39.880, 21.34727],
[116.400, 39.890, 14.98324],
[116.400, 39.900, 0.00409],
[116.410, 39.880, 1.10176],
[116.410, 39.890, 0.34221],
[116.340, 39.890, 0.01832 ]
],
[
[116.340, 39.890, 0.01832],
[116.340, 39.900, 0.00816],
[116.350, 39.880, 0.04680],
[116.350, 39.890, 1.33700],
[116.350, 39.900, 0.49916],
[116.360, 39.880, 0.84824],
[116.360, 39.890, 18.84108],
[116.360, 39.900, 4.04046],
[116.370, 39.880, 3.60664],
[116.370, 39.890, 45.32563],
[116.370, 39.900, 4.34053],
[116.370, 39.910, 0.00204],
[116.380, 39.880, 4.76695],
[116.380, 39.890, 32.40399],
[116.380, 39.900, 1.25000],
[116.390, 39.880, 0.89889],
[116.390, 39.890, 3.78132],
[116.390, 39.900, 0.04897],
[116.400, 39.880, 0.01015],
[116.400, 39.890, 0.00814],
[116.320, 39.890, 0.03051 ]
],
[
[116.320, 39.890, 0.03051],
[116.320, 39.900, 0.09577],
[116.330, 39.890, 1.57621],
[116.330, 39.900, 2.80221],
[116.330, 39.910, 0.10406],
[116.340, 39.880, 0.24179],
[116.340, 39.890, 12.83724],
[116.340, 39.900, 14.89832],
[116.340, 39.910, 0.29378],
[116.350, 39.880, 0.76218],
[116.350, 39.890, 28.95889],
[116.350, 39.900, 19.70082],
[116.350, 39.910, 0.18966],
[116.360, 39.880, 0.95715],
[116.360, 39.890, 24.04803],
[116.360, 39.900, 8.69456],
[116.360, 39.910, 0.05716],
[116.370, 39.880, 0.20107],
[116.370, 39.890, 4.53214],
[116.370, 39.900, 0.99686],
[116.370, 39.910, 0.01022],
[116.380, 39.880, 0.00607],
[116.380, 39.890, 0.04468],
[116.380, 39.900, 0.00611],
[116.290, 39.900, 0.00612 ]
],
[
[116.290, 39.900, 0.00612],
[116.290, 39.910, 0.00205],
[116.300, 39.890, 0.03460],
[116.300, 39.900, 0.39980],
[116.300, 39.910, 0.09204],
[116.310, 39.880, 0.00204],
[116.310, 39.890, 1.42216],
[116.310, 39.900, 6.90293],
[116.310, 39.910, 1.48698],
[116.310, 39.920, 0.01025],
[116.320, 39.880, 0.10168],
[116.320, 39.890, 7.24075],
[116.320, 39.900, 25.49714],
[116.320, 39.910, 3.31247],
[116.320, 39.920, 0.02252],
[116.330, 39.880, 0.28230],
[116.330, 39.890, 13.43844],
[116.330, 39.900, 31.06486],
[116.330, 39.910, 2.19667],
[116.330, 39.920, 0.01227],
[116.340, 39.880, 0.24154],
[116.340, 39.890, 9.48720],
[116.340, 39.900, 14.52084],
[116.340, 39.910, 0.64422],
[116.350, 39.880, 0.04059],
[116.350, 39.890, 1.80845],
[116.350, 39.900, 1.72174],
[116.350, 39.910, 0.06321],
[116.360, 39.890, 0.03850],
[116.360, 39.900, 0.01016],
[116.270, 39.900, 0.02863 ]
],
[
[116.270, 39.900, 0.02863],
[116.270, 39.910, 0.02256],
[116.280, 39.890, 0.09788],
[116.280, 39.900, 1.20800],
[116.280, 39.910, 0.83202],
[116.280, 39.920, 0.05340],
[116.290, 39.880, 0.00611],
[116.290, 39.890, 1.34089],
[116.290, 39.900, 10.91492],
[116.290, 39.910, 5.85281],
[116.290, 39.920, 0.19498],
[116.300, 39.880, 0.06106],
[116.300, 39.890, 4.76275],
[116.300, 39.900, 27.27734],
[116.300, 39.910, 10.56156],
[116.300, 39.920, 0.18048],
[116.310, 39.880, 0.16477],
[116.310, 39.890, 6.57797],
[116.310, 39.900, 27.48800],
[116.310, 39.910, 7.01690],
[116.310, 39.920, 0.09417],
[116.320, 39.880, 0.10973],
[116.320, 39.890, 3.53153],
[116.320, 39.900, 10.56950],
[116.320, 39.910, 1.89227],
[116.320, 39.920, 0.01023],
[116.330, 39.880, 0.01422],
[116.330, 39.890, 0.50569],
[116.330, 39.900, 0.91728],
[116.330, 39.910, 0.09792],
[116.340, 39.890, 0.02030],
[116.340, 39.900, 0.00203],
[116.340, 39.900, 0.00203]
]
]
}
}

10
04.系统编码/App/Content/scripts/beijing/history-panel.js

@ -85,12 +85,20 @@
};
this.LoadData = function (task) {
$.getJSON("http://{0}/bj/getresult/{1}.json".format(Config.ApiRoot, task.Id), function (data) {
$.getJSON(this.getJsonUrl(task.Id), function (data) {
this.Parent.Map.LoadAverageData(task.Id, task, data);
this.Parent.Map.CreateIntersect(task, data);
this.ResultList.SetData(task.Id, [task.Latitude, task.Longitude], data);
}.bind(this));
};
this.getJsonUrl = function (taskId) {
if (Config.InProductionMode)
return "http://{0}/bj/getresult/{1}.json".format(Config.ApiRoot, taskId);
else
return '/Content/json/beijing/202107151920657.json'.format(taskId);
};
this.OnQueryButtonClick = function () {
this.ReloadAllLabels();
this.ReloadDataGrid();

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

@ -70,6 +70,7 @@ var Map = function (parent) {
exportSelected: false
};
this.firstPolygon = null;
this.ForecastPoints = null;
this.ForecastBackwardPoints = null;
this.ForecastForwardPoints = null;
@ -309,6 +310,65 @@ var Map = function (parent) {
this.BindCloseButtons();
};
this.GetFirstPolygon = function (result) {
this.firstPolygon = result;
};
this.GetIntersect = function (result) {
var backwardData = result.backward.average;
var forwardData = result.forward.average;
backwardData.push.apply(backwardData, forwardData);
for (var i = 0; i < backwardData.length; i++) {
backwardData[i].pop();
}
let polygon1 = null;
for (var p = 0, len = backwardData.length; p < len; p++) {
var temp = backwardData[p];
if (p === 0) {
polygon1 = turf.polygon([[
[temp[0] - 0.005, temp[1] + 0.005],
[temp[0] + 0.005, temp[1] + 0.005],
[temp[0] + 0.005, temp[1] - 0.005],
[temp[0] - 0.005, temp[1] - 0.005],
[temp[0] - 0.005, temp[1] + 0.005]
]]);
} else {
var tempPolygon = turf.polygon([[
[temp[0] - 0.005, temp[1] + 0.005],
[temp[0] + 0.005, temp[1] + 0.005],
[temp[0] + 0.005, temp[1] - 0.005],
[temp[0] - 0.005, temp[1] - 0.005],
[temp[0] - 0.005, temp[1] + 0.005]
]]);
polygon1 = turf.union(polygon1, tempPolygon);
}
}
console.log(polygon1);
return polygon1;
};
this.CreateIntersect = function (param, result) {
var data1 = this.GetIntersect(this.firstPolygon);
var data2 = this.GetIntersect(result);
var intersection = turf.intersect(data1, data2);
var intersect_style = {
fillColor: "#ff0000",
color: "#000",
opacity: 1,
weight: 0.5,
fillOpacity: 0.8
};
L.geoJson(intersection, {
style: intersect_style
}).addTo(this.map);
};
this.ClearLiveLayer = function (name) {
if (this.MultiLayers)
this.RemoveLayer(name);

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

@ -98,6 +98,8 @@
pullGroundData.push([point.Longitude, point.Latitude, point.Height, moment(point.DateTime).format("YYYYMMDD_HHmmss")]);
}.bind(this));
console.log(pullGroundData);
this.PullGroundData = pullGroundData;
var value = this.PullGroundData[this.PullGroundData.length - 1];
var time = moment(value[3], "YYYYMMDD_HHmmss");
@ -243,7 +245,8 @@
Latitude: param.latitude,
Height: param.height
}, data);
this.Parent.Map.GetFirstPolygon(data);
this.Parent.Map.SetForecastData(data);
this.ResultList.SetData('realtime-layer', [param.latitude, param.longitude], data);
}.bind(this));

33465
04.系统编码/App/Content/thirds/turf.min.js

File diff suppressed because it is too large

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

@ -275,6 +275,7 @@
@section scripts {
<script src="~/Content/thirds/leaflet-velocity/leaflet-velocity.min.js"></script>
<script src="~/Content/thirds/leaflet.draw-0.4.14/leaflet.draw.js"></script>
<script src="~/Content/thirds/turf.min.js"></script>
<script src="~/Content/thirds/niuniu-capture/niuniucapture.js"></script>
<script src="~/Content/thirds/niuniu-capture/capturewrapper.js"></script>
<script src="~/Content/thirds/niuniu-capture/jquery.json-2.3.min.js"></script>

Loading…
Cancel
Save