<template>
  <div class="app-container">
    <el-row :gutter="20">
      <el-col :span="5" :xs="24">
        <chapter ref="chapter" @questionnaire="getQuestionnaire"></chapter>
      </el-col>
      <el-col :span="19" :xs="24">
        <questionnaire ref="questionnaire"></questionnaire>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import Chapter from "../chapter";
import Questionnaire from "../questionnaire";

export default {
  name: "AuditInfo",
  components: { Chapter, Questionnaire },
  mounted() {
    this.$refs.chapter.getList(this.$route.query.auditId);
    this.$refs.questionnaire.getList(this.$route.query.auditId, null);
  },
  methods: {
    getQuestionnaire(chapterId) {
      this.$refs.questionnaire.getList(null, chapterId);
    }
  }
};
</script>
