diff --git a/templates/repo/modelmanage/convertIndex.tmpl b/templates/repo/modelmanage/convertIndex.tmpl index 4b296b189..defec40ac 100644 --- a/templates/repo/modelmanage/convertIndex.tmpl +++ b/templates/repo/modelmanage/convertIndex.tmpl @@ -382,8 +382,12 @@ $.get(`${repolink}/modelmanage/query_modelfile_for_predict?ID=${modelId}`, (data) => { const n_length = data.length let file_html='' + let firstFileName ='' for (let i=0;i${data[i].FileName}` file_html += '' }else{ @@ -391,8 +395,8 @@ } } $("#model-file").append(file_html) - $('#choice_file .default.text').text(data[0].FileName) - $('#choice_file input[name="ModelFile"]').val(data[0].FileName) + $('#choice_file .default.text').text(firstFileName) + $('#choice_file input[name="ModelFile"]').val(firstFileName) }) }