Merge branch 'main' of http://49.232.154.205:10100/liujingchao/fad_oa into main
This commit is contained in:
@@ -29,11 +29,36 @@ const permission = {
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
// 生成路由
|
||||
GenerateRoutes({ commit }) {
|
||||
GenerateRoutes({ commit }) {
|
||||
return new Promise(resolve => {
|
||||
// 向后端请求路由数据
|
||||
|
||||
getRouters().then(res => {
|
||||
|
||||
|
||||
const oaMenu = res.data.find(item => item.path === '/oa' || (item.meta && item.meta.title === '办公中心'));
|
||||
|
||||
if (oaMenu) {
|
||||
if (!oaMenu.children) oaMenu.children = [];
|
||||
|
||||
|
||||
const hasHistory = oaMenu.children.some(child => child.path === 'flowHistory');
|
||||
|
||||
if (!hasHistory) {
|
||||
oaMenu.children.push({
|
||||
name: 'HrmFlowHistory',
|
||||
path: 'flowHistory',
|
||||
hidden: false,
|
||||
component: 'hrm/flow/taskHistory',
|
||||
meta: {
|
||||
title: '审批历史',
|
||||
icon: 'date-range',
|
||||
noCache: false
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// ================= 新增拦截代码:将页面注入到办公中心结束 =================
|
||||
|
||||
const sdata = JSON.parse(JSON.stringify(res.data))
|
||||
const rdata = JSON.parse(JSON.stringify(res.data))
|
||||
const sidebarRoutes = filterAsyncRouter(sdata)
|
||||
@@ -130,4 +155,4 @@ export const loadView = (view) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default permission
|
||||
export default permission
|
||||
Reference in New Issue
Block a user