update:显示HPC提交计算列表

This commit is contained in:
2026-04-13 16:51:10 +08:00
parent 0ebd883f4d
commit 6aa6fa61af

View File

@@ -4,7 +4,7 @@
<div class="page-title">
<div class="title-name">创建任务</div>
<div class="title-operate">
<el-button type="primary"> HPC计算列表</el-button>
<el-button type="primary" @click="visible = true"> HPC计算列表</el-button>
</div>
</div>
<!-- 求解器 -->
@@ -137,8 +137,10 @@
<div class="page-footer">
<el-button type="primary" @click="submitFun" :disabled="isLoading">提交</el-button>
<el-button type="" @click="resetFormFun" :disabled="isLoading">重置</el-button>
<el-button type="" @click="testSubmitFun">测试提交</el-button>
<!-- <el-button type="" @click="testSubmitFun">测试提交</el-button> -->
</div>
<HpcList v-model="visible" />
</div>
</template>
@@ -152,6 +154,7 @@ import emitter from '@/utils/eventBus';
import { cloneDeep } from 'lodash-es';
import { ElMessage } from 'element-plus';
import { batchWebSubmitApi, webSubmitApi } from '@/api/pbs/pbs';
import HpcList from '@/components/task/hpcList.vue';
const formData = reactive<any>({
uuid: '',
@@ -171,6 +174,7 @@ const formData = reactive<any>({
const hpcAppList = ref<any>([]);
const hpcAppInofs = ref<any>([]);
const visible = ref(false);
const removeFun = (fileList: any, index: any) => {
fileList.splice(index, 1);
@@ -209,8 +213,8 @@ const submitFun = async () => {
const webkitRelativePath = files[0]?.raw?.webkitRelativePath;
params.selectDirName = webkitRelativePath ? webkitRelativePath.split('/')[0] : '';
localStorage.setItem('SUBMIT_JOB_INFO', JSON.stringify(params));
console.log(formData, 'formData');
console.log(params, 'params');
// console.log(formData, 'formData');
// console.log(params, 'params');
submitUploadBigFile(params, files);
// resetFormFun();
@@ -289,27 +293,6 @@ const uploadFinishedFun = async (data: any) => {
}
};
const testSubmitFun = async () => {
const params = JSON.parse(localStorage.getItem('SUBMIT_JOB_INFO') as string) || null;
if (params) {
let res: any;
try {
if (params.type === 'single') {
res = await webSubmitApi(params);
} else {
res = await batchWebSubmitApi(params);
}
if (res && res.code === 200) {
ElMessage.success('提交成功');
}
} catch {}
} else {
ElMessage.warning('执行参数丢失,请重新提交');
}
};
// 切换批量或者单个提交计算模式
const typeChangeFun = () => {
formData.masterFile = [];