|
|
@ -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; |
|
|
|