|
|
|
@@ -16,7 +16,7 @@ |
|
|
|
prop="Name" |
|
|
|
:label="i18n.model_name" |
|
|
|
align="left" |
|
|
|
min-width="18%" |
|
|
|
min-width="17%" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="expand-icon" v-if="scope.row.hasChildren===false"> |
|
|
|
@@ -26,22 +26,31 @@ |
|
|
|
<a class="text-over" :href="showinfoHref+scope.row.Name" :title="scope.row.Name">{{ scope.row.Name }}</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="Status" |
|
|
|
:label="i18n.model_status" |
|
|
|
align="center" |
|
|
|
min-width="6.5%" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span class="text-over" :title="scope.row.Status_title"> <i style="vertical-align: middle;" :class="scope.row.Status"></i></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="Version" |
|
|
|
:label="i18n.model_version" |
|
|
|
align="center" |
|
|
|
min-width="6.5%" |
|
|
|
min-width="6%" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span class="text-over" :title="scope.row.Version">{{ scope.row.Version}}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
prop="VersionCount" |
|
|
|
:label="i18n.model_version_num" |
|
|
|
align="center" |
|
|
|
min-width="7.5%" |
|
|
|
min-width="7%" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span class="text-over" :title="scope.row.VersionCount">{{ scope.row.VersionCount}}</span> |
|
|
|
@@ -52,7 +61,7 @@ |
|
|
|
prop="Size" |
|
|
|
:label="i18n.model_size" |
|
|
|
align="center" |
|
|
|
min-width="10.5%" |
|
|
|
min-width="10%" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span class="text-over">{{ renderSize(scope.row.Size)}}</span> |
|
|
|
@@ -62,7 +71,7 @@ |
|
|
|
prop="EngineName" |
|
|
|
:label="i18n.model_egine" |
|
|
|
align="center" |
|
|
|
min-width="8.5%" |
|
|
|
min-width="8%" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span class="text-over" :title="scope.row.EngineName">{{ scope.row.EngineName}}</span> |
|
|
|
@@ -72,7 +81,7 @@ |
|
|
|
prop="ComputeResource" |
|
|
|
:label="i18n.model_compute_resource" |
|
|
|
align="center" |
|
|
|
min-width="10.5%" |
|
|
|
min-width="8%" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span class="text-over">{{ scope.row.ComputeResource}}</span> |
|
|
|
@@ -101,7 +110,7 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column :label="i18n.model_operation" min-width="18%" align="center"> |
|
|
|
<el-table-column :label="i18n.model_operation" min-width="17%" 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,scope.row.Label)">{{i18n.model_create_new_ver}}</a> |
|
|
|
@@ -153,7 +162,8 @@ export default { |
|
|
|
submitId:{}, |
|
|
|
defaultAvatar:'/user/avatar/Ghost/-1', |
|
|
|
defaultAvatarName:'Ghost', |
|
|
|
data:'' |
|
|
|
data:'', |
|
|
|
timer:null, |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
@@ -381,6 +391,7 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
getModelList(){ |
|
|
|
let countStatus = 0 |
|
|
|
try { |
|
|
|
this.loadNodeMap.clear(); |
|
|
|
this.$axios.get(location.href+'_api',{ |
|
|
|
@@ -397,12 +408,33 @@ export default { |
|
|
|
this.tableData[i].EngineName = this.getEngineName(this.tableData[i]) |
|
|
|
this.tableData[i].ComputeResource = TrainTaskInfo.ComputeResource |
|
|
|
this.tableData[i].hasChildren = res.data.data[i].VersionCount===1 ? false : true |
|
|
|
if(this.tableData[i].Status!==1){ |
|
|
|
countStatus++ |
|
|
|
} |
|
|
|
|
|
|
|
switch(this.tableData[i].Status){ |
|
|
|
case 1: |
|
|
|
this.tableData[i].Status = "WAITING" |
|
|
|
this.tableData[i].Status_title = this.i18n.model_wait |
|
|
|
break |
|
|
|
case 2: |
|
|
|
this.tableData[i].Status = "FAILED" |
|
|
|
this.tableData[i].Status_title = this.i18n.model_failed |
|
|
|
break |
|
|
|
default: |
|
|
|
this.tableData[i].Status = "SUCCEEDED" |
|
|
|
this.tableData[i].Status_title = this.i18n.model_success |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
this.totalNum = res.data.count |
|
|
|
if(countStatus===this.tableData.length){ |
|
|
|
clearInterval(this.timer); |
|
|
|
} |
|
|
|
// if(res.data.count===1 && res.data.data[0].VersionCount===1){ |
|
|
|
// location.reload() |
|
|
|
// } |
|
|
|
}) |
|
|
|
}).catch((err)=>{console.log(err)}) |
|
|
|
}catch (e) { |
|
|
|
console.log(e) |
|
|
|
} |
|
|
|
@@ -446,7 +478,9 @@ export default { |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.submitId = document.getElementById("submitId") |
|
|
|
this.getModelList() |
|
|
|
this.timer = setInterval(()=>{ |
|
|
|
this.getModelList() |
|
|
|
}, 3000); |
|
|
|
this.url = location.href.split('show_model')[0] |
|
|
|
this.submitId.addEventListener("click", this.submit) |
|
|
|
this.url_create_newVersion = this.url + 'create_model' |
|
|
|
@@ -461,6 +495,7 @@ export default { |
|
|
|
}, |
|
|
|
beforeDestroy() { // 实例销毁之前对点击事件进行解绑 |
|
|
|
this.submitId.removeEventListener('click', this.submit); |
|
|
|
clearInterval(this.timer); |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|