<template>
  <div>
    <!-- 監造日報 -->
    <div v-show="$route.name === 'SupervisionList'" class="shadow">
      <b-button class="btn1" @click="supervisionIssue()">
        <b-icon-file-earmark-plus />新增日報
      </b-button>
    </div>
    <!-- 估驗計價 -->
    <div v-show="$route.name === 'EstimatedValuationList'" class="shadow">
      <b-button class="btn1" @click="AddInformationModalOpen = true" >
        <b-icon-file-earmark-plus /> 新增資料
      </b-button>
    </div>
    <!-- 新增資料Modal -->
    <modal
      :is-open="AddInformationModalOpen"
      title="新增資料"
      @closeEvent="AddInformationModalOpen = false"
    >
      <addInformation @closeEvent="AddInformationModalOpen = false" />
    </modal>
  </div>
</template>
<script>
import addInformation from '@/views/ConstructionSupervision/ModalContent/addInformation.vue'
export default {
  data () {
    return {
      AddInformationModalOpen: false
    }
  },
  components: {
    modal: () => import('@/views/Modal/index.vue'),
    addInformation
  },
  methods: {
    supervisionIssue () {
      this.$router.push({ name: 'SupervisionCreate' })
    }
  }
}
</script>
<style lang="scss" scoped>
.shadow {
  background-color: #ffff;
  height: 65px;
  width: 100%;
  box-shadow: 2px 2px 20px rgba(0, 0, 0, 40);
  /* border-bottom-width:3px;
    border-bottom-color:#1D325F;
    border-bottom-style:solid */
  position: fixed;
  top: 55px;
  z-index: 500;
}
.btn1 {
  background-color: rgb(75, 102, 255);
  font-size: 16px;
  margin-top: 15px;
  margin-left: 15px;
  padding-left: 7px;
  padding-right: 7px;
  padding-top: 5px;
  padding-bottom: 5px;
  color: #ffffff;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
  border: none;
  hover {
    color: rgb(255, 255, 255);
    background-color: rgb(49, 68, 175);
  }
}
</style>
