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

<script>

import PumDetail from "./mmDetail";
import PumList from "./mmList";

export default {
  name: "AppMassMessage",
  components: {PumList, PumDetail},
  label: "群众留言(秀山)",
  props: {
    instance: Function,
    dict: Object,
    permissions: Function
  },
  computed: {
    currentComponent() {
      return !!this.$route.query.id ? PumDetail : PumList
    }
  },
  created() {
    this.dict.load("leaveMessageType", "yesOrNo", "msgStatus")
  }
}
</script>

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