|
|
@@ -0,0 +1,44 @@
|
|
|
+<template>
|
|
|
+ <div class="ele-body">
|
|
|
+ <jimureportBrowse :url="fileUrl"></jimureportBrowse>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <script>
|
|
|
+ import jimureportBrowse from '@/components/jimureport/browse.vue';
|
|
|
+ import { getServiceurl } from '@/components/jimureport/api.js';
|
|
|
+ import { getToken } from '@/utils/token-util';
|
|
|
+ export default {
|
|
|
+ components: {
|
|
|
+ jimureportBrowse
|
|
|
+ },
|
|
|
+
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ fileUrl: ''
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {},
|
|
|
+ watch: {
|
|
|
+ '$route'(to, from) {
|
|
|
+ if (to.path) {
|
|
|
+ this.getJmPrintBrowse(); // 重新加载数据
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getJmPrintBrowse()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async getJmPrintBrowse(){
|
|
|
+ let id = this.$route.path.split('/').pop()
|
|
|
+ let url = await getServiceurl();
|
|
|
+ this.fileUrl = `${url}/jmreport/view/${id}?token=${getToken()}`;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+ </script>
|
|
|
+ <style lang="scss" scoped>
|
|
|
+
|
|
|
+ </style>
|
|
|
+
|