Browse Source

Update

master
fanwensheng 3 years ago
parent
commit
df9870add3
  1. 1
      04.系统编码/App/App.csproj
  2. 4
      04.系统编码/App/Content/json/beijing/check.json
  3. 29
      04.系统编码/App/Content/scripts/beijing/realtime-panel.js

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

@ -337,6 +337,7 @@
<Content Include="Content\scripts\menggu\wind-template.json" />
<Content Include="Content\thirds\leaflet.draw-0.4.14\leaflet.draw-src.map" />
<Content Include="Content\json\beijing\202111060851610.json" />
<Content Include="Content\json\beijing\check.json" />
<None Include="packages.config" />
<Content Include="Views\Tiananmen\Index.cshtml" />
<Content Include="Views\User\Login.cshtml" />

4
04.系统编码/App/Content/json/beijing/check.json

@ -0,0 +1,4 @@
{
"code": 200,
"num": 202111060851610
}

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

@ -141,13 +141,18 @@
// Close details
this.ResultList.Reset();
// Submit task
// Prepare task info
this.TaskInfo = {
Id: this.CreateId(),
Result: null,
CreateTime: new Date()
};
this.SubmitTask(this.TaskInfo.Id);
// Submit task
if (Config.InProductionMode)
this.SubmitTask(this.TaskInfo.Id);
else
this.TestModel('202111060851610', 100.9, 36.94);
};
this.OnResetButtonClick = function () {
@ -183,7 +188,7 @@
$.ajax({
type: "GET",
dataType: 'json',
url: this.getJsonUrl(this.TaskInfo.Id),
url: this.getCheckUrl(this.TaskInfo.Id),
success: function (result) {
this.TaskInfo.Result = result;
@ -200,15 +205,22 @@
});
};
this.getJsonUrl = function (taskId) {
this.getCheckUrl = function (taskId) {
if (Config.InProductionMode)
return 'http://{0}/bj/check?num={1}'.format(Config.ApiRoot, taskId);
else
return '/Content/json/beijing/{0}.json'.format(taskId);
return '/Content/json/beijing/check.json'.format(taskId);
};
this.getJsonUrl = function (taskId) {
if (Config.InProductionMode)
return "http://{0}/bj/getresult/{1}.json".format(Config.ApiRoot, taskId);
else
return '/Content/json/beijing/{0}.json'.format(taskId);
}
this.LoadData = function (result) {
$.getJSON("http://{0}/bj/getresult/{1}.json".format(Config.ApiRoot, result.num), function (data) {
$.getJSON(this.getJsonUrl(result.num), function (data) {
var param = this.GetTaskParams(this.TaskInfo.Id);
this.Parent.Map.LoadAverageData('realtime-layer', {
ReleaseTime: param.releaseTime,
@ -300,9 +312,6 @@
var partten = 'http://{0}/bj/{1}?lon={2}&lat={3}&num={4}&hgt={5}&rlen={6}&tlen={7}&tpoint={8}&rlen2={9}&tlen2={10}&fac={11}';
var url = partten.format(Config.ApiRoot, 'backward', params.lon, params.lat, params.num, params.hgt, params.rlen, params.tlen, params.tpoint, params.rlen2, params.tlen2, params.pullGround);
this.TestModel('202111060851610', parseFloat(params.lat), parseFloat(params.lon));
return;
$.ajax({
type: "GET",
dataType: 'json',
@ -325,7 +334,7 @@
$.ajax({
type: "GET",
dataType: 'json',
url: this.getJsonUrl(taskId),
url: this.getCheckUrl(taskId),
success: function (result) {
this.TaskInfo.Id = taskId;
this.TaskInfo.Result = result;

Loading…
Cancel
Save