update 仿真执行 输入输出数据 增加重命名

This commit is contained in:
2026-03-24 15:18:05 +08:00
parent 6e9c9f946b
commit e05e10e83e
3 changed files with 33 additions and 15 deletions

View File

@@ -297,20 +297,37 @@ onBeforeUnmount(() => {
// #endregion
// ---------------------------透传 baseTable 的所有暴露属性和方法---------------------------
const proxyMethods = [
'resetFun',
'getCheckboxRecords',
'getCheckboxReserveRecords',
'clearCheckboxRow',
'setCheckboxRow',
'setDataFun',
'getSearchParamsFun',
'getSearchParamByKeyFun',
'setSearchParamsFun',
'setSearchParamByKeyFun',
'setOptionsFun',
];
defineExpose({
// 属性透传(保持访问形态不变)
get tableData() {
return fileTableRef.value?.tableData;
},
get tableRef() {
return fileTableRef.value?.tableRef;
},
get tableHeadVisible() {
return fileTableRef.value?.tableHeadVisible;
},
// 方法透传
...Object.fromEntries(
[
'tableData',
'tableRef',
'tableHeadVisible',
'resetFun',
'setDataFun',
'getSearchParamsFun',
'getSearchParamByKeyFun',
'setSearchParamsFun',
'setSearchParamByKeyFun',
'setOptionsFun',
].map((method) => [method, (...args: any[]) => fileTableRef.value?.[method](...args)])
proxyMethods.map((method) => [
method,
(...args: any[]) => fileTableRef.value?.[method](...args),
])
),
});
</script>

View File

@@ -4,7 +4,7 @@
<template>
<div class="node-file-page">
<div class="table-box">
<BaseTable
<FileTable
showIndex
ref="baseTableRef"
tableName="RUN_RESULT_FILE_TABLE"
@@ -18,6 +18,7 @@
}"
:show-checkbox="true"
:action-list="actionList"
:defaultActions="readonly ? [] : ['rename']"
:full-height="true"
:show-setting="false"
>
@@ -41,7 +42,7 @@
<template #fileSize="{ row }">
<span>{{ formatFileSize(row.fileSize) }}</span>
</template>
</BaseTable>
</FileTable>
</div>
<!-- <div class="operate-box">
<el-upload :show-file-list="false" multiple :before-upload="beforeUploadFun">
@@ -107,6 +108,7 @@
<script setup lang="ts">
import { nextTick, reactive, ref, watch } from 'vue';
import BaseTable from '@/components/common/table/baseTable.vue';
import FileTable from '@/components/common/fileTable/index.vue';
import { queryRunDirApi, syncKeyResultToTaskApi, uploadRunFilesApi } from '@/api/project/run';
import { downloadFileById, downloadFileByStream, fileUploadAllocationTypeFun } from '@/utils/file';
import FilePreview from '@/components/common/filePreview/index.vue';

View File

@@ -291,7 +291,6 @@ const showfileTableFun = async (ids: any) => {
};
const refreshFun = () => {
console.log('refresh');
showfileTableFun(fileIds.value.join(','));
};