<template>
  <div id="index">
    <admin-frame :useTop="false" :usePage="false" :useNav="false">
      <template v-slot:info>
        <van-col span="24" class="menu" v-for="(i, index) in menu" :key="index" @click.native="$router.push(i.router)">
          {{ i.label }}
        </van-col>
      </template>
    </admin-frame>
  </div>
</template>

<script>
import { mapState, createNamespacedHelpers } from 'vuex';
import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
export default {
  name: 'index',
  props: {},
  components: {
    adminFrame,
  },
  data: function () {
    return {
      menu: [
        // 信息展示
        {
          label: '信息展示-重点实验室',
          router: '/infoview/laboratory/index',
        },
        {
          label: '信息展示-研究方向',
          router: '/infoview/research/index',
        },
        {
          label: '信息展示-设备信息',
          router: '/infoview/equipment/index',
        },
        {
          label: '信息展示-重要成果',
          router: '/infoview/achievement/index',
        },
        {
          label: '信息展示-承担科研任务',
          router: '/infoview/task/index',
        },
        // 科研信息
        {
          label: '科研信息-获奖信息',
          router: '/scientific/award/index',
        },
        {
          label: '科研信息-论文发表情况',
          router: '/scientific/paper/index',
        },
        {
          label: '科研信息-其他成果',
          router: '/scientific/otherachieve/index',
        },
        // 平台活动时间段
        {
          label: '平台活动时间段公示',
          router: '/activity/time/index',
        },
        // 人员信息
        {
          label: '人员信息',
          router: '/personnel/index',
        },
        // 学术交流
        {
          label: '学术交流',
          router: '/learning/index',
        },
        // 队伍建设与人才培养
        {
          label: '队伍建设与人才培养',
          router: '/ranks/index',
        },
      ],
    };
  },
  async created() {},
  methods: {},
  computed: {
    ...mapState(['user']),
  },
  metaInfo() {
    return { title: this.$route.meta.title };
  },
  watch: {
    test: {
      deep: true,
      immediate: true,
      handler(val) {},
    },
  },
};
</script>

<style lang="less" scoped>
.menu {
  border: 1px dashed #ccc;
  margin: 0 0 10px 0;
  padding: 10px;
}
</style>
