xiangpei
2025-03-09 0829704d064b5d843014897a84b42f3625571d97
src/views/flowable/task/myProcess/detail/index.vue
@@ -30,6 +30,19 @@
                  >
                  </el-alert>
                </div>
                <div style="position: absolute;top: 10px; right: 20px" v-if="formDataObj.events.length > 0">
                  <el-popover
                    placement="right-start"
                    title="任务日志"
                    width="800"
                    trigger="hover"
                    >
                    <div v-if="formDataObj.events.length > 0">
                      <log-view :log-list="formDataObj.events"/>
                    </div>
                    <el-button slot="reference">任务日志</el-button>
                  </el-popover>
                </div>
                <div v-if="formDataList.length <= 1">
                  <div class="before_none">前置阶段:<span>不存在前置阶段</span></div>
                  <el-alert
@@ -109,12 +122,13 @@
import {getProcessVariables, flowXmlAndNode} from "@/api/flowable/definition";
import {flowTaskForm, flowTaskFormDetail} from "@/api/flowable/todo";
import BpmnViewer from '@/components/Process/viewer';
import LogView from "@/views/projectProcess/components/LogView";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
  name: "Record",
  components: {
    BpmnViewer
    BpmnViewer, LogView
  },
  props: {},
  data() {
@@ -152,14 +166,14 @@
    this.projectName = this.$route.query && this.$route.query.projectName;
    this.flowName = this.$route.query && this.$route.query.flowName;
    // 流程任务重获取变量表单
    this.processVariables( this.taskForm.taskId)
    this.getFlowRecordList(this.taskForm.procInsId, this.taskForm.deployId);
    this.processVariables( this.taskForm.taskId, this.taskForm.procInsId)
    this.getFlowRecordList(this.taskForm.procInsId);
  },
  methods: {
    handleClick(tab, event) {
      if (tab.name === '3'){
        this.imgLoading = true
        flowXmlAndNode({procInsId:this.taskForm.procInsId,deployId:this.taskForm.deployId}).then(res => {
        flowXmlAndNode({processInsId:this.taskForm.procInsId,deployId:this.taskForm.deployId}).then(res => {
          this.imgLoading = false
          this.flowData = res.data;
        })
@@ -180,9 +194,9 @@
      }
    },
    /** 流程流转记录 */
    getFlowRecordList(procInsId, deployId) {
    getFlowRecordList(procInsId) {
      const that = this
      const params = {procInsId: procInsId, deployId: deployId}
      const params = {procInsId: procInsId}
      flowRecord(params).then(res => {
        that.flowRecordList = res.data.flowList;
      }).catch(res => {
@@ -190,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(() => {