<template>
  <div>
    <tableForm
      ref="tableForm"
      :formType="formType"
      :readonly="readonly"
      :showBack="true"
    ></tableForm>
  </div>
</template>
<script>
import tableForm from "../components/tableForm";
export default {
  components: { tableForm },
  data() {
    return {
      id: "",
      formType: null,
      readonly: false,
    };
  },
  created() {
    this.id = this.$route.query.id;
    this.formType = parseInt(this.$route.query.formType);
    let readonly = this.$route.query.readonly;
    this.readonly = readonly === "true" ? true : false;
  },
  mounted() {
    setTimeout(() => {
      this.$refs.tableForm.initialize(this.id);
    }, 200);
  },
};
</script>
