添加新建任务提示
This commit is contained in:
parent
a35a006db4
commit
33fb55be83
@ -7,7 +7,7 @@ export default {
|
||||
<script setup lang="ts">
|
||||
import { onMounted,onBeforeUnmount, ref, nextTick,reactive } from "vue";
|
||||
import { ElForm, ElMessage, ElMessageBox,FormRules } from "element-plus";
|
||||
import { addAlgorithms,deleteAlgorithms,trainAlgorithmsPage,trainPublish,trainStatus} from "@/api/algorithml";
|
||||
import { addAlgorithms,deleteAlgorithms,trainAlgorithmsPage,trainPublish,trainStatus,trainCapacityCheck} from "@/api/algorithml";
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
import { searchAlgorithmsPage,algorithmsType } from "@/api/business/algorithm";
|
||||
import { getActiveAlgorithms } from "@/api/business/scenario";
|
||||
@ -143,7 +143,22 @@ function addClick() {
|
||||
algorithmsTypeData.value = []
|
||||
fileList.value = []
|
||||
isSwitch.value = false;
|
||||
|
||||
trainCapacityCheck().then((res:any) => {
|
||||
if(res != null && res.data != null && res.data.canSubmit == true){
|
||||
dialogVisibles.value = true;
|
||||
}else if(res != null && res.data != null && res.data.canSubmit == false){
|
||||
let training = res.data.counts.training
|
||||
let pending = res.data.counts.pending
|
||||
ElMessage({
|
||||
type: "warning",
|
||||
message: "当前训练中(" + training + ")且等待中(" + pending + ")已达上限,请稍后再试",
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
//新建训练任务-确认按钮/修改按钮
|
||||
function confirmClick(formEl: any) {
|
||||
@ -680,6 +695,7 @@ function open(e:any) {
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="任务状态" width="100" align="center">
|
||||
<template #default="scope">
|
||||
|
||||
<span v-if="scope.row.status == 'Success' " style="color:#00c10b"> {{statusName(scope.row.status)}}</span>
|
||||
<span v-if="scope.row.status == 'Failed' " style="color: #fd3737;cursor: pointer;" @click="open(scope.row)">
|
||||
{{statusName(scope.row.status)}}
|
||||
@ -687,7 +703,7 @@ function open(e:any) {
|
||||
<span v-if="scope.row.status == 'Training' " style="color: #266fff;display: flex;align-items: center;" >
|
||||
<img src="@/assets/table/loading.gif" alt="" title="训练中" style="margin-right: 10px;width: 20px;height: 20px;"> {{statusName(scope.row.status)}}
|
||||
</span>
|
||||
|
||||
<span v-if="scope.row.status == 'Pending' " style="color: #266fff;"> 排队中 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user