Загрузка данных


$("#downloadSelectedFiles").click(function() {
    const modelData = getSelectedFnsRows();
    const rows = modelData && modelData.list ? modelData.list : [];

    if (!rows.length) {
        return;
    }

    rows.forEach(function(row, index) {
        if (!row.model_file_id) {
            return;
        }

        setTimeout(function() {
            const link = document.createElement('a');

            link.href =
                'modelFileToVerification/modelFileToVerification/downloadSource?id='
                + encodeURIComponent(row.model_file_id);

            link.style.display = 'none';

            document.body.appendChild(link);
            link.click();
            document.body.removeChild(link);
        }, index * 300);
    });
});