previsualizacion pdf

This commit is contained in:
casnet1
2020-09-21 20:22:35 -05:00
parent 2843a3ec89
commit 312415c928
8 changed files with 27 additions and 128 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" type=image/png href=assets/icono.png><title>Portal Editorial Acatlán</title><link href=css/app.7e1118b4.css rel=preload as=style><link href=css/chunk-vendors.138628b4.css rel=preload as=style><link href=js/app.7aae65a9.js rel=preload as=script><link href=js/chunk-vendors.8f463115.js rel=preload as=script><link href=css/chunk-vendors.138628b4.css rel=stylesheet><link href=css/app.7e1118b4.css rel=stylesheet></head><body><noscript><strong>We're sorry but portal doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.8f463115.js></script><script src=js/app.7aae65a9.js></script></body></html>
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" type=image/png href=assets/icono.png><title>Portal Editorial Acatlán</title><link href=css/app.9e333d29.css rel=preload as=style><link href=css/chunk-vendors.138628b4.css rel=preload as=style><link href=js/app.24d4ba2c.js rel=preload as=script><link href=js/chunk-vendors.8f463115.js rel=preload as=script><link href=css/chunk-vendors.138628b4.css rel=stylesheet><link href=css/app.9e333d29.css rel=stylesheet></head><body><noscript><strong>We're sorry but portal doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.8f463115.js></script><script src=js/app.24d4ba2c.js></script></body></html>
+2
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
-2
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
+22 -24
View File
@@ -7,27 +7,27 @@
Previsualizar
</button>
<div v-if="Visible" @close="closeModal()">
<transition name="modal" >
<div class="modal-backdrop" @click.self="close()">
<div
class="modal"
role="dialog"
aria-labelledby="modalTitle"
aria-describedby="modalDescription"
>
<section class="modal-body rounded" id="modalDescription">
<iframe
:src="PDF"
width="100%"
height="100%"
frameborder="0"
></iframe>
</section>
<modal v-if="Visible" @close="closeModal()">
<transition name="modal">
<div class="modal-backdrop" @click.self="closeModal()">
<div
class="modal"
role="dialog"
aria-labelledby="modalTitle"
aria-describedby="modalDescription"
>
<section class="modal-body rounded" id="modalDescription">
<iframe
:src="PDF"
width="100%"
height="100%"
frameborder="0"
></iframe>
</section>
</div>
</div>
</div>
</transition>
</div>
</transition>
</modal>
<br /><br />
<div class="container">
<div class="row izq">
@@ -113,7 +113,7 @@ import Title from "../components/titulo.vue";
export default {
components: {
Title,
Title
//modal
},
@@ -144,7 +144,7 @@ export default {
close() {
this.$emit("close");
},
async descripcion(idLibro) {
localStorage.clear();
window.localStorage.setItem("idLibro", idLibro);
@@ -239,9 +239,7 @@ export default {
} catch (error) {
console.log(`Ocurrio un error ${error}`);
}
}
};
</script>
-99
View File
@@ -1,99 +0,0 @@
<template>
<transition name="modal">
<div class="modal-backdrop" @click.self="close()">
<div
class="modal"
role="dialog"
aria-labelledby="modalTitle"
aria-describedby="modalDescription"
>
<section class="modal-body rounded" id="modalDescription">
<iframe
:src="PDF"
width="100%"
height="100%"
frameborder="0"
></iframe>
</section>
</div>
</div>
</transition>
</template>
<script>
//import axios from "axios";
import config from "../config/config.js";
export default {
props: ["pdfPre"], //RUTA.pdf
name: "modal",
methods: {
close() {
this.$emit("close");
}
},
data() {
return {
PDF: ""
};
},
async created() {
try {
let nombre = window.localStorage.getItem("pdfVis");
console.log(`Ruta de pdf ${config.api}/PDFget/?nombrePDF=${nombre}`)
let path = `${config.api}/PDFget/?nombrePDF=${nombre}`;
this.PDF = path;
console.log(path);
console.log(config.api);
/*let PDF = await axios.get(`${config.api}/PDFget/${this.pdfPre}`, {
responseType: 'blob', //
})
.then(response => {
this.PDF = PDF
// this.user = response.data;
console.log("si se pudo", response.data)
}).catch(e => {
console.log(e);
})*/
} catch (error) {
console.log(`Ocurrio un error msj: ${error}`);
}
}
};
</script>
<style scoped>
.modal-backdrop {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(0, 0, 0, 0.3);
display: flex;
justify-content: center;
align-items: center;
}
.modal {
background: #ffffff;
box-shadow: 2px 2px 20px 1px;
/* overflow-x: auto; */
display: flex;
flex-direction: column;
position: relative;
width: 90%;
height: 90%;
}
.modal-body {
/* position: relative; */
padding: 20px 10px;
}
</style>