<template>
  <ADialog v-model:show="showDialog"
    :closed="dialogCloseHandler"
    width="80vw"
    title="执行日志">
    <ExecuteLog :schedule-id="scheduleId"/>
    <template #footer>
      <ElButton @click="showDialog = false">关闭</ElButton>
    </template>
  </ADialog>
</template>

<script lang="ts" setup>
import ExecuteLog from '@/pages/sys/task/execute-log/ExecuteLog.vue'
import ADialog from '@/components/a-dialog/ADialog.vue'

const showDialog = ref(false)
const scheduleId = ref<string>('')

function dialogCloseHandler() {
  scheduleId.value = ''
}

defineExpose({
  open(data: string) {
    showDialog.value = true
    scheduleId.value = data
  },
})
</script>

<style lang="stylus" scoped>
</style>
