<template>
  <ele-modal
    :centered="true"
    :close-on-click-modal="false"
    :maxable="true"
    :title="title"
    :visible.sync="detailsVisible"
    append-to-body
    custom-class="ele-dialog-form long-dialog-form"
    width="55%"
    @close="handleClose"
  >
    <ModifyRecord :list="list" />
    <div slot="footer" class="footer">
      <el-button @click="handleClose">返回</el-button>
    </div>
  </ele-modal>
</template>
<script>
  import ModifyRecord from './ModifyRecord.vue';

  export default {
    components: {
      ModifyRecord
    },
    data() {
      return {
        list: [],
        detailsVisible: false
      };
    },
    methods: {
      handleClose() {
        this.detailsVisible = false;
        this.list = [];
      },
      open(list = []){
        this.detailsVisible = true;
        this.list = list;
      }
    },
    watch: {},
    props: {
      title: {
        type: String,
        default: '报工记录'
      },
    }
  };
</script>
