Browse Source

Update

master
fanwensheng 3 years ago
parent
commit
77dafef422
  1. 3
      04.系统编码/App/App.csproj
  2. 2
      04.系统编码/App/App.csproj.user
  3. 2
      04.系统编码/App/Content/scripts/beijing/realtime-panel.js
  4. 41
      04.系统编码/App/Content/scripts/menggu/realtime-panel.js

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

@ -329,7 +329,6 @@
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
<Folder Include="Content\json\menggu\" />
<Folder Include="Models\" />
</ItemGroup>
<ItemGroup>
@ -338,6 +337,8 @@
<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" />
<Content Include="Content\json\menggu\202111242105788.json" />
<Content Include="Content\json\menggu\check.json" />
<None Include="packages.config" />
<Content Include="Views\Tiananmen\Index.cshtml" />
<Content Include="Views\User\Login.cshtml" />

2
04.系统编码/App/App.csproj.user

@ -2,7 +2,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<ProjectView>ProjectFiles</ProjectView>
<ProjectView>ShowAllFiles</ProjectView>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort>44332</IISExpressSSLPort>

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

@ -217,7 +217,7 @@
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(this.getJsonUrl(result.num), function (data) {

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

@ -34,7 +34,12 @@
Result: null,
CreateTime: new Date()
};
this.SubmitTask(this.TaskInfo.Id);
// Submit task
if (Config.InProductionMode)
this.SubmitTask(this.TaskInfo.Id);
else
this.SubmitTest(this.TaskInfo.Id, 36.538, 64.850);
};
this.OnResetButtonClick = function () {
@ -70,7 +75,7 @@
$.ajax({
type: "GET",
dataType: 'json',
url: 'http://{0}/mg/check?num={1}'.format(Config.ApiRoot, this.TaskInfo.Id),
url: this.getCheckUrl(this.TaskInfo.Id),
success: function (result) {
this.TaskInfo.Result = result;
@ -87,8 +92,22 @@
});
};
this.getCheckUrl = function (taskId) {
if (Config.InProductionMode)
return 'http://{0}/mg/check?num={1}'.format(Config.ApiRoot, taskId);
else
return '/Content/json/menggu/check.json'.format(taskId);
};
this.getJsonUrl = function (taskId) {
if (Config.InProductionMode)
return "http://{0}/mg/getresult/{1}.json".format(Config.ApiRoot, taskId);
else
return '/Content/json/menggu/{0}.json'.format(taskId);
};
this.LoadData = function (result) {
$.getJSON("http://{0}/mg/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,
@ -191,6 +210,22 @@
});
};
this.SubmitTest = function (taskId, lat, lon) {
$.ajax({
type: "GET",
dataType: 'json',
url: this.getCheckUrl(taskId),
success: function (result) {
this.TaskInfo.Id = taskId;
this.TaskInfo.Result = result;
this.Parent.Map.CenterMap(lat, lon);
this.AddTask(this.TaskInfo.Id);
this.LoadData(result);
}.bind(this)
});
};
this.AddTask = function (taskId) {
$.ajax({
type: "POST",

Loading…
Cancel
Save