<template>
  <section class="AppPublicizeInformation">
    <component :is="currentComponent" :instance="instance" :dict="dict" :permissions="permissions"/>
  </section>
</template>

<script>

import Add from "./Add";
import List from "./List";

export default {
  name: "AppPublicizeInformation",
  components: {List, Add},
  label: "宣传资讯",
  props: {
    instance: Function,
    dict: Object,
    permissions: Function
  },
  computed: {
    currentComponent() {
      return this.$route.hash == "#add" ? Add : List
    }
  },
  created() {
    this.dict.load("sex", "fpNation", "fpPrtpStatus", "fpHealth", "fpStudentsInSchool", 'fpYesOrNo', "fpRelationship",
        "yesOrNo", "fpLaborSkills", "fpEducation", "fpType", "fpPoliticalOutlook",
        "fpPublicWelfarePostAssistance","fpHealthAssistance","fpFnancialAssistance","fpEmploymentAssistance","fpEducationalAssistance","fpIndustrialAssistance","fpSocialAssistance")
  }
}
</script>

<style lang="scss" scoped>
.AppPublicizeInformation {
  height: 100%;
}
</style>
