index.vue 1.04 KB
<!-- 费用类目管理 -->
<template>
  <d2-container class="account">
    <div class="header" slot="header">
      <el-tabs v-model="activeName">
        <el-tab-pane label="分账类目" name="ledger" />
        <el-tab-pane label="对账类目" name="reconciliation" />
      </el-tabs>
    </div>
    <div>
      <ledger-list v-if="activeName === 'ledger'" />
      <reconciliation-list v-if="activeName === 'reconciliation'" />
    </div>
  </d2-container>
</template>

<script>
import ledgerList from './ledgerList'
import reconciliationList from './reconciliationList'
export default {
  name: 'CostCategoryIndex',
  data() {
    return {
      userInfo: this.$store.state.d2admin.user.info,
      activeName: 'ledger'
      // activeName: 'reconciliation'
    }
  },

  components: {
    ledgerList,
    reconciliationList
  },

  mounted() {
    if (this.$route.params.activeName) {
      this.activeName = this.$route.params.activeName
    }
  },

  methods: {}
}

</script>
<style>
.account .el-tabs__header {
  margin: 0;
  padding: 0 20px;
}
</style>