<template>
  <div class="about">
    <el-config-provider :locale="zhCn">
      <v-header />
      <v-sidebar />
      <div class="content-box" :class="{ 'content-collapse': collapse }">
        <v-tags></v-tags>
        <div class="content">
          <router-view />
        </div>
      </div>
    </el-config-provider>
    <AlarmPopupa />
  </div>
</template>
<script setup>
import { ElConfigProvider } from "element-plus";
import zhCn from "element-plus/lib/locale/lang/zh-cn";

import { computed, onBeforeMount } from "vue";
import { useStore } from "vuex";
import vHeader from "../components/Header.vue";
import vSidebar from "../components/Sidebar.vue";
import vTags from "../components/Tags.vue";
import AlarmPopupa from "../components/alarmPopupa/index.vue";

import { getWpList } from "/@/api/api.js";
const store = useStore();
const collapse = computed(() => store.state.collapse);
onBeforeMount(async () => {
  await getStationList();
  await getStationListAll();
  await getBooststation();
});
const getStationList = async () => {
  const { data } = await getWpList("windturbine");
  store.dispatch("actionsStationList", data);
};
const getStationListAll = async () => {
  const { data } = await getWpList();
  store.dispatch("actionsStationListAll", data);
};
const getBooststation = async () => {
  const { data } = await getWpList("booststation");
  store.dispatch("actionsBooststationList", data);
};
</script>
