Blame view

src/router/index.js 9.07 KB
1 2 3
/*
 * @Description: 全局路由
 * @Autor: renchao
renchao@pashanhoo.com committed
4
 * @LastEditTime: 2023-05-26 17:11:19
5
 */
赵千 committed
6 7 8 9 10 11 12 13 14 15
import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
import Layout from '@/layout'
/* Router Modules */
// import componentsRouter from './modules/components'

export const constantRoutes = [
  {
任超 committed
16
    path: '/404',
任超 committed
17 18
    component: Layout,
    hidden: true,
任超 committed
19
    redirect: '/404/index',
任超 committed
20 21
    children: [
      {
任超 committed
22
        path: '/index',
任超 committed
23 24 25 26 27
        component: () => import('@/views/error-page/404'),
        name: '404',
        meta: { title: '404' }
      }
    ]
任超 committed
28
  },
29
  // 业务流程框架
任超 committed
30
  {
任超 committed
31 32 33
    path: '/workFrame',
    component: () => import('@/views/workflow/workFrame.vue'),
    name: 'workFrame',
任超 committed
34
    hidden: true,
任超 committed
35
    meta: { title: '发起申请' }
任超 committed
36
  },
37 38 39 40 41 42
    // 业务流程框架
    {
      path: '/djbworkFrame',
      component: () => import('@/views/djbworkflow/workFrame.vue'),
      name: 'djbworkFrame',
      hidden: true,
xiaomiao committed
43
      meta: { title: '登记簿补录' }
44
    },
xiaomiao committed
45 46 47 48 49 50 51 52
  //登记簿详情
  {
    path: '/djbFrameall',
    component: () => import('@/views/registerBook/djbFrameall.vue'),
    name: 'djbFrameall',
    hidden: true,
    meta: { title: '登记簿详情' }
  },
53 54
  // 业务流程只读框架
  {
任超 committed
55 56 57
    path: '/workFrameView',
    component: () => import('@/views/workflow/workFrameView.vue'),
    name: 'workFrameView',
任超 committed
58
    hidden: true,
59
    meta: { title: '发起申请' }
任超 committed
60
  },
任超 committed
61
  {
赵千 committed
62 63 64
    path: '/',
    component: Layout,
    redirect: '/home',
任超 committed
65
    meta: { title: '首页' },
赵千 committed
66 67 68 69
    children: [
      {
        path: 'home',
        component: () => import('@/views/home/index'),
任超 committed
70
        name: 'home',
任超 committed
71
        meta: { title: '工作台', icon: 'workbench', affix: true }
赵千 committed
72 73 74
      }
    ]
  },
yangwei committed
75 76 77 78 79 80 81 82
  // 登录页
  {
    path: '/login',
    component: () => import('@/views/login/index'),
    name: 'login',
    hidden: true,
    meta: { title: '登录' }
  },
任超 committed
83 84 85 86 87 88
]
/**
 * asyncRoutes
 * the routes that need to be dynamically loaded based on user roles
 */
export const asyncRoutes = [
赵千 committed
89
  {
90
    path: '/ywbl',
91
    id: '2',
赵千 committed
92 93
    parentId: null,
    component: Layout,
任超 committed
94
    meta: { title: '业务办理', icon: 'ywbl' },
任超 committed
95
    redirect: '/ywbl/ywsq',
96
    name: 'ywbl',
赵千 committed
97 98
    children: [
      {
99
        path: 'ywsq',
100 101
        id: '21',
        parentId: '2',
102
        component: () => import('@/views/ywbl/ywsq/guidePage.vue'),
103
        name: 'ywsq',
任超 committed
104
        meta: { title: '业务申请' }
任超 committed
105 106
      },
      {
107
        path: 'dbx',
108 109
        id: '22',
        parentId: '2',
110
        component: () => import('@/views/ywbl/dbx/dbx.vue'),
111
        name: 'dbx',
任超 committed
112 113 114
        meta: { title: '待办箱' }
      },
      {
115
        path: 'ybx',
116 117
        id: '23',
        parentId: '2',
118
        component: () => import('@/views/ywbl/ybx/ybx.vue'),
119
        name: 'ybx',
任超 committed
120
        meta: { title: '已办箱' }
任超 committed
121
      },
任超 committed
122 123 124
    ]
  },
  {
125
    path: '/sqcx',
126
    id: '3',
任超 committed
127 128
    parentId: null,
    component: Layout,
任超 committed
129
    meta: { title: '申请查询', icon: 'sqcx' },
130
    redirect: '/sqcx/jtfc',
任超 committed
131
    alwaysShow: true,
132
    name: 'sqcx',
任超 committed
133 134
    children: [
      {
135
        path: 'jtfc',
136 137
        id: '31',
        parentId: '3',
138
        component: () => import('@/views/sqcx/jtfc/jtfc.vue'),
139
        name: 'jtfc',
任超 committed
140 141 142
        meta: { title: '家庭房产' }
      },
      {
143
        path: 'dydjb',
144 145
        id: '32',
        parentId: '3',
146
        component: () => import('@/views/sqcx/dydjb/dydjb.vue'),
147
        name: 'dydjb',
任超 committed
148 149 150
        meta: { title: '打印登记薄' }
      },
      {
jiaozeping@pashanhoo.com committed
151
        path: 'sqcxjl',
152 153
        id: '33',
        parentId: '3',
jiaozeping@pashanhoo.com committed
154
        component: () => import('@/views/sqcx/sqcxjl/sqcxjl.vue'),
155
        name: 'cxjl',
jiaozeping@pashanhoo.com committed
156
        meta: { title: '申请查询记录' }
任超 committed
157 158 159 160
      }
    ]
  },
  {
161
    path: '/zhcx',
162
    id: '4',
任超 committed
163 164
    parentId: null,
    component: Layout,
任超 committed
165
    meta: { title: '综合查询', icon: 'zhcx' },
166
    redirect: '/zhcx/jdcx',
任超 committed
167
    alwaysShow: true,
168
    name: 'zhcx',
任超 committed
169 170
    children: [
      {
171
        path: 'jdcx',
172 173
        id: '41',
        parentId: '4',
174
        component: () => import('@/views/zhcx/jdcx/jdcx.vue'),
175
        name: 'jdcx',
任超 committed
176 177 178
        meta: { title: '进度查询' }
      },
      {
179
        path: 'djbcx',
180 181
        id: '42',
        parentId: '4',
182
        component: () => import('@/views/zhcx/djbcx/djbcx.vue'),
183
        name: 'djbcx',
任超 committed
184 185 186
        meta: { title: '登记簿查询' }
      },
      {
187
        path: 'lpcx',
188 189
        id: '43',
        parentId: '4',
190
        component: () => import('@/views/zhcx/lpcx/lpcx.vue'),
191
        name: 'lpcx',
任超 committed
192
        meta: { title: '楼盘查询' }
任超 committed
193 194 195 196 197 198 199 200
      },
      {
        path: 'zslqcx',
        id: '45',
        parentId: '4',
        component: () => import('@/views/zhcx/zslqcx/zslqcx.vue'),
        name: 'zslqcx',
        meta: { title: '证书领取查询' }
任超 committed
201 202 203 204 205 206 207 208 209 210
      },
      // 在建工程抵押查询
      {
        path: 'zxgcdycx',
        id: '46',
        parentId: '4',
        component: () => import('@/views/zhcx/zxgcdycx/zxgcdycx.vue'),
        name: 'zxgcdycx',
        meta: { title: '在建工程抵押' }
      },
任超 committed
211 212 213
    ]
  },
  {
214
    path: '/zsgl',
215
    id: '5',
任超 committed
216 217
    parentId: null,
    component: Layout,
任超 committed
218
    meta: { title: '证书管理', icon: 'zsgl' },
219
    redirect: '/zsgl/zsrk',
任超 committed
220
    alwaysShow: true,
221
    name: 'zsgl',
任超 committed
222 223
    children: [
      {
224
        path: 'zsrk',
225 226
        id: '51',
        parentId: '5',
227
        component: () => import('@/views/zsgl/zsrk/zsrk.vue'),
228
        name: 'zsrk',
任超 committed
229 230 231
        meta: { title: '证书入库' }
      },
      {
232
        path: 'zsff',
233 234
        id: '52',
        parentId: '5',
235
        component: () => import('@/views/zsgl/zsff/zsff.vue'),
236
        name: 'zsff',
任超 committed
237 238 239
        meta: { title: '证书分发' }
      },
      {
240
        path: 'zssyjl',
241 242
        id: '53',
        parentId: '5',
243
        component: () => import('@/views/zsgl/zssyjl/zssyjl.vue'),
244
        name: 'zssyjl',
任超 committed
245
        meta: { title: '证书使用记录' }
任超 committed
246
      },
任超 committed
247 248 249 250
    ]
  },
  {
    path: '/system',
251
    id: '9',
任超 committed
252 253
    parentId: null,
    component: Layout,
任超 committed
254
    meta: { title: '系统管理', icon: 'system' },
任超 committed
255 256 257 258 259 260
    redirect: '/system/dictionaries',
    alwaysShow: true,
    name: 'system',
    children: [
      {
        path: 'dictionaries',
261 262
        id: '91',
        parentId: '9',
任超 committed
263
        component: () => import('@/views/system/dictionaries/dictionaries.vue'),
任超 committed
264 265
        name: 'dictionaries',
        meta: { title: '字典管理' }
266 267 268 269 270 271 272 273
      },
      {
        path: 'sqywgz',
        id: '92',
        parentId: '9',
        component: () => import('@/views/system/sqywgz/sqywgz.vue'),
        name: 'sqywgz',
        meta: { title: '申请业务规则' }
274 275 276 277 278 279 280 281
      },
      {
        path: 'qtjfjmb',
        id: '93',
        parentId: '9',
        component: () => import('@/views/system/qtjfjmb/qtjfjmb.vue'),
        name: 'qtjfjmb',
        meta: { title: '其他及附记模板' }
任超 committed
282 283 284 285 286 287 288 289 290
      },
      {
        path: 'dymbgl',
        id: '94',
        parentId: '9',
        component: () => import('@/views/system/dymbgl/dymbgl.vue'),
        name: 'dymbgl',
        meta: { title: '打印模板管理' }
      },
蔡俊立 committed
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306
      {
        path: 'xttz',
        id: '95',
        parentId: '9',
        component: () => import('@/views/system/xttz/xttz.vue'),
        name: 'xttz',
        meta: { title: '系统通知' }
      },
      {
        path: 'flfg',
        id: '96',
        parentId: '9',
        component: () => import('@/views/system/flfg/flfg.vue'),
        name: 'flfg',
        meta: { title: '法律法规' }
      },
307 308 309 310 311 312 313 314
      {
        path: 'gxhpz',
        id: '97',
        parentId: '9',
        component: () => import('@/views/system/gxhpz/gxhpz.vue'),
        name: 'gxhpz',
        meta: { title: '个性化配置' }
      },
赵千 committed
315
    ]
蔡俊立 committed
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342
  },
  {
    path: '/xtjk',
    id: '6',
    parentId: null,
    component: Layout,
    meta: { title: '系统监控', icon: 'system' },
    redirect: '/xtjk/cwrz',
    alwaysShow: true,
    name: 'xtjk',
    children: [
      {
        path: 'cwrz',
        id: '61',
        parentId: '6',
        component: () => import('@/views/xtjk/cwrz/cwrz.vue'),
        name: 'cwrz',
        meta: { title: '错误日志' }
      },
      {
        path: 'czrz',
        id: '62',
        parentId: '6',
        component: () => import('@/views/xtjk/czrz/czrz.vue'),
        name: 'czrz',
        meta: { title: '操作日志' }
      },
蔡俊立 committed
343 344 345 346 347 348 349 350
      {
        path: 'zjjk',
        id: '63',
        parentId: '6',
        component: () => import('@/views/xtjk/zjjk/zjjk.vue'),
        name: 'zjjk',
        meta: { title: '主机监控' }
      },
蔡俊立 committed
351
    ]
蔡俊立 committed
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371
  },
  {
    path: '/jkfw',
    id: '7',
    parentId: null,
    component: Layout,
    meta: { title: '接口服务', icon: 'system' },
    redirect: '/jkfw/ptjk',
    alwaysShow: true,
    name: 'jkfw',
    children: [
      {
        path: 'ptjk',
        id: '71',
        parentId: '7',
        component: () => import('@/views/jkfw/ptjk/ptjk.vue'),
        name: 'ptjk',
        meta: { title: '平台接口' }
      },
    ]
赵千 committed
372 373 374 375 376 377
  }
]

const createRouter = () =>
  new Router({
    scrollBehavior: () => ({ y: 0 }),
任超 committed
378
    routes: [...constantRoutes]
赵千 committed
379 380 381 382 383 384 385 386 387 388
  })

const router = createRouter()
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter () {
  const newRouter = createRouter()
  router.matcher = newRouter.matcher // reset router
}

export default router