Commit bdd0fa60 authored by Gakki's avatar Gakki

allPerm

parent 13e79c34
......@@ -3,6 +3,8 @@ import pudong from '@/router/pudongRoutes.json'
import xuhui from '@/router/xuhuiRoutes.json'
import huangpu from '@/router/huangpuRoutes.json'
import yangpu from '@/router/yangpuRoutes.json'
import ajax from '@/server/ajax'
import api from '@/server/api'
import documents from '@/router/documentsRoutes.json'
import Store from '@/store/index'
......@@ -50,9 +52,12 @@ async function GetRoutes(router) {
break
}
// 徐汇区的子项目要看当前用户是否是超管,否则不展示 处置单和投诉
// console.log(Store.state.userInfos)
if (env.indexOf('xuhui') != -1 ) {
await function() {
ajax.get({
url: api.GET_USER_INFO,
}).then(res => {
// 本地存储用户基本信息
if (env.indexOf('xuhui') != -1 && res.data.content.isAllPerm) {
let newArr= []
MicRouters.Layout.forEach((item) => {
if (item.name != 'tousu' && item.name != 'Disposal' ) {
......@@ -61,6 +66,20 @@ async function GetRoutes(router) {
})
MicRouters.Layout = newArr
}
})
}()
// 徐汇区的子项目要看当前用户是否是超管,否则不展示 处置单和投诉
// console.log(Store.state.userInfos)
// if (env.indexOf('xuhui') != -1 ) {
// let newArr= []
// MicRouters.Layout.forEach((item) => {
// if (item.name != 'tousu' && item.name != 'Disposal' ) {
// newArr.push(item)
// }
// })
// MicRouters.Layout = newArr
// }
const micSystemRoutersConfigs = Object.assign({}, MicRouters)
const { routes } = router.options
......
......@@ -980,13 +980,11 @@ export default {
* 判断是否开启自定义字段
*/
getConfig(){
console.log(1)
this.$ajax.get({
url: this.$api.GET_CONFIG,
}).then(res => {
if (res.code === '200') {
console.log(2)
this.openConfig = this.$com.confirm(res, 'data.content', []).customKeyEnable
console.log(this.openConfig)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment