Browse Source

Merge pull request '模型中的label信息可以传递给新创建的版本' (#1134) from zhou into V20211213

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1134
Reviewed-by: lewis <747342561@qq.com>
tags/v1.21.12.1^2
lewis 4 years ago
parent
commit
6a65f1a040
2 changed files with 4 additions and 21 deletions
  1. +1
    -1
      templates/repo/modelmanage/index.tmpl
  2. +3
    -20
      web_src/js/components/Model.vue

+ 1
- 1
templates/repo/modelmanage/index.tmpl View File

@@ -114,7 +114,7 @@
</div>
<div class="inline field">
<label>模型标签</label>
<input style="width: 83%;margin-left: 7px;" name="Label" maxlength="255" placeholder='{{.i18n.Tr "repo.modelarts.train_job.label_place"}}'>
<input style="width: 83%;margin-left: 7px;" id="label" name="Label" maxlength="255" placeholder='{{.i18n.Tr "repo.modelarts.train_job.label_place"}}'>
</div>
<div class="inline field">
<label for="description">模型描述</label>


+ 3
- 20
web_src/js/components/Model.vue View File

@@ -104,7 +104,7 @@
<el-table-column label="操作" min-width="18%" align="center">
<template slot-scope="scope">
<div class="space-around">
<a :style="{visibility:!scope.row.Children ? 'visible':'hidden'}" :class="{'disabled':!scope.row.IsCanOper}" @click="showcreateVue(scope.row.Name,scope.row.Version)">创建新版本</a>
<a :style="{visibility:!scope.row.Children ? 'visible':'hidden'}" :class="{'disabled':!scope.row.IsCanOper}" @click="showcreateVue(scope.row.Name,scope.row.Version,scope.row.Label)">创建新版本</a>
<a :href="loadhref+scope.row.ID" :class="{'disabled':!scope.row.IsCanOper}">下载</a>
<a :class="{'disabled':!scope.row.IsCanOper}" @click="deleteModel(scope.row.ID,scope.row.cName)">删除</a>
</div>
@@ -194,7 +194,7 @@ export default {
this.params.page = val
this.getModelList()
},
showcreateVue(name,version){
showcreateVue(name,version,label){
$('.ui.modal.second')
.modal({
centered: false,
@@ -206,6 +206,7 @@ export default {
$('.ui.dimmer').css({"background-color":"rgb(136, 136, 136,0.7)"})
$("#job-name").empty()
$('#name').val(name)
$('#label').val(label)
let version_string = versionAdd(version)
$('#version').val(version_string)
loadTrainList()
@@ -253,31 +254,13 @@ export default {
$("#verionname").removeClass("error")
}
return true
},
// getFirstChildLabel(cName){
// this.$axios.get(this.url+'show_model_child_api',{params:{
// name:cName
// }}).then((res)=>{
// console.log(res)
// let initLabel = $("input[name='Label']").val()
// let addLabel=res.data[0].Label + ' ' + initLabel
// $("input[name='Label']").val(addLabel)
// this.data = $("#formId").serialize()
// })
// },
submit(){
let context = this
let flag= this.check()
if(flag){
let cName = $("input[name='Name']").val()
let version = $("input[name='Version']").val()
// if(!(version==='0.0.1')){
// context.getFirstChildLabel(cName)
// }else{
// context.data = $("#formId").serialize()
// }
// console.log(context.data)
let data = $("#formId").serialize()
$("#mask").css({"display":"block","z-index":"9999"})
$.ajax({


Loading…
Cancel
Save