<template>
  <div class="fullHeight">
    <div class="content_title">
      <el-menu
        :default-active="String(showModule)"
        active-text-color="#5181F6"
        class="el-menu-demo whiteBlock"
        mode="horizontal"
        style="width: 329px"
      >
        <!-- <el-menu-item index="1" style="height: 41px; line-height: 41px" @click="switchTab(1)">地图</el-menu-item> -->
        <el-menu-item index="2" style="height: 41px; line-height: 41px" @click="switchTab(2)">
          基站
        </el-menu-item>
        <el-menu-item index="3" style="height: 41px; line-height: 41px" @click="switchTab(3)">
        楼栋
        </el-menu-item>
      </el-menu>
    </div>
    <div class="content_right"></div>

    <!-- 基站 -->
    <pointConfiguration v-if="showModule == 3" />
    <!-- 楼栋 -->
    <personnelPositioning v-if="showModule == 2" />
  </div>
</template>
<script>
import pointConfiguration from '@/views/projectFront/personnelPosition/ConfigChildrenIndex/configuration'
import personnelPositioning from '@/views/projectFront/personnelPosition/ConfigChildrenIndex/positoningIndex'
export default {
  components: {
    // Labor,
    pointConfiguration,
    personnelPositioning
  },
  data() {
    return {
      showModule: 2
    }
  },
  created() {
    //详情返回对应的 列表模块
    if (localStorage.getItem('showPersonModule')) {
      this.switchTab(Number(localStorage.getItem('showPersonModule')))
      localStorage.removeItem('showPersonModule')
    }
  },
  methods: {
    switchTab(type) {
      if (type == this.showModule) return
      if (type == 1) {
        window._paq.push(['trackEvent', '点击', '劳务人员', '切换为劳务人员'])
      } else if (type == 2) {
        window._paq.push(['trackEvent', '点击', '管理人员', '切换为管理人员'])
      } else if (type == 3) {
        window._paq.push(['trackEvent', '点击', '临时人员', '切换为临时人员'])
      }
      this.showModule = type
    }
  }
}
</script>
<style lang="less" scoped>
.searchBox {
  justify-content: space-between;
}
.content_title {
  z-index: 100;
  position: absolute;
  top: 20;
  left: 20;
}
.labor_module {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
/deep/ .el-dialog__title,
.pageTitle {
  font-weight: 700 !important;
}
.el-menu-item {
  width: 49.333%;
  text-align: center;
  padding: 0 16px !important;
}
</style>
