Blame view

src/router/index.js 6.77 KB
任超 committed
1 2 3 4
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
import Layout from '@/layout'
xiaomiao committed
5

任超 committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
export const constantRoutes = [
  {
    path: '/404',
    component: Layout,
    hidden: true,
    redirect: '/404/index',
    children: [
      {
        path: '/index',
        component: () => import('@/views/error-page/404'),
        name: '404',
        meta: { title: '404' }
      }
    ]
  },
yangwei committed
21 22
  //登录
  {
xiaomiao committed
23
    path: "/jg",
xiaomiao committed
24 25 26 27
    name: "loginjg",
    component: () => import("@/views/loginjg/index.vue"),
  },
  {
xiaomiao committed
28
    path: "/sb",
xiaomiao committed
29 30
    name: "loginsb",
    component: () => import("@/views/loginsb/index.vue"),
yangwei committed
31
  },
任超 committed
32 33
  {
    path: '/',
任超 committed
34
    redirect: to => {
任超 committed
35
      return { path: `/${Vue.prototype.BASE_API.THEME}` }
任超 committed
36 37 38 39 40
    },
  },
  // 监管首页
  {
    path: '/home',
任超 committed
41 42 43 44
    component: Layout,
    meta: { title: '首页' },
    children: [
      {
任超 committed
45
        path: '',
任超 committed
46
        component: () => import('@/views/home/index'),
任超 committed
47
        name: 'home',
任超 committed
48
        meta: { title: '工作台', icon: 'workbench', affix: true }
任超 committed
49 50
      }
    ]
任超 committed
51 52 53 54 55 56 57
  }
]
/**
 * asyncRoutes
 * the routes that need to be dynamically loaded based on user roles
 */
export const asyncRoutes = [
任超 committed
58
  // 接收报文查询
任超 committed
59 60 61 62 63 64
  {
    path: '/jsbwcx',
    component: Layout,
    children: [
      {
        path: 'index',
任超 committed
65
        component: () => import('@/views/jsbwcx/index'),
任超 committed
66
        name: 'jsbwcx',
任超 committed
67
        meta: { title: '区县接入', icon: 'zsgl' }
任超 committed
68 69 70
      }
    ]
  },
任超 committed
71
  // 省厅汇交
任超 committed
72
  {
任超 committed
73
    path: '/sthj',
任超 committed
74 75 76
    component: Layout,
    children: [
      {
任超 committed
77
        path: 'sbbwcx',
任超 committed
78
        component: () => import('@/views/sthj/sbbwcx/index'),
任超 committed
79
        name: 'sbbwcx',
任超 committed
80 81
        meta: { title: '上报报文', icon: 'zsgl' }
      },
任超 committed
82
      {
任超 committed
83
        path: 'dbrzcx',
任超 committed
84
        component: () => import('@/views/sthj/dbrzcx/index'),
任超 committed
85
        name: 'dbrzcx',
任超 committed
86
        meta: { title: '登簿日志', icon: 'zsgl' }
任超 committed
87 88 89
      }
    ]
  },
任超 committed
90 91 92 93
  // 监控统计
  {
    path: '/jktj',
    component: Layout,
任超 committed
94
    meta: { title: '统计监控', icon: 'sqcx' },
任超 committed
95 96
    children: [
      {
任超 committed
97 98 99 100 101 102 103 104
        path: 'ywltj',
        component: () => import('@/views/jktj/ywltj/index'),
        name: 'jktj',
        meta: { title: '业务量统计', icon: 'zhcx' }
      },
      {
        path: 'bsxljk',
        component: () => import('@/views/jktj/bsxljk/index'),
任超 committed
105
        name: 'jktj',
任超 committed
106
        meta: { title: '办事效率监控', icon: 'zhcx' }
任超 committed
107 108 109
      }
    ]
  },
任超 committed
110
  // 接入业务信息-不动产数据
任超 committed
111 112 113
  {
    path: '/busineInfo',
    component: Layout,
任超 committed
114
    meta: { title: '不动产数据', icon: 'sqcx' },
任超 committed
115 116 117 118 119
    redirect: '/busineInfo/landOwnership',
    alwaysShow: true,
    name: 'busineInfo',
    children: [
      {
jiaozeping@pashanhoo.com committed
120
        path: 'tdsyq',
jiaozeping@pashanhoo.com committed
121
        component: () => import('@/views/bdcsj/tdsyq/index'),
jiaozeping@pashanhoo.com committed
122
        name: 'tdsyq',
任超 committed
123 124 125
        meta: { title: '土地所有权' }
      },
      {
1  
jiaozeping@pashanhoo.com committed
126
        path: 'jsydzjdsyq',
jiaozeping@pashanhoo.com committed
127
        component: () => import('@/views/bdcsj/jsydzjdsyq/index'),
1  
jiaozeping@pashanhoo.com committed
128
        name: 'jsydzjdsyq',
任超 committed
129 130 131
        meta: { title: '建设用地、宅基地使用权' }
      },
      {
1  
jiaozeping@pashanhoo.com committed
132
        path: 'fdcqdz',
jiaozeping@pashanhoo.com committed
133
        component: () => import('@/views/bdcsj/fdcqdz/index'),
1  
jiaozeping@pashanhoo.com committed
134
        name: 'fdcqdz',
任超 committed
135 136 137
        meta: { title: '房地产权(项目内多幢房屋)' }
      },
      {
1  
jiaozeping@pashanhoo.com committed
138
        path: 'fdcqyz',
jiaozeping@pashanhoo.com committed
139
        component: () => import('@/views/bdcsj/fdcqyz/index'),
1  
jiaozeping@pashanhoo.com committed
140
        name: 'fdcqyz',
任超 committed
141 142 143
        meta: { title: '房地产权(独幢、层、套、间、房屋)' }
      },
      {
1  
jiaozeping@pashanhoo.com committed
144
        path: 'fdcqqfsyq',
jiaozeping@pashanhoo.com committed
145
        component: () => import('@/views/bdcsj/fdcqqfsyq/index'),
1  
jiaozeping@pashanhoo.com committed
146
        name: 'fdcqqfsyq',
任超 committed
147 148 149
        meta: { title: '建筑物区分所有权业主共有部分' }
      },
      {
jiaozeping@pashanhoo.com committed
150
        path: 'hysyq',
jiaozeping@pashanhoo.com committed
151
        component: () => import('@/views/bdcsj/hysyq/index'),
jiaozeping@pashanhoo.com committed
152
        name: 'hysyq',
1  
jiaozeping@pashanhoo.com committed
153
        meta: { title: '海域(含无居民海岛)使用权' }
任超 committed
154 155
      },
      {
1  
jiaozeping@pashanhoo.com committed
156
        path: 'gzwsyq',
jiaozeping@pashanhoo.com committed
157
        component: () => import('@/views/bdcsj/gzwsyq/index'),
1  
jiaozeping@pashanhoo.com committed
158
        name: 'gzwsyq',
1  
jiaozeping@pashanhoo.com committed
159
        meta: { title: '构(建)筑物所有权' }
任超 committed
160 161
      },
      {
1  
jiaozeping@pashanhoo.com committed
162
        path: 'nydsyq',
jiaozeping@pashanhoo.com committed
163
        component: () => import('@/views/bdcsj/nydsyq/index'),
1  
jiaozeping@pashanhoo.com committed
164
        name: 'nydsyq',
1  
jiaozeping@pashanhoo.com committed
165
        meta: { title: '农用地使用权(非林地)' }
任超 committed
166 167
      },
      {
1  
jiaozeping@pashanhoo.com committed
168
        path: 'lq',
jiaozeping@pashanhoo.com committed
169
        component: () => import('@/views/bdcsj/lq/index'),
1  
jiaozeping@pashanhoo.com committed
170
        name: 'lq',
1  
jiaozeping@pashanhoo.com committed
171
        meta: { title: '林权' }
任超 committed
172 173
      },
      {
1  
jiaozeping@pashanhoo.com committed
174
        path: 'zxdj',
jiaozeping@pashanhoo.com committed
175
        component: () => import('@/views/bdcsj/zxdj/index'),
1  
jiaozeping@pashanhoo.com committed
176
        name: 'zxdj',
1  
jiaozeping@pashanhoo.com committed
177
        meta: { title: '注销登记' }
任超 committed
178 179
      },
      {
1  
jiaozeping@pashanhoo.com committed
180
        path: 'yydj',
jiaozeping@pashanhoo.com committed
181
        component: () => import('@/views/bdcsj/yydj/index'),
1  
jiaozeping@pashanhoo.com committed
182 183
        name: 'yydj',
        meta: { title: '异议登记' }
任超 committed
184 185
      },
      {
1  
jiaozeping@pashanhoo.com committed
186
        path: 'ygdj',
jiaozeping@pashanhoo.com committed
187
        component: () => import('@/views/bdcsj/ygdj/index'),
1  
jiaozeping@pashanhoo.com committed
188 189
        name: 'ygdj',
        meta: { title: '预告登记' }
任超 committed
190 191
      },
      {
1  
jiaozeping@pashanhoo.com committed
192
        path: 'Cfdj',
jiaozeping@pashanhoo.com committed
193
        component: () => import('@/views/bdcsj/cfdj/index'),
1  
jiaozeping@pashanhoo.com committed
194 195
        name: 'Cfdj',
        meta: { title: '查封登记' }
任超 committed
196 197
      },
      {
1  
jiaozeping@pashanhoo.com committed
198
        path: 'dyaq',
jiaozeping@pashanhoo.com committed
199
        component: () => import('@/views/bdcsj/dyaq/index'),
1  
jiaozeping@pashanhoo.com committed
200
        name: 'dyaq',
1  
jiaozeping@pashanhoo.com committed
201
        meta: { title: '抵押权登记' }
任超 committed
202 203
      },
      {
1  
jiaozeping@pashanhoo.com committed
204
        path: 'dyiq',
jiaozeping@pashanhoo.com committed
205
        component: () => import('@/views/bdcsj/dyiq/index'),
1  
jiaozeping@pashanhoo.com committed
206
        name: 'dyiq',
1  
jiaozeping@pashanhoo.com committed
207
        meta: { title: '地役权登记' }
任超 committed
208 209 210
      }
    ]
  },
任超 committed
211 212 213 214
  // 系统管理
  {
    path: '/system',
    component: Layout,
yangwei committed
215
    meta: { title: '运维中心', icon: 'sqcx', breadcrumb: false },
任超 committed
216
    redirect: '/system/dictionaries',
任超 committed
217 218 219 220
    alwaysShow: true,
    name: 'system',
    children: [
      {
任超 committed
221 222 223
        path: 'dictionaries',
        component: () => import('@/views/system/dictionaries/dictionaries.vue'),
        name: 'dictionaries',
任超 committed
224 225 226 227
        meta: { title: '字典管理' }
      },
      {
        path: 'validationRule',
任超 committed
228
        component: () => import('@/views/system/validationRule/index'),
任超 committed
229
        name: 'validationRule',
任超 committed
230
        meta: { title: '上报校验规则配置' }
任超 committed
231 232 233
      },
      {
        path: 'timedTask',
任超 committed
234
        component: () => import('@/views/system/timedTask/index'),
任超 committed
235 236
        name: 'timedTask',
        meta: { title: '定时任务' }
xiaomiao committed
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
      },
      {
        path: 'menus',
        component: () => import('@/views/system/menus/index'),
        name: 'menus',
        meta: { title: '菜单管理' }
      },
      {
        path: 'users',
        component: () => import('@/views/system/users/index'),
        name: 'users',
        meta: { title: '人员管理' }
      },
      {
        path: 'roles',
        component: () => import('@/views/system/roles/index'),
        name: 'roles',
        meta: { title: '角色管理' }
任超 committed
255 256
      }
    ]
yangwei committed
257
  },
任超 committed
258 259 260 261 262
]

const createRouter = () =>
  new Router({
    scrollBehavior: () => ({ y: 0 }),
任超 committed
263
    routes: [...constantRoutes]
任超 committed
264 265 266 267 268 269 270 271 272
  })

const router = createRouter()
export function resetRouter () {
  const newRouter = createRouter()
  router.matcher = newRouter.matcher // reset router
}

export default router