Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
pull/2480/head
zouap 3 years ago
parent
commit
0540fd20bb
1 changed files with 14 additions and 14 deletions
  1. +14
    -14
      web_src/js/components/Model.vue

+ 14
- 14
web_src/js/components/Model.vue View File

@@ -168,7 +168,7 @@ export default {
tableData= res.data tableData= res.data
for(let i=0;i<tableData.length;i++){ for(let i=0;i<tableData.length;i++){
TrainTaskInfo = JSON.parse(tableData[i].TrainTaskInfo) TrainTaskInfo = JSON.parse(tableData[i].TrainTaskInfo)
tableData[i].EngineName = getEngineName(tableData[i])
tableData[i].EngineName = this.getEngineName(tableData[i])
tableData[i].ComputeResource = TrainTaskInfo.ComputeResource tableData[i].ComputeResource = TrainTaskInfo.ComputeResource
tableData[i].cName=tableData[i].Name tableData[i].cName=tableData[i].Name
tableData[i].Name='' tableData[i].Name=''
@@ -347,6 +347,18 @@ export default {
}) })
.modal('show') .modal('show')
}, },
getEngineName(model){
if(model.Engine == 0){
return "Pytorch";
}else if(model.Engine == 1 || model.Engine == 121){
return "TensorFlow";
}else if(model.Engine == 2 || model.Engine == 122){
return "MindSpore";
}else{
return "Other"
}

},
getModelList(){ getModelList(){
try { try {
this.$refs.table.store.states.lazyTreeNodeMap = {} this.$refs.table.store.states.lazyTreeNodeMap = {}
@@ -360,7 +372,7 @@ export default {
for(let i=0;i<this.tableData.length;i++){ for(let i=0;i<this.tableData.length;i++){
TrainTaskInfo = JSON.parse(this.tableData[i].TrainTaskInfo) TrainTaskInfo = JSON.parse(this.tableData[i].TrainTaskInfo)
this.tableData[i].cName=this.tableData[i].Name this.tableData[i].cName=this.tableData[i].Name
this.tableData[i].EngineName = getEngineName(this.tableData[i])
this.tableData[i].EngineName = this.getEngineName(this.tableData[i])
this.tableData[i].ComputeResource = TrainTaskInfo.ComputeResource this.tableData[i].ComputeResource = TrainTaskInfo.ComputeResource
this.tableData[i].hasChildren = res.data.data[i].VersionCount===1 ? false : true this.tableData[i].hasChildren = res.data.data[i].VersionCount===1 ? false : true
} }
@@ -377,18 +389,6 @@ export default {
}, },
computed:{ computed:{
getEngineName(model){
if(model.Engine == 0){
return "Pytorch";
}else if(model.Engine == 1 || model.Engine == 121){
return "TensorFlow";
}else if(model.Engine == 2 || model.Engine == 122){
return "MindSpore";
}else{
return "Other"
}

},
loadhref(){ loadhref(){
return this.url+'downloadall?ID=' return this.url+'downloadall?ID='
}, },


Loading…
Cancel
Save