<template>
  <ElDialog v-model="showDialog"
    :close-on-click-modal="false"
    destroy-on-close
    width="80vw"
    @close="dialogCloseHandler">
    <ExecuteLog :schedule-id="scheduleId"/>
    <template #footer>
      <ElButton @click="showDialog = false">关闭</ElButton>
    </template>
  </ElDialog>
</template>

<script lang="ts" setup>
import ExecuteLog from '@/pages/sys/task/execute-log/ExecuteLog.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>
