Browse Source

fix issue

tags/v1.21.12.1^2
zhoupzh 4 years ago
parent
commit
65cc8de99e
2 changed files with 17 additions and 12 deletions
  1. +6
    -0
      templates/repo/modelmanage/showinfo.tmpl
  2. +11
    -12
      web_src/js/components/Model.vue

+ 6
- 0
templates/repo/modelmanage/showinfo.tmpl View File

@@ -0,0 +1,6 @@
{{template "base/head" .}}
<div class="repository">
{{template "repo/header" .}}
<div class="ui container">
</div>
</div>

+ 11
- 12
web_src/js/components/Model.vue View File

@@ -1,7 +1,7 @@
<template>
<div>
<div class="ui container" id="header">
<el-row style="margin-top:15px;">
<el-row style="margin-top:15px;" v-loading.fullscreen.lock="fullscreenLoading">
<el-table
:data="tableData"
style="min-width: 100%"
@@ -103,7 +103,7 @@
<el-table-column label="操作" min-width="18%" align="center">
<template slot-scope="scope">
<div class="space-around">
<a @click="showcreateVue(scope.row.Name,scope.row.Version)">创建新版本</a>
<a :style="{visibility:!scope.row.Children ? 'visible':'hidden'}" @click="showcreateVue(scope.row.Name,scope.row.Version)">创建新版本</a>
<a :href="loadhref+scope.row.ID">下载</a>
<a @click="deleteModel(scope.row.ID)">删除</a>
</div>
@@ -147,12 +147,7 @@ export default {
totalNum:0,
params:{page:0,pageSize:10},
tableData: [],
loading:false,
tableData1:[{id:"27",name:"Model-abcd",version:"0.0.3",version_count:'20',modelsize:"20MB",aiengine:'Mindspore',computesource:'NPU',createtime:'2020-1-2 12:06:01',creator:'zhoupz',hasChildren: true},
{id:"28",name:"Model-abcd",version:"0.0.3",version_count:'20',modelsize:"20MB",aiengine:'Mindspore',computesource:'NPU',createtime:'2020-1-2 12:06:01',creator:'zhoupz',hasChildren: false},
{id:"29",name:"Model-abcd",version:"0.0.3",version_count:'20',modelsize:"20MB",aiengine:'Mindspore',computesource:'NPU',createtime:'2020-1-2 12:06:01',creator:'zhoupz',hasChildren: false},
{id:"30",name:"Model-abcd",version:"0.0.3",version_count:'20',modelsize:"20MB",aiengine:'Mindspore',computesource:'NPU',createtime:'2020-1-2 12:06:01',creator:'zhoupz',hasChildren: false}],
fullscreenLoading: false,
url:''
};
},
@@ -167,13 +162,16 @@ export default {
let tableData
tableData= res.data
console.log("-----tableData---",tableData)
for(let i=0;i<res.data.count;i++){
for(let i=0;i<tableData.length;i++){
TrainTaskInfo = JSON.parse(res.data[i].TrainTaskInfo)
tableData[i].EngineName = TrainTaskInfo.EngineName.split('-')[0]
tableData[i].ComputeResource = TrainTaskInfo.ComputeResource
tableData[i].Name=''
tableData[i].VersionCount = ''
tableData[i].Children = true

}
console.log("=====-----tabledata---".tableData)
console.log("=====-----tabledata---",tableData)
resolve(tableData)
})
@@ -223,7 +221,7 @@ export default {
})
},
getModelList(){
this.loading = true
this.fullscreenLoading = true
this.$axios.get(location.href+'_api',{
params:this.params
@@ -236,8 +234,9 @@ export default {
this.tableData[i].ComputeResource = TrainTaskInfo.ComputeResource
this.tableData[i].hasChildren = res.data.data[i].VersionCount===1 ? false : true
}
this.totalNum = this.tableData.length
console.log("this.tableData.",this.tableData)
this.loading = false
this.fullscreenLoading = false
})
},


Loading…
Cancel
Save