123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 |
- import Vue from "vue";
- import Router from "vue-router";
- import Layout from "@/layout/index.vue";
- Vue.use(Router);
- export default new Router({
- mode: "history",
- scrollBehavior: (to, from, savedPosition) => {
- if (savedPosition) {
- return savedPosition;
- } else {
- return { x: 0, y: 0 };
- }
- },
- base: process.env.BASE_URL,
- routes: [
- {
- path: "/login",
- component: () =>
- import( "@/views/login/index.vue"),
- meta: { hidden: true }
- },
- {
- path: "/404",
- component: () => import( "@/views/404.vue"),
- meta: { hidden: true }
- },
- {
- path: "/",
- redirect: "/project/index",
- component: Layout,
- children: [
- {
- path: "project/index",
- component: () =>
- import(
- "@/views/project/index.vue"
- ),
- meta: {
- title: "项目管理",
- icon: "form"
- }
- }
- ]
- },
- {
- path: "/manage",
- component: Layout,
- meta: {
- title: "文件管理",
- icon: "example"
- },
- children: [
- {
- path: "build",
- component: () =>
- import(
- "@/views/manage/build/index.vue"
- ),
- meta: {
- title: "建筑楼层管理",
- icon: "tree"
- }
- },
- {
- path: "model",
- component: () =>
- import(
- "@/views/manage/model/index.vue"
- ),
- meta: {
- title: "模型修改任务",
- icon: "table"
- }
- }
- ]
- },
- {
- path: "/maintain",
- component: Layout,
- redirect: "/maintain/device",
- meta: {
- title: "数据维护",
- icon: "nested"
- },
- children: [
- {
- path: "device",
- component: () =>
- import(
- "@/views/maintain/device/index.vue"
- ),
- meta: { title: "设备" }
- },
- {
- path: "space",
- component: () =>
- import(
- "@/views/maintain/space/index.vue"
- ),
- meta: { title: "空间" }
- },
- {
- path: "system",
- component: () =>
- import(
- "@/views/maintain/system/index.vue"
- ),
- meta: { title: "系统" }
- },
- {
- path: "relationship",
- component: () =>
- import(
- "@/views/maintain/relationship/index.vue"
- ),
- meta: { title: "关系" }
- }
- ]
- },
- {
- path: "/scene",
- component: Layout,
- redirect: "/scene/tiepoint",
- meta: {
- title: "现场实施",
- icon: "nested"
- },
- children: [
- {
- path: "tiepoint",
- component: () =>
- import(
- "@/views/scene/tiepoint/index.vue"
- ),
- meta: { title: "绑点" }
- },
- {
- path: "system",
- component: () =>
- import(
- "@/views/scene/system/index.vue"
- ),
- meta: { title: "系统图" }
- },
- {
- path: "plane",
- component: () =>
- import(
- "@/views/scene/plane/index.vue"
- ),
- meta: { title: "平面图" }
- }
- ]
- },
- {
- path: "/tools",
- component: Layout,
- meta: {
- title: "一致性检查工具",
- icon: "nested"
- }
- },
- {
- path: "/model-tool",
- component: Layout,
- meta: {
- title: "模型检查工具",
- icon: "nested"
- }
- },
- {
- path: "*",
- redirect: "/404",
- meta: { hidden: true }
- }
- ]
- });
|