<template>
   <el-drawer class="custom-drawer-form" size="1000px" :with-header="false" :visible.sync="drawer" direction="rtl" :before-close="close" destroy-on-close append-to-body>
        <div style="padding:10px;height:100%">
            <component :is='component' :isOperate='2' :eventId="params.eventId" :eventName="params.eventName" @submit="submit"></component>
        </div>
    </el-drawer>
</template>

<script>
  import Project from '@/views/project/index.vue'
  import Report from '@/views/report/components/index.vue'
  import patentMining from '@/views/patentMining/components/viewIndex.vue'
export default {
  components: {
    Project,
    Report,
    patentMining
  },
  props: {},
  data() {
    return {
        drawer:false,
        component:'',
        params:{},
        components:{
            1:'Project',
            2:'Report',
            3:'patentMining'
        },
        isEdit:false
    };
  },
  watch: {},
  computed: {},
  created() {},
  mounted() {},
  methods: {
    open(data){
        this.params = data
        this.component = this.components[data.type]
        this.isEdit = false
        this.drawer = true
    },
    close(){
        this.$emit('isEdit',this.isEdit)
        this.drawer = false
    },
    submit(val){
        this.isEdit = val
    }
  },
};
</script>
<style lang="scss" scoped>
</style>