<template>
  <div>
    <FollowReview :currentRow="currentRow" titlePosition="top">
      <template #button>
        <el-button
          style="padding: 8px 20px"
          v-if="isShowEdit"
          @click="handleEdit"
          >修 改</el-button
        >
        <el-button
          style="padding: 8px 20px; margin-left: 20px"
          @click="$emit('back')"
          >返 回</el-button
        >
      </template>
    </FollowReview>
  </div>
</template>

<script>
import FollowReview from "./components/FollowReview"
export default {
  name: "FollowUpDetail",
  props: {
    currentRow: {},
  },
  components: {
    FollowReview,
  },
  data() {
    return {}
  },
  methods: {
    handleEdit() {
      const { patientId, followId } = this.currentRow
      this.$router.push({
        path: "/followupentry",
        query: {
          patientId,
          followId,
          model: "edit",
          getData: 1,
          formType: 2,
        },
      })
    },
  },
  computed: {
    isShowEdit() {
      const { checkStatus, followBatch } = this.currentRow
      return followBatch > 0 && checkStatus !== 3 && checkStatus !== 4
    },
  },
}
</script>
