Browse Source

修改样式。

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

+ 31
- 2
templates/repo/modelmanage/convertIndex.tmpl View File

@@ -332,20 +332,49 @@
$('input[name="_csrf"]').val(csrf)
var modelData;

function inputshapeNotValid(value){
if(value == null || value ==""){
return true;
}
var tmps = value.split(",");
if(tmps.length ==4){
return false;
}else{
return true;
}
}

$('#submitId').click(function(){
let data={};
data['_csrf']=csrf
data['name']= $('#model_convert_name').val()

if(data['name']==""){
$("#task_name").addClass("error")
return false
}else{
$("#task_name").removeClass("error")
}

data['desc']= $('#Description').val()
data['modelId'] = $('#ModelVersion').val()
data['SrcEngine'] = $('#SrcEngine').val();
data['inputshape']= $('#inputshape').val();

if(inputshapeNotValid(data['inputshape'])){
$("#task_name").addClass("error")
return false
}else{
$("#task_name").removeClass("error")
}

data['inputdataformat']= $('#inputdataformat').val();
data['DestFormat'] = $('#DestFormat').val();
data['NetOutputFormat']= $('#NetOutputFormat').val();
data['ModelFile'] = $('#ModelFile').val();
console.log("name=" + data['name'] + " desc=" + data['desc'] + " modelId=" + data['modelId'] + " SrcEngine=" + data['SrcEngine'] + " ModelFile=" + data['ModelFile']);
console.log("inputshape=" + data['inputshape'] + " inputdataformat=" + data['inputdataformat'] + " DestFormat=" + data['DestFormat'] + " NetOutputFormat=" + data['NetOutputFormat']);



$.post(`${repolink}/modelmanage/create_model_convert`,data,(result) => {
console.log("result=" + result);
$('.ui.modal.second').modal('hide');


Loading…
Cancel
Save