d30d3d2d352abfcd9e16cece8a34f2a517f8abc0..b934c4025486bfbfe940d6d49ee86b617eeeb56b
2025-03-09 xiangpei
容缺日志展示
b934c4 对比 | 目录
2025-03-09 xiangpei
容缺补办实现
082970 对比 | 目录
2025-03-09 xiangpei
容缺查询,TODO:容缺完成时调新的接口
2cd8b0 对比 | 目录
2025-03-06 xiangpei
容缺接口
39b368 对比 | 目录
7个文件已修改
197 ■■■■■ 已修改文件
src/api/flowable/process.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/flowable/todo.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/projectProcess/projectProcess.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/task/myProcess/detail/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/task/myProcess/send/index.vue 74 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectProcess/components/LogView.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectProcess/detail/index.vue 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/flowable/process.js
@@ -44,6 +44,15 @@
  })
}
// 容缺补交
export function waitCompleteSubmitFormTask(taskId, data) {
  return request({
    url: '/flowable/task/wait/complete/form/' + taskId,
    method: 'post',
    data: data
  })
}
// 取消申请
export function stopProcess(data) {
  return request({
src/api/flowable/todo.js
@@ -132,9 +132,9 @@
  })
}
// 流程节点查看详情表单
export function flowTaskFormDetail(taskId) {
export function flowTaskFormDetail(processInsId, taskId) {
  return request({
    url: '/flowable/task/detail/' + taskId,
    url: '/flowable/task/detail/' + processInsId + '/' + taskId,
    method: 'get',
  })
}
src/api/projectProcess/projectProcess.js
@@ -90,6 +90,15 @@
  })
}
// 容缺
export function taskWait(data) {
  return request({
    url: '/project-process/detail/task/wait',
    method: 'post',
    data: data
  })
}
// 督办
export function taskSupervise(data) {
  return request({
src/views/flowable/task/myProcess/detail/index.vue
@@ -166,7 +166,7 @@
    this.projectName = this.$route.query && this.$route.query.projectName;
    this.flowName = this.$route.query && this.$route.query.flowName;
    // 流程任务重获取变量表单
    this.processVariables( this.taskForm.taskId)
    this.processVariables( this.taskForm.taskId, this.taskForm.procInsId)
    this.getFlowRecordList(this.taskForm.procInsId);
  },
  methods: {
@@ -204,11 +204,11 @@
      })
    },
    /** 获取流程变量内容 */
    processVariables(taskId) {
    processVariables(taskId, processInsId) {
      if (taskId) {
        this.formLoading = true
        // 提交流程申请时填写的表单存入了流程变量中后续任务处理时需要展示
        flowTaskFormDetail(taskId).then(res => {
        flowTaskFormDetail(processInsId, taskId).then(res => {
          this.formDataList = res.data
          if (this.formDataList && this.formDataList.length > 0) {
            this.$nextTick(() => {
src/views/flowable/task/myProcess/send/index.vue
@@ -18,11 +18,11 @@
                  <div class="op-list">
                    <el-button size="small" type="primary" :disabled="formDataObj.taskStatus === '挂起' || submitLoading" v-loading="submitLoading" @click="submitForm">确认并提交</el-button>
<!--                    <el-button size="small" type="primary" disabled @click="submitForm">协同办理(功能开发中)</el-button>-->
                    <el-button size="small" type="primary" :disabled="formDataObj.taskStatus === '挂起'" @click="openDelegation(formDataList[0].beforeNodeName)">转办</el-button>
                    <el-button v-if="formDataObj.canJump" :disabled="formDataObj.taskStatus === '挂起'" size="small" type="primary" @click="jumpTask()">跳过</el-button>
                    <el-button v-if="formDataObj.canWait" :disabled="formDataObj.taskStatus === '挂起'" size="small" type="primary" >容缺</el-button>
                    <el-button v-if="formDataObj.canHangup && formDataObj.taskStatus !== '挂起'" size="small" type="primary" @click="hangup">挂起</el-button>
                    <el-button v-if="formDataObj.canHangup && formDataObj.taskStatus === '挂起'" size="small" type="primary" @click="cancelHangup">结束挂起</el-button>
                    <el-button size="small" type="primary" v-if="!isWait" :disabled="formDataObj.taskStatus === '挂起'" @click="openDelegation(formDataList[0].beforeNodeName)">转办</el-button>
                    <el-button v-if="formDataObj.canJump && !isWait" :disabled="formDataObj.taskStatus === '挂起'" size="small" type="primary" @click="jumpTask()">跳过</el-button>
                    <el-button v-if="formDataObj.canWait && !isWait" :disabled="formDataObj.taskStatus === '挂起'" size="small" type="primary" @click="waitTask()">容缺</el-button>
                    <el-button v-if="formDataObj.canHangup && formDataObj.taskStatus !== '挂起' && !isWait" size="small" type="primary" @click="hangup">挂起</el-button>
                    <el-button v-if="formDataObj.canHangup && formDataObj.taskStatus === '挂起' && !isWait" size="small" type="primary" @click="cancelHangup">结束挂起</el-button>
                  </div>
                  <div class="current">当前阶段:<span>{{formDataObj.beforeNodeName}}</span><span v-if="formDataObj.taskStatus === 'HANGUP'">(挂起中)</span></div>
                </div>
@@ -185,12 +185,12 @@
import SingleUser from '@/components/flow/User/SingleUser'
import MultUser from '@/components/flow/User/MultUser'
import MyRole from '@/components/flow/Role/MyRole'
import {completeSubmitFormTask} from "@/api/flowable/process";
import {completeSubmitFormTask, waitCompleteSubmitFormTask} from "@/api/flowable/process";
import { flowTaskForm } from "@/api/flowable/todo";
import {getNextFlowNodeByStart} from "@/api/flowable/todo";
import LogView from "@/views/projectProcess/components/LogView";
import {rejectTask} from "@/api/flowable/process";
import {cancelTaskHangup, taskDelegation, taskHangup, taskJump} from "@/api/projectProcess/projectProcess";
import {cancelTaskHangup, taskDelegation, taskHangup, taskJump, taskWait} from "@/api/projectProcess/projectProcess";
export default {
  name: "Record",
@@ -205,6 +205,7 @@
  props: {},
  data() {
    return {
      isWait: false,
      jumpDesc: '', // 跳过说明
      rejectLoading: false, // 驳回按钮加载
      submitLoading: false, // 提交按钮加载
@@ -288,6 +289,7 @@
    this.procDefId  = this.$route.query && this.$route.query.procDefId;
    this.procInsId  = this.$route.query && this.$route.query.procInsId;
    this.goBackParams  = this.$route.query && this.$route.query.goBackParams;
    this.isWait = this.$route.query && this.$route.query.isWait === 'true' ? true : false;
    // this.getNextFlowNodeByStart(this.deployId);
    this.getFlowFormData(this.taskId);
  },
@@ -335,6 +337,30 @@
          this.goBack()
        })
      })
    },
    // 容缺任务
    waitTask() {
      this.$prompt('备注说明', '确定要容缺此任务吗', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        inputType: 'textarea'
      }).then(({ value }) => {
        let waitForm = {
          taskId: this.taskId,
          projectId: this.projectId,
          processInsId: this.procInsId,
          desc: value
        }
        taskWait(waitForm).then(res => {
          this.$message.success("操作成功")
          this.goBack()
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消容缺操作'
        });
      });
    },
    // 跳过任务
    jumpTask() {
@@ -649,19 +675,35 @@
            // 复制对象的属性值给新的对象
            Object.assign(param, formData);
            // 完成任务
            completeSubmitFormTask(this.taskId, param).then(res => {
            if (this.isWait) {
              waitCompleteSubmitFormTask(this.taskId, param).then(res => {
                this.$modal.msgSuccess(res.msg);
                this.submitLoading = false
                this.goBack();
              })
            } else {
              completeSubmitFormTask(this.taskId, param).then(res => {
                this.$modal.msgSuccess(res.msg);
                this.submitLoading = false
                this.goBack();
              })
            }
          })
        } else {
          // 没关联表单直接传空
          if (this.isWait) {
              waitCompleteSubmitFormTask(this.taskId, {}).then(res => {
              this.$modal.msgSuccess(res.msg);
              this.submitLoading = false
              this.goBack();
            })
          })
        } else {
          // 没关联表单直接传空
          completeSubmitFormTask(this.taskId, {}).then(res => {
            this.$modal.msgSuccess(res.msg);
            this.submitLoading = false
            this.goBack();
          })
          } else {
            completeSubmitFormTask(this.taskId, {}).then(res => {
              this.$modal.msgSuccess(res.msg);
              this.submitLoading = false
              this.goBack();
            })
          }
        }
      }).catch((err) => {
        console.log(err)
src/views/projectProcess/components/LogView.vue
@@ -76,6 +76,20 @@
            <span class="tag">{{log.eventDataObj.desc}}</span>
          </div>
        </div>
        <div class="log" v-else-if="log.eventType === 'WAIT'">
          <div>
            <span class="tag name">{{log.nickName}}</span>
            于
            <span class="tag time">{{log.gmtCreate}}</span>
            <span class="tag jump">容缺</span>
            了任务
            <span class="tag taskName">{{log.taskName}}</span>
            ,
            <span class="tag jump">容缺说明</span>
            :
            <span class="tag">{{log.eventDataObj.desc}}</span>
          </div>
        </div>
        <div class="log" v-else-if="log.eventType === 'SUPERVISE'">
          <div>
            <span class="tag name">{{log.nickName}}</span>
src/views/projectProcess/detail/index.vue
@@ -19,7 +19,7 @@
      <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(3, 'todo')" :class="{'item-warm': true, 'current-color': true, 'active': 3 === selectTabId}">当前环节</div>
        <div @click="changeTab(3, 'wait')" :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}">按时完成<span v-if="detailData && detailData.statistics">({{detailData.statistics.timelyFinishedTaskNum}})</span></div>
        <div @click="changeTab(6, 'overtime')" :class="{'item-warm': true, 'overtime-color': true, 'active': 6 === selectTabId}">超时事项(0)</div>
@@ -73,45 +73,6 @@
            :formatter="candidateFormatter"
          >
          </el-table-column>
<!--          <el-table-column-->
<!--            prop="promoterUnitName"-->
<!--            label="发起单位"-->
<!--          >-->
<!--          </el-table-column>-->
<!--          <el-table-column-->
<!--            prop="promoterName"-->
<!--            label="发起人"-->
<!--          >-->
<!--          </el-table-column>-->
<!--          <el-table-column-->
<!--            align="center"-->
<!--            prop="handlerType"-->
<!--            label="处理方类型"-->
<!--          >-->
<!--            <template slot-scope="scope">-->
<!--              <el-tag v-if="scope.row.handlerType === 'USER'">人员账号</el-tag>-->
<!--              <el-tag type="success" v-else-if="scope.row.handlerType === 'DEPT'">单位</el-tag>-->
<!--              <el-tag type="info" v-else-if="scope.row.handlerType === 'ROLE'">角色</el-tag>-->
<!--            </template>-->
<!--          </el-table-column>-->
<!--          <el-table-column-->
<!--            prop="handlerUnitName"-->
<!--            label="处理单位"-->
<!--            :formatter="unitFormatter"-->
<!--          >-->
<!--          </el-table-column>-->
<!--          <el-table-column-->
<!--            prop="handlerName"-->
<!--            label="候选处理人"-->
<!--            :formatter="candidateFormatter"-->
<!--          >-->
<!--          </el-table-column>-->
<!--          <el-table-column-->
<!--            prop="handlerName"-->
<!--            label="实际处理人"-->
<!--            :formatter="finalFinishedFormatter"-->
<!--          >-->
<!--          </el-table-column>-->
          <el-table-column
            align="center"
            prop="taskStatus"
@@ -415,7 +376,7 @@
      }
    },
    showHandle(row) {
      if (row.taskStatus === '待办' || row.taskStatus === '挂起') {
      if (row.taskStatus === '待办' || row.taskStatus === '挂起' || row.taskStatus === '容缺') {
        if (row.handlerType === "USER") {
          return row.handlerId.indexOf(this.$store.state.user.id) !== -1
        } else if (row.handlerType === "DEPT") {
@@ -428,13 +389,7 @@
      }
    },
    goToDo(row) {
      // 查询该任务是否配置了需要审批
      let params = {
        processDefId: row.processDefId,
        taskId: row.taskId
      }
      getTaskIsAuditing(params).then(res => {
        console.log("row",row)
      if (row.taskStatus === '容缺') {
        this.$router.push({
          path: '/flowable/task/myProcess/send/index',
          query: {
@@ -445,12 +400,38 @@
            flowName: this.queryParams.processName,
            projectName: this.detailData.projectName,
            taskId: row.taskId,
            showAuditing: res.data,
            showAuditing: false,
            projectId: this.queryParams.projectId,
            isWait: true,
            goBackParams: this.queryParams
          }
        })
      })
      } else {
        // 查询该任务是否配置了需要审批
        let params = {
          processDefId: row.processDefId,
          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,
              taskId: row.taskId,
              showAuditing: res.data,
              projectId: this.queryParams.projectId,
              isWait: false,
              goBackParams: this.queryParams
            }
          })
        })
      }
    },
    goToProcessDetail(row) {
      this.$router.push({ path: '/flowable/task/myProcess/detail/index',