* testtask: refactor the ajaxGetTestReports method.

This commit is contained in:
liugang
2023-09-13 13:55:07 +08:00
parent b56ee9ca03
commit cdffe69a68
2 changed files with 9 additions and 11 deletions
+3 -4
View File
@@ -55,13 +55,12 @@ function loadExecutionBuilds()
*/
function loadTestReports(productID)
{
$.get($.createLink('testtask', 'ajaxGetTestReports', 'productID=' + productID), function(data)
$.getJSON($.createLink('testtask', 'ajaxGetTestReports', 'productID=' + productID), function(result)
{
let $testreportPicker = $('[name="testreport"]').zui('picker');
if(data)
if(result.reports)
{
data = JSON.parse(data);
$testreportPicker.render({items: data});
$testreportPicker.render({items: result.reports});
$testreportPicker.$.changeState({value: '0'});
}
});