<template>
  <section class="AppPartyScore">
    <component :is="currentPage" v-bind="$props"/>
  </section>
</template>

<script>
import PsList from "./psList";
import PsDetail from "./psDetail";

export default {
  name: "AppPartyScore",
  components: {PsDetail, PsList},
  label: "党员积分",
  props: {
    instance: Function,
    dict: Object,
    permissions: Function
  },
  computed: {
    currentPage() {
      return this.$route.query.id ? PsDetail : PsList
    }
  },
  created() {
    this.dict.load("partyIntegralType")
  }
}
</script>

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