<!--
 * @Author: ysh
 * @Date: 2024-09-27 16:33:10
 * @LastEditors: 
 * @LastEditTime: 2024-12-30 09:50:09
-->
<template>
  <div>
    <div>退回意见：{{ reBackDescription }}</div>
    <div>办理人：{{ assigneeName }}</div>
  </div>
</template>

<script>
import { flowRecordFull } from "@/api/flowable/finished";
export default {
  props: {
    taskForm: {
      type: Object,
      require: true
    }
  },
  data() {
    return {
      reBackDescription: '',
      assigneeName:''
    }
  },
  created() {
    this.getComment()
  },
  methods: {
    getComment() {
      const params = { procInsId: this.taskForm.procInsId, deployId: this.taskForm.deployId }
      flowRecordFull(params).then(res => {
        if (res.data.flowList) {
          if (res.data.flowList.length > 1 && res.data.flowList[1].comment && res.data.flowList[1].comment.type == '退回意见') {
            this.reBackDescription = res.data.flowList[1].comment.comment
            this.assigneeName = res.data.flowList[1].assigneeName
            this.$emit('isReturn', true)
          } else {
            this.$emit('isReturn', false)
          }
        }
      })
    }
  },
}
</script>

<style lang="scss" scoped></style>