<template>
  <layout-card>
    <div id="printContainer">
      <div
        v-for="item in list"
        :key="item.IDENTIFICATIONPARTS_ID"
        class="page_break"
      >
        <part-qr-code :info="item" />
      </div>
    </div>
    <div class="tc mt-10">
      <el-button v-print="'#printContainer'" type="primary">打 印</el-button>
    </div>
  </layout-card>
</template>

<script setup>
import { useRoute } from "vue-router";
import { getIdentifyingPartsListById } from "@/request/risk_control.js";
import PartQrCode from "./components/part_qr_code.vue";
import useListData from "@/assets/js/useListData.js";

const route = useRoute();
const { IDS } = route.query;
const { list } = useListData(getIdentifyingPartsListById, {
  otherParams: { IDS },
  usePagination: false,
});
</script>

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