Browse Source

Update

master
fanwensheng 3 years ago
parent
commit
6c686bb4cb
  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); $('#start-date').datetimebox("setValue", startDate);
}; };
this.OnTaskSelected = function (index, row) { this.OnTaskSelected = function (index, task) {
this.LoadData(row); this.LoadData(task);
var selections = $('#task-grid').datagrid('getSelections'); var selections = $('#task-grid').datagrid('getSelections');
if (selections.length > 1) { if (selections.length > 1) {

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

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

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

@ -40,13 +40,15 @@ namespace BeijingSafeguard.Controllers
} }
[HttpPost] [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(); User user = GetLoginUser();
TaskBLL.Add(user.OrgId, user.Id, taskId, region, longitude, latitude, height, simulatedDuration, simulatedInterval, releaseTime, resultState, resultMessage); TaskBLL.Add(user.OrgId, user.Id, taskId, region, longitude, latitude, height, simulatedDuration, simulatedInterval, releaseTime, resultState, resultMessage);
user.LastComputeTime = DateTime.Now; user.LastComputeTime = DateTime.Now;
UserBLL.Update(user); UserBLL.Update(user);
return Json(true);
} }
[HttpPost] [HttpPost]

Loading…
Cancel
Save