<template>
  <el-dialog v-model="visible" title="查看二维码" width="600px">
    <div id="printContainer" style="border: 1px dashed #ccc">
      <div class="tc mt-20">
        <h1>{{ info.CORP_NAME }}</h1>
      </div>
      <!--      TODO-->
      <layout-qr-code :src="info.CORPINFO_ID" />
    </div>
    <template #footer>
      <el-button @click="visible = false">关闭</el-button>
      <el-button v-print="'#printContainer'" type="primary">打 印</el-button>
    </template>
  </el-dialog>
</template>

<script setup>
import { useVModel } from "@vueuse/core";
import LayoutQrCode from "@/components/qr_code/index.vue";

const props = defineProps({
  visible: {
    type: Boolean,
    required: true,
    default: false,
  },
  info: {
    type: Object,
    required: true,
    default: () => ({}),
  },
});
const emits = defineEmits(["update:visible"]);
const visible = useVModel(props, "visible", emits);
</script>

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