<template>
  <div>
    <el-dialog v-draggable custom-class="checkFile" :title="title" :visible.sync="dialogVisible" width="800px"
      :before-close="handleClose" :close-on-click-modal="false">

      <detailsPage :row="row" v-on="$listeners"></detailsPage>

      <span slot="footer" class="dialog-footer">
        <el-button @click="handleClose" type="primary">关 闭</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
import detailsPage from './detailsPage.vue'
export default {
  components: {
    detailsPage,
  },
  data() {
    return {
      title: '',
      dialogVisible: false,
      row: {},
    }
  },
  watch: {
    dialogVisible(val) {
      if (val) {
        this.$nextTick(() => {
          document.querySelectorAll('.checkFile')[0].parentNode.classList.add('checkFile1')
        })
      }
    }
  },
  mounted() {

  },
  methods: {

    // 打开弹窗
    open(data) {
      this.row = data
      this.title = data.name + '任务'
      this.dialogVisible = true
    },
    // 关闭
    handleClose() {
      this.dialogVisible = false
    },
  },

}
</script>

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