update:任务执行逻辑修改

This commit is contained in:
2026-01-27 19:42:24 +08:00
parent 5fa0b7ca75
commit 441e76ba5d
3 changed files with 43 additions and 4 deletions

View File

@@ -12,17 +12,26 @@
fullHeight
>
<template #totalElapsedTime="{ row }">
<span>{{ row.totalElapsedTime || '--' }}h</span>
<span>{{ row.totalElapsedTime ? row.totalElapsedTime + 'h' : '--' }}</span>
</template>
<template #jobStatus="{ row }">
<span>{{ WORK_STATUS.O[row.jobStatus] }}</span>
<el-tag v-if="row.jobStatus === 'Finished'" type="success">{{
WORK_STATUS.O[row.jobStatus]
}}</el-tag>
<el-tag type="info" v-else-if="row.jobStatus === 'Canceled'">{{
WORK_STATUS.O[row.jobStatus]
}}</el-tag>
<el-tag v-else-if="row.jobStatus === 'Failed'" type="danger">{{
WORK_STATUS.O[row.jobStatus]
}}</el-tag>
<el-tag v-else type="primary">{{ WORK_STATUS.O[row.jobStatus] }}</el-tag>
</template>
</BaseTable>
</div>
</el-tab-pane>
<el-tab-pane label="本地作业执行列表" name="local">
<!-- <el-tab-pane label="本地作业执行列表" name="local">
<div class="table"></div>
</el-tab-pane>
</el-tab-pane> -->
</el-tabs>
</div>
</Dialog>

View File

@@ -548,6 +548,7 @@ const runUploadRunFilesFun = async (list: any, inputDirId: any) => {
if (res && res.code === 200) {
res.data.forEach((item: any, index: any) => {
item.isSaveLocal = 'Y';
emitter.emit('ADD_UPLOAD_FILE', {
file: list[index].raw,
data: {

View File

@@ -8,8 +8,24 @@
:params="{
runId: currentRunInfo?.uuid,
}"
:actionList="actionList"
:fullHeight="true"
>
<template #totalElapsedTime="{ row }">
<span>{{ row.totalElapsedTime ? row.totalElapsedTime + 'h' : '--' }}</span>
</template>
<template #jobStatus="{ row }">
<el-tag v-if="row.jobStatus === 'Finished'" type="success">{{
WORK_STATUS.O[row.jobStatus]
}}</el-tag>
<el-tag type="info" v-else-if="row.jobStatus === 'Canceled'">{{
WORK_STATUS.O[row.jobStatus]
}}</el-tag>
<el-tag v-else-if="row.jobStatus === 'Failed'" type="danger">{{
WORK_STATUS.O[row.jobStatus]
}}</el-tag>
<el-tag v-else type="primary">{{ WORK_STATUS.O[row.jobStatus] }}</el-tag>
</template>
</BaseTable>
</div>
</template>
@@ -18,6 +34,7 @@
import { ref } from 'vue';
import BaseTable from '@/components/common/table/baseTable.vue';
import { queryJobsApi } from '@/api/pbs/pbs';
import { useDict } from '@/utils/useDict';
defineProps({
currentRunInfo: {
@@ -25,8 +42,20 @@ defineProps({
default: () => {},
},
});
const { WORK_STATUS } = useDict('WORK_STATUS');
const baseTableRef = ref();
const actionList = ref([
{
title: '暂停',
type: 'danger',
click: (row: any) => {},
hide: (row: any) => {
return !['Canceled', 'Finished', 'Failed'].includes(row.jobStatus);
},
},
]);
</script>
<style lang="scss" scoped>