Как обновить предыдущую бета-версию Handson Table до текущей новой версии? - PullRequest
0 голосов
/ 09 апреля 2019

Я обновляю проект до новой версии Handson Table.

Это для Windows Server с MySQL, JSP и Apache Tomcat 64.

function exportXls(data,gridid,current_sheet_name) {

if(current_table=="reports") {
    var servicePath = service_path+"/getrmsfilename";

    showMessage("Exporting Data..<div class='mdl-spinner mdl-js-spinner is-active'></div>","exportdata");
    $.ajax({
            type: 'GET',
            url: servicePath,
            data: JSON.stringify(data),
            contentType: "application/json",
            dataType: 'json',
            success: function(data) {
                windows.location(data);
            },
            complete:function(response) {
                if(response.status==204) {
                    hideMessage("OOPS!! Error Occured during rms calculation","updatedata");
                    return;
                }
                response = response.responseText;
                ////////////////////////////console.log(response)
                response = response.replace(/\\/g ,":");
                response = response.replace(/\//g ,":");
                ////////////////////////////console.log(response);
                window.location.replace(service_path+"/download/"+response);
                hideMessage("Exporting data","exportdata")
            },
            error:function(data1) {
                var message = "Error occurred while exporting data to excel";
                hideMessage(message,"exportdata");
            }
        });
} else if (data != "") {
    console.log("netting export to excel");
    ////////////console.log(data);
    showMessage("Exporting Data..<div class='mdl-spinner mdl-js-spinner is-active'></div>","exportdata");
    var servicePath = service_path + "/exportexcel";

    var gridColumns = new Array();
    $.each(current_table_columns[current_table],function(i,item){
        gridColumns.push(item["column-name"]);
    });
    $("div.datacontainer[containerid="+current_containerid+"] div[gridid="+gridid+"] form.excelexport input[name=data]").val(data);
    $("div.datacontainer[containerid="+current_containerid+"] div[gridid="+gridid+"] form.excelexport input[name=fieldlist]").val(JSON.stringify(gridColumns));
    $("div.datacontainer[containerid="+current_containerid+"] div[gridid="+gridid+"] form.excelexport input[name=sheetname]").val(current_sheet_name);
    $("div.datacontainer[containerid="+current_containerid+"] div[gridid="+gridid+"] form.excelexport input[name=tablename]").val(current_table);

    $.ajax({
            type: 'POST',
            url: servicePath,
            data: JSON.stringify(data),
            contentType: "application/json",
            dataType: 'json',
            success: function(data) {
                ////////////////////////////console.log(data);
                windows.location(data);
            },
            complete:function(response){
                if(response.status==204){
                    hideMessage("OOPS!! Error Occured during rms calculation","updatedata");
                    return;
                }
                response = response.responseText;
                ////////////////////////////console.log(response)
                response = response.replace(/\\/g ,":");
                response = response.replace(/\//g ,":");
                ////////////////////////////console.log(response);
                window.location.replace(service_path+"/download/"+response);
                hideMessage("Exporting data","exportdata")
                logAction("Data exported for "+current_table,"DATA_EXPORT");
            },
            error:function(data1){
                var message = "Error occured while exporting data to excel";
                hideMessage(message,"exportdata");
            }
        });
    }

}

После обновления CDN данные экспортируются с пустым файлом. Заголовки столбцов только идут.

...