<template>
  <div>
    <functionBar class="F_bar" />
    <b-container fluid>
    <div style="margin-left: 20px; margin-top: 80px">
      <b-row>
        <b-col cols="6">
         <agendaInformation ref="agendaInformation" @isedit="isedit" @ispatch="ispatch"/>
        </b-col>
        <b-col cols="6" style="margin-left: -20px">
         <respondEditContent ref="respondEditContent"/>
        </b-col>
      </b-row>
    </div>
    </b-container>
  </div>
</template>
<script>
import functionBar from '@/views/ConferenceManagement/ConferenceEdit/functionBar.vue'
import agendaInformation from '@/views/ConferenceManagement/ConferenceEdit/agendaInformation.vue'
import respondEditContent from '@/views/ConferenceManagement/ConferenceEdit/respondEditContent.vue'
export default {
  data () {
    return {}
  },
  beforeRouteLeave (to, from, next) {
    if (this.isedit === true) {
      const answer = window.confirm('尚未儲存，確定離開當前畫面?')
      if (answer) {
        next()
      } else {
        next(false)
      }
    } else {
      next()
    }
  },
  components: {
    functionBar,
    agendaInformation,
    respondEditContent
  },
  methods: {
    isedit () {
      this.isedit = true
    },
    ispatch () {
      this.isedit = false
    }
  }
}
</script>
<style scoped>
.main-content .container-fluid,
.main-content .container-sm,
.main-content .container-md,
.main-content .container-lg,
.main-content .container-xl {
  padding-left: 15px !important;
  padding-right: 39px !important;
}
.no-padding [class*="col-"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
</style>
