Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.7.1
zouap 3 years ago
parent
commit
d847f3c3e6
1 changed files with 22 additions and 4 deletions
  1. +22
    -4
      templates/repo/modelmanage/convertIndex.tmpl

+ 22
- 4
templates/repo/modelmanage/convertIndex.tmpl View File

@@ -111,7 +111,7 @@
<input type="hidden" name="_csrf" value="">
<div class="unite min_title required inline field" id="task_name">
<label>任务名称</label>
<input style="width: 45%;" id="name" name="Name" required maxlength="25" onkeyup="this.value=this.value.replace(/[, ]/g,'')">
<input style="width: 45%;" id="model_convert_name" name="model_convert_name" required maxlength="25" onkeyup="this.value=this.value.replace(/[, ]/g,'')">
</div>
<div class="unite min_title inline field">
<label for="description">任务描述</label>
@@ -120,7 +120,6 @@
<div class="unite min_title inline field required">
<label>模型名称</label>
<div class="ui dropdown selection search width83 loading" id="choice_model">
<input type="hidden" id="ModelName" name="ModelName" required>
<div class="default text">选择模型</div>
<i class="dropdown icon"></i>
<div class="menu" id="model-name">
@@ -175,7 +174,7 @@
</div>

<div class="unite min_title inline field">
<button id="submitId" type="button" class="ui create_train_job green button" style="position: absolute;">
<button id="submitId" name="submitId" type="button" class="ui create_train_job green button" style="position: absolute;">
新建任务
</button>
</div>
@@ -198,6 +197,19 @@
$('input[name="_csrf"]').val(csrf)
var modelData;

$('#submitId').click(function(){
let name = $("#model_convert_name).val()
let desc = $("#Description).val()
let modelId = $("#ModelVersion).val()
let SrcEngine = $('#SrcEngine').val();
let inputshape = $('#inputshape').val();
let inputdataformat = $('#inputdataformat').val();
let DestFormat = $('#DestFormat').val();
let NetOutputFormat = $('#NetOutputFormat').val();
console.log("name=" + name + " desc=" + desc + " modelId=" + modelId + " SrcEngine=" + SrcEngine);
console.log("inputshape=" + inputshape + " inputdataformat=" + inputdataformat + " DestFormat=" + DestFormat + " NetOutputFormat=" + NetOutputFormat);
}

function createModelName(){
let repoName = location.pathname.split('/')[2]
let modelName = repoName + '_modelConvert_' + Math.random().toString(36).substr(2, 4)
@@ -237,6 +249,13 @@
loadModelVersion(value)
}
})

$('#choice_version').dropdown({
onChange:function(value){
console.log("model version:" + value);
$('#choice_version input[name="ModelVersion"]').val(value)
}
})
})
function loadModelList(){
@@ -252,7 +271,6 @@
$("#model-name").append(train_html)
$(".ui.dropdown.selection.search.width83").removeClass("loading")
$('#choice_model .default.text').text(nameList[0])
$('#choice_model input[name="ModelName"]').val(nameList[0])
loadModelVersion(nameList[0])
})
}


Loading…
Cancel
Save