This commit is contained in:
parent
a47c8a608e
commit
458ba876de
|
|
@ -0,0 +1,25 @@
|
||||||
|
.DS_Store
|
||||||
|
node_modules/
|
||||||
|
dist/
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
.env.development
|
||||||
|
**/*.log
|
||||||
|
|
||||||
|
tests/**/coverage/
|
||||||
|
tests/e2e/reports
|
||||||
|
selenium-debug.log
|
||||||
|
.env.development
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.local
|
||||||
|
|
||||||
|
package-lock.json
|
||||||
|
yarn.lock
|
||||||
|
|
@ -17,6 +17,7 @@ import workLogRouter from './modules/workLog'
|
||||||
import addressBookRouter from './modules/addressBook'
|
import addressBookRouter from './modules/addressBook'
|
||||||
import calendarRouter from './modules/calendar'
|
import calendarRouter from './modules/calendar'
|
||||||
import hrmRouter from './modules/hrm'
|
import hrmRouter from './modules/hrm'
|
||||||
|
import compliance from './modules/compliance'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hidden: true if `hidden:true` will not show in the sidebar(default is false)
|
* hidden: true if `hidden:true` will not show in the sidebar(default is false)
|
||||||
|
|
@ -80,5 +81,6 @@ export const asyncRouterMap = [
|
||||||
{ type: 'bi', router: biRouter },
|
{ type: 'bi', router: biRouter },
|
||||||
{ type: 'calendar', router: calendarRouter },
|
{ type: 'calendar', router: calendarRouter },
|
||||||
{ type: 'hrm', router: hrmRouter },
|
{ type: 'hrm', router: hrmRouter },
|
||||||
{ type: 'manage', router: adminRouter }
|
{ type: 'manage', router: adminRouter },
|
||||||
|
{ type: 'compliance', router: compliance }
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ const getters = {
|
||||||
oa: state => state.user.oa,
|
oa: state => state.user.oa,
|
||||||
project: state => state.user.project,
|
project: state => state.user.project,
|
||||||
hrm: state => state.user.hrm,
|
hrm: state => state.user.hrm,
|
||||||
|
compliance: state => state.user.allAuth,
|
||||||
// 路由
|
// 路由
|
||||||
addRouters: state => state.permission.addRouters,
|
addRouters: state => state.permission.addRouters,
|
||||||
crmRouters: state => state.permission.crmRouters,
|
crmRouters: state => state.permission.crmRouters,
|
||||||
|
|
@ -55,7 +55,7 @@ const getters = {
|
||||||
biRouters: state => state.permission.biRouters,
|
biRouters: state => state.permission.biRouters,
|
||||||
manageRouters: state => state.permission.manageRouters,
|
manageRouters: state => state.permission.manageRouters,
|
||||||
hrmRouters: state => state.permission.hrmRouters,
|
hrmRouters: state => state.permission.hrmRouters,
|
||||||
|
complianceRouters: state => state.permission.complianceRouters,
|
||||||
// 客户管理信息
|
// 客户管理信息
|
||||||
messageNum: state => state.crm.messageNum,
|
messageNum: state => state.crm.messageNum,
|
||||||
// 配置信息
|
// 配置信息
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ import permission from './modules/permission'
|
||||||
import app from './modules/app'
|
import app from './modules/app'
|
||||||
import crm from './modules/crm'
|
import crm from './modules/crm'
|
||||||
import hrm from './modules/hrm'
|
import hrm from './modules/hrm'
|
||||||
|
import compliance from './modules/compliance'
|
||||||
|
|
||||||
import getters from './getters'
|
import getters from './getters'
|
||||||
|
|
||||||
Vue.use(Vuex)
|
Vue.use(Vuex)
|
||||||
|
|
@ -15,7 +17,8 @@ const store = new Vuex.Store({
|
||||||
permission,
|
permission,
|
||||||
user,
|
user,
|
||||||
crm,
|
crm,
|
||||||
hrm
|
hrm,
|
||||||
|
compliance
|
||||||
},
|
},
|
||||||
getters
|
getters
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -230,10 +230,12 @@ const permission = {
|
||||||
projectRouters: [],
|
projectRouters: [],
|
||||||
biRouters: [],
|
biRouters: [],
|
||||||
manageRouters: [],
|
manageRouters: [],
|
||||||
hrmRouters: []
|
hrmRouters: [],
|
||||||
|
complianceRouters:[]
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
SET_ROUTERS: (state, data) => {
|
SET_ROUTERS: (state, data) => {
|
||||||
|
console.log('set routers', data)
|
||||||
state.addRouters = data.addRouter
|
state.addRouters = data.addRouter
|
||||||
state.crmRouters = data.router.crm || []
|
state.crmRouters = data.router.crm || []
|
||||||
state.workLogRouters = data.router.workLog || []
|
state.workLogRouters = data.router.workLog || []
|
||||||
|
|
@ -243,6 +245,7 @@ const permission = {
|
||||||
state.biRouters = data.router.bi || []
|
state.biRouters = data.router.bi || []
|
||||||
state.manageRouters = data.router.manage || []
|
state.manageRouters = data.router.manage || []
|
||||||
state.hrmRouters = data.router.hrm || []
|
state.hrmRouters = data.router.hrm || []
|
||||||
|
state.complianceRouters = data.router.compliance || []
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,14 @@ const user = {
|
||||||
manage: {}, // 管理后台
|
manage: {}, // 管理后台
|
||||||
oa: {}, // 办公
|
oa: {}, // 办公
|
||||||
project: {}, // 项目管理
|
project: {}, // 项目管理
|
||||||
hrm: {} // 人力资源
|
hrm: {}, // 人力资源
|
||||||
|
compliance: {} // 合规管理
|
||||||
},
|
},
|
||||||
|
|
||||||
mutations: {
|
mutations: {
|
||||||
|
SET_COMPLIANCE: (state, compliance) => {
|
||||||
|
state.compliance = compliance
|
||||||
|
},
|
||||||
SET_USERINFO: (state, userInfo) => {
|
SET_USERINFO: (state, userInfo) => {
|
||||||
state.userInfo = userInfo
|
state.userInfo = userInfo
|
||||||
localStorage.setItem('loginUserInfo', JSON.stringify(userInfo))
|
localStorage.setItem('loginUserInfo', JSON.stringify(userInfo))
|
||||||
|
|
@ -106,7 +110,8 @@ const user = {
|
||||||
}) {
|
}) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
adminIndexAuthListAPI().then((response) => {
|
adminIndexAuthListAPI().then((response) => {
|
||||||
const data = response.data
|
let data = response.data
|
||||||
|
data.compliance='compliance'
|
||||||
Lockr.set('authList', data)
|
Lockr.set('authList', data)
|
||||||
data.wkFirstModel = data.firstModel
|
data.wkFirstModel = data.firstModel
|
||||||
commit('SET_ALLAUTH', data)
|
commit('SET_ALLAUTH', data)
|
||||||
|
|
@ -116,7 +121,7 @@ const user = {
|
||||||
commit('SET_OA', data.oa)
|
commit('SET_OA', data.oa)
|
||||||
commit('SET_PROJECT', data.project)
|
commit('SET_PROJECT', data.project)
|
||||||
commit('SET_HRM', data.hrm)
|
commit('SET_HRM', data.hrm)
|
||||||
|
commit('SET_COMPLIANCE', data.compliance)
|
||||||
// 获取 管理后台 员工和部门信息
|
// 获取 管理后台 员工和部门信息
|
||||||
dispatch('GetUserList')
|
dispatch('GetUserList')
|
||||||
dispatch('GetDeptList')
|
dispatch('GetDeptList')
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,8 @@ export default {
|
||||||
'oa',
|
'oa',
|
||||||
'project',
|
'project',
|
||||||
'hrm',
|
'hrm',
|
||||||
'headerModule'
|
'headerModule',
|
||||||
|
'compliance'
|
||||||
]),
|
]),
|
||||||
...mapState({
|
...mapState({
|
||||||
moduleAuth: state => state.app.moduleAuth
|
moduleAuth: state => state.app.moduleAuth
|
||||||
|
|
@ -201,6 +202,16 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (true) {
|
||||||
|
tempsItems.hrm = {
|
||||||
|
title: '合规风险',
|
||||||
|
type: 12,
|
||||||
|
module: 'compliance',
|
||||||
|
path: '/compliance',
|
||||||
|
icon: 'wk wk-employees',
|
||||||
|
fontSize: '18px'
|
||||||
|
}
|
||||||
|
}
|
||||||
return tempsItems
|
return tempsItems
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -228,6 +239,7 @@ export default {
|
||||||
* 获取置顶应用
|
* 获取置顶应用
|
||||||
*/
|
*/
|
||||||
getHeaderModelSortList() {
|
getHeaderModelSortList() {
|
||||||
|
console.log('1111111111111111',this.allItemsObj)
|
||||||
if (this.headerModule.length) {
|
if (this.headerModule.length) {
|
||||||
const allList = []
|
const allList = []
|
||||||
for (let index = 0; index < this.headerModule.length; index++) {
|
for (let index = 0; index < this.headerModule.length; index++) {
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,8 @@ export default {
|
||||||
'collapse',
|
'collapse',
|
||||||
'headerModule',
|
'headerModule',
|
||||||
'app',
|
'app',
|
||||||
'hrmUserInfo'
|
'hrmUserInfo',
|
||||||
|
'compliance'
|
||||||
]),
|
]),
|
||||||
...mapState({
|
...mapState({
|
||||||
moduleAuth: state => state.app.moduleAuth
|
moduleAuth: state => state.app.moduleAuth
|
||||||
|
|
@ -272,7 +273,16 @@ export default {
|
||||||
icon: 'wk wk-employees'
|
icon: 'wk wk-employees'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.compliance) {
|
||||||
|
tempsItems.compliance = {
|
||||||
|
title: '合规风险',
|
||||||
|
type: 12,
|
||||||
|
module: 'compliance',
|
||||||
|
path: '/compliance',
|
||||||
|
icon: 'wk wk-employees',
|
||||||
|
fontSize: '18px'
|
||||||
|
}
|
||||||
|
}
|
||||||
return tempsItems
|
return tempsItems
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -355,6 +365,7 @@ export default {
|
||||||
* 根据关键词获取菜单数据
|
* 根据关键词获取菜单数据
|
||||||
*/
|
*/
|
||||||
getTopHeaderModule() {
|
getTopHeaderModule() {
|
||||||
|
console.log('1111111111',this.allItemsObj)
|
||||||
if (this.headerModule.length > 0) {
|
if (this.headerModule.length > 0) {
|
||||||
const allList = []
|
const allList = []
|
||||||
for (let index = 0; index < this.headerModule.length; index++) {
|
for (let index = 0; index < this.headerModule.length; index++) {
|
||||||
|
|
@ -388,6 +399,7 @@ export default {
|
||||||
hiddenItems.push(element)
|
hiddenItems.push(element)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(showItems)
|
||||||
this.showItems = showItems
|
this.showItems = showItems
|
||||||
this.hiddenItems = hiddenItems
|
this.hiddenItems = hiddenItems
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue