<!-- 节点输入文件 -->
<!-- 节点输出文件 -->

<template>
  <div class="node-file-page">
    <BaseTable
      showIndex
      ref="baseTableRef"
      tableName="RUN_RESULT_FILE_TABLE"
    >
      <template #leftOptions>
        <el-upload :show-file-list="false" :before-upload="beforeUploadFun">
          <el-button>上传文件</el-button>
        </el-upload>
        <el-button type="primary" class="ml10">下载文件</el-button>
      </template>
    </BaseTable>
  </div>
</template>

<script setup lang="ts">
import { ref, defineProps, defineEmits, watch } from 'vue';
import BaseTable from '@/components/common/table/baseTable.vue';

const props = defineProps({
  currentNodeInfo: {
    type: Object,
    default: () => {},
  },
});

const baseTableRef = ref();
const nodeInfo = ref<any>({});
const beforeUploadFun = (file:any) => {

};

watch(() => props.currentNodeInfo, (newVal) => {
  if (newVal) {
    nodeInfo.value = newVal;
  }

}, {
  immediate: true,
  deep: true,
});

</script>

<style lang="scss" scoped>
.node-file-page{
    width: 100%;
    height: 100%;
    padding: 10px;

    .ml10{
        margin-left: 10px;
    }

}
</style>
