|
@@ -1,12 +1,12 @@
|
|
<template>
|
|
<template>
|
|
- <hc-new-card>
|
|
|
|
|
|
+ <div class="hc-pdf-page-box">
|
|
<hc-pdf :src="pdfUrl" :download="isDownload" :print="isPrint" />
|
|
<hc-pdf :src="pdfUrl" :download="isDownload" :print="isPrint" />
|
|
- </hc-new-card>
|
|
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import { isNullES } from 'js-fast-way'
|
|
import { isNullES } from 'js-fast-way'
|
|
-import { onActivated, ref } from 'vue'
|
|
|
|
|
|
+import { onMounted, ref } from 'vue'
|
|
import { useRoute } from 'vue-router'
|
|
import { useRoute } from 'vue-router'
|
|
import { btnAuth, decode } from '~uti/btn-auth'
|
|
import { btnAuth, decode } from '~uti/btn-auth'
|
|
|
|
|
|
@@ -15,13 +15,9 @@ const useRoutes = useRoute()
|
|
const isDownload = ref(btnAuth('measure-pdf-download'))
|
|
const isDownload = ref(btnAuth('measure-pdf-download'))
|
|
const isPrint = ref(btnAuth('measure-pdf-print'))
|
|
const isPrint = ref(btnAuth('measure-pdf-print'))
|
|
|
|
|
|
-defineOptions({
|
|
|
|
- name: 'Pdf',
|
|
|
|
-})
|
|
|
|
-
|
|
|
|
//渲染完成
|
|
//渲染完成
|
|
const pdfUrl = ref('')
|
|
const pdfUrl = ref('')
|
|
-onActivated(() => {
|
|
|
|
|
|
+onMounted(() => {
|
|
const { url, code } = useRoutes.query
|
|
const { url, code } = useRoutes.query
|
|
//如果url和code都为空,不做处理
|
|
//如果url和code都为空,不做处理
|
|
if (isNullES(url) && isNullES(code)) {
|
|
if (isNullES(url) && isNullES(code)) {
|
|
@@ -42,6 +38,11 @@ onActivated(() => {
|
|
})
|
|
})
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
|
-
|
|
|
|
|
|
+<style scoped>
|
|
|
|
+.hc-pdf-page-box {
|
|
|
|
+ position: relative;
|
|
|
|
+ height: 100%;
|
|
|
|
+ width: 100%;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|