<template>
  <!-- 随访调查录入 -->
  <div>
    <ConfigForms
      form-type="2"
      formClass="follow-form"
      :patient-id="patientId"
      :disabled="disabled"
      :tabDisabled="tabDisabled"
      :operation="operation"
    ></ConfigForms>
  </div>
</template>

<script>
import ConfigForms from "@/views/screening/components/ConfigForms.vue"
export default {
  name: "FollowupEntry",
  components: {
    ConfigForms,
  },
  data() {
    return {
      disabled:false,
      tabDisabled:true,
      operation:'',
      patientId:this.$route.query.patientId,
      model:''
    }
  },
  watch:{
    model(val){
      switch(val){
         case 'view':
           this.disabled = true
           this.tabDisabled = false
           this.operation = 'edit'
          break;
          case 'edit':
           this.disabled = false
           this.tabDisabled = true
           this.operation = 'edit'
          break;
          default:
           this.disabled = false
           this.tabDisabled = true
           this.operation = ''
          break;
      }
      
    }
  },
  created() {
    this.model = this.$route.query.model
  },
  methods: {},
}
</script>

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