增加业务菜单
This commit is contained in:
parent
15f5b7ab98
commit
c5073ebd6c
|
|
@ -0,0 +1,920 @@
|
|||
import { createRouter, createWebHashHistory } from 'vue-router';
|
||||
import SviLayout from '@/layouts/index-svi.vue'
|
||||
import { useRouteStore } from '@/stores/modules/router';
|
||||
|
||||
// 基础路由,不需要权限控制的路由
|
||||
const baseRoutes = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'index',
|
||||
component: () => import('@views/main/index.vue'),
|
||||
meta: {title: '空白'},
|
||||
},
|
||||
{
|
||||
path: '/big-screen',
|
||||
name: 'BigScreen',
|
||||
component: () => import('@views/big-screen/bigdata.vue'),
|
||||
meta: {title: '大屏'},
|
||||
},
|
||||
{
|
||||
path: '/svi',
|
||||
name: 'Svi',
|
||||
component: SviLayout,
|
||||
meta: {title: '布局'},
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'SviIndex',
|
||||
component: () => import('@views/main/svi.vue'),
|
||||
meta: {
|
||||
title: '首页',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/example',
|
||||
name: 'Example',
|
||||
component: SviLayout,
|
||||
meta: {title: '示例'},
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'Example1Index',
|
||||
component: () => import('@views/example/example1/index.vue'),
|
||||
meta: {
|
||||
title: '示例',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'example-business-table',
|
||||
name: 'ExampleBusinessTableIndex',
|
||||
component: () => import('@views/example/example-businesss-table/index.vue'),
|
||||
meta: {
|
||||
title: '业务表格示例',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/jbts/login',
|
||||
name: '_jbts_login',
|
||||
component: () => import('@views/jbts/login.vue'),
|
||||
meta: {
|
||||
title: '登录',
|
||||
target: '_blank',
|
||||
openInNewTab: true
|
||||
},
|
||||
beforeEnter: (to) => {
|
||||
const inNewTab = to.query._nw === '1'
|
||||
if (to.meta && to.meta.openInNewTab && !inNewTab) {
|
||||
const newUrl = `${window.location.origin}${window.location.pathname}#${to.fullPath}${to.fullPath.includes('?') ? '&' : '?'}_nw=1`
|
||||
window.open(newUrl, '_blank')
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/dtsjygl',
|
||||
name: 'dtsjygl',
|
||||
component: SviLayout,
|
||||
meta: {title: '动态数据管理'},
|
||||
children: [
|
||||
{
|
||||
path: 'dtsjk',
|
||||
name: '_dtsjk',
|
||||
component: () => import('@views/dtsjygl/qyxxgl.vue'),
|
||||
meta: {
|
||||
title: '企业信息管理',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'qyxxcx',
|
||||
name: '_qyxxcx',
|
||||
component: () => import('@views/dtsjygl/qyxxcx.vue'),
|
||||
meta: {
|
||||
title: '企业信息查询',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'qyxxsb',
|
||||
name: '_qyxxsb',
|
||||
component: () => import('@views/dtsjygl/qyxxsb.vue'),
|
||||
meta: {
|
||||
title: '企业信息上报审核',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'qyfjfl',
|
||||
name: '_qyfjfl',
|
||||
component: () => import('@views/dtsjygl/qyfjfl.vue'),
|
||||
meta: {
|
||||
title: '企业分级分类',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'qyxxtj',
|
||||
name: '_qyxxtj',
|
||||
component: () => import('@views/dtsjygl/qyxxtj.vue'),
|
||||
meta: {
|
||||
title: '企业信息统计',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
// 执法机构管理
|
||||
{
|
||||
path: '/zfjgl',
|
||||
name: 'zfjgl',
|
||||
component: SviLayout,
|
||||
meta: {title: '执法机构管理'},
|
||||
children: [
|
||||
{
|
||||
path: 'jgrl',
|
||||
name: '_jgrl',
|
||||
component: () => import('@views/zfjgl/jgrl/index.vue'),
|
||||
meta: {
|
||||
title: '执法机构管理',
|
||||
menuId: 'A-610100000000-0005_0197',
|
||||
icon: 'zyyy_rzzx'
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'zfrygl',
|
||||
name: '_zfrygl',
|
||||
component: () => import('@views/zfjgl/zfrygl.vue'),
|
||||
meta: {
|
||||
title: '执法人员管理',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'zfzbgl',
|
||||
name: '_zfjgl_zfzbgl',
|
||||
component: () => import('@views/zbgl/zfzbgl.vue'),
|
||||
meta: {
|
||||
title: '执法装备管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'zfclgl',
|
||||
name: '_zfjgl_zfclgl',
|
||||
component: () => import('@views/zbgl/zfclgl.vue'),
|
||||
meta: {
|
||||
title: '执法车辆管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'jcbgl',
|
||||
name: '_zfjgl_jcbgl',
|
||||
component: () => import('@views/xzzfgl/jcbgl.vue'),
|
||||
meta: {
|
||||
title: '检查表管理',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'jcsxgl',
|
||||
name: '_zfjgl_jcsxgl',
|
||||
component: () => import('@views/xzzfgl/jcsxgl.vue'),
|
||||
meta: {
|
||||
title: '自定义检查事项',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
path: '/xzzfgl',
|
||||
name: 'xzzfgl',
|
||||
component: SviLayout,
|
||||
meta: {title: '行政执法'},
|
||||
children: [
|
||||
{
|
||||
path: 'zfxxgl',
|
||||
name: '_zfxxgl',
|
||||
component: () => import('@views/xzzfgl/zfxxgl.vue'),
|
||||
meta: {
|
||||
title: '执法案件资源池',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'zfjc',
|
||||
name: '_zfj',
|
||||
meta: {
|
||||
title: '行政检查',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'dzjcfa',
|
||||
name: '_dzjcfa',
|
||||
component: () => import('@views/xzzfgl/dzjcfa.vue'),
|
||||
meta: {
|
||||
title: '定制检查方案',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'fasp',
|
||||
name: '_fasp',
|
||||
component: () => import('@views/xzzfgl/fasp.vue'),
|
||||
meta: {
|
||||
title: '方案审批',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'zfjc',
|
||||
name: '_zfjc_menu',
|
||||
component: () => import('@views/xzzfgl/zfjc.vue'),
|
||||
meta: {
|
||||
title: '现场检查',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'zgfc',
|
||||
name: '_zgfc_menu',
|
||||
component: () => import('@views/xzzfgl/zgfc.vue'),
|
||||
meta: {
|
||||
title: '整改复查',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'xcclcs',
|
||||
name: '_xcclcs_menu',
|
||||
component: () => import('@views/xzzfgl/xcclcs.vue'),
|
||||
meta: {
|
||||
title: '现场处理措施',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'xzjccl',
|
||||
name: '_xzjccl_menu',
|
||||
component: () => import('@views/xzzfgl/xzjccl.vue'),
|
||||
meta: {
|
||||
title: '行政检查处理',
|
||||
},
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'xzcf',
|
||||
name: '_xzcf',
|
||||
meta: {
|
||||
title: '行政处罚',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'zfla',
|
||||
name: '_zfla',
|
||||
component: () => import('@views/xzzfgl/zfla.vue'),
|
||||
meta: {
|
||||
title: '立案',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'dcqz',
|
||||
name: '_dcqz',
|
||||
component: () => import('@views/xzzfgl/caseInquiry.vue'),
|
||||
meta: {
|
||||
title: '调查取证',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'fxyp',
|
||||
name: '_fxyp',
|
||||
component: () => import('@views/xzzfgl/fxyp.vue'),
|
||||
meta: {
|
||||
title: '审理',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'cssbhtz',
|
||||
name: '_cssbhtz',
|
||||
component: () => import('@views/xzzfgl/cssbhtz.vue'),
|
||||
meta: {
|
||||
title: '陈述申辩或听证',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'gz',
|
||||
name: '_gz',
|
||||
component: () => import('@views/xzzfgl/caseInform.vue'),
|
||||
meta: {
|
||||
title: '告知',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'fzsh',
|
||||
name: '_fzsh',
|
||||
component: () => import('@views/xzzfgl/fzshjzfjd.vue'),
|
||||
meta: {
|
||||
title: '法制审核',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'jttl',
|
||||
name: '_jttl',
|
||||
component: () => import('@views/xzzfgl/jttl.vue'),
|
||||
meta: {
|
||||
title: '集体讨论',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'zfjd',
|
||||
name: '_zfjd',
|
||||
component: () => import('@views/xzzfgl/zfjd.vue'),
|
||||
meta: {
|
||||
title: '决定',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'zfzx',
|
||||
name: '_zfzx',
|
||||
component: () => import('@views/xzzfgl/zfzx.vue'),
|
||||
meta: {
|
||||
title: '执行',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'zfja',
|
||||
name: '_zfja',
|
||||
component: () => import('@views/xzzfgl/zfja.vue'),
|
||||
meta: {
|
||||
title: '结案',
|
||||
},
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'zdzfjh',
|
||||
name: '_zdzfjh',
|
||||
meta: {
|
||||
title: '监督检查计划',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'zdjcqyqd',
|
||||
name: '_zdjcqyqd',
|
||||
component: () => import('@views/xzzfgl/zdjcqyqd.vue'),
|
||||
meta: {
|
||||
title: '年度监督检查计划',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'scssjygkqd',
|
||||
name: '_scssjygkqd',
|
||||
component: () => import('@views/xzzfgl/scssjygkqd.vue'),
|
||||
meta: {
|
||||
title: '双随机一公开计划',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'zfjhrwgl',
|
||||
name: '_zfjhrwgl',
|
||||
component: () => import('@views/xzzfgl/zfjhrwgl.vue'),
|
||||
meta: {
|
||||
title: '计划审批',
|
||||
},
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'ddjcjh',
|
||||
name: '_ddjcjh',
|
||||
meta: {
|
||||
title: '督导检查计划',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'ddjc',
|
||||
name: 'ddjc',
|
||||
component: () => import('@views/xzzfgl/ddjc.vue'),
|
||||
meta: {
|
||||
title: '督导检查',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'ddjcsp',
|
||||
name: 'ddjcsp',
|
||||
component: () => import('@views/xzzfgl/ddjcsp.vue'),
|
||||
meta: {
|
||||
title: '督导检查审批',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'ddjcrwgl',
|
||||
name: '_ddjcrwgl',
|
||||
component: () => import('@views/xzzfgl/ddjcrwgl.vue'),
|
||||
meta: {
|
||||
title: '督导检查任务管理',
|
||||
},
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'jbhcxx',
|
||||
name: '_jbhcxx',
|
||||
component: () => import('@views/xzzfgl/jbhcxx.vue'),
|
||||
meta: {
|
||||
title: '举报核查',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'jchcjh',
|
||||
name: '_jchcjh',
|
||||
meta: {
|
||||
title: '交叉检查计划',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'jchc',
|
||||
name: '_jchc',
|
||||
component: () => import('@views/xzzfgl/jchc.vue'),
|
||||
meta: {
|
||||
title: '交叉检查',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'jchcrwgl',
|
||||
name: '_jchcrwgl',
|
||||
component: () => import('@views/xzzfgl/jchcrwgl.vue'),
|
||||
meta: {
|
||||
title: '交叉检查任务管理',
|
||||
},
|
||||
},
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: 'smrq',
|
||||
// name: '_smrq',
|
||||
// component: () => import('@views/xzzfgl/smrq.vue'),
|
||||
// meta: {
|
||||
// title: '扫码入企',
|
||||
// },
|
||||
// },
|
||||
{
|
||||
path: 'jcbgl',
|
||||
name: '_jcbgl',
|
||||
component: () => import('@views/xzzfgl/jcbgl.vue'),
|
||||
meta: {
|
||||
title: '检查表管理',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'jcsxgl',
|
||||
name: '_jcsxgl',
|
||||
component: () => import('@views/xzzfgl/jcsxgl.vue'),
|
||||
meta: {
|
||||
title: '自定义检查事项',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'zfwsgl',
|
||||
name: '_zfwsgl',
|
||||
component: () => import('@views/xzzfgl/zfwsgl.vue'),
|
||||
meta: {
|
||||
title: '执法文书管理',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'caseList',
|
||||
name: '_caseList',
|
||||
component: () => import('@views/xzzfgl/caseList.vue'),
|
||||
meta: {
|
||||
title: '案卷资料清单',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/fxczfgl',
|
||||
name: 'fxczfgl',
|
||||
component: SviLayout,
|
||||
meta: {title: '非现场执法'},
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: '_index',
|
||||
component: () => import('@views/fxczfgl/index.vue'),
|
||||
meta: {
|
||||
title: '非现场执法管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'zxxcxx',
|
||||
name: '_zxxcxx',
|
||||
component: () => import('@views/fxczfgl/zxxcxx.vue'),
|
||||
meta: {
|
||||
title: '在线巡查信息'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'zxxcqd',
|
||||
name: '_zxxcqd',
|
||||
meta: {
|
||||
title: '在线巡查启动'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'sjzxxc',
|
||||
name: '_sjzxxc',
|
||||
component: () => import('@views/fxczfgl/sjzxxc.vue'),
|
||||
meta: {
|
||||
title: '随机在线巡查',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'dzzxxc',
|
||||
name: '_dzzxxc',
|
||||
component: () => import('@views/fxczfgl/dzzxxc.vue'),
|
||||
meta: {
|
||||
title: '定制在线巡查',
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'zxxcsp',
|
||||
name: '_zxxcsp',
|
||||
component: () => import('@views/fxczfgl/zxxcsp.vue'),
|
||||
meta: {
|
||||
title: '在线巡查结果'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'fxczftj',
|
||||
name: '_fxczftj',
|
||||
component: () => import('@views/fxczfgl/fxczftj.vue'),
|
||||
meta: {
|
||||
title: '非现场执法统计'
|
||||
}
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/zfwssd',
|
||||
name: 'zfwssd',
|
||||
component: SviLayout,
|
||||
meta: {title: '执法文书'},
|
||||
children: [
|
||||
{
|
||||
path: 'sdfsgl',
|
||||
name: '_sdfsgl',
|
||||
component: () => import('@views/zfwssd/sdfsgl.vue'),
|
||||
alias: '/xzzfgl/wssd/sdfsgl',
|
||||
meta: {
|
||||
title: '送达方法管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'ssdrgl',
|
||||
name: '_ssdrgl',
|
||||
component: () => import('@views/zfwssd/ssdrgl.vue'),
|
||||
alias: '/xzzfgl/wssd/ssdrgl',
|
||||
meta: {
|
||||
title: '受送达人管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'zfwsxx',
|
||||
name: '_zfwsxx',
|
||||
component: () => import('@views/zfwssd/zfwsxx.vue'),
|
||||
alias: '/xzzfgl/wssd/zfwsxx',
|
||||
meta: {
|
||||
title: '执法文书管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'sdywtj',
|
||||
name: '_sdywtj',
|
||||
component: () => import('@views/zfwssd/sdywtj.vue'),
|
||||
alias: '/xzzfgl/wssd/sdywtj',
|
||||
meta: {
|
||||
title: '送达业务统计'
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/dagl',
|
||||
name: 'dagl',
|
||||
component: SviLayout,
|
||||
meta: {title: '档案管理'},
|
||||
children: [
|
||||
{
|
||||
path: 'xzjcdagl',
|
||||
name: '_xzjcdagl',
|
||||
component: () => import('@views/xzzfgl/xzjcdagl.vue'),
|
||||
alias: '/xzzfgl/ljgd/xzjcdagl',
|
||||
meta: {
|
||||
title: '行政检查档案'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'xzcfdagl',
|
||||
name: '_xzcfdagl',
|
||||
component: () => import('@views/xzzfgl/xzcfdagl.vue'),
|
||||
alias: '/xzzfgl/ljgd/xzcfdagl',
|
||||
meta: {
|
||||
title: '行政执法档案'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'caseList',
|
||||
name: '_caseList',
|
||||
component: () => import('@views/xzzfgl/caseList.vue'),
|
||||
alias: '/xzzfgl/ljgdl/caseList',
|
||||
meta: {
|
||||
title: '案卷资料清单',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/zbgl',
|
||||
name: 'zbgl',
|
||||
component: SviLayout,
|
||||
meta: {title: '装备管理'},
|
||||
children: [
|
||||
{
|
||||
path: 'zfzbgl',
|
||||
name: '_zfzbgl',
|
||||
component: () => import('@views/zbgl/zfzbgl.vue'),
|
||||
meta: {
|
||||
title: '执法装备管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'zsfzgl',
|
||||
name: '_zsfzgl',
|
||||
component: () => import('@views/zbgl/zsfzgl.vue'),
|
||||
meta: {
|
||||
title: '制式服装管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'zfclgl',
|
||||
name: '_zfclgl',
|
||||
component: () => import('@views/zbgl/zfclgl.vue'),
|
||||
meta: {
|
||||
title: '执法车辆管理'
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/tztg',
|
||||
name: 'tztg',
|
||||
component: SviLayout,
|
||||
meta: {title: '通知公告'},
|
||||
children: [
|
||||
{
|
||||
path: 'tztggl',
|
||||
name: '_tztggl',
|
||||
component: () => import('@views/tztggl/NoticeManager.vue'),
|
||||
meta: {
|
||||
title: '执法装备管理'
|
||||
}
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/tjbb',
|
||||
name: 'tjbb',
|
||||
component: SviLayout,
|
||||
meta: {title: '统计分析'},
|
||||
children: [
|
||||
{
|
||||
path: 'qxtjsb',
|
||||
name: '_qxtjsb',
|
||||
meta: {
|
||||
title: '区县统计上报',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'zflasb',
|
||||
name: '_zflasb',
|
||||
component: () => import('@views/dtsjygl/zflasb.vue'),
|
||||
meta: {
|
||||
title: '执法立案上报',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'zfjcsb',
|
||||
name: '_zfjcsb',
|
||||
component: () => import('@views/dtsjygl/zfjcsb.vue'),
|
||||
meta: {
|
||||
title: '执法检查上报',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'lszfsb',
|
||||
name: '_lszfsb',
|
||||
component: () => import('@views/dtsjygl/lszfjlsb.vue'),
|
||||
meta: {
|
||||
title: '历史执法信息上报',
|
||||
},
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
{
|
||||
path: 'qxtjsbsp',
|
||||
name: '_qxtjsbsp',
|
||||
meta: {
|
||||
title: '区县统计上报审核',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'zflasbsp',
|
||||
name: '_zflasbsp',
|
||||
component: () => import('@views/dtsjygl/zflasbsp.vue'),
|
||||
meta: {
|
||||
title: '执法立案上报审核',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'zfjcsbsp',
|
||||
name: '_zfjcsbsp',
|
||||
component: () => import('@views/dtsjygl/zfjcsbsp.vue'),
|
||||
meta: {
|
||||
title: '执法检查上报审核',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'lszfjlsbsp',
|
||||
name: '_lszfjlsbsp',
|
||||
component: () => import('@views/dtsjygl/lszfjlsbsp.vue'),
|
||||
meta: {
|
||||
title: '历史执法信息上报审核',
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'zflatj',
|
||||
name: '_zflatj',
|
||||
component: () => import('@views/dtsjygl/zflatj.vue'),
|
||||
meta: {
|
||||
title: '执法立案统计'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'zfjcqktj',
|
||||
name: '_zfjcqktj',
|
||||
component: () => import('@views/dtsjygl/zfjcqktj.vue'),
|
||||
meta: {
|
||||
title: '检查情况统计'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'zfsjzbb',
|
||||
name: '_zfsjzbb',
|
||||
component: () => import('@views/dtsjygl/zfsjzbb.vue'),
|
||||
meta: {
|
||||
title: '执法数据周报表'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'zfsjjbb',
|
||||
name: '_zfsjjbb',
|
||||
component: () => import('@views/dtsjygl/zfsjjbb.vue'),
|
||||
meta: {
|
||||
title: '执法数据季报表'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'qyxxStatice',
|
||||
name: '_qyxxStatice',
|
||||
component: () => import('@views/dtsjygl/qyxxtj.vue'),
|
||||
meta: {
|
||||
title: '企业信息统计',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'fxczfStatice',
|
||||
name: '_fxczfStatice',
|
||||
component: () => import('@views/fxczfgl/fxczftj.vue'),
|
||||
meta: {
|
||||
title: '非现场执法统计'
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
path: 'wssdtj',
|
||||
name: '_wssdtj',
|
||||
component: () => import('@views/zfwssd/sdywtj.vue'),
|
||||
meta: {
|
||||
title: '送达业务统计'
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
// 投诉举报
|
||||
{
|
||||
path: '/jbts',
|
||||
name: 'jbts',
|
||||
component: SviLayout,
|
||||
meta: {title: '举报投诉'},
|
||||
children: [
|
||||
{
|
||||
path: 'tsjbkb',
|
||||
name: '_tsjbkb',
|
||||
component: () => import('@views/jbts/ComplaintReportBoard.vue'),
|
||||
meta: {
|
||||
title: '投诉举报看板'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'jbhcxx',
|
||||
name: '_jbhcxx',
|
||||
component: () => import('@views/xzzfgl/jbhcxx.vue'),
|
||||
meta: {
|
||||
title: '举报核查'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
// 创建路由实例
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes: baseRoutes
|
||||
})
|
||||
|
||||
// 标记路由是否已经初始化
|
||||
let routesInitialized = false
|
||||
|
||||
// 动态添加路由方法
|
||||
export function addDynamicRoutes() {
|
||||
const routeStore = useRouteStore();
|
||||
|
||||
// 确保路由存储已初始化默认路由
|
||||
if (routeStore.defaultRoutes.length === 0) {
|
||||
routeStore.initDefaultRoutes();
|
||||
}
|
||||
|
||||
const dynamicRoutes = routeStore.defaultRoutes || [];
|
||||
|
||||
console.log('开始加载动态路由,当前路由表:', router.getRoutes().map(r => r.path));
|
||||
console.log('动态路由数据:', JSON.stringify(dynamicRoutes, null, 2));
|
||||
|
||||
// 先清除所有非基础路由
|
||||
router.getRoutes().forEach(route => {
|
||||
if (!baseRoutes.some(r => r.name === route.name)) {
|
||||
router.removeRoute(route.name);
|
||||
}
|
||||
});
|
||||
|
||||
// 如果有动态路由,添加到路由表中
|
||||
if (dynamicRoutes && dynamicRoutes.length > 0) {
|
||||
dynamicRoutes.forEach(route => {
|
||||
console.log('正在添加路由:', route.path, route.name);
|
||||
try {
|
||||
if (!router.hasRoute(route.name)) {
|
||||
router.addRoute(route);
|
||||
console.log('成功添加路由:', route.path);
|
||||
} else {
|
||||
console.log('路由已存在,跳过:', route.path);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('添加路由失败:', route.path, error);
|
||||
}
|
||||
});
|
||||
console.log('动态路由加载完成,更新后的路由表:', router.getRoutes().map(r => r.path));
|
||||
// 标记路由已初始化
|
||||
routesInitialized = true;
|
||||
} else {
|
||||
console.warn('没有可用的动态路由数据!');
|
||||
}
|
||||
|
||||
return dynamicRoutes;
|
||||
}
|
||||
|
||||
// 全局前置导航守卫,在路由跳转前进行检查
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
console.log('路由跳转:', from.path, '->', to.path);
|
||||
console.log('当前路由表:', router.getRoutes().map(r => r.path));
|
||||
|
||||
// 直接放行
|
||||
next();
|
||||
});
|
||||
|
||||
export function setupRouter(app) {
|
||||
// 创建路由实例
|
||||
app.use(router);
|
||||
|
||||
// 在路由初始化时就加载所有路由
|
||||
try {
|
||||
// 强制加载动态路由,无论是否已经初始化
|
||||
// addDynamicRoutes();
|
||||
|
||||
// 打印当前路由表信息
|
||||
console.log('路由初始化完成,当前路由表:', router.getRoutes().map(r => r.path));
|
||||
|
||||
// 确保路由已初始化
|
||||
routesInitialized = true;
|
||||
} catch (error) {
|
||||
console.error('路由初始化错误:', error);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import { createPinia } from 'pinia'
|
||||
|
||||
export const store = createPinia()
|
||||
|
||||
export function setupStore(app) {
|
||||
app.use(store)
|
||||
}
|
||||
|
||||
export default store
|
||||
|
|
@ -0,0 +1,966 @@
|
|||
{
|
||||
"zhzf": {
|
||||
"svi": [],
|
||||
"big-screen": [],
|
||||
"dtsjygl": [
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0067",
|
||||
"name": "企业信息管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/dtsjygl/dtsjk",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "企业信息管理",
|
||||
"menuId": "A-610100000000-0005_0067"
|
||||
},
|
||||
"noClosable": true
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0078",
|
||||
"name": "企业信息查询",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/dtsjygl/qyxxcx",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "企业信息查询",
|
||||
"menuId": "A-610100000000-0005_0078"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0089",
|
||||
"name": "企业信息上报审核",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/dtsjygl/qyxxsb",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "企业信息上报审核",
|
||||
"menuId": "A-610100000000-0005_0089"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0111",
|
||||
"name": "企业分级分类",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/dtsjygl/qyfjfl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "企业分级分类",
|
||||
"menuId": "A-610100000000-0005_0111"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0100",
|
||||
"name": "企业信息统计",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/dtsjygl/qyxxtj",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "企业信息统计",
|
||||
"menuId": "A-610100000000-0005_0100"
|
||||
}
|
||||
}
|
||||
],
|
||||
"zfjgl": [
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0197",
|
||||
"name": "执法机构管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/zfjgl/jgrl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "执法机构管理",
|
||||
"menuId": "A-610100000000-0005_0197"
|
||||
},
|
||||
"noClosable": true
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0198",
|
||||
"name": "执法人员管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/zfjgl/zfrygl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "执法人员管理",
|
||||
"menuId": "A-610100000000-0005_0198"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_26001",
|
||||
"name": "执法装备管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/zfjgl/zfzbgl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "执法装备管理",
|
||||
"menuId": "A-610100000000-0005_26002"
|
||||
},
|
||||
"noClosable": true
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_06310",
|
||||
"name": "执法车辆管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/zfjgl/zfclgl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "执法车辆管理",
|
||||
"menuId": "A-610100000000-0005_06310"
|
||||
},
|
||||
"noClosable": true
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0243",
|
||||
"name": "检查表管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/zfjgl/jcbgl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "检查表管理",
|
||||
"menuId": "A-610100000000-0005_0243"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0246",
|
||||
"name": "自定义检查事项",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/zfjgl/jcsxgl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "自定义检查事项",
|
||||
"menuId": "A-610100000000-0005_0246"
|
||||
}
|
||||
}
|
||||
],
|
||||
"xzzfgl": [
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0254",
|
||||
"name": "监督检查计划",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/zdzfjh",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "监督检查计划",
|
||||
"menuId": "A-610100000000-0005_0254"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0463",
|
||||
"name": "年度监督检查计划",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/zdzfjh/zdjcqyqd",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "年度监督检查计划",
|
||||
"menuId": "A-610100000000-0005_0463"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0485",
|
||||
"name": "双随机一公开计划",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/zdzfjh/scssjygkqd",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "双随机一公开计划",
|
||||
"menuId": "A-610100000000-0005_0485"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0509",
|
||||
"name": "督导检查计划",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/ddjcjh/ddjc",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "督导检查计划",
|
||||
"menuId": "A-610100000000-0005_0509"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0519",
|
||||
"name": "交叉检查计划",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/jchcjh/jchc",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "交叉检查计划",
|
||||
"menuId": "A-610100000000-0005_0519"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0496",
|
||||
"name": "执法计划任务管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/zdzfjh/zfjhrwgl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "执法计划任务管理",
|
||||
"menuId": "A-610100000000-0005_0496"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0510",
|
||||
"name": "督导检查任务管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/ddjcjh/ddjcrwgl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "督导检查任务管理",
|
||||
"menuId": "A-610100000000-0005_0510"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0520",
|
||||
"name": "交叉检查任务管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/jchcjh/jchcrwgl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "交叉检查任务管理",
|
||||
"menuId": "A-610100000000-0005_0520"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0511",
|
||||
"name": "督导检查审批",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/ddjcjh/ddjcsp",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "督导检查审批",
|
||||
"menuId": "A-610100000000-0005_0511"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0255",
|
||||
"name": "检查方案",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/zfjc",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "检查方案",
|
||||
"menuId": "A-610100000000-0005_0255"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0555",
|
||||
"name": "制定检查方案",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/zfjc/dzjcfa",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "制定检查方案",
|
||||
"menuId": "A-610100000000-0005_0555"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0588",
|
||||
"name": "方案审批",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/zfjc/fasp",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "方案审批",
|
||||
"menuId": "A-610100000000-0005_0588"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0155",
|
||||
"name": "行政检查",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/zfjc",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "行政检查",
|
||||
"menuId": "A-610100000000-0005_0155"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0628",
|
||||
"name": "现场检查",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/zfjc/zfjc",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "现场检查",
|
||||
"menuId": "A-610100000000-0005_0628"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0629",
|
||||
"name": "整改复查",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/zfjc/zgfc",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "整改复查",
|
||||
"menuId": "A-610100000000-0005_0629"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0699",
|
||||
"name": "现场处理措施",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/zfjc/xcclcs",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "现场处理措施",
|
||||
"menuId": "A-610100000000-0005_0699"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0299",
|
||||
"name": "行政检查处理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/zfjc/xzjccl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "现场处理措施",
|
||||
"menuId": "A-610100000000-0005_0299"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0386",
|
||||
"name": "行政处罚",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/xzcf",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "行政处罚",
|
||||
"menuId": "A-610100000000-0005_0386"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0397",
|
||||
"name": "立案",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/xzcf/zfla",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "立案",
|
||||
"menuId": "A-610100000000-0005_0397"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0408",
|
||||
"name": "调查取证",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/xzcf/dcqz",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "调查取证",
|
||||
"menuId": "A-610100000000-0005_0408"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0419",
|
||||
"name": "审理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/xzcf/fxyp",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "审理",
|
||||
"menuId": "A-610100000000-0005_0419"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0441",
|
||||
"name": "告知",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/xzcf/gz",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "告知",
|
||||
"menuId": "A-610100000000-0005_0441"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0445",
|
||||
"name": "陈述申辩或听证",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/xzcf/cssbhtz",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "陈述申辩或听证",
|
||||
"menuId": "A-610100000000-0005_0445"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0618",
|
||||
"name": "决定",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/xzcf/zfjd",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "决定",
|
||||
"menuId": "A-610100000000-0005_0618"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0852",
|
||||
"name": "执行",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/xzcf/zfzx",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "执行",
|
||||
"menuId": "A-610100000000-0005_0852"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0452",
|
||||
"name": "结案",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/xzcf/zfja",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "结案",
|
||||
"menuId": "A-610100000000-0005_0452"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0903",
|
||||
"name": "执法文书管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/zfwsgl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "执法文书管理",
|
||||
"menuId": "A-610100000000-0005_0903"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0901",
|
||||
"name": "立卷归档",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "",
|
||||
"router": false,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "立卷归档",
|
||||
"menuId": "A-610100000000-0005_0901"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0529",
|
||||
"name": "行政检查档案",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/ljgd/xzjcdagl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "行政检查档案",
|
||||
"menuId": "A-610100000000-0005_0529"
|
||||
},
|
||||
"noClosable": true
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0540",
|
||||
"name": "行政执法档案",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/ljgd/xzcfdagl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "行政执法档案",
|
||||
"menuId": "A-610100000000-0005_0540"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0199",
|
||||
"name": "案卷资料清单",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/ljgdl/caseList",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "案卷资料清单",
|
||||
"menuId": "A-610100000000-0005_0199"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0902",
|
||||
"name": "文书送达",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/wssd/zfwsxx",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "文书送达",
|
||||
"menuId": "A-610100000000-0005_0902"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0320",
|
||||
"name": "执法文书信息",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/wssd/zfwsxx",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "执法文书信息",
|
||||
"menuId": "A-610100000000-0005_0320"
|
||||
},
|
||||
"noClosable": true
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0331",
|
||||
"name": "送达业务统计",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/wssd/sdywtj",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "送达业务统计",
|
||||
"menuId": "A-610100000000-0005_0331"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0309",
|
||||
"name": "受送达人管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/wssd/ssdrgl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "受送达人管理",
|
||||
"menuId": "A-610100000000-0005_0309"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0298",
|
||||
"name": "送达方法管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/wssd/sdfsgl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "送达方法管理",
|
||||
"menuId": "A-610100000000-0005_0298"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"fxczfgl": [
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0276",
|
||||
"name": "非现场执法管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/fxczfgl/index",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "非现场执法管理",
|
||||
"menuId": "A-610100000000-0005_0276"
|
||||
},
|
||||
"noClosable": true
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0278",
|
||||
"name": "在线巡查信息",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/fxczfgl/zxxcxx",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "在线巡查信息",
|
||||
"menuId": "A-610100000000-0005_0278"
|
||||
},
|
||||
"noClosable": true
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0152",
|
||||
"name": "在线巡查启动",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/fxczfgl/zxxcqd",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "在线巡查启动",
|
||||
"menuId": "A-610100000000-0005_0152"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0588",
|
||||
"name": "随机在线巡查",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/fxczfgl/zxxcqd/sjzxxc",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "随机在线巡查",
|
||||
"menuId": "A-610100000000-0005_0588"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0545",
|
||||
"name": "定制在线巡查",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/fxczfgl/zxxcqd/dzzxxc",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "定制在线巡查",
|
||||
"menuId": "A-610100000000-0005_0545"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0606",
|
||||
"name": "在线巡查结果",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/fxczfgl/zxxcsp",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "在线巡查结果",
|
||||
"menuId": "A-610100000000-0005_0606"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0287",
|
||||
"name": "非现场执法统计",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/fxczfgl/fxczftj",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "非现场执法统计",
|
||||
"menuId": "A-610100000000-0005_0287"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tjbb": [
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0651",
|
||||
"name": "区县统计上报",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/tjbb/qxtjsb",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "区县统计上报",
|
||||
"menuId": "A-610100000000-0005_0651"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0661",
|
||||
"name": "执法立案上报",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/tjbb/qxtjsb/zflasb",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "执法立案上报",
|
||||
"menuId": "A-610100000000-0005_0661"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0662",
|
||||
"name": "执法检查上报",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/tjbb/qxtjsb/zfjcsb",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "执法检查上报",
|
||||
"menuId": "A-610100000000-0005_0662"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0663",
|
||||
"name": "历史执法信息上报",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/tjbb/qxtjsb/lszfsb",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "历史执法信息上报",
|
||||
"menuId": "A-610100000000-0005_0663"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0652",
|
||||
"name": "区县统计上报审核",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/tjbb/qxtjsbsp",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "区县统计上报审核",
|
||||
"menuId": "A-610100000000-0005_0652"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0661",
|
||||
"name": "执法立案上报审核",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/tjbb/qxtjsbsp/zflasbsp",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "执法立案上报审核",
|
||||
"menuId": "A-610100000000-0005_0671"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0662",
|
||||
"name": "执法检查上报审核",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/tjbb/qxtjsbsp/zfjcsbsp",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "执法检查上报审核",
|
||||
"menuId": "A-610100000000-0005_0672"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0666",
|
||||
"name": "历史执法信息上报审核",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/tjbb/qxtjsbsp/lszfjlsbsp",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "历史执法信息上报审核",
|
||||
"menuId": "A-610100000000-0005_0676"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0650",
|
||||
"name": "执法立案统计",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/tjbb/zflatj",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "执法立案统计",
|
||||
"menuId": "A-610100000000-0005_0650"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0639",
|
||||
"name": "检查情况统计",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/tjbb/zfjcqktj",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "检查情况统计",
|
||||
"menuId": "A-610100000000-0005_0639"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0672",
|
||||
"name": "执法数据周报表",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/tjbb/zfsjzbb",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "执法数据周报表",
|
||||
"menuId": "A-610100000000-0005_0672"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0661",
|
||||
"name": "执法数据季报表",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/tjbb/zfsjjbb",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "执法数据季报表",
|
||||
"menuId": "A-610100000000-0005_0661"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0662",
|
||||
"name": "企业信息统计",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/tjbb/qyxxStatice",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "企业信息统计",
|
||||
"menuId": "A-610100000000-0005_0662"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0663",
|
||||
"name": "非现场执法统计",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/tjbb/fxczfStatice",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "非现场执法统计",
|
||||
"menuId": "A-610100000000-0005_0663"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0664",
|
||||
"name": "送达业务统计",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/tjbb/wssdtj",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "送达业务统计",
|
||||
"menuId": "A-610100000000-0005_0664"
|
||||
}
|
||||
}
|
||||
],
|
||||
"zbgl": [
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_06001",
|
||||
"name": "执法装备管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/zbgl/zfzbgl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "执法装备管理",
|
||||
"menuId": "A-610100000000-0005_06002"
|
||||
},
|
||||
"noClosable": true
|
||||
},
|
||||
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_06003",
|
||||
"name": "制式服装管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/zbgl/zsfzgl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "制式服装管理",
|
||||
"menuId": "A-610100000000-0005_06005"
|
||||
}
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_06006",
|
||||
"name": "执法车辆管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/zbgl/zfclgl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "执法车辆管理",
|
||||
"menuId": "A-610100000000-0005_06006"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tztg": [
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_06001",
|
||||
"name": "通知公告管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/tztg/tztggl",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "通知公告管理",
|
||||
"menuId": "A-610100000000-0005_06002"
|
||||
},
|
||||
"noClosable": true
|
||||
}
|
||||
],
|
||||
"jbts": [
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0230",
|
||||
"name": "举报核查",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/jbts/jbhcxx",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "举报核查",
|
||||
"menuId": "A-610100000000-0005_0230"
|
||||
},
|
||||
"noClosable": true
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0232",
|
||||
"name": "投诉举报看板",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/jbts/tsjbkb",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "投诉举报看板",
|
||||
"menuId": "A-610100000000-0005_0232"
|
||||
},
|
||||
"noClosable": true
|
||||
},
|
||||
{
|
||||
"gncdbh": "A-610100000000-0005_0231",
|
||||
"name": "举报投诉",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/jbts/login",
|
||||
"router": true,
|
||||
"meta": {
|
||||
"icon": "zyyy_rzzx",
|
||||
"title": "举报投诉",
|
||||
"menuId": "A-610100000000-0005_0231"
|
||||
},
|
||||
"noClosable": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,349 @@
|
|||
{
|
||||
"tyrz": [
|
||||
{
|
||||
"gncdbh": 1,
|
||||
"name": "认证中心",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "rzzx",
|
||||
"children": [
|
||||
{
|
||||
"gncdbh": 10,
|
||||
"path": "/rzzx/rzzxyhgl",
|
||||
"icon": "zyyy_yhgl",
|
||||
"name": "用户管理"
|
||||
},
|
||||
{
|
||||
"gncdbh": 11,
|
||||
"path": "/rzzx/rzzxzzjggl",
|
||||
"icon": "zyyy_zzjggl",
|
||||
"name": "组织机构管理"
|
||||
},
|
||||
{
|
||||
"gncdbh": 12,
|
||||
"path": "/rzzx/rzzxglyyh",
|
||||
"icon": "zyyy_glyyh",
|
||||
"name": "管理员用户"
|
||||
},
|
||||
{
|
||||
"gncdbh": 13,
|
||||
"path": "/rzzx/rzzxkfzyh",
|
||||
"icon": "zyyy_kfzyh",
|
||||
"name": "开发者用户"
|
||||
},
|
||||
{
|
||||
"gncdbh": 14,
|
||||
"path": "/rzzx/rzzxlpgl",
|
||||
"icon": "zyyy_lpgl",
|
||||
"name": "令牌管理"
|
||||
},
|
||||
{
|
||||
"gncdbh": 15,
|
||||
"path": "/rzzx/rzzxyygl",
|
||||
"icon": "zyyy_yygl",
|
||||
"name": "应用管理"
|
||||
},
|
||||
{
|
||||
"gncdbh": 16,
|
||||
"path": "/rzzx/rzzxrzyz",
|
||||
"icon": "zyyy_rzyz",
|
||||
"name": "认证因子"
|
||||
},
|
||||
{
|
||||
"gncdbh": 17,
|
||||
"path": "/rzzx/rzzxdsfrzfw",
|
||||
"icon": "zyyy_dsfrzfw",
|
||||
"name": "第三方认证服务"
|
||||
},
|
||||
{
|
||||
"gncdbh": 18,
|
||||
"path": "/rzzx/rzzxzdgl",
|
||||
"icon": "zyyy_dsfrzfw",
|
||||
"name": "字典管理"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"gncdbh": 2,
|
||||
"name": "权限中心",
|
||||
"icon": "zyyy_qxzx",
|
||||
"path": "qxzx",
|
||||
"children": [
|
||||
{
|
||||
"gncdbh": 20,
|
||||
"path": "/qxzx/qxzxjsgl",
|
||||
"icon": "zyyy_jsgl",
|
||||
"name": "公共角色管理"
|
||||
},
|
||||
{
|
||||
"gncdbh": 20,
|
||||
"path": "/qxzx/qxzxyyjsgl",
|
||||
"icon": "zyyy_jsgl",
|
||||
"name": "应用角色管理"
|
||||
},
|
||||
{
|
||||
"gncdbh": 22,
|
||||
"path": "/qxzx/qxzxcdgl",
|
||||
"icon": "zyyy_dsfrzfw",
|
||||
"name": "菜单管理"
|
||||
},
|
||||
{
|
||||
"gncdbh": 25,
|
||||
"path": "/qxzx/qxzxmxgl",
|
||||
"icon": "zyyy_dsfrzfw",
|
||||
"name": "模型管理"
|
||||
},
|
||||
{
|
||||
"gncdbh": 26,
|
||||
"path": "/qxzx/qxzxdpgl",
|
||||
"icon": "zyyy_dsfrzfw",
|
||||
"name": "大屏管理"
|
||||
},
|
||||
{
|
||||
"gncdbh": 23,
|
||||
"path": "/qxzx/qxzxajqx",
|
||||
"icon": "zyyy_ajqx",
|
||||
"name": "案件权限"
|
||||
},
|
||||
{
|
||||
"gncdbh": 24,
|
||||
"path": "/qxzx/qxzxsjqx",
|
||||
"icon": "zyyy_sjqx",
|
||||
"name": "事件权限"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"gncdbh": 3,
|
||||
"name": "日志中心",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "rzzxs",
|
||||
"children": [
|
||||
{
|
||||
"gncdbh": 30,
|
||||
"path": "/rzzxs/rzzxsrzjctj",
|
||||
"icon": "zyyy_rzjctj",
|
||||
"name": "日志监测统计"
|
||||
},
|
||||
{
|
||||
"gncdbh": 31,
|
||||
"path": "/rzzxs/rzzxsrzfwrz",
|
||||
"icon": "zyyy_rzfwrz",
|
||||
"name": "认证服务日志"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"zbzx": [
|
||||
{
|
||||
"gncdbh": 1,
|
||||
"name": "指标中心",
|
||||
"icon": "zngzt_zbzx",
|
||||
"path": "zbzx",
|
||||
"children": [
|
||||
{
|
||||
"gncdbh": 1111,
|
||||
"path": "/zbzx/zbtj",
|
||||
"icon": "zngzt_zbtj",
|
||||
"name": "指标统计",
|
||||
"noClosable": true,
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"gncdbh": 10,
|
||||
"path": "/zbzx/wdsq",
|
||||
"icon": "zyyy_wdsq",
|
||||
"name": "我的申请"
|
||||
},
|
||||
{
|
||||
"gncdbh": 11,
|
||||
"path": "/zbzx/zbgl",
|
||||
"icon": "zngzt_zbgl",
|
||||
"name": "指标管理"
|
||||
},
|
||||
{
|
||||
"gncdbh": 12,
|
||||
"path": "/zbzx/zbml",
|
||||
"icon": "zngzt_zbml",
|
||||
"name": "指标目录"
|
||||
},
|
||||
{
|
||||
"gncdbh": 13,
|
||||
"path": "/zbzx/zbrz",
|
||||
"icon": "zngzt_ddrz",
|
||||
"name": "调度日志"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"rwzx": [
|
||||
{
|
||||
"id": 1,
|
||||
"label": "任务中心",
|
||||
"icon": "zngzt_rwzx",
|
||||
"route": "rwzx",
|
||||
"children": [
|
||||
{
|
||||
"id": 10,
|
||||
"label": "全部任务",
|
||||
"route": "/rwzx/qbrw",
|
||||
"icon": "zngzt_qbrw",
|
||||
"name": "Qbrw"
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"label": "代办任务",
|
||||
"route": "/rwzx/dbrw",
|
||||
"icon": "zngzt_dbrw",
|
||||
"name": "Dbrw"
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"label": "已办任务",
|
||||
"route": "/rwzx/ybrw",
|
||||
"icon": "zngzt_ybrw",
|
||||
"name": "Ybrw"
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"label": "任务管理",
|
||||
"route": "/rwzx/rwgl",
|
||||
"icon": "zngzt_rwgl",
|
||||
"name": "Rwgl"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"jcjcgk": [],
|
||||
"zygl": [
|
||||
{
|
||||
"gncdbh": 1,
|
||||
"name": "应用资源",
|
||||
"icon": "zyyy_yyzy",
|
||||
"path": "yyzy",
|
||||
"children": [
|
||||
{
|
||||
"gncdbh": 10,
|
||||
"path": "/yyzy/zhyy",
|
||||
"icon": "zyyy_zhyy",
|
||||
"name": "综合应用"
|
||||
},
|
||||
{
|
||||
"gncdbh": 11,
|
||||
"path": "/yyzy/zyyy",
|
||||
"icon": "zyyy_zyyy",
|
||||
"name": "专业应用"
|
||||
},
|
||||
{
|
||||
"gncdbh": 12,
|
||||
"path": "/yyzy/wqyy",
|
||||
"icon": "zyyy_wqyy",
|
||||
"name": "微/轻应用"
|
||||
},
|
||||
{
|
||||
"gncdbh": 13,
|
||||
"path": "/yyzy/kshkb",
|
||||
"icon": "zyyy_kshkb",
|
||||
"name": "可视化看板"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"gncdbh": 2,
|
||||
"name": "数据资源",
|
||||
"icon": "zyyy_sjzy",
|
||||
"path": "sjzy",
|
||||
"children": [
|
||||
{
|
||||
"gncdbh": 20,
|
||||
"path": "/sjzy/xdc",
|
||||
"icon": "zyyy_xdc",
|
||||
"name": "限定词"
|
||||
},
|
||||
{
|
||||
"gncdbh": 21,
|
||||
"path": "/sjzy/bzsjy",
|
||||
"icon": "zyyy_bzsjy",
|
||||
"name": "标准数据元"
|
||||
},
|
||||
{
|
||||
"gncdbh": 22,
|
||||
"path": "/sjzy/bzxxdm",
|
||||
"icon": "zyyy_bzxxdm",
|
||||
"name": "标准信息代码"
|
||||
},
|
||||
{
|
||||
"gncdbh": 23,
|
||||
"path": "/sjzy/sjzygl",
|
||||
"icon": "zyyy_sjzyml",
|
||||
"name": "数据资源",
|
||||
"children": [
|
||||
{
|
||||
"gncdbh": 230,
|
||||
"path": "/sjzy/sjzygl/sjygl",
|
||||
"icon": "zyyy_sjzyml",
|
||||
"name": "数据源管理"
|
||||
},
|
||||
{
|
||||
"gncdbh": 231,
|
||||
"path": "/sjzy/sjzygl/sjzyml",
|
||||
"icon": "zyyy_sjzyml",
|
||||
"name": "数据资源管理"
|
||||
},
|
||||
{
|
||||
"gncdbh": 232,
|
||||
"path": "/sjzy/sjzygl/yyxtgl",
|
||||
"icon": "zyyy_sjzyml",
|
||||
"name": "应用系统管理"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"gncdbh": 24,
|
||||
"path": "/sjzy/ysj",
|
||||
"icon": "zyyy_ysj",
|
||||
"name": "元数据"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"gncdbh": 3,
|
||||
"name": "服务资源",
|
||||
"icon": "zyyy_fwzy",
|
||||
"path": "fwzy",
|
||||
"children": [
|
||||
{
|
||||
"gncdbh": 30,
|
||||
"path": "/fwzy/zczx",
|
||||
"icon": "zyyy_zczx",
|
||||
"name": "注册中心"
|
||||
},
|
||||
{
|
||||
"gncdbh": 31,
|
||||
"path": "/fwzy/lygl",
|
||||
"icon": "zyyy_lygl",
|
||||
"name": "路由管理"
|
||||
},
|
||||
{
|
||||
"gncdbh": 32,
|
||||
"path": "/fwzy/fwwg",
|
||||
"icon": "zyyy_fwwg",
|
||||
"name": "服务网关"
|
||||
},
|
||||
{
|
||||
"gncdbh": 33,
|
||||
"path": "/fwzy/afw",
|
||||
"icon": "zyyy_afw",
|
||||
"name": "API管理"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"sqjw": [
|
||||
{
|
||||
"gncdbh": 1,
|
||||
"name": "社区警务看板",
|
||||
"path": "/sqjw/sqjwkb",
|
||||
"icon": "zngzt_rwgl"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"gzt": [],
|
||||
"zhzf": [
|
||||
{
|
||||
"gncdbh": 0,
|
||||
"name": "首页",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/svi/index",
|
||||
"router": true
|
||||
},
|
||||
{
|
||||
"gncdbh": 2,
|
||||
"name": "执法对象管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/dtsjygl/dtsjk",
|
||||
"router": true
|
||||
},
|
||||
{
|
||||
"gncdbh": 12,
|
||||
"name": "执法机构管理",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/zfjgl/jgrl",
|
||||
"router": true
|
||||
},
|
||||
{
|
||||
"gncdbh": 3,
|
||||
"name": "行政执法",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/xzzfgl/zfxxgl",
|
||||
"router": true
|
||||
},
|
||||
{
|
||||
"gncdbh": 4,
|
||||
"name": "非现场执法",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/fxczfgl/index",
|
||||
"router": true
|
||||
},
|
||||
{
|
||||
"gncdbh": 13,
|
||||
"name": "举报投诉",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/jbts/tsjbkb",
|
||||
"router": true
|
||||
},
|
||||
{
|
||||
"gncdbh": 9,
|
||||
"name": "统计分析",
|
||||
"icon": "zyyy_rzzx",
|
||||
"path": "/tjbb/zflatj",
|
||||
"router": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
import dictItems from '@/api/system/DictItems'
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
// 使用 Pinia 的正确方式定义 store
|
||||
export const useConstantStore = defineStore('constant', {
|
||||
state: () => ({
|
||||
dictData: {},
|
||||
constants: {},
|
||||
globalParamData: {},
|
||||
}),
|
||||
getters: {
|
||||
getDictData: (state) => (dictCode) => {
|
||||
return state.dictData[dictCode] || []
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
/**
|
||||
* 查询字典数据并缓存
|
||||
* @param {Object} params - 查询参数,包含dictCode
|
||||
* @returns {Array} - 返回字典数据
|
||||
*/
|
||||
async queryDictData(params) {
|
||||
// 如果已经有缓存数据并且不是强制刷新,直接返回
|
||||
if (this.dictData[params.dictCode] && !params.forceRefresh) {
|
||||
console.log('使用缓存的字典数据:', params.dictCode)
|
||||
return this.dictData[params.dictCode]
|
||||
}
|
||||
|
||||
console.log('从服务器获取字典数据:', params.dictCode)
|
||||
// 使用 querylist 方法获取数据
|
||||
const res = await dictItems.queryGzt(params)
|
||||
|
||||
// 检查返回结果并更新 state
|
||||
if (res.success && res.data instanceof Array && res.data.length) {
|
||||
// 直接修改 state
|
||||
this.dictData[params.dictCode] = res.data
|
||||
}
|
||||
|
||||
// 返回数组数据,而不是通过 getter 获取
|
||||
// DictSelector 组件期望直接获取数组,而不是通过 getter 函数
|
||||
return this.dictData[params.dictCode] || []
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
export function useConstantStoreWithOut() {
|
||||
return useConstantStore()
|
||||
}
|
||||
|
|
@ -0,0 +1,194 @@
|
|||
/*
|
||||
蓝色主题色:#5ea1ff rgb(94, 161, 255)
|
||||
绿色主题色:#41cbe2 rgb(65, 203, 226)
|
||||
红色主题色:#f8b650 rgb(248, 182, 80)
|
||||
黑色主题色:#58bbf2 rgb(88, 187, 242)
|
||||
1.1 -> 工作台首页第一个配色
|
||||
2.gztIndexTwoColor -> 工作台首页第二个配色
|
||||
3.gztIndexThreeColor -> 工作台首页第三个配色 用于饼图的透明色 rgba(94, 161, 255, 0.08)
|
||||
4.gztIndexFourColor -> 工作台首页第四个配色 用于线图背景色渐变 rgba(94, 161, 255, 0.08)
|
||||
5.gztIndexDiaBorColor -> 工作台首页弹框以及边框颜色
|
||||
*/
|
||||
|
||||
export const echartsColor = {
|
||||
blueTheme: {
|
||||
gztIndexOneColor: '#5ea1ff',
|
||||
gztIndexTwoColor: '#FFD93E',
|
||||
gztIndexThreeColor: '#5ea1ff14',
|
||||
gztIndexFourColor: '#5ea1ff80',
|
||||
gztIndexLineColor: '#5ea1ff26',
|
||||
gztIndexDialogColor: '#123B7E',
|
||||
gztIndexAreaColor: '#24D192',
|
||||
gztIndexAreaOpacityColor: '#24D1924D',
|
||||
gztIndexBarStartColor: '#3097F0',
|
||||
gztIndexBarEndColor: '#96CBFA',
|
||||
zbzxIndexSqlBackground: '#5ea1ff0d',
|
||||
zbzxZblxBackground0: '#17CFD5',
|
||||
zbzxZblxBackground1: '#1576E0',
|
||||
sqjwYltyBackground: '#5ea1ff0d',
|
||||
sqjwYltxAxisBackground: '#5ea1ff26',
|
||||
sqjwYltxAxisBackground1: '#19FFC6',
|
||||
sqjwYltxAxisBackground2: '#33AAFF',
|
||||
sqjwMdBackground: ['#FFC859', '#5AAEE0', '#3FDA98'],
|
||||
sqjwMdProcessBackground: '#021D4A',
|
||||
screenProcessColor: '#092A5C',
|
||||
pcsWaterBorder: '#5ea1ff4d',
|
||||
pcsWaterBg1_1: '#33AAFF',
|
||||
pcsWaterBg1_2: '#19FFC6',
|
||||
pcsWaterBg2_1: '#0F3B66',
|
||||
pcsWaterBg2_2: '#5EA1FF',
|
||||
pcsWater2Bg1: '#79DAFF',
|
||||
pcsWater2Bg2: '#175F9D',
|
||||
pcsMonthColor: [
|
||||
'#0B5FA9',
|
||||
'#097CE2',
|
||||
'#43A7FF',
|
||||
'#BADFFF',
|
||||
'#2CC6BD',
|
||||
'#33D4ED',
|
||||
'#7A59F8',
|
||||
'#8D7AD7',
|
||||
'#C4B5FA',
|
||||
'#FCB6B6',
|
||||
'#FFC859',
|
||||
],
|
||||
pcsPieBorderColor: '#fff',
|
||||
zyglPieBgColor:'#5EA1FF14',
|
||||
zyglPieColor:'#5EA1FF'
|
||||
},
|
||||
greenTheme: {
|
||||
gztIndexOneColor: '#41cbe2',
|
||||
gztIndexTwoColor: '#FFD93E',
|
||||
gztIndexThreeColor: '#41cbe214',
|
||||
gztIndexFourColor: '#41cbe280',
|
||||
gztIndexLineColor: '#41cbe226',
|
||||
gztIndexDialogColor: '#045462',
|
||||
gztIndexAreaColor: '#24D192',
|
||||
gztIndexAreaOpacityColor: '#24D1924D',
|
||||
gztIndexBarStartColor: '#3097F0',
|
||||
gztIndexBarEndColor: '#96CBFA',
|
||||
zbzxIndexSqlBackground: '#61e8ff0d',
|
||||
zbzxZblxBackground0: '#17CFD5',
|
||||
zbzxZblxBackground1: '#1576E0',
|
||||
sqjwYltyBackground: '#41cbe20d',
|
||||
sqjwYltxAxisBackground: '#41cbe226',
|
||||
sqjwYltxAxisBackground1: '#19FFC6',
|
||||
sqjwYltxAxisBackground2: '#33AAFF',
|
||||
sqjwMdBackground: ['#FFC859', '#5AAEE0', '#3FDA98'],
|
||||
sqjwMdProcessBackground: '#053336',
|
||||
screenProcessColor: '#094146',
|
||||
pcsWaterBorder: '#41cbe24d',
|
||||
pcsWaterBg1_1: '#33AAFF',
|
||||
pcsWaterBg1_2: '#19FFC6',
|
||||
pcsWaterBg2_1: '#0F3B66',
|
||||
pcsWaterBg2_2: '#5EA1FF',
|
||||
pcsWater2Bg1: '#79DAFF',
|
||||
pcsWater2Bg2: '#175F9D',
|
||||
pcsMonthColor: [
|
||||
'#0B5FA9',
|
||||
'#097CE2',
|
||||
'#43A7FF',
|
||||
'#BADFFF',
|
||||
'#2CC6BD',
|
||||
'#33D4ED',
|
||||
'#7A59F8',
|
||||
'#8D7AD7',
|
||||
'#C4B5FA',
|
||||
'#FCB6B6',
|
||||
'#FFC859',
|
||||
],
|
||||
pcsPieBorderColor: '#fff',
|
||||
zyglPieBgColor:'#41CBE214',
|
||||
zyglPieColor:'#41CBE2'
|
||||
},
|
||||
redTheme: {
|
||||
gztIndexOneColor: '#FFB138',
|
||||
gztIndexTwoColor: '#FF504F',
|
||||
gztIndexThreeColor: '#f8b65014',
|
||||
gztIndexFourColor: '#f8b650b3',
|
||||
gztIndexLineColor: '#f8b65026',
|
||||
gztIndexDialogColor: '#B92C19',
|
||||
gztIndexAreaColor: '#24D192',
|
||||
gztIndexAreaOpacityColor: '#24D1924D',
|
||||
gztIndexBarStartColor: '#3097F0',
|
||||
gztIndexBarEndColor: '#96CBFA',
|
||||
zbzxIndexSqlBackground: '#ffb1380d',
|
||||
zbzxZblxBackground0: '#17CFD5',
|
||||
zbzxZblxBackground1: '#1576E0',
|
||||
sqjwYltyBackground: '#FFB1380d',
|
||||
sqjwYltxAxisBackground: '#FFB13826',
|
||||
sqjwYltxAxisBackground1: '#FF8878',
|
||||
sqjwYltxAxisBackground2: '#FFB138',
|
||||
sqjwMdBackground: ['#ffd93e', '#ff8f12', '#e73938'],
|
||||
sqjwMdProcessBackground: '#9F2011',
|
||||
screenProcessColor: '#A92F12',
|
||||
pcsWaterBorder: '#FFB1384d',
|
||||
pcsWaterBg1_1: '#EB631E',
|
||||
pcsWaterBg1_2: '#DC9C3A',
|
||||
pcsWaterBg2_1: '#EE7937',
|
||||
pcsWaterBg2_2: '#E1481C',
|
||||
pcsWater2Bg1: '#FFCB72',
|
||||
pcsWater2Bg2: '#FFA990',
|
||||
pcsMonthColor: [
|
||||
'#FFB138',
|
||||
'#E86C05',
|
||||
'#43A7FF',
|
||||
'#BADFFF',
|
||||
'#2CC6BD',
|
||||
'#33D4ED',
|
||||
'#7A59F8',
|
||||
'#8D7AD7',
|
||||
'#C4B5FA',
|
||||
'#FCB6B6',
|
||||
'#FFC859',
|
||||
],
|
||||
pcsPieBorderColor: '#ffb1384d',
|
||||
zyglPieBgColor:'#FFB13814',
|
||||
zyglPieColor:'#FFB138'
|
||||
},
|
||||
blackTheme: {
|
||||
gztIndexOneColor: '#58bbf2',
|
||||
gztIndexTwoColor: '#FFD93E',
|
||||
gztIndexThreeColor: '#58bbf214',
|
||||
gztIndexFourColor: '#58bbf280',
|
||||
gztIndexLineColor: '#58bbf226',
|
||||
gztIndexDialogColor: '#094364',
|
||||
gztIndexAreaColor: '#24D192',
|
||||
gztIndexAreaOpacityColor: '#24D1924D',
|
||||
gztIndexBarStartColor: '#3097F0',
|
||||
gztIndexBarEndColor: '#96CBFA',
|
||||
zbzxIndexSqlBackground: '#7fcefa0d',
|
||||
zbzxZblxBackground0: '#17CFD5',
|
||||
zbzxZblxBackground1: '#1576E0',
|
||||
sqjwYltyBackground: '#58bbf20d',
|
||||
sqjwYltxAxisBackground: '#58bbf226',
|
||||
sqjwYltxAxisBackground1: '#19FFC6',
|
||||
sqjwYltxAxisBackground2: '#33AAFF',
|
||||
sqjwMdBackground: ['#FFC859', '#5AAEE0', '#3FDA98'],
|
||||
sqjwMdProcessBackground: '#0E1F29',
|
||||
screenProcessColor: '#17303F',
|
||||
pcsWaterBorder: '#58bbf24d',
|
||||
pcsWaterBg1_1: '#33AAFF',
|
||||
pcsWaterBg1_2: '#19FFC6',
|
||||
pcsWaterBg2_1: '#0F3B66',
|
||||
pcsWaterBg2_2: '#5EA1FF',
|
||||
pcsWater2Bg1: '#79DAFF',
|
||||
pcsWater2Bg2: '#175F9D',
|
||||
pcsMonthColor: [
|
||||
'#0B5FA9',
|
||||
'#097CE2',
|
||||
'#43A7FF',
|
||||
'#BADFFF',
|
||||
'#2CC6BD',
|
||||
'#33D4ED',
|
||||
'#7A59F8',
|
||||
'#8D7AD7',
|
||||
'#C4B5FA',
|
||||
'#FCB6B6',
|
||||
'#FFC859',
|
||||
],
|
||||
pcsPieBorderColor: '#fff',
|
||||
zyglPieBgColor:'#58BBF214',
|
||||
zyglPieColor:'#58BBF2'
|
||||
},
|
||||
}
|
||||
|
|
@ -0,0 +1,317 @@
|
|||
/*
|
||||
* @MoudelName: 模块名称
|
||||
* @Company: 湖南xx科技有限公司
|
||||
* @Author: LJ
|
||||
* @Date: 2024-04-23 16:42:19
|
||||
*/
|
||||
/**
|
||||
* @description 路由信息
|
||||
*/
|
||||
import { defineStore } from 'pinia'
|
||||
import routeList from '../json/routeList.json'
|
||||
import { useUserStore } from './user'
|
||||
import SviLayout from '@/layouts/index-svi.vue'
|
||||
|
||||
// 获取全部视图组件(对应菜单)
|
||||
const components = import.meta.glob('@/views/**/*.vue')
|
||||
|
||||
export const useRouteStore = defineStore('router', {
|
||||
state: () => ({
|
||||
currentRoute: '',
|
||||
allMenuData: routeList,
|
||||
visitedRoutes: [],
|
||||
defaultRoutes: [],
|
||||
sidebarRoutes: [],
|
||||
topMenus: {},
|
||||
}),
|
||||
getters: {
|
||||
getCurrentRoute: (state) => state.currentRoute,
|
||||
getVisitedRoutes: (state) => state.visitedRoutes,
|
||||
getDefaultRoutes: (state) => state.defaultRoutes,
|
||||
},
|
||||
actions: {
|
||||
setCurrentRoute(currentRoute) {
|
||||
this.currentRoute = currentRoute
|
||||
},
|
||||
addVisitedRoutes(data) {
|
||||
const routeExists = this.visitedRoutes.some((item) => item.path === data.path)
|
||||
if (!routeExists) {
|
||||
this.visitedRoutes.push(data)
|
||||
} else {
|
||||
if (data.path == '/rwzx/zdgl') {
|
||||
const index = this.visitedRoutes.findIndex((item) => item.path === '/rwzx/zdgl')
|
||||
this.visitedRoutes.splice(index, 1)
|
||||
this.visitedRoutes.push(data)
|
||||
}
|
||||
}
|
||||
},
|
||||
setVisitedRoutes(data) {
|
||||
if (this.visitedRoutes.length) {
|
||||
const current = this.visitedRoutes.find((item) => {
|
||||
return item.path === data[0].path
|
||||
})
|
||||
if (!current) {
|
||||
this.visitedRoutes = [...data, ...this.visitedRoutes]
|
||||
}
|
||||
} else {
|
||||
this.visitedRoutes = data
|
||||
}
|
||||
},
|
||||
clearVisitedRoutes() {
|
||||
this.visitedRoutes = []
|
||||
},
|
||||
initDefaultRoutes() {
|
||||
const userStore = useUserStore()
|
||||
// 从用户信息中获取菜单数据
|
||||
const data = userStore.userInfo.menus
|
||||
if (data && data.length) {
|
||||
// 处理菜单数据,构建路由和菜单
|
||||
const { routes, menuData, topMenus } = buildMenuAndRoutes(data)
|
||||
|
||||
// 设置菜单数据
|
||||
this.allMenuData.zhzf = menuData
|
||||
// 设置路由数据
|
||||
this.defaultRoutes = routes
|
||||
// 顶部菜单
|
||||
this.topMenus = topMenus
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
/**
|
||||
* 从用户信息中构建菜单和路由
|
||||
* @param {Array} menuData - 用户信息中的菜单数据
|
||||
* @returns {Object} - 包含路由和菜单数据的对象
|
||||
*/
|
||||
function buildMenuAndRoutes(menuData) {
|
||||
// 结果对象
|
||||
const result = {
|
||||
routes: [],
|
||||
menuData: {},
|
||||
}
|
||||
|
||||
if (!menuData || !menuData.length) return result
|
||||
|
||||
// 打印原始菜单数据,帮助调试
|
||||
// console.log('原始菜单数据:', JSON.stringify(menuData))
|
||||
|
||||
// 手动构建路由数据
|
||||
const routes = []
|
||||
|
||||
// 处理菜单数据
|
||||
const menuObj = {}
|
||||
|
||||
const topMenus = {}
|
||||
|
||||
/**
|
||||
* 递归处理菜单项,生成路由配置和菜单数据
|
||||
* @param {Array} items - 菜单项数组
|
||||
* @param {String} parentPath - 父路径
|
||||
* @param {Array} parentRoutes - 父路由数组
|
||||
* @param {Number} level - 当前层级
|
||||
*/
|
||||
function processMenuItems(items, parentPath = '', parentRoutes = routes, level = 0) {
|
||||
items.forEach((item) => {
|
||||
// 处理目录类型菜单(M)
|
||||
if (item.gncdlx === 'M' && item.children?.length > 0) {
|
||||
// 直接处理子菜单,不创建路由
|
||||
processMenuItems(item.children, parentPath, parentRoutes, level + 1)
|
||||
return
|
||||
}
|
||||
|
||||
// 处理路径
|
||||
const normalizedPath = normalizePath(item.path, parentPath)
|
||||
const pathParts = normalizedPath.split('/').filter(Boolean)
|
||||
|
||||
const firstLevelDir = pathParts[0] || ''
|
||||
|
||||
// 处理菜单数据
|
||||
if (level >= 1 && item.gncdlx === 'C') {
|
||||
processMenuItem(item, normalizedPath, firstLevelDir, level, pathParts)
|
||||
}
|
||||
|
||||
// 处理路由配置(有组件的菜单项)
|
||||
if (item.component && item.gncdlx === 'C') {
|
||||
// 创建并添加路由配置
|
||||
const routeConfig = createRouteConfig(item, normalizedPath, level, pathParts)
|
||||
parentRoutes.push(routeConfig)
|
||||
|
||||
// 递归处理子菜单
|
||||
if (item.children?.length > 0) {
|
||||
processMenuItems(item.children, normalizedPath, routeConfig.children, level + 1)
|
||||
}
|
||||
}
|
||||
// 处理没有组件但有子菜单的项
|
||||
else if (item.children?.length > 0) {
|
||||
processMenuItems(item.children, normalizedPath, parentRoutes, level + 1)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 规范化路径
|
||||
* @param {String} path - 当前路径
|
||||
* @param {String} parentPath - 父路径
|
||||
* @returns {String} - 规范化后的路径
|
||||
*/
|
||||
function normalizePath(path, parentPath) {
|
||||
const currentPath = path.startsWith('/') ? path : `${parentPath}/${path}`
|
||||
return currentPath.replace(/\/\/+/g, '/')
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理菜单项数据
|
||||
* @param {Object} item - 菜单项
|
||||
* @param {String} normalizedPath - 规范化路径
|
||||
* @param {String} firstLevelDir - 一级目录名
|
||||
* @param {Number} level - 当前层级
|
||||
*/
|
||||
function processMenuItem(item, normalizedPath, firstLevelDir, level, pathParts) {
|
||||
if (item.gncdlx === 'M' || item.gncdlx === 'F') {
|
||||
return
|
||||
}
|
||||
// 确保存在一级目录
|
||||
if (!firstLevelDir) return
|
||||
|
||||
// 初始化目录数组
|
||||
if (!menuObj[firstLevelDir]) {
|
||||
menuObj[firstLevelDir] = []
|
||||
}
|
||||
|
||||
if (!topMenus['zhzf']) {
|
||||
topMenus.zhzf = []
|
||||
}
|
||||
|
||||
// 第一层菜单
|
||||
if (level === 1) {
|
||||
topMenus.zhzf.push({
|
||||
gncdbh: item.gncdbh,
|
||||
name: item.gncdmc,
|
||||
icon: item.meta?.icon || 'zyyy_rzzx',
|
||||
path: normalizedPath,
|
||||
router: item.sfwl == 1,
|
||||
meta: {
|
||||
icon: item.meta?.icon || 'zyyy_rzzx',
|
||||
title: item.gncdmc,
|
||||
menuId: item.gncdbh,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
if (level >= 2) {
|
||||
// 构建菜单项
|
||||
const menuItem = {
|
||||
gncdbh: item.gncdbh,
|
||||
name: item.gncdmc,
|
||||
icon: item.meta?.icon || 'zyyy_rzzx',
|
||||
path: normalizedPath,
|
||||
router: item.sfwl == 1,
|
||||
meta: {
|
||||
icon: item.meta?.icon || 'zyyy_rzzx',
|
||||
title: item.gncdmc,
|
||||
menuId: item.gncdbh,
|
||||
},
|
||||
children: [],
|
||||
}
|
||||
|
||||
// 查找上级菜单路径
|
||||
const parentPath = pathParts.slice(0, -1).join('/')
|
||||
// 查找上级菜单
|
||||
const parentMenu = menuObj[firstLevelDir].find((m) => m.path.endsWith(`/${parentPath}`) || m.path === `/${parentPath}`)
|
||||
|
||||
if (parentMenu) {
|
||||
// 确保parentMenu有children数组
|
||||
if (!parentMenu.children) {
|
||||
parentMenu.children = []
|
||||
}
|
||||
// 将当前菜单项添加到上级菜单的children中
|
||||
parentMenu.children.push(menuItem)
|
||||
} else {
|
||||
// 如果没有找到上级菜单,则添加到一级菜单
|
||||
menuObj[firstLevelDir].push(menuItem)
|
||||
}
|
||||
|
||||
if (menuItem.children.length === 0) {
|
||||
delete menuItem.children
|
||||
}
|
||||
|
||||
// 第一个菜单项设置为不可关闭
|
||||
if (menuObj[firstLevelDir].length === 1) {
|
||||
menuItem.noClosable = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建路由配置
|
||||
* @param {Object} item - 菜单项
|
||||
* @param {String} normalizedPath - 规范化路径
|
||||
* @param {Number} level - 当前层级
|
||||
* @param {Array} pathParts - 路径部分
|
||||
* @returns {Object} - 路由配置对象
|
||||
*/
|
||||
function createRouteConfig(item, normalizedPath, level, pathParts) {
|
||||
// 确定组件
|
||||
const component = item.component === 'SviLayout' ? SviLayout : components[item.component.replace('@', '/src')]
|
||||
|
||||
// 确定路径
|
||||
let routePath
|
||||
const childPath = pathParts[pathParts.length - 1] || ''
|
||||
routePath = level === 1 ? `/${childPath}` : childPath
|
||||
// 返回路由配置
|
||||
return {
|
||||
path: routePath || normalizedPath,
|
||||
name: `_${pathParts.join('_')}`,
|
||||
component,
|
||||
meta: {
|
||||
title: item.gncdmc,
|
||||
icon: item.meta?.icon || 'zyyy_rzzx',
|
||||
menuId: item.gncdbh,
|
||||
buttonPermissions:
|
||||
item.children?.filter((child) => child.gncdlx === 'F')?.map((child) => [child.path, child.gncdmc]) || [],
|
||||
},
|
||||
children: [],
|
||||
}
|
||||
}
|
||||
|
||||
// 开始处理菜单数据
|
||||
processMenuItems(menuData)
|
||||
|
||||
// 打印路由路径信息,检查是否有不以斜杠开头的路径
|
||||
routes.forEach((route) => {
|
||||
// 确保顶级路由路径以斜杠开头
|
||||
if (!route.path.startsWith('/')) {
|
||||
console.error(`路由路径必须以 / 开头: ${route.path}`)
|
||||
route.path = `/${route.path}`
|
||||
}
|
||||
|
||||
// 检查子路由
|
||||
if (route.children) {
|
||||
route.children.forEach((child) => {
|
||||
// 子路由不应该以斜杠开头,如果有则移除
|
||||
if (child.path.startsWith('/')) {
|
||||
console.warn(`子路由路径不应该以 / 开头: ${child.path}`)
|
||||
child.path = child.path.substring(1)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
// 确保有 svi 属性
|
||||
menuObj.svi = []
|
||||
|
||||
// 打印处理后的菜单和路由数据,帮助调试
|
||||
console.log('处理后的菜单数据:', JSON.stringify(menuObj))
|
||||
console.log('处理后的路由数据:', JSON.stringify(routes, null, 2))
|
||||
|
||||
result.routes = routes
|
||||
result.menuData = menuObj
|
||||
topMenus.zhzf = topMenus.zhzf.map((menu) => {
|
||||
const subMenus = menuObj[menu.path.substring(1)]
|
||||
menu.path = subMenus && subMenus.length ? subMenus[0].path : menu.path
|
||||
return menu
|
||||
})
|
||||
result.topMenus = topMenus
|
||||
return result
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
import { store } from '@/stores'
|
||||
import { defineStore } from 'pinia'
|
||||
import { echartsColor } from './echartsColor.js'
|
||||
|
||||
export const useThemeStore = defineStore('theme', {
|
||||
state: () => ({
|
||||
fontCls: localStorage.getItem('data-font') || '',
|
||||
themeCls: localStorage.getItem('data-theme') || 'whiteblueTheme',
|
||||
mainThemeCls: 'whiteblueTheme',
|
||||
echartsColor, // 图标所有配色
|
||||
}),
|
||||
getters: {},
|
||||
actions: {
|
||||
setTheme(theme) {
|
||||
this.themeCls = theme
|
||||
},
|
||||
setFont(font) {
|
||||
this.fontCls = font
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
export function useThemeStoreWithOut() {
|
||||
return useThemeStore(store)
|
||||
}
|
||||
|
|
@ -0,0 +1,487 @@
|
|||
import store from '@/stores'
|
||||
import { defineStore } from 'pinia'
|
||||
import topMenu from '../json/topMenu.json'
|
||||
import allMenus from '../json/menu.json'
|
||||
import { addDynamicRoutes } from '@/router'
|
||||
import { useRouteStore } from './router'
|
||||
import { refreshToken, getLoginUrl } from '@/api/lawenforcement/User'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
import tsjb from '@/assets/applocationImage/tsjb.png'
|
||||
import ajbl from '@/assets/applocationImage/ajbl.png'
|
||||
import scyf from '@/assets/applocationImage/scyf.png'
|
||||
import zhzf from '@/assets/applocationImage/zhzf.png'
|
||||
import ddjc from '@/assets/applocationImage/ddjc.png'
|
||||
import zdbwgl from '@/assets/applocationImage/zdbwgl.png'
|
||||
import pxgl from '@/assets/applocationImage/pxgl.png'
|
||||
import kwgl from '@/assets/applocationImage/kwgl.png'
|
||||
import yjzh from '@/assets/applocationImage/yjzh.png'
|
||||
import yagl from '@/assets/applocationImage/yagl.png'
|
||||
import xxfb from '@/assets/applocationImage/xxfb.png'
|
||||
import yjsj from '@/assets/applocationImage/yjsj.png'
|
||||
import zbzs from '@/assets/applocationImage/zbzs.png'
|
||||
import xxjb from '@/assets/applocationImage/xxjb.png'
|
||||
import fxpc from '@/assets/applocationImage/fxpc.png'
|
||||
import csaqfz from '@/assets/applocationImage/csaqfz.png'
|
||||
import yjbncs from '@/assets/applocationImage/yjbncs.png'
|
||||
import yjwzgl from '@/assets/applocationImage/yjwzgl.png'
|
||||
import dzhlfx from '@/assets/applocationImage/dzhlfx.png'
|
||||
import xcjy from '@/assets/applocationImage/xcjy.png'
|
||||
import cssmx from '@/assets/applocationImage/cssmx.png'
|
||||
import ggaq from '@/assets/applocationImage/ggaq.png'
|
||||
import dklfxzx from '@/assets/applocationImage/dklfxzx.png'
|
||||
import wxhxpzx from '@/assets/applocationImage/wxhxpzx.png'
|
||||
import gksmzx from '@/assets/applocationImage/gksmzx.png'
|
||||
import gcjs from '@/assets/applocationImage/gcjs.png'
|
||||
import shzx from '@/assets/applocationImage/shzx.png'
|
||||
import fxzx from '@/assets/applocationImage/fxzx.png'
|
||||
import dzdzzx from '@/assets/applocationImage/dzdzzx.png'
|
||||
import tysfrz from '@/assets/applocationImage/tysfrz.png'
|
||||
import tyxxtz from '@/assets/applocationImage/tyxxtz.png'
|
||||
import jcxxgl from '@/assets/applocationImage/jcxxgl.png'
|
||||
import yjzhgl from '@/assets/applocationImage/yjzhgl.png'
|
||||
import spfx from '@/assets/applocationImage/spfx.png'
|
||||
import znwh from '@/assets/applocationImage/znwh.png'
|
||||
import dmdd from '@/assets/applocationImage/dmdd.png'
|
||||
import sjgc from '@/assets/applocationImage/sjgc.png'
|
||||
import fwkfpt from '@/assets/applocationImage/fwkfpt.png'
|
||||
import scjyba from '@/assets/applocationImage/scjyba.png'
|
||||
import zzzggl from '@/assets/applocationImage/zzzggl.png'
|
||||
import zcfg from '@/assets/applocationImage/zcfg.png'
|
||||
import tztg from '@/assets/applocationImage/tztg.png'
|
||||
import zhdj from '@/assets/applocationImage/zhdj.png'
|
||||
|
||||
// 默认用户头像
|
||||
import avatar from '@/assets/image/avatar.png'
|
||||
import users from '@/api/lawenforcement/User'
|
||||
import agencies from '@/api/lawenforcement/Agency'
|
||||
|
||||
// 基础系统地址
|
||||
const baseURL = import.meta.env.VITE_BASE_URL
|
||||
|
||||
export const useUserStore = defineStore('user', {
|
||||
state: () => {
|
||||
return {
|
||||
token: sessionStorage.getItem('accessToken') || '',
|
||||
refreshToken: sessionStorage.getItem('refreshToken') || '',
|
||||
tokenExpireIn: 0,
|
||||
tokenExpireInHandler: null,
|
||||
bjImg: '',
|
||||
frameUrl: '',
|
||||
username: '张怀杉',
|
||||
mobile: '13800138000',
|
||||
userAvatar: avatar,
|
||||
layoutTitle: '基层基础管控',
|
||||
topMenu,
|
||||
allMenus,
|
||||
myAppLocations: [
|
||||
{
|
||||
index: 'jiandu',
|
||||
name: '监督管理',
|
||||
list: [
|
||||
{
|
||||
name: '投诉举报',
|
||||
avatar: tsjb,
|
||||
},
|
||||
{
|
||||
name: '案件办理',
|
||||
avatar: ajbl,
|
||||
},
|
||||
{
|
||||
name: '双重预防',
|
||||
avatar: scyf,
|
||||
},
|
||||
{
|
||||
name: '综合执法',
|
||||
avatar: zhzf,
|
||||
isImg: false,
|
||||
isTrue: true,
|
||||
url: '/zhzf/index.html',
|
||||
},
|
||||
{
|
||||
name: '督导检查',
|
||||
avatar: ddjc,
|
||||
isImg: true,
|
||||
url: '/gzt/index.html#/frame?imageIndex=1',
|
||||
},
|
||||
{
|
||||
name: '重点部位管理',
|
||||
avatar: zdbwgl,
|
||||
},
|
||||
{
|
||||
name: '培训管理',
|
||||
avatar: pxgl,
|
||||
isImg: true,
|
||||
url: '/gzt/index.html#/frame?imageIndex=3',
|
||||
},
|
||||
{
|
||||
name: '考务管理',
|
||||
avatar: kwgl,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
index: 'jiance',
|
||||
name: '监测预警',
|
||||
list: [
|
||||
{
|
||||
name: '城市生命线',
|
||||
avatar: cssmx,
|
||||
},
|
||||
{
|
||||
name: '公共安全',
|
||||
avatar: ggaq,
|
||||
},
|
||||
{
|
||||
name: '大客流风险专项',
|
||||
avatar: dklfxzx,
|
||||
isImg: true,
|
||||
url: '/gzt/index.html#/frame?imageIndex=0',
|
||||
},
|
||||
{
|
||||
name: '危险化学品专项',
|
||||
avatar: wxhxpzx,
|
||||
},
|
||||
{
|
||||
name: '工矿商贸专项',
|
||||
avatar: gksmzx,
|
||||
isTrue: true,
|
||||
url: '/gmzx/index.html#/',
|
||||
},
|
||||
{
|
||||
name: '工程建设',
|
||||
avatar: gcjs,
|
||||
},
|
||||
{
|
||||
name: '森火专项',
|
||||
avatar: shzx,
|
||||
},
|
||||
{
|
||||
name: '防汛专项',
|
||||
avatar: fxzx,
|
||||
},
|
||||
{
|
||||
name: '地震地质专项',
|
||||
avatar: dzdzzx,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
index: 'zhihui',
|
||||
name: '指挥救援',
|
||||
list: [
|
||||
{
|
||||
name: '应急指挥',
|
||||
avatar: yjzh,
|
||||
},
|
||||
{
|
||||
name: '预案管理',
|
||||
avatar: yagl,
|
||||
},
|
||||
{
|
||||
name: '信息发布',
|
||||
avatar: xxfb,
|
||||
},
|
||||
{
|
||||
name: '应急事件',
|
||||
avatar: yjsj,
|
||||
},
|
||||
{
|
||||
name: '值班值守',
|
||||
avatar: zbzs,
|
||||
},
|
||||
{
|
||||
name: '信息接报',
|
||||
avatar: xxjb,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
index: 'fangzai',
|
||||
name: '防灾减灾',
|
||||
list: [
|
||||
{
|
||||
name: '风险普查',
|
||||
avatar: fxpc,
|
||||
},
|
||||
{
|
||||
name: '城市安全发展',
|
||||
avatar: csaqfz,
|
||||
},
|
||||
{
|
||||
name: '应急避难场所',
|
||||
avatar: yjbncs,
|
||||
isImg: true,
|
||||
url: '/gzt/index.html#/frame?imageIndex=6',
|
||||
},
|
||||
{
|
||||
name: '应急物资管理',
|
||||
avatar: yjwzgl,
|
||||
isImg: true,
|
||||
url: '/gzt/index.html#/frame?imageIndex=7',
|
||||
},
|
||||
{
|
||||
name: '多灾害链分析',
|
||||
avatar: dzhlfx,
|
||||
},
|
||||
{
|
||||
name: '宣传教育',
|
||||
avatar: xcjy,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
index: 'zhengwu',
|
||||
name: '政务服务',
|
||||
list: [
|
||||
{
|
||||
name: '生产经营备案',
|
||||
avatar: scjyba,
|
||||
},
|
||||
{
|
||||
name: '资质资格管理',
|
||||
avatar: zzzggl,
|
||||
},
|
||||
{
|
||||
name: '政策法规',
|
||||
avatar: zcfg,
|
||||
},
|
||||
{
|
||||
name: '通知通告',
|
||||
avatar: tztg,
|
||||
},
|
||||
{
|
||||
name: '智慧党建',
|
||||
avatar: zhdj,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
index: 'zhicheng',
|
||||
name: '支撑服务',
|
||||
list: [
|
||||
{
|
||||
name: '统一身份认证',
|
||||
avatar: tysfrz,
|
||||
isImg: true,
|
||||
url: '/gzt/index.html#/frame?imageIndex=5',
|
||||
},
|
||||
{
|
||||
name: '统一消息通知',
|
||||
avatar: tyxxtz,
|
||||
},
|
||||
{
|
||||
name: '基础信息管理',
|
||||
avatar: jcxxgl,
|
||||
isTrue: true,
|
||||
url: '/yjzy/index.html#/yjzyqygl/index',
|
||||
},
|
||||
{
|
||||
name: '应急综合管理',
|
||||
avatar: yjzhgl,
|
||||
},
|
||||
{
|
||||
name: '视频分析',
|
||||
avatar: spfx,
|
||||
},
|
||||
{
|
||||
name: '智能外呼',
|
||||
avatar: znwh,
|
||||
},
|
||||
{
|
||||
name: '点名点到',
|
||||
avatar: dmdd,
|
||||
},
|
||||
{
|
||||
name: '数据工程',
|
||||
avatar: sjgc,
|
||||
isImg: true,
|
||||
url: '/gzt/index.html#/frame?imageIndex=4',
|
||||
},
|
||||
{
|
||||
name: '服务开放平台',
|
||||
avatar: fwkfpt,
|
||||
isTrue: true,
|
||||
url: '/kfpt/index.html#/svi/index',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
isDraggable: false,
|
||||
communityDept: '',
|
||||
indexLayout: [
|
||||
{ x: 0, y: 0, w: 8, h: 3.5, title: '用户信息', i: 'CviSummary', havePublic: 1 },
|
||||
{ x: 0, y: 3.5, w: 8, h: 9.5, title: '待办事件', i: 'Backlog' },
|
||||
{ x: 0, y: 13, w: 8, h: 7.6, title: '消息通知', i: 'MsgCenter' },
|
||||
{ x: 8, y: 0, w: 16, h: 10.6, title: '监测预警', i: 'SurveyWarning' },
|
||||
{ x: 8, y: 10.6, w: 16, h: 10, title: '风险隐患统计', i: 'RiskStatistics' },
|
||||
{ x: 0, y: 31.6, w: 24, h: 5, title: '自然灾害专项', i: 'NaturalCalamities' },
|
||||
{ x: 0, y: 36.6, w: 8, h: 19, title: '城市生命线', i: 'CityLife' },
|
||||
{ x: 0, y: 55.6, w: 8, h: 18, title: '应急资源', i: 'EmergencyResource' },
|
||||
{ x: 8, y: 31.6, w: 16, h: 16.5, title: '危化专项', i: 'DangerousChemistry' },
|
||||
{ x: 8, y: 48.1, w: 16, h: 20.5, title: '工贸专项', i: 'IndustryTrade' },
|
||||
{ x: 0, y: 68.6, w: 24, h: 10, title: '应急事件', i: 'Emergency' },
|
||||
{ x: 0, y: 78.6, w: 24, h: 11.5, title: '安全生产隐患', i: 'SafeTable', havePublic: 1 },
|
||||
],
|
||||
imageIndex: 0,
|
||||
yhtxtpurl: 'https://i.gtimg.cn/club/item/face/img/2/15922_100.gif',
|
||||
// 用户所在机构信息
|
||||
deptInfo: JSON.parse(sessionStorage.getItem('deptInfo')) || [],
|
||||
userInfo: JSON.parse(sessionStorage.getItem('userInfo')) || {},
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
setToken(token) {
|
||||
this.token = token
|
||||
sessionStorage.setItem('accessToken', token)
|
||||
},
|
||||
set_yhtxtpurl(url) {
|
||||
this.yhtxtpurl = url
|
||||
},
|
||||
setRefreshToken(token) {
|
||||
this.refreshToken = token
|
||||
sessionStorage.setItem('refreshToken', token)
|
||||
},
|
||||
setExpireIn(expireIn) {
|
||||
this.tokenExpireIn = expireIn
|
||||
|
||||
if (this.tokenExpireInHandler) {
|
||||
clearInterval(this.tokenExpireInHandler)
|
||||
}
|
||||
this.tokenExpireInHandler = setInterval(() => {
|
||||
this.tokenExpireIn = this.tokenExpireIn - 1
|
||||
if (this.tokenExpireIn <= 120 && this.tokenExpireIn >= 0) {
|
||||
// 当令牌即将过期时(剩余120秒),刷新access token
|
||||
if (this.refreshToken) {
|
||||
refreshToken(this.refreshToken)
|
||||
.then(({ data }) => {
|
||||
if (data && data.access_token) {
|
||||
this.setToken(data.access_token)
|
||||
this.setRefreshToken(data.refresh_token)
|
||||
this.setExpireIn(data.expires_in)
|
||||
console.log('令牌刷新成功')
|
||||
} else {
|
||||
// 刷新失败,清除定时器
|
||||
clearInterval(this.tokenExpireInHandler)
|
||||
this.tokenExpireInHandler = null
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('令牌刷新失败', error)
|
||||
// 刷新失败,清除定时器
|
||||
clearInterval(this.tokenExpireInHandler)
|
||||
this.tokenExpireInHandler = null
|
||||
})
|
||||
}
|
||||
}
|
||||
if (this.tokenExpireIn === 0 && this.tokenExpireInHandler) {
|
||||
clearInterval(this.tokenExpireInHandler)
|
||||
this.tokenExpireInHandler = null
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
resetAll() {
|
||||
this.token = ''
|
||||
this.refreshToken = ''
|
||||
this.tokenExpireIn = 0
|
||||
localStorage.removeItem('accessToken')
|
||||
localStorage.removeItem('refreshToken')
|
||||
sessionStorage.removeItem('accessToken')
|
||||
sessionStorage.removeItem('refreshToken')
|
||||
},
|
||||
// 获取用户信息
|
||||
getUserInfo() {
|
||||
return new Promise((resolve, reject) => {
|
||||
users
|
||||
.getUserInfo()
|
||||
.then(({ data }) => {
|
||||
this.userInfo = data
|
||||
this.username = this.userInfo.xm
|
||||
this.mobile = this.userInfo.yddh
|
||||
this.userAvatar = this.userInfo.yhtxtpurl
|
||||
// this.yhtxtpurl = this.userInfo.yhtxtpurl
|
||||
sessionStorage.setItem('userInfo', JSON.stringify(data))
|
||||
|
||||
// 获取用户所在机构信息
|
||||
if (data && data.gajgjgdm) {
|
||||
// 使用 agency 接口获取机构详细信息
|
||||
agencies.findOneByCode(data.gajgjgdm)
|
||||
.then(res => {
|
||||
if (res.data) {
|
||||
// 将获取到的机构数据保存到 deptInfo 中
|
||||
this.deptInfo = res.data
|
||||
sessionStorage.setItem('deptInfo', JSON.stringify(this.deptInfo))
|
||||
console.log('用户机构信息获取成功:', this.deptInfo)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('获取用户机构信息失败:', error)
|
||||
})
|
||||
}
|
||||
// 初始化路由数据
|
||||
const routeStore = useRouteStore()
|
||||
|
||||
// 确保路由存储已初始化默认路由
|
||||
if (routeStore.defaultRoutes.length === 0) {
|
||||
// routeStore.initDefaultRoutes()
|
||||
}
|
||||
|
||||
// 加载动态路由
|
||||
// const dynamicRoutes = addDynamicRoutes()
|
||||
// console.log('动态路由加载完成,共加载路由数量:', dynamicRoutes.length)
|
||||
|
||||
resolve(data)
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
},
|
||||
init() {
|
||||
if (this.userInfo && Object.keys(this.userInfo).length) {
|
||||
this.username = this.userInfo.xm
|
||||
this.mobile = this.userInfo.yddh
|
||||
this.userAvatar = this.userInfo.yhtxtpurl
|
||||
this.yhtxtpurl = this.userInfo.yhtxtpurl
|
||||
}
|
||||
},
|
||||
async logout() {
|
||||
// 调用后端的标准退出接口
|
||||
await users.logout({ accessToken: this.token });
|
||||
// sysLogout (客户端退出) 会在 beforeunload (关闭标签页时) 由 main/index.vue 中的 sendBeacon 调用
|
||||
// 手动点击退出时,主要职责是清除前端状态并引导用户重新登录或到指定页面
|
||||
ElMessage({ message: '退出成功', type: 'success' });
|
||||
this.resetAll();
|
||||
// 先尝试直接关闭
|
||||
// window.close();
|
||||
// 如果没有关闭成功(被浏览器阻止)
|
||||
// if (!window.closed) {
|
||||
window.location.href = `${baseURL}/gzt/index.html`;
|
||||
// }
|
||||
},
|
||||
async login() {
|
||||
const state = {
|
||||
params: {
|
||||
scope: 'all',
|
||||
response_type: 'code',
|
||||
client_id: 'WORK-PLATFORM',
|
||||
redirect_uri: '',
|
||||
}
|
||||
}
|
||||
// 通过授权码的方式登录系统
|
||||
const { data } = await getLoginUrl()
|
||||
const redirect_uri = data.redirect_uri
|
||||
const client_id = data.client_id
|
||||
let urlQuery = []
|
||||
const params = { ...state.params, redirect_uri, client_id }
|
||||
Object.keys(params).forEach((key) => {
|
||||
urlQuery.push(`${key}=${params[key]}`)
|
||||
})
|
||||
window.location.href = `${baseURL}/ht/uaa/oauth/authorize?${urlQuery.join('&')}`
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
export function useUserStoreWithOut() {
|
||||
return useUserStore(store)
|
||||
}
|
||||
Loading…
Reference in New Issue