index.vue 1.46 KB
<!-- 我的分账 -->
<template>
  <d2-container class="account">
    <div class="header"
         slot="header">
      <el-tabs v-model="activeName">
        <el-tab-pane label="线下对账"
                     name="offline" />
        <el-tab-pane label="线上分账"
                     name="online" />
      </el-tabs>
    </div>
    <div v-if="+accountType === 7">
      <service-offline-list v-show="activeName === 'offline'" />
      <service-online-list v-if="activeName === 'online'" />
    </div>
    <div v-else>
      <offline-account-list v-show="activeName === 'offline'" />
      <online-account-list v-show="activeName === 'online'" />
    </div>
  </d2-container>
</template>

<script>
import serviceOnlineList from './serviceAccount/serviceOnlineList'
import serviceOfflineList from './serviceAccount/serviceOfflineList'
import onlineAccountList from './onlineAccountList'
import offlineAccountList from './offlineAccountList'
export default {
  name: 'Account',
  data() {
    return {
      userInfo: this.$store.state.d2admin.user.info,
      // 7 - 服务商
      accountType: '',
      activeName: 'offline'
    }
  },

  components: {
    serviceOnlineList,
    serviceOfflineList,
    onlineAccountList,
    offlineAccountList
  },

  mounted() {
    // console.log(this.userInfo.detail.accountType)
    this.accountType = this.userInfo.detail.accountType
  },

  methods: {}
}

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