[後端] 修改匯出問題
This commit is contained in:
parent
19d3845a95
commit
8b9efdf89e
@ -363,7 +363,7 @@
|
||||
let start = new Date($('#his_startdate').val());
|
||||
let end = new Date(new Date().setDate(new Date($('#his_enddate input').val()).getDate() + 1));
|
||||
|
||||
if (pageAct.dateType == "day")
|
||||
if (pageAct.dateType == "today")
|
||||
end = new Date(new Date().setDate(start.getDate() + 1));
|
||||
else if (pageAct.dateType == "month") {
|
||||
start = new Date($('#getmonth').val());
|
||||
@ -445,7 +445,6 @@
|
||||
v.endtime = $('#his_enddate input').val() === "" ? null : new Date($('#his_enddate input').val());
|
||||
v.dateType = pageAct.dateType;
|
||||
});
|
||||
|
||||
ytAjax = new YourTeam.Ajax(url, objSendData, function (rel) {
|
||||
if (rel.code == "0000") {
|
||||
location.href = baseApiUrl + "/api/df?path=" + rel.data.split('/')[0] + "&fileName=" + rel.data.split('/')[1] + "&token=" + cookies.get("JWT-Authorization");
|
||||
|
@ -46,7 +46,8 @@ namespace FrontendWebApi.ApiControllers
|
||||
/// </summary>
|
||||
/// <param name="lhe"></param>
|
||||
/// <returns></returns>
|
||||
public ActionResult<ApiResult<string>> OpeExportExcel([FromBody] List<HistoryExport> lhe)
|
||||
[HttpPost]
|
||||
public async Task<ActionResult<ApiResult<string>>> OpeExportExcel([FromBody] List<HistoryExport> lhe)
|
||||
{
|
||||
ApiResult<string> apiResult = new ApiResult<string>();
|
||||
|
||||
@ -172,7 +173,7 @@ namespace FrontendWebApi.ApiControllers
|
||||
catch (Exception exception)
|
||||
{
|
||||
apiResult.Code = "9999";
|
||||
apiResult.Msg = "系統內部錯誤,請聯絡管理者。";
|
||||
apiResult.Msg = "系統內部錯誤,請聯絡管理者。 Msg: " + exception.Message;
|
||||
Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
||||
return Ok(apiResult);
|
||||
}
|
||||
|
@ -289,7 +289,7 @@ namespace FrontendWebApi.Models
|
||||
public class HistoryExport
|
||||
{
|
||||
public string deviceName { get; set; }
|
||||
public int value { get; set; }
|
||||
public double value { get; set; }
|
||||
public DateTime timestamp { get; set; }
|
||||
public DateTime starttime { get; set; }
|
||||
public DateTime? endtime { get; set; }
|
||||
|
Loading…
Reference in New Issue
Block a user