<!-- **模块 **页面 -->
<template>
  <el-tabs v-model="activeName"
           @tab-click="handleClick"
           class="common-tabs"
           v-loading='pageLoading'>
    <el-tab-pane label="公司部门"
                 name="first">
      <shoreDept v-if="activeName === 'first'" />
    </el-tab-pane>
    <el-tab-pane label="公司权限"
                 name="second">
      <shore-auth v-if="activeName === 'second'" />
    </el-tab-pane>
    <el-tab-pane label="成员"
                 name="third">
      <shoreBasedMembers v-if="activeName === 'third'" />
    </el-tab-pane>
    <!-- <el-tab-pane label="船端部门"
                 name="fourth">
      <shipDept v-if="activeName === 'fourth'" />
    </el-tab-pane>
    <el-tab-pane label="船端权限"
                 name="fifth">
      <vessel-auth v-if="activeName === 'fifth'" />
    </el-tab-pane>
    <el-tab-pane label="船端成员"
                 name="sixth">
      <crewMembers v-if="activeName === 'sixth'" />
    </el-tab-pane> -->
  </el-tabs>
</template>
<script>
import shoreDept from "../../views/organizationNew/shoreDept"; //岸基部门
import shipDept from "../../views/organizationNew/shipDept";  //船端部门
import shoreAuth from "./shoreAuth";   //岸基权限
import vesselAuth from "./vesselAuth";  //船端权限
import shoreBasedMembers from "../../views/organizationNew/shoreBasedMembers"; //岸基成员
import shoreApi from "../../api/organization/shore";
import crewMembers from "../../views/organizationNew/crewMembers";  //船端成员

export default {
  name: "organizationIndex",
  components: {
    shoreDept,
    shipDept,
    shoreAuth,
    vesselAuth,
    shoreBasedMembers,
    crewMembers
  },
  data () {
    return {
      pageLoading: false,
      activeName: "first"
    };
  },
  created () {
    const active = localStorage.getItem("ws-pf_activeName");
    if (active != null) {
      this.activeName = active;
    } else {
      this.activeName = "first";
    }
  },
  methods: {
    handleClick (tab, event) {
      localStorage.setItem("ws-pf_activeName", tab.name);
    }
  }
};
</script>
