| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- import Vue from 'vue'
- import Router from 'vue-router'
- // 解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题
- const originalPush = Router.prototype.push
- Router.prototype.push = function push(location) {
- return originalPush.call(this, location).catch(err => err)
- }
- const Login = () => import('@/components/Login')
- const Index = () => import('@/components/Index')
- const Home01 = () => import( /* webpackChunkName: "shouye" */ '@/components/home/Home01')
- const UserManger = () => import('@/components/UserManger')
- //---------------------------------------溯源模块------------------------------农场管理----------------------
- const FarmUserManger = () => import('@/Pages/symanger/farm/User')
- const FarmFieldsManger = () => import('@/Pages/symanger/farm/Fields')
- const FarmBaseManger = () => import( /* webpackChunkName: "syFarmBase" */ '@/Pages/symanger/farm/Base')
- const FarmAddBase = () => import( /* webpackChunkName: "syFarmBase" */ '@/Pages/symanger/farm/AddBase')
- const FarmEditBase = () => import( /* webpackChunkName: "syFarmBase" */ '@/Pages/symanger/farm/EditBase')
- //---------------------------------------溯源模块------------------------------溯源信息----------------------
- const ResultInfoList = () => import( /* webpackChunkName: "resultInfo" */ '@/Pages/symanger/resultInfo/resultInfoList')
- const ResultInfoEdit = () => import( /* webpackChunkName: "resultInfo" */ '@/Pages/symanger/resultInfo/resultInfoEdit')
- const TracebackDetail = () => import( /* webpackChunkName: "resultInfo" */ '@/Pages/symanger/resultInfo/tracebackDetail')
- const TracebackDetailApp = () => import( /* webpackChunkName: "resultInfo" */ '@/Pages/symanger/resultInfo/tracebackDetailApp')
- //---------------------------------------溯源模块------------------------------农事管理----------------------
- const FarmThingPlant = () => import('@/Pages/symanger/farmThing/plant')
- const FarmThingspray = () => import('@/Pages/symanger/farmThing/spray')
- const FarmThingApplyFertilizer = () => import('@/Pages/symanger/farmThing/applyFertilizer')
- const FarmThingWatering = () => import('@/Pages/symanger/farmThing/watering')
- const FarmThingHarvest = () => import('@/Pages/symanger/farmThing/harvest')
- const FarmThingMore = () => import('@/Pages/symanger/farmThing/more')
- const FarmThingStockIn = () => import('@/Pages/symanger/farmThing/stockIn')
- const FarmThingStockOut = () => import('@/Pages/symanger/farmThing/stockOut')
- const FarmThingStock = () => import('@/Pages/symanger/farmThing/stock')
- const FarmThingSale = () => import('@/Pages/symanger/farmThing/sale')
- const FarmThingTransport = () => import('@/Pages/symanger/farmThing/transport')
- Vue.use(Router)
- export default new Router({
- routes: [{
- path: '',
- redirect: '/index/farmBaseManger'
- },
- {
- path: '/login',
- component: Login
- },
- {
- path: '/index',
- component: Index,
- children: [{
- path: '',
- redirect: '/index/farmBaseManger'
- },
- {
- path: 'home',
- component: Home01
- },
- //-------------------溯源模块-----------农场管理----------
- {
- path: 'farmUserManger',
- component: FarmUserManger
- },
- {
- path: 'farmFieldsManger',
- component: FarmFieldsManger
- },
- {
- path: 'farmBaseManger',
- component: FarmBaseManger
- },
- {
- path: 'farmAddBase',
- component: FarmAddBase
- },
- {
- path: 'farmEditBase',
- component: FarmEditBase
- },
- //-------------------溯源模块-----------溯源信息----------
- {
- path: 'resultInfoList',
- component: ResultInfoList
- },
- {
- path: 'resultInfoEdit',
- component: ResultInfoEdit
- },
- //-------------------溯源模块-----------农事管理----------
- {
- path: 'farmThingPlant',
- component: FarmThingPlant
- },
- {
- path: 'farmThingspray',
- component: FarmThingspray
- },
- {
- path: 'farmThingApplyFerti',
- component: FarmThingApplyFertilizer
- },
- {
- path: 'farmThingWatering',
- component: FarmThingWatering
- },
- {
- path: 'farmThingHarvest',
- component: FarmThingHarvest
- },
- {
- path: 'farmThingMore',
- component: FarmThingMore
- },
- {
- path: 'farmThingStockIn',
- component: FarmThingStockIn
- },
- {
- path: 'farmThingStockOut',
- component: FarmThingStockOut
- },
- {
- path: 'farmThingStock',
- component: FarmThingStock
- },
- {
- path: 'farmThingSale',
- component: FarmThingSale
- },
- {
- path: 'farmThingTransport',
- component: FarmThingTransport
- },
- {
- path: 'userManger',
- component: UserManger
- },
- ]
- },
- //-------------------溯源模块-----------溯源中心----------
- {
- path: '/tracebackDetail/:backcode',
- name:'TracebackDetail',
- component: TracebackDetail,
- },
- {
- path: '/tracebackDetailApp/:backcode',
- name:'TracebackDetailApp',
- component: TracebackDetailApp,
- },
- ],
- // mode:'history'
- })
|