<template>
    <div class="relatedTasks pl-4 pr-4 pt-3 pb-3 h-full flex flex-col">
        <div class="flex justify-between">
            <div class="title">相关任务</div>
            <div>
                <el-button type="primary" v-permission="['tasksAdd']">新建任务</el-button>
            </div>
        </div>
        <div class="flex-1 overflow-auto pt-3">
            <el-table :data="relatedTaskstable" border style="width: 100%;height: 100%;">
                <el-table-column prop="taskName" label="任务名称">
                    <template #default="scope">
                        <el-button link type="primary" size="large">{{
                            scope.row.taskName
                        }}</el-button>
                    </template>
                </el-table-column>
                <el-table-column prop="priority" label="优先级" width="130" />
                <el-table-column prop="status" label="状态" width="130" />
                <el-table-column prop="executor" label="执行人" width="130" />
                <el-table-column prop="startTime" label="开始时间" width="130" />
                <el-table-column prop="endTime" label="截至时间" width="130" />
            </el-table>
        </div>
    </div>
</template>
<script lang="ts" setup>
import { ref, reactive, onMounted, onUnmounted, defineExpose, inject } from 'vue'

const relatedTaskstable = ref([{
    taskName: '任务名称20240316-tempalsbls',
    priority: '中',
    status: '进行中',
    executor: '张三',
    startTime: '2024-04-01',
    endTime: '2024-04-01',
}, {
    taskName: '任务名称20240316-tempalsbls',
    priority: '中',
    status: '进行中',
    executor: '张三',
    startTime: '2024-04-01',
    endTime: '2024-04-01',
}, {
    taskName: '任务名称20240316-tempalsbls',
    priority: '中',
    status: '进行中',
    executor: '张三',
    startTime: '2024-04-01',
    endTime: '2024-04-01',
}, {
    taskName: '任务名称20240316-tempalsbls',
    priority: '中',
    status: '进行中',
    executor: '张三',
    startTime: '2024-04-01',
    endTime: '2024-04-01',
}, {
    taskName: '任务名称20240316-tempalsbls',
    priority: '中',
    status: '进行中',
    executor: '张三',
    startTime: '2024-04-01',
    endTime: '2024-04-01',
}, {
    taskName: '任务名称20240316-tempalsbls',
    priority: '中',
    status: '进行中',
    executor: '张三',
    startTime: '2024-04-01',
    endTime: '2024-04-01',
}])
// 生命周期钩子
onMounted(() => {
});
</script>
<style scoped lang="scss">
.relatedTasks {
    .title {
        font-size: 18px;
        color: #000
    }
}
</style>