<template>
  <div class="app-container">
    <el-tabs type="border-card" >
      <el-tab-pane label="申请信息" style="overflow-y:auto;overflow-x:hidden;">
        <CCCform @handleCommit="save" :certapp="certapp" v-if="kind=='CCC'"></CCCform>
        <QMSform @handleCommit="save" :certapp="certapp" v-if="kind=='QMS'"></QMSform>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import CCCform from "@/views/certapp/cccform"
import Productunit from "@/views/certapp/productunit"
import { getCertapp, completeCertapp } from "@/api/certapp"
import router from '@/router';
import QMSform from "@/views/certapp/qmsform"
export default {
  components: { CCCform, Productunit, QMSform},
  props: [],
  data() {
    return {
      certapp:null,
      kind:'CCC',
    };
  },
  computed: {},
  watch: {
    // "formData.cert_field": "changeRules"
  },
  created() {
    this.getParams()
  },
  mounted() {},
  methods: {
      getParams(){
          this.kind = this.$route.params.kind
      },
      save(val){
        this.certapp=val
      },
      handleComplete(){
        completeCertapp(this.certapp.id).then(res=>{
          this.$message.success('成功')
          this.$router.go(-1)
        })
      }
  }
};
</script>
