zhanghua
2025-01-16 53605d638044f3129cb622d44bd6c2026b7978cd
src/views/projectProcess/detail/index.vue
@@ -18,7 +18,7 @@
      </div>
      <div class="search-warp">
        <div @click="changeTab(1, 'all')" :class="{'item-warm': true, 'all-color': true, 'active': 1 === selectTabId}">全部事项<span v-if="detailData && detailData.statistics">({{detailData.statistics.totalTaskNum}})</span></div>
        <div @click="changeTab(2, 'todo')" :class="{'item-warm': true, 'all-color': true, 'active': 2 === selectTabId}">代办事项<span v-if="detailData && detailData.statistics">({{detailData.statistics.todoTaskNum}})</span></div>
        <div @click="changeTab(2, 'todo')" :class="{'item-warm': true, 'all-color': true, 'active': 2 === selectTabId}">待办事项<span v-if="detailData && detailData.statistics">({{detailData.statistics.todoTaskNum}})</span></div>
        <div @click="changeTab(3, 'todo')" :class="{'item-warm': true, 'current-color': true, 'active': 3 === selectTabId}">当前环节</div>
        <div @click="changeTab(4, 'remaining')" :class="{'item-warm': true, 'remaining-color': true, 'active': 4 === selectTabId}">剩余事项<span v-if="detailData && detailData.statistics">({{detailData.statistics.remainingTaskNum}})</span></div>
        <div @click="changeTab(5, 'timely')" :class="{'item-warm': true, 'timely-color': true, 'active': 5 === selectTabId}">按时完成(0)</div>
@@ -148,9 +148,16 @@
  },
  mounted() {
    console.log(this.$route.query, "参数")
    this.queryParams.projectId = this.$route.query.projectId
    this.queryParams.processDefId = this.$route.query.processDefId
    this.queryParams.processName = this.$route.query.processName
    let params = JSON.parse(sessionStorage.getItem("projectProDetail"))
    console.log(params, "参数")
    if (!params || ! params.projectId) {
      this.queryParams.projectId = this.$route.query.projectId
      this.queryParams.processDefId = this.$route.query.processDefId
      this.queryParams.processName = this.$route.query.processName
      sessionStorage.setItem("projectProDetail", JSON.stringify(this.queryParams))
    } else {
      this.queryParams = params
    }
    this.loading = true
    this.getProjectProcessInfo()
  },
@@ -178,7 +185,7 @@
      if (row.taskStatus !== '已完成') {
        return null
      } else {
        return row.handlerName
        return row.actualHandlerUserName
      }
    },
    showHandle(row) {
@@ -204,11 +211,13 @@
        taskId: row.taskId
      }
      getTaskIsAuditing(params).then(res => {
        console.log("row",row)
        this.$router.push({
          path: '/flowable/task/myProcess/send/index',
          query: {
            deployId: row.deployId,
            procDefId: row.processDefId,
            procInsId: row.processInsId,
            processName: row.taskName,
            flowName: this.queryParams.processName,
            projectName: this.detailData.projectName,
@@ -246,11 +255,12 @@
      this.getList()
    },
    getList() {
      this.tableLoading = true
      // 获取任务列表
      getProjectProcessDetailTaskList(this.queryParams).then(res => {
        this.tableLoading =false
        this.taskList = res.data
        this.total = res.total
        this.tableLoading =false
      })
    },
    // 查询详情
@@ -263,14 +273,12 @@
      })
    },
    changeTab(id, event) {
      this.tableLoading = true
      let beforeId = this.selectTabId
      this.selectTabId = id
      this.queryParams.taskType = event
      if (beforeId !== id) {
        this.getList()
      }
    }
  }
}