Blame view

src/router/index.js 7.61 KB
xiaomiao committed
1 2 3 4 5
/*
 * @Description  :路由配置
 * @Autor        : miaofang
 * @LastEditTime : 2023-05-18 11:19:24
 */
任超 committed
6 7 8 9
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
import Layout from '@/layout'
xiaomiao committed
10

任超 committed
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
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
26 27
  //登录
  {
28 29 30
    path: "/login",
    name: "login",
    component: () => import("@/views/login/index.vue"),
yangwei committed
31
  },
任超 committed
32 33
  {
    path: '/',
任超 committed
34
    redirect: to => {
35
      return { path: '/login' }
任超 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 = [
58
  // 区县接入
任超 committed
59
  {
60
    path: '/qxjr',
任超 committed
61 62 63
    component: Layout,
    children: [
      {
64 65 66 67 68 69 70 71 72
        path: 'gbxxcx',
        component: () => import('@/views/qxjr/gbxxcx/index'),
        name: 'gbxxcx',
        meta: { title: '信息查询', icon: 'zsgl' }
      },
      {
        path: 'jsbwcx',
        component: () => import('@/views/qxjr/jsbwcx/index'),
        name: 'jsbwcx',
任超 committed
73
        meta: { title: '区县接入', icon: 'zsgl' }
任超 committed
74 75 76
      }
    ]
  },
任超 committed
77
  // 省厅汇交
任超 committed
78
  {
任超 committed
79
    path: '/sthj',
任超 committed
80 81 82
    component: Layout,
    children: [
      {
任超 committed
83
        path: 'sbbwcx',
任超 committed
84
        component: () => import('@/views/sthj/sbbwcx/index'),
任超 committed
85
        name: 'sbbwcx',
86
        meta: { title: '数据上报', icon: 'zsgl' }
任超 committed
87
      },
任超 committed
88
      {
任超 committed
89
        path: 'dbrzcx',
任超 committed
90
        component: () => import('@/views/sthj/dbrzcx/index'),
任超 committed
91
        name: 'dbrzcx',
任超 committed
92
        meta: { title: '登簿日志', icon: 'zsgl' }
任超 committed
93 94 95
      }
    ]
  },
任超 committed
96 97 98 99
  // 监控统计
  {
    path: '/jktj',
    component: Layout,
任超 committed
100
    meta: { title: '统计监控', icon: 'sqcx' },
任超 committed
101 102
    children: [
      {
任超 committed
103 104 105 106 107 108 109 110
        path: 'ywltj',
        component: () => import('@/views/jktj/ywltj/index'),
        name: 'jktj',
        meta: { title: '业务量统计', icon: 'zhcx' }
      },
      {
        path: 'bsxljk',
        component: () => import('@/views/jktj/bsxljk/index'),
任超 committed
111
        name: 'jktj',
任超 committed
112
        meta: { title: '办事效率监控', icon: 'zhcx' }
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
      },
      {
        path: 'dataReceiveQuality',
        component: () => import('@/views/jktj/dataReceiveQuality/index'),
        name: 'dataReceiveQuality',
        meta: { title: '接入质量评价表', icon: 'dataReceiveQuality' }
      },
      {
        path: 'nullTermRatio',
        component: () => import('@/views/jktj/nullTermRatio/index'),
        name: 'nullTermRatio',
        meta: { title: '相关字段空置率统计', icon: 'nullTermRatio' }
      },
      {
        path: 'registerBookQuality',
        component: () => import('@/views/jktj/registerBookQuality/index'),
        name: 'registerBookQuality',
        meta: { title: '登簿质量评价表', icon: 'registerBookQuality' }
任超 committed
131 132 133
      }
    ]
  },
任超 committed
134
  // 接入业务信息-不动产数据
任超 committed
135 136 137
  {
    path: '/busineInfo',
    component: Layout,
任超 committed
138
    meta: { title: '不动产数据', icon: 'sqcx' },
任超 committed
139 140 141 142 143
    redirect: '/busineInfo/landOwnership',
    alwaysShow: true,
    name: 'busineInfo',
    children: [
      {
jiaozeping@pashanhoo.com committed
144
        path: 'tdsyq',
jiaozeping@pashanhoo.com committed
145
        component: () => import('@/views/bdcsj/tdsyq/index'),
jiaozeping@pashanhoo.com committed
146
        name: 'tdsyq',
任超 committed
147 148 149
        meta: { title: '土地所有权' }
      },
      {
1  
jiaozeping@pashanhoo.com committed
150
        path: 'jsydzjdsyq',
jiaozeping@pashanhoo.com committed
151
        component: () => import('@/views/bdcsj/jsydzjdsyq/index'),
1  
jiaozeping@pashanhoo.com committed
152
        name: 'jsydzjdsyq',
任超 committed
153 154 155
        meta: { title: '建设用地、宅基地使用权' }
      },
      {
1  
jiaozeping@pashanhoo.com committed
156
        path: 'fdcqdz',
jiaozeping@pashanhoo.com committed
157
        component: () => import('@/views/bdcsj/fdcqdz/index'),
1  
jiaozeping@pashanhoo.com committed
158
        name: 'fdcqdz',
任超 committed
159 160 161
        meta: { title: '房地产权(项目内多幢房屋)' }
      },
      {
1  
jiaozeping@pashanhoo.com committed
162
        path: 'fdcqyz',
jiaozeping@pashanhoo.com committed
163
        component: () => import('@/views/bdcsj/fdcqyz/index'),
1  
jiaozeping@pashanhoo.com committed
164
        name: 'fdcqyz',
任超 committed
165 166 167
        meta: { title: '房地产权(独幢、层、套、间、房屋)' }
      },
      {
1  
jiaozeping@pashanhoo.com committed
168
        path: 'fdcqqfsyq',
jiaozeping@pashanhoo.com committed
169
        component: () => import('@/views/bdcsj/fdcqqfsyq/index'),
1  
jiaozeping@pashanhoo.com committed
170
        name: 'fdcqqfsyq',
任超 committed
171 172 173
        meta: { title: '建筑物区分所有权业主共有部分' }
      },
      {
jiaozeping@pashanhoo.com committed
174
        path: 'hysyq',
jiaozeping@pashanhoo.com committed
175
        component: () => import('@/views/bdcsj/hysyq/index'),
jiaozeping@pashanhoo.com committed
176
        name: 'hysyq',
1  
jiaozeping@pashanhoo.com committed
177
        meta: { title: '海域(含无居民海岛)使用权' }
任超 committed
178 179
      },
      {
1  
jiaozeping@pashanhoo.com committed
180
        path: 'gzwsyq',
jiaozeping@pashanhoo.com committed
181
        component: () => import('@/views/bdcsj/gzwsyq/index'),
1  
jiaozeping@pashanhoo.com committed
182
        name: 'gzwsyq',
1  
jiaozeping@pashanhoo.com committed
183
        meta: { title: '构(建)筑物所有权' }
任超 committed
184 185
      },
      {
1  
jiaozeping@pashanhoo.com committed
186
        path: 'nydsyq',
jiaozeping@pashanhoo.com committed
187
        component: () => import('@/views/bdcsj/nydsyq/index'),
1  
jiaozeping@pashanhoo.com committed
188
        name: 'nydsyq',
1  
jiaozeping@pashanhoo.com committed
189
        meta: { title: '农用地使用权(非林地)' }
任超 committed
190 191
      },
      {
1  
jiaozeping@pashanhoo.com committed
192
        path: 'lq',
jiaozeping@pashanhoo.com committed
193
        component: () => import('@/views/bdcsj/lq/index'),
1  
jiaozeping@pashanhoo.com committed
194
        name: 'lq',
1  
jiaozeping@pashanhoo.com committed
195
        meta: { title: '林权' }
任超 committed
196 197
      },
      {
1  
jiaozeping@pashanhoo.com committed
198
        path: 'zxdj',
jiaozeping@pashanhoo.com committed
199
        component: () => import('@/views/bdcsj/zxdj/index'),
1  
jiaozeping@pashanhoo.com committed
200
        name: 'zxdj',
1  
jiaozeping@pashanhoo.com committed
201
        meta: { title: '注销登记' }
任超 committed
202 203
      },
      {
1  
jiaozeping@pashanhoo.com committed
204
        path: 'yydj',
jiaozeping@pashanhoo.com committed
205
        component: () => import('@/views/bdcsj/yydj/index'),
1  
jiaozeping@pashanhoo.com committed
206 207
        name: 'yydj',
        meta: { title: '异议登记' }
任超 committed
208 209
      },
      {
1  
jiaozeping@pashanhoo.com committed
210
        path: 'ygdj',
jiaozeping@pashanhoo.com committed
211
        component: () => import('@/views/bdcsj/ygdj/index'),
1  
jiaozeping@pashanhoo.com committed
212 213
        name: 'ygdj',
        meta: { title: '预告登记' }
任超 committed
214 215
      },
      {
1  
jiaozeping@pashanhoo.com committed
216
        path: 'Cfdj',
jiaozeping@pashanhoo.com committed
217
        component: () => import('@/views/bdcsj/cfdj/index'),
1  
jiaozeping@pashanhoo.com committed
218 219
        name: 'Cfdj',
        meta: { title: '查封登记' }
任超 committed
220 221
      },
      {
1  
jiaozeping@pashanhoo.com committed
222
        path: 'dyaq',
jiaozeping@pashanhoo.com committed
223
        component: () => import('@/views/bdcsj/dyaq/index'),
1  
jiaozeping@pashanhoo.com committed
224
        name: 'dyaq',
1  
jiaozeping@pashanhoo.com committed
225
        meta: { title: '抵押权登记' }
任超 committed
226 227
      },
      {
1  
jiaozeping@pashanhoo.com committed
228
        path: 'dyiq',
jiaozeping@pashanhoo.com committed
229
        component: () => import('@/views/bdcsj/dyiq/index'),
1  
jiaozeping@pashanhoo.com committed
230
        name: 'dyiq',
1  
jiaozeping@pashanhoo.com committed
231
        meta: { title: '地役权登记' }
任超 committed
232 233 234
      }
    ]
  },
任超 committed
235 236 237 238
  // 系统管理
  {
    path: '/system',
    component: Layout,
yangwei committed
239
    meta: { title: '运维中心', icon: 'sqcx', breadcrumb: false },
任超 committed
240
    redirect: '/system/dictionaries',
任超 committed
241 242 243 244
    alwaysShow: true,
    name: 'system',
    children: [
      {
任超 committed
245 246 247
        path: 'dictionaries',
        component: () => import('@/views/system/dictionaries/dictionaries.vue'),
        name: 'dictionaries',
任超 committed
248 249 250 251
        meta: { title: '字典管理' }
      },
      {
        path: 'validationRule',
任超 committed
252
        component: () => import('@/views/system/validationRule/index'),
任超 committed
253
        name: 'validationRule',
任超 committed
254
        meta: { title: '上报校验规则配置' }
任超 committed
255 256 257
      },
      {
        path: 'timedTask',
任超 committed
258
        component: () => import('@/views/system/timedTask/index'),
任超 committed
259 260
        name: 'timedTask',
        meta: { title: '定时任务' }
xiaomiao committed
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278
      },
      {
        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
279 280
      }
    ]
281
  }
任超 committed
282 283 284 285 286
]

const createRouter = () =>
  new Router({
    scrollBehavior: () => ({ y: 0 }),
任超 committed
287
    routes: [...constantRoutes]
任超 committed
288 289 290 291 292 293 294 295 296
  })

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

export default router