update 更新报表设计
This commit is contained in:
parent
ff17c94e78
commit
aeb016615b
@ -1,5 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>design</div>
|
<div v-loading="loading" style="" class="main-container">
|
||||||
|
<iframe ref="report-view" id="report-view" name="main-iframe" :src="url" frameborder="0" scrolling="auto" />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -7,12 +9,42 @@ export default {
|
|||||||
name: "ReportDesign",
|
name: "ReportDesign",
|
||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {
|
||||||
|
loading: true,
|
||||||
|
url: "",
|
||||||
|
// url: "/pms-am/ureport/preview", // 不行
|
||||||
|
// url: "http://192.168.1.62:8080/pms-am/ureport/preview", // 可以,但不通用
|
||||||
|
// url: window.SITE_CONFIG["apiURL"] + "/ureport/designer",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
beforeRouteEnter(to, from, next) {
|
||||||
|
next((vm) => {
|
||||||
|
vm.loading = true;
|
||||||
|
vm.url = window.SITE_CONFIG["apiURL"] + "/ureport/designer?_u=db:" + to.query.name; // + ".ureport.xml";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
const iframe = this.$refs["report-view"];
|
||||||
|
iframe.onload = () => {
|
||||||
|
this.loading = false;
|
||||||
|
};
|
||||||
},
|
},
|
||||||
created() {},
|
|
||||||
mounted() {},
|
|
||||||
methods: {},
|
methods: {},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped>
|
||||||
|
.main-container {
|
||||||
|
min-height: inherit;
|
||||||
|
/* padding: 16px; */
|
||||||
|
background: white;
|
||||||
|
/* border-radius: 6px; */
|
||||||
|
/* box-shadow: 0 0 1.125px 0.125px rgba(0, 0, 0, 0.125); */
|
||||||
|
/* height: 100%; */
|
||||||
|
}
|
||||||
|
|
||||||
|
#report-view {
|
||||||
|
width: 100%;
|
||||||
|
min-height: inherit;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -11,14 +11,20 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: true,
|
loading: true,
|
||||||
|
url: "",
|
||||||
// url: "/pms-am/ureport/preview", // 不行
|
// url: "/pms-am/ureport/preview", // 不行
|
||||||
// url: "http://192.168.1.62:8080/pms-am/ureport/preview",
|
// url: "http://192.168.1.62:8080/pms-am/ureport/preview",
|
||||||
url: window.SITE_CONFIG['apiURL'] + '/ureport/preview'
|
// url: window.SITE_CONFIG['apiURL'] + '/ureport/preview'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {},
|
beforeRouteEnter(to, from, next) {
|
||||||
|
next((vm) => {
|
||||||
|
vm.loading = true;
|
||||||
|
vm.url = window.SITE_CONFIG["apiURL"] + "/ureport/preview?_u=db:" + to.query.name; // + ".ureport.xml";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.url += "?_u=db:" + this.$route.query.name // + ".ureport.xml";
|
|
||||||
if (this.$route.query.substrateId) {
|
if (this.$route.query.substrateId) {
|
||||||
this.url += "&substrateId=" + this.$route.query.substrateId;
|
this.url += "&substrateId=" + this.$route.query.substrateId;
|
||||||
}
|
}
|
||||||
@ -34,9 +40,10 @@ export default {
|
|||||||
if (this.$route.query.id) {
|
if (this.$route.query.id) {
|
||||||
this.url += "&id=" + this.$route.query.id;
|
this.url += "&id=" + this.$route.query.id;
|
||||||
}
|
}
|
||||||
const iframe = this.$refs['report-view']
|
const iframe = this.$refs["report-view"];
|
||||||
console.log('iframe', iframe)
|
iframe.onload = () => {
|
||||||
iframe.onload = () => this.loading = false
|
this.loading = false;
|
||||||
|
};
|
||||||
},
|
},
|
||||||
methods: {},
|
methods: {},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user