import Vue from 'vue';
import VueRouter from 'vue-router';
import HomeView from '../views/HomeView.vue';
import UserList from '@/components/list.vue'; // 账号列表组件
import suffixList from '@/components/suffixList.vue'; // 账号列表组件
import instupdata from '@/components/instupdata.vue'; // 账号列表组件
import UserExamine from '@/components/examine.vue'; // 账号审核组件.
import VersionAdd from '@/components/versionAdd.vue';//版本添加组件
import OrganList from '@/components/organList.vue';
import SchoolList from '@/components/schoolList.vue';
import versionInstr from '@/views/versionInstr.vue';//版本说明组件
import updateDate from '@/views/updateDate.vue';
import desktopToolList from '@/components/desktopToolList.vue';

Vue.use(VueRouter);

const routes = [
  {
    path: '/login',
    name:'login',
    component: () => import('@/views/login/index.vue'),
    meta: {
      title: '登录',
      keepAlive: false
    }
  },
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect: '/user-list', // 默认跳转到账号列表
    children: [
      {
        path: 'user-list',
        name: 'UserList',
        component: UserList,
      },
      {
        path: 'suffix-list',
        name: 'suffixList',
        component: suffixList,
      },
      {
        path: 'instupdata',
        name: 'instupdata',
        component: instupdata,
      },
      {
        path: 'user-examine',
        name: 'UserExamine',
        component: UserExamine,
      },
      {
        path: 'version-add',
        name: 'VersionAdd',
        component: VersionAdd,
      },
      {
        path: 'organ-list',
        name: 'organList',
        component: OrganList,
      },
      {
        path: 'school-list',
        name: 'schoolList',
        component: SchoolList,
      },
			{
				path:"desktopTool-list",
				name:"desktopToolList",
				component:desktopToolList
			}
    ],
  },
  {
    path: '/examineDialog',
    name: 'examineDialog',
    component: () => import(/* webpackChunkName: "examineDialog" */ '../views/examineDialog.vue'),
  },
  {
    path: '/versionInstr',
    name: 'versionInstr',
    component:versionInstr,
  },
  {
    path: '/updateDate',
    name: 'updateDate',
    component:updateDate,
  }
];

const router = new VueRouter({
  routes,
});

export default router;
