流程推进详情,办理按钮的权限判断完善,转办传递项目id、流程实例id
| | |
| | | function authRole(role) { |
| | | const super_admin = "admin"; |
| | | const roles = store.getters && store.getters.roles |
| | | console.log("当前用户角色", roles) |
| | | if (role && role.length > 0) { |
| | | return roles.some(v => { |
| | | return super_admin === v || v === role |
| | |
| | | avatar: '', |
| | | deptId: null, |
| | | roles: [], |
| | | roleIds: [], |
| | | permissions: [] |
| | | }, |
| | | |
| | |
| | | }, |
| | | SET_ROLES: (state, roles) => { |
| | | state.roles = roles |
| | | }, |
| | | SET_ROLE_IDS: (state, roleIds) => { |
| | | state.roleIds = roleIds |
| | | }, |
| | | SET_DEPT: (state, deptId) => { |
| | | state.deptId = deptId |
| | |
| | | commit('SET_ROLES', ['ROLE_DEFAULT']) |
| | | } |
| | | commit('SET_ID', user.userId) |
| | | commit('SET_ROLE_IDS', user.roles.map(role => role.roleId)) |
| | | commit('SET_NAME', user.userName) |
| | | commit('SET_DEPT', user.deptId) |
| | | commit('SET_AVATAR', avatar) |
| | |
| | | taskId: '', |
| | | peopleType: '', |
| | | targetId: '', |
| | | taskName: '' |
| | | taskName: '', |
| | | processInsId: '', |
| | | projectId: '', |
| | | }, |
| | | delegationShow: false, // 转办显示 |
| | | rejectShow: false, // 驳回显示 |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.delegationForm.projectId = this.goBackParams.projectId |
| | | this.delegationForm.processInsId = this.procInsId |
| | | this.delegationButLoading = true |
| | | taskDelegation(this.delegationForm).then(res => { |
| | | this.$message.success("已发起转办申请") |
| | |
| | | return row.handlerUnitId.indexOf(this.$store.state.user.deptId) !== -1 |
| | | // return this.$store.state.user.name === '市发展改革委' || this.$store.state.user.name === '市住建局' |
| | | } else if (row.handlerType === "ROLE") { |
| | | return this.$auth.hasRole(row.handlerUnitName) |
| | | return row.handlerUnitId.some(roleId => this.$store.state.user.roleIds.indexOf(roleId) !== -1) |
| | | } |
| | | } else { |
| | | return false |