update:HPC列表
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
import { post } from '@/api/request';
|
||||
import { post, get } from '@/api/request';
|
||||
|
||||
const env = import.meta.env;
|
||||
const PREFIX = env.VITE_API_PREFIX_PBS;
|
||||
|
||||
// HPC任务列表
|
||||
export const queryJobsApi = (params: any) => {
|
||||
return post(`${PREFIX}pbs/queryJobs`, params);
|
||||
};
|
||||
// 暂停任务
|
||||
export const stopHpcJobApi = (params: any) => {
|
||||
return get(`${PREFIX}pbs/stopHpcJob`, params);
|
||||
};
|
||||
|
||||
@@ -61,6 +61,10 @@
|
||||
.vxe-cell--col-resizable {
|
||||
display: none;
|
||||
}
|
||||
.vxe-header-cell--wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
.vxe-cell--title {
|
||||
|
||||
@@ -15,21 +15,16 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div>
|
||||
<el-button>{{ $t('通用.取消') }}</el-button>
|
||||
<el-button type="primary">{{ $t('通用.确定') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</Dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue';
|
||||
import { queryJobsApi } from '@/api/pbs/pbs';
|
||||
import { queryJobsApi, stopHpcJobApi } from '@/api/pbs/pbs';
|
||||
import Dialog from '@/components/common/dialog/index.vue';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
interface Props {
|
||||
modelValue: boolean;
|
||||
@@ -52,10 +47,23 @@ const actionList = ref([
|
||||
type: 'danger',
|
||||
needConfirm: true,
|
||||
confirmTip: '确定取消选中计算任务吗?',
|
||||
click: () => {},
|
||||
click: (raw: any) => {
|
||||
stopFun(raw);
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
const stopFun = (data: any) => {
|
||||
const params = {
|
||||
jobId: data.jobId,
|
||||
};
|
||||
stopHpcJobApi(params).then((res: any) => {
|
||||
if (res.code === 200) {
|
||||
ElMessage.success('操作成功');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const closeFun = () => {
|
||||
emit('update:modelValue', false);
|
||||
};
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
<template #form-updateTime="{ row }">
|
||||
{{ row.updateTime || '--' }}
|
||||
</template>
|
||||
<template #form-fileType="{ row }">
|
||||
{{ DATA_SEARCH_FILE_TYPE.O[row.fileType] || '--' }}
|
||||
</template>
|
||||
<template #form-fileSize="{ row }">
|
||||
{{ formatFileSize(row.fileSize) || '--' }}
|
||||
</template>
|
||||
@@ -31,7 +34,7 @@ import TableForm from '@/components/common/table/tableForm.vue';
|
||||
import { formatFileSize } from '@/utils/file';
|
||||
import { useDict } from '@/utils/useDict';
|
||||
|
||||
const { DATA_TYPE } = useDict('DATA_TYPE');
|
||||
const { DATA_TYPE, DATA_SEARCH_FILE_TYPE } = useDict('DATA_TYPE', 'DATA_SEARCH_FILE_TYPE');
|
||||
const tableFormRef = ref();
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -111,6 +111,9 @@
|
||||
<template #dataType="{ row }">
|
||||
{{ DATA_TYPE.O[row.dataType] }}
|
||||
</template>
|
||||
<template #fileType="{ row }">
|
||||
{{ DATA_SEARCH_FILE_TYPE.O[row.fileType] || '--' }}
|
||||
</template>
|
||||
<template #fileSize="{ row }">
|
||||
{{ formatFileSize(row.fileSize) }}
|
||||
</template>
|
||||
@@ -187,7 +190,7 @@ import { formatFileSize } from '@/utils/file';
|
||||
import { isCategoryNodeType } from '@/utils/node';
|
||||
|
||||
const env = import.meta.env;
|
||||
const { DATA_TYPE } = useDict('DATA_TYPE');
|
||||
const { DATA_TYPE, DATA_SEARCH_FILE_TYPE } = useDict('DATA_TYPE', 'DATA_SEARCH_FILE_TYPE');
|
||||
const currentDimension = ref(1);
|
||||
const templateList = ref<any>([]);
|
||||
const configurationShow = ref(false);
|
||||
|
||||
Reference in New Issue
Block a user