index.vue 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. <template>
  2. <div class="hc-page-box">
  3. <hc-new-card title="测试签章">
  4. <template #extra>
  5. <el-button v-if="isBatch" type="primary" @click="BatchClick(false)">不批量</el-button>
  6. <el-button v-else type="primary" @click="BatchClick(true)">批量</el-button>
  7. </template>
  8. <HcSignPdf v-if="pdfUrl" :batch="isBatch" :dom="hcSignImageArr" :sign="logoName" :src="pdfUrl" :img-width="imgWidth" :img-height="imgHeight" @change="pdfChange" />
  9. </hc-new-card>
  10. </div>
  11. </template>
  12. <script setup>
  13. import { ref } from 'vue'
  14. import HcSignPdf from './hc-pdf1.vue'
  15. const isBatch = ref(false)
  16. const BatchClick = (val) => {
  17. console.log(111111111111)
  18. isBatch.value = val
  19. }
  20. const pdfUrl = ref('https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20250317/bc112743d3fd74da4347d25b7caeea99.pdf')
  21. const hcSignImageArr = ref([])
  22. const logoName = ref('https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20250317/d0b11313e9bb1f0de41b165282215a72.png')
  23. const pdfChange = (data) => {
  24. console.log('签章数据', data)
  25. }
  26. </script>