2021-01-06 19:52:14 +08:00
|
|
|
import { RouteRecordRaw, createRouter, createWebHistory } from 'vue-router';
|
|
|
|
|
2021-01-16 00:54:31 +08:00
|
|
|
|
2021-01-22 03:38:17 +08:00
|
|
|
import LoginView from "../views/auth/Login.vue";
|
|
|
|
import DashBoardView from "../views/dashboard/index.vue";
|
|
|
|
import PatientsView from "../views/patient/index.vue";
|
|
|
|
import ClientsView from "../views/client/index.vue";
|
|
|
|
import SamplesView from "../views/sample/index.vue";
|
|
|
|
import WorkSheetsView from "../views/worksheet/index.vue";
|
2021-01-16 00:54:31 +08:00
|
|
|
import AboutView from "../views/About";
|
|
|
|
|
2021-01-06 19:52:14 +08:00
|
|
|
const routes: RouteRecordRaw[] = [
|
|
|
|
{
|
|
|
|
path: '/',
|
2021-01-22 03:38:17 +08:00
|
|
|
name: 'DashBoard',
|
|
|
|
component: DashBoardView,
|
2021-01-16 00:54:31 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/auth",
|
|
|
|
name: "Login",
|
|
|
|
component: LoginView,
|
|
|
|
meta: { layout: "empty" },
|
2021-01-06 19:52:14 +08:00
|
|
|
},
|
2021-01-22 03:38:17 +08:00
|
|
|
{
|
|
|
|
path: '/patients',
|
|
|
|
name: 'Patients',
|
|
|
|
component: PatientsView,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/clients',
|
|
|
|
name: 'Clients',
|
|
|
|
component: ClientsView,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/samples',
|
|
|
|
name: 'Samples',
|
|
|
|
component: SamplesView,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/worksheets',
|
|
|
|
name: 'WorkSheets',
|
|
|
|
component: WorkSheetsView,
|
|
|
|
},
|
2021-01-06 19:52:14 +08:00
|
|
|
{
|
|
|
|
path: '/about',
|
|
|
|
name: 'About',
|
2021-01-16 00:54:31 +08:00
|
|
|
component: () => AboutView
|
2021-01-06 19:52:14 +08:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
const router = createRouter({
|
|
|
|
history: createWebHistory(process.env.BASE_URL),
|
|
|
|
routes,
|
|
|
|
});
|
|
|
|
|
|
|
|
export default router;
|