xiangpei
2024-12-10 579bbf7f5e190c190eaef16adc1c92ce85f6e107
流程推进详情页:待办按钮的显隐逻辑完善
2个文件已修改
52 ■■■■■ 已修改文件
src/store/modules/user.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectProcess/detail/index.vue 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/user.js
@@ -7,6 +7,7 @@
    id: '',
    name: '',
    avatar: '',
    deptId: null,
    roles: [],
    permissions: []
  },
@@ -26,6 +27,9 @@
    },
    SET_ROLES: (state, roles) => {
      state.roles = roles
    },
    SET_DEPT: (state, deptId) => {
      state.deptId = deptId
    },
    SET_PERMISSIONS: (state, permissions) => {
      state.permissions = permissions
@@ -64,7 +68,9 @@
          }
          commit('SET_ID', user.userId)
          commit('SET_NAME', user.userName)
          commit('SET_DEPT', user.deptId)
          commit('SET_AVATAR', avatar)
          resolve(res)
        }).catch(error => {
          reject(error)
src/views/projectProcess/detail/index.vue
@@ -53,13 +53,13 @@
          >
          </el-table-column>
          <el-table-column
            prop="promoterName"
            label="发起人"
            prop="promoterUnitName"
            label="发起单位"
          >
          </el-table-column>
          <el-table-column
            prop="promoterUnitName"
            label="发起单位"
            prop="promoterName"
            label="发起人"
          >
          </el-table-column>
          <el-table-column
@@ -143,8 +143,9 @@
        if (row.handlerType === "USER") {
          return this.$store.state.user.id === row.handlerId
        } else if (row.handlerType === "DEPT") {
          // return this.$store.state.user.id === row.handlerId
          return this.$store.state.user.name === '市发展改革委' || this.$store.state.user.name === '市住建局'
          console.log(this.$store.state.user.deptId, "部门id", row.handlerUnitId)
          return this.$store.state.user.deptId === row.handlerUnitId
          // return this.$store.state.user.name === '市发展改革委' || this.$store.state.user.name === '市住建局'
        } else if (row.handlerType === "ROLE") {
          return this.$auth.hasRole(row.handlerUnitName)
        }
@@ -153,38 +154,23 @@
      }
    },
    goToDo(row) {
      // TODO 这里的判断条件根据实际情况设置
      // let params = {
      //   processDefId: row.processDefId,
      //   taskId: row.taskId
      // }
      // getTaskIsAuditing(params).then(res => {
      //
      // })
      // if (this.showHandle(row)) {
        console.log("zhe")
      // 查询该任务是否配置了需要审批
      let params = {
        processDefId: row.processDefId,
        taskId: row.taskId
      }
      getTaskIsAuditing(params).then(res => {
        this.$router.push({
          path: '/flowable/task/myProcess/send/index',
          query: {
            deployId: row.deployId,
            procDefId: row.processDefId,
            processName: row.taskName,
            taskId: row.taskId
            taskId: row.taskId,
            showAuditing: res.data
          }
        })
      // } else {
      //   this.$router.push({
      //     path: '/flowable/task/todo/detail/index',
      //     query: {
      //       taskName: row.taskName,
      //       startUser: row.promoterName,
      //       deployId: row.deployId,
      //       taskId: row.taskId,
      //       procInsId: row.processInsId,
      //       executionId: row.executionId
      //     }
      //   })
      // }
      })
    },
    goToProcessDetail(row) {
      this.$router.push({ path: '/flowable/task/myProcess/detail/index',