xiangpei
2025-01-17 e563871312e934fedf153c4b83ca5ba3b147c36c
流程推进详情,办理按钮的权限判断完善,转办传递项目id、流程实例id
4个文件已修改
14 ■■■■ 已修改文件
src/plugins/auth.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/user.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/task/myProcess/send/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectProcess/detail/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/plugins/auth.js
@@ -15,6 +15,7 @@
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
src/store/modules/user.js
@@ -9,6 +9,7 @@
    avatar: '',
    deptId: null,
    roles: [],
    roleIds: [],
    permissions: []
  },
@@ -27,6 +28,9 @@
    },
    SET_ROLES: (state, roles) => {
      state.roles = roles
    },
    SET_ROLE_IDS: (state, roleIds) => {
      state.roleIds = roleIds
    },
    SET_DEPT: (state, deptId) => {
      state.deptId = deptId
@@ -67,6 +71,7 @@
            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)
src/views/flowable/task/myProcess/send/index.vue
@@ -217,7 +217,9 @@
        taskId: '',
        peopleType: '',
        targetId: '',
        taskName: ''
        taskName: '',
        processInsId: '',
        projectId: '',
      },
      delegationShow: false, // 转办显示
      rejectShow: false, // 驳回显示
@@ -313,6 +315,8 @@
            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("已发起转办申请")
src/views/projectProcess/detail/index.vue
@@ -198,7 +198,7 @@
          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