import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from "@/components/Index"

import DataStatis from "@/views/DataStatis/Index"

Vue.use(VueRouter)

const router = new VueRouter({
    routes: [
        {
            path: '/', component: Index, redirect: "/dataStatis",
            children: [

                {
                    path: '/dataStatis', component: DataStatis,
                    meta: {
                        title: '水利工程质量动态评估系统'
                    }
                },


            ],

        },



    ]
})
router.beforeEach((to, from, next) => {
    if (to.meta.title) {
        document.title = to.meta.title
    }
    next()
})
export default router