<template>
  <div>
    <el-dialog :visible.sync="visible" :append-to-body="appendToBody" title="相关方安全告知培训合格证" width="370px" destroy-on-close	>
      <vue-qr :text="qrCodeStr" :margin="0" :size="320" color-dark="#000" color-light="#fff"/>
    </el-dialog>
  </div>
</template>

<script>
import vueQr from 'vue-qr'

export default {
  components: { vueQr },
  props: {
    appendToBody: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      visible: false,
      qrCodeStr: ''
    }
  },
  methods: {
    init(e) {
      this.visible = true
      this.qrCodeStr = e.qrCodeStr
    }
  }
}
</script>

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