|
|
|
@@ -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 |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|