| @@ -138,12 +138,15 @@ | |||
| <div class="unite min_title inline field required"> | |||
| <label>模型框架</label> | |||
| <select id="Engine" placeholder="" style='width:385px' name="Engine"> | |||
| <option name="Pytorch" value="0">Pytorch</option> | |||
| <option name="TensorFlow" value="1">TensorFlow</option> | |||
| <option name="MindSpore" value="2">MindSpore</option> | |||
| <option name="Other" value="3">Other</option> | |||
| </select> | |||
| <div class="ui dropdown selection search width70" id="choice_version"> | |||
| <input type="hidden" id="Engine" name="Engine" required> | |||
| <div class="default text">选择模型框架</div> | |||
| <i class="dropdown icon"></i> | |||
| <div class="menu" id="job-Engine"> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <div class="inline field"> | |||
| <label>模型标签</label> | |||
| @@ -293,19 +296,32 @@ | |||
| function setEngine(modelVersion){ | |||
| console.log("modelVersion=" + modelVersion); | |||
| $("#job-Engine").empty() | |||
| if(modelVersion.EngineName != null && modelVersion.EngineName != ""){ | |||
| srcEngine = modelVersion.EngineName.split('-')[0] | |||
| srcEngine = srcEngine.trim(); | |||
| //if(srcEngine =='TensorFlow'){ | |||
| // $('#Engine').val(1) | |||
| //}else if(srcEngine =='MindSpore'){ | |||
| // $('#Engine').val(2) | |||
| //} | |||
| $("#Engine").dropdown('set selected',srcEngine); | |||
| //$("#Engine").attr("disabled","disabled"); | |||
| let itemHtml = "<option class=\"item\" data-value=\"0\">Pytorch</option>"; | |||
| if(srcEngine =='TensorFlow'){ | |||
| itemHtml += "<option class=\"active item\" data-value=\"1\">TensorFlow</option>" | |||
| }else{ | |||
| itemHtml += "<option class=\"item\" data-value=\"1\">TensorFlow</option>" | |||
| } | |||
| if(srcEngine =='MindSpore'){ | |||
| itemHtml += "<option class=\"active item\" data-value=\"2\">MindSpore</option>" | |||
| }else{ | |||
| itemHtml += "<option class=\"item\" data-value=\"2\">MindSpore</option>" | |||
| } | |||
| itemHtml += "<option class=\"item\" data-value=\"3\">Other</option>" | |||
| $("#job-Engine").append(itemHtml); | |||
| $("#job-Engine").css('disabled','disabled') | |||
| }else{ | |||
| //$("#Engine").removeAttr("disabled"); | |||
| let itemHtml = "<option class=\"item\" data-value=\"0\">Pytorch</option>"; | |||
| itemHtml += "<option class=\"item\" data-value=\"1\">TensorFlow</option>" | |||
| itemHtml += "<option class=\"item\" data-value=\"2\">MindSpore</option>" | |||
| itemHtml += "<option class=\"item\" data-value=\"3\">Other</option>" | |||
| $("#job-Engine").append(itemHtml); | |||
| $("#job-Engine").removeAttr('disabled'); | |||
| } | |||
| } | |||
| </script> | |||