<template>
  <div>
    <div class="right-qualification">
      <div class="right-qualification-title">
        <span style="font-size: 18px;font-weight: bold">我的资质</span>
        <el-button type="primary" size="mini" class="pull-right" @click="addQualification = true">添加</el-button>
      </div>
      <el-row :gutter="15" style="margin-bottom: 15px">
        <el-col :span="8">
          <QualificationCard></QualificationCard>
        </el-col>
        <el-col :span="8">
          <QualificationCard></QualificationCard>
        </el-col>
        <el-col :span="8">
          <QualificationCard></QualificationCard>
        </el-col>
      </el-row>
    </div>
    <el-dialog
      title="新增资质"
      :visible.sync="addQualification"
      width="30%"
    >
      <el-form ref="form" :model="form" label-width="80px">
        <el-form-item label="证书名称">
          <el-input v-model="form.name"></el-input>
        </el-form-item>
        <el-form-item label="证书编号">
          <el-input v-model="form.number"></el-input>
        </el-form-item>
        <el-form-item label="发证机构">
          <el-input v-model="form.institution"></el-input>
        </el-form-item>
        <el-form-item label="发证时间">
          <el-input v-model="form.date"></el-input>
        </el-form-item>
        <el-form-item label="是否公开">
          <el-radio-group v-model="form.isPublic">
            <el-radio label="公开"></el-radio>
            <el-radio label="不公开"></el-radio>
          </el-radio-group>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
    <el-button @click="addQualification = false">取 消</el-button>
    <el-button type="primary" @click="addQualification = false">确 定</el-button>
  </span>
    </el-dialog>
  </div>

</template>

<script>
  import QualificationCard from './QualificationCard'
  export default {
    name: "MyQualification",
    components:{
      QualificationCard
    },
    data(){
      return {
        addQualification: false,
        form: {
          name: '',
          number:'',
          institution:'',
          date:'',
          isPublic:''
        }
      }
    }
  }
</script>

<style scoped lang="less">
  .right-qualification {
    padding: 20px;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0px 1px 6px 0px rgba(8, 6, 6, 0.13);

  .right-qualification-title {
    padding: 10px;
    border-bottom: 1px solid #ccc;
    margin-bottom: 20px;
  }
  }
</style>
