hhx 3 years ago
parent
commit
d4c013371e
  1. 4
      04.系统编码/App/Content/scripts/beijing/history-panel.js
  2. 5
      04.系统编码/App/Content/scripts/beijing/realtime-panel.js
  3. 4
      04.系统编码/App/Controllers/BeijingController.cs

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

@ -58,8 +58,8 @@
$('#start-date').datetimebox("setValue", startDate);
};
this.OnTaskSelected = function (index, row) {
this.LoadData(row);
this.OnTaskSelected = function (index, task) {
this.LoadData(task);
var selections = $('#task-grid').datagrid('getSelections');
if (selections.length > 1) {

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

@ -375,7 +375,6 @@
success: function (result) {
this.TaskStopped();
this.MessageBox("warning", result.info);
this.Parent.HistoryPanel.ReloadDataGrid();
}.bind(this),
complete: function () {
$('.param-label').removeClass('label-shade');
@ -395,7 +394,6 @@
this.Parent.Map.CenterMap(lat, lon);
this.AddTask(this.TaskInfo.Id);
this.LoadData(result);
this.Parent.HistoryPanel.ReloadDataGrid();
}.bind(this)
});
};
@ -407,7 +405,8 @@
url: '/Beijing/AddTask',
data: this.GetTaskParams(taskId),
success: function (result) {
console.log(result);
this.Parent.HistoryPanel.InitDateTimes();
this.Parent.HistoryPanel.ReloadDataGrid();
}.bind(this)
});
};

4
04.系统编码/App/Controllers/BeijingController.cs

@ -40,13 +40,15 @@ namespace BeijingSafeguard.Controllers
}
[HttpPost]
public void AddTask(string taskId, string region, decimal longitude, decimal latitude, decimal height, decimal simulatedDuration, decimal simulatedInterval, DateTime releaseTime, int resultState, string resultMessage)
public JsonResult AddTask(string taskId, string region, decimal longitude, decimal latitude, decimal height, decimal simulatedDuration, decimal simulatedInterval, DateTime releaseTime, int resultState, string resultMessage)
{
User user = GetLoginUser();
TaskBLL.Add(user.OrgId, user.Id, taskId, region, longitude, latitude, height, simulatedDuration, simulatedInterval, releaseTime, resultState, resultMessage);
user.LastComputeTime = DateTime.Now;
UserBLL.Update(user);
return Json(true);
}
[HttpPost]

Loading…
Cancel
Save