fix:bug修复

This commit is contained in:
2026-03-25 17:00:15 +08:00
parent 18390c3bb0
commit 2085d0bf5d

View File

@@ -35,13 +35,8 @@
:action-list="actionList"
:hide-pagination="true"
show-index
:data="tableData"
>
<template #name="{ row }">
<div class="file-name">
<img :src="fileUploadAllocationIconFun(row.name)" width="18" class="mr5" alt="" />
<span>{{ row.name }}</span>
</div>
</template>
<template #directory="{ row }">
<span>{{ row.directory === 1 ? '文件夹' : '文件' }}</span>
</template>
@@ -111,13 +106,18 @@ const getJobFileListFun = async (data?: any) => {
const res: any = await getJobResultFilesApi(param);
if (res && res.code == 200) {
tableData.value = res.data;
nextTick(() => {
if (tableRef.value) {
tableRef.value.setDataFun(tableData.value);
}
tableData.value = res.data.map((item: any) => {
return {
...item,
dataType: item.directory === '1' ? 1 : 2,
};
});
// nextTick(() => {
// if (tableRef.value) {
// tableRef.value.setDataFun(tableData.value);
// }
// });
}
} catch {}
};
@@ -129,8 +129,9 @@ const actionList = ref([
click: async (row: any) => {
await hpcDownloadFileApi({ fileName: row.fullPath, name: row.name });
},
// hide: (row: any) => {
// },
hide: (row: any) => {
return row.directory === 1;
},
},
{
title: '查看',
@@ -153,6 +154,9 @@ const actionList = ref([
fileLogConnectFun();
// await hpcDownloadFileApi({ fileName: row.fullPath, name: row.name });
},
hide: (row: any) => {
return row.directory === 1;
},
// hide: (row: any) => {},
},
]);
@@ -199,7 +203,15 @@ const fileLogConnectFun = () => {
SEE.value.addEventListener('message', (e: any) => {
if (e?.data) {
logContent.value.content = logContent.value.content + e?.data + '\n';
const str = e?.data.replace('data: ', ' ');
logContent.value.content = logContent.value.content + str + '\n';
if (e?.data === 'data: TIME_TOO_LONG_END') {
SEE.value.close();
SEE.value = null;
localStorage.setItem('CONNECTION_TOKEN', '');
streamLogEndApi(connectionToken.value);
}
}
});