Bug fix for export
This commit is contained in:
parent
478aecf2c8
commit
1ad6246b8d
@ -98,7 +98,7 @@ public class ExportController : Controller, IExportController<IActionResult>
|
|||||||
public IActionResult GetCSVExport(int toolTypeId, [FromQuery] string? datebegin, [FromQuery] string? dateend, [FromQuery] string? filename)
|
public IActionResult GetCSVExport(int toolTypeId, [FromQuery] string? datebegin, [FromQuery] string? dateend, [FromQuery] string? filename)
|
||||||
{
|
{
|
||||||
string r = _ExportRepository.GetCSVExport(_MetrologyRepository, toolTypeId, datebegin, dateend);
|
string r = _ExportRepository.GetCSVExport(_MetrologyRepository, toolTypeId, datebegin, dateend);
|
||||||
return File(r, "application/octet-stream", filename);
|
return Content(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -20,7 +20,7 @@ function getParams() {
|
|||||||
function postExport() {
|
function postExport() {
|
||||||
parms = getParams();
|
parms = getParams();
|
||||||
var toolTypeID = $("#ToolType").igCombo("value");
|
var toolTypeID = $("#ToolType").igCombo("value");
|
||||||
var url = _apiUrl + "/Export/" + toolTypeID + "/export";
|
var url = _apiUrl + "/Export/" + toolTypeID + "/csv";
|
||||||
$.get(url, parms, function (data) {
|
$.get(url, parms, function (data) {
|
||||||
var blob = new Blob([data], {
|
var blob = new Blob([data], {
|
||||||
type: "text/plain;charset=utf-8",
|
type: "text/plain;charset=utf-8",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user