import config from "../../config";

export function BatchExport(params) {
  let url = config.serviceHost('api/QC/Batch/QCExport');
  let from = `<form method="post" id="batchForm" action = "${url}" enctyped="multipart/form-data">` +
    `<input name="Keyword" type="hidden" value="${params.Keyword}" />` +
    `<input name="Parameter1" type="hidden" value="${params.Parameter1}" />` +
    `</form>`;

    var div = document.createElement("div");
    div.id = "batchFormDiv";
    div.innerHTML = from;
    document.body.appendChild(div);
    let submitForm = document.getElementById("batchForm");
    submitForm.submit();
    document.getElementById("batchFormDiv").remove();
}
