Commit fe15ee5d authored by 张伯涛's avatar 张伯涛

修改

parent 74a9bcca
......@@ -14,7 +14,6 @@ NProgress.configure({ showSpinner: false }) // NProgress Configuration
const whiteList = ['/auth-redirect', '/bind', '/register', '/login', '/forgetPwd']
router.beforeEach((to, from, next) => {
console.log('beforeEach', to)
NProgress.start()
if (getToken()) {
/* has token*/
......@@ -22,7 +21,6 @@ router.beforeEach((to, from, next) => {
next()
NProgress.done()
} else {
console.log('store.getters.roles.length', store.getters.roles.length)
if (store.getters.roles.length === 0) {
// 判断当前用户是否已拉取完user_info信息
store.dispatch('GetInfo').then(res => {
......@@ -33,11 +31,8 @@ router.beforeEach((to, from, next) => {
store.dispatch('GenerateRoutes', res).then((routers) => {
// 判断用户是否有路由
if (routers.accessedRoutes && routers.accessedRoutes.length > 0 && routers.getRouters && routers.getRouters.length > 0) {
console.log('routers.accessedRoutes', routers.accessedRoutes)
console.log('routers.accessedRoutes[0].children[0].path', routers.accessedRoutes[0].children[0].path)
// router.push({ path: routers.accessedRoutes[0].children[0].path })
// next()
console.log('tototo', to)
router.addRoutes(routers.accessedRoutes) // 动态添加可访问路由表
// next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
next({ path: routers.accessedRoutes[0].children[0].path, replace: true })
......
......@@ -106,250 +106,6 @@ export const constantRoutes = [
}
]
}
// {
// path: '/old',
// component: Layout,
// redirect: '/old/oldConfig',
// hidden: true,
// children: [{
// path: '/old/oldConfig',
// name: 'OldConfig',
// component: () => import('@/views/mesCenter/msgConfigOld.vue'),
// meta: { title: '消息配置旧的', icon: 'dashboard' }
// },
// {
// path: '/old/addMes',
// name: 'AddMes',
// component: () => import('@/views/mesCenter/addMes.vue'),
// meta: { title: '新增消息', icon: 'dashboard' }
// },
// {
// path: '/old/editMes',
// name: 'EditMes',
// component: () => import('@/views/mesCenter/editMes.vue'),
// meta: { title: '修改消息', icon: 'dashboard' }
// }
// ]
// }
/*,
{
path: '/log',
component: Layout,
redirect: '/log/operLog',
children: [{
path: '/log/operLog',
name: 'Operlog',
component: () => import('@/views/monitor/operLog/index.vue'),
meta: { title: '操作日志', icon: 'dashboard' }
}]
}*/
// 系统管理
/* {
path: '/sysManage',
component: Layout,
name: 'sysManage',
redirect: '/sysManage/userManage',
meta: { title: '系统管理', icon: 'dashboard' },
showFather: 'true',
children: [{
path: '/sysManage/userManage',
name: 'UserManage',
component: () => import('@/views/system/user'),
meta: { title: '用户管理', icon: 'dashboard' }
},
{
path: '/sysManage/roleManage',
name: 'RoleManage',
component: () => import('@/views/system/role'),
meta: { title: '角色管理', icon: 'dashboard' }
},
{
path: '/sysManage/deptManage',
name: 'DeptManage',
component: () => import('@/views/system/dept'),
meta: { title: '部门管理', icon: 'dashboard' }
},
{
path: '/sysManage/menuManage',
name: 'MenuManage',
component: () => import('@/views/system/menu'),
meta: { title: '菜单管理', icon: 'dashboard' }
},
{
path: '/sysManage/dictionary',
name: 'Dictionary',
component: () => import('@/views/system/menu'),
meta: { title: '数据字典', icon: 'dashboard' }
}
]
},*/
// 消息中心
/* {
path: '/mesCenter',
component: Layout,
name: 'MesCenter',
redirect: '/mesCenter/bussinessMes',
meta: { title: '消息中心', icon: 'dashboard' },
showFather: 'true',
children: [{
path: '/mesCenter/bussinessMes',
name: 'BussinessMes',
component: () => import('@/views/operationCenter'),
meta: { title: '业务消息', icon: 'dashboard' }
},
{
path: '/mesCenter/mailMes',
name: 'MailMes',
component: () => import('@/views/operationCenter'),
meta: { title: '邮件消息', icon: 'dashboard' }
},
{
path: '/mesCenter/mobileMes',
name: 'MobileMes',
component: () => import('@/views/operationCenter'),
meta: { title: '短信消息', icon: 'dashboard' }
}
]
},*/
// 集成管理
// {
// path: '/integratedManagement',
// component: Layout,
// name: 'IntegratedManagement',
// redirect: '/integratedManagement/dataIntegrated',
// meta: { title: '集成管理', icon: 'dashboard' },
// showFather: 'true',
// children: [{
// path: '/integratedManagement/dataIntegrated',
// name: 'DataIntegrated',
// component: () => import('@/views/operationCenter'),
// meta: { title: '数据集成', icon: 'dashboard' }
// }
// ]
// },
// 移动集成
// {
// path: '/mobileIntegrated',
// component: Layout,
// name: 'MobileIntegrated',
// redirect: '/mobileIntegrated/appManage',
// meta: { title: '移动集成', icon: 'dashboard' },
// showFather: 'true',
// children: [{
// path: '/mobileIntegrated/appManage',
// name: 'AppManage',
// component: () => import('@/views/operationCenter'),
// meta: { title: '应用管理', icon: 'dashboard' }
// }
// ]
// },
// 流程设计
/* {
path: '/workflow',
component: Layout,
name: 'Workflow',
redirect: '/workflow/group',
meta: { title: '流程设计', icon: 'dashboard' },
showFather: 'true',
children: [{
path: '/workflow/group',
name: 'Group',
component: () => import('@/views/workflow/group/index.vue'),
meta: { title: '业务分组', icon: 'dashboard' }
},
{
path: '/workflow/formTemplate',
name: 'FormTemplate',
component: () => import('@/views/workflow/formTemplate/list.vue'),
meta: { title: '表单模板', icon: 'dashboard' }
},
{
path: '/workflow/formTemplate/add',
name: 'FormTemplateAdd',
hidden: true,
component: () => import('@/views/workflow/formTemplate/add.vue'),
meta: { title: '表单添加', icon: 'dashboard' }
},
{
path: '/workflow/workFlowManage',
name: 'WorkFlowManage',
component: () => import('@/views/workflow/processLIst/ProcessList.vue'),
meta: { title: '流程定义', icon: 'dashboard' }
},
{
path: '/workflow/workFlowManage/edit',
name: 'WorkFlowEdit',
hidden: true,
component: () => import('@/views/workflow/processLIst/EditProcessList.vue'),
meta: { title: '流程编辑', icon: 'dashboard' }
},
{
path: '/workflow/workFlowInstance',
name: 'WorkFlowInstance',
component: () => import('@/views/workflow/workFlowInstance/index.vue'),
meta: { title: '流程实例', icon: 'dashboard' }
}
]
},*/
// {
// path: '/uiStandard',
// component: Layout,
// redirect: '/uiStandard/info',
// children: [{
// path: '/uiStandard/info',
// name: 'uiStandardInfo',
// component: () => import('@/views/uiStandard/index.vue'),
// meta: { title: 'ui标准', icon: 'dashboard' }
// }]
// },
// 业务管理
/* {
path: '/businessManage',
component: Layout,
name: 'businessManage',
redirect: '/businessManage/todolist',
meta: { title: '业务管理', icon: 'dashboard' },
showFather: 'true',
children: [
{
path: '/businessManage/todolist',
name: 'bmTodoList',
component: () => import('@/views/instance/TodoList'),
meta: { title: '待办事项', pageType: 1, icon: 'dashboard' }
},
{
path: '/businessManage/personal/todolist',
name: 'bmDoneList',
component: () => import('@/views/instance/doneList'),
meta: { title: '已办事项', pageType: 2, icon: 'dashboard' }
},
{
path: '/businessManage/taskDetail/:param',
name: 'bmTaskDetail',
component: () => import('@/views/instance/TaskDetail'),
hidden: true,
meta: { title: '任务详情页', icon: 'dashboard' }
},
{
path: '/businessManage/template',
name: 'bmTemplate',
component: () => import('@/views/instance/Template'),
meta: { title: '模板渲染展示', icon: 'dashboard' }
},
{
path: '/businessManage/instance/listDetail',
name: 'ListDetail',
component: () => import('@/views/instance/ListDetail'),
meta: { title: '流程详情', icon: 'dashboard' }
},
{
path: '/businessManage/instance/list',
name: 'InstanceList',
component: () => import('@/views/instance/InstanceList'),
meta: { title: '流程启动列表', icon: 'dashboard' }
}
]
}*/
]
/**
......
......@@ -1066,6 +1066,11 @@ export default {
getUser(userId).then(response => {
this.open = true
this.form = response.data
if (this.form.deptFlag === '1') {
this.form.deptId = response.data.deptId
} else {
this.form.deptId = response.data.deptName
}
this.apiRoleIds = response.data.roleIds
if (this.form.nltStartDate) {
this.form.nltStartDate = this.form.nltStartDate.substring(0, 10)
......@@ -1158,25 +1163,33 @@ export default {
message: '当前用户所选角色包含停用的角色,请重新选择'
})
} else {
updateUser(this.form).then(response => {
if (response.code === 200) {
this.$message({
message: '修改成功',
type: 'success'
})
this.open = false
this.confirmLoading = false
this.form.deptId = undefined // 防止再次新增的时候触发treeselect的@i
this.getList()
} else if (response.code === 4007) {
this.confirmLoading = false
this.$message({
type: 'error',
message: response.message
})
// this.form.deptId = undefined // 防止再次新增的时候触发treeselect的@i
}
})
if (this.form.deptFlag !== '1') {
this.$message({
type: 'error',
message: '当前所选部门已停用,请重新选择'
})
this.confirmLoading = false
} else {
updateUser(this.form).then(response => {
if (response.code === 200) {
this.$message({
message: '修改成功',
type: 'success'
})
this.open = false
this.confirmLoading = false
this.form.deptId = undefined // 防止再次新增的时候触发treeselect的@i
this.getList()
} else if (response.code === 4007) {
this.confirmLoading = false
this.$message({
type: 'error',
message: response.message
})
// this.form.deptId = undefined // 防止再次新增的时候触发treeselect的@i
}
})
}
}
} else {
addUser(this.form).then(response => {
......
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