routes.js 2.16 KB
import login from "@/views/login/login.vue";

const errorPage = [
	{
		path: "/404",
		component: () => import("@/views/404"),
		hidden: true,
	},
	{ path: "*", redirect: "/404", hidden: true },
];

const frameOut = [
	{
		path: "/",
		name: "login",
		component: login,
	},
];
const constantRoutes = [
	{
		path: "/panel",
		code: "panel",
		component: () => import("@/views/Home"),
		redirect: "/panel",
		children: [
			{
				path: "/panel",
				name: "首页",
				code: "0-1",
				component: () => import("@/views/panel/index"),
			},
			{
				path: "/create",
				name: "新建",
				code: "0-2",
				component: () => import("@/views/panel/create/index"),
			},
			{
				path: "/add",
				name: "添加",
				code: "0-6",
				component: () => import("@/views/panel/add/index"),
			},
			{
				path: "/modify",
				name: "更正",
				code: "0-3",
				component: () => import("@/views/panel/modify/index"),
			},
			{
				path: "/change",
				name: "变更",
				code: "0-4",
				component: () => import("@/views/panel/change/index"),
			},
			{
				path: "/search",
				name: "综合查询",
				code: "0-5",
				component: () => import("@/views/panel/search/index"),
			},
			{
				path: "/zrz",
				name: "自然幢",
				code: "1-1",
				component: () => import("@/views/systemZRZ/index"),
			},
			{
				path: "/dz",
				name: "多幢",
				code: "1-2",
				component: () => import("@/views/systemDZ/index"),
			},
			{
				path: "/h",
				name: "户",
				code: "1-3",
				component: () => import("@/views/systemH/index"),
			},
			{
				path: "/zd",
				name: "宗地",
				code: "1-5",
				component: () => import("@/views/systemZD/index"),
			},
			{
				path: "/ljz",
				name: "逻辑幢",
				code: "1-6",
				component: () => import("@/views/systemZRZ/ljz/index"),
			},
			{
				path: "/c",
				name: "层",
				code: "1-7",
				component: () => import("@/views/systemZRZ/c/index"),
			},
			{
				path: "/zdy",
				name: "幢单元",
				code: "1-8",
				component: () => import("@/views/systemZRZ/lpb/zdy/index"),
			},
		],
	},
];
// 在这里面动态引入路由文件 达成权限处理得问题
// 重新组织后导出
export default [...errorPage, ...frameOut, ...constantRoutes];