diff --git a/src/views/modules/pms/reportDesign/index.vue b/src/views/modules/pms/reportDesign/index.vue
index 934b590..87b0526 100644
--- a/src/views/modules/pms/reportDesign/index.vue
+++ b/src/views/modules/pms/reportDesign/index.vue
@@ -1,5 +1,7 @@
- design
+
+
+
-
+
diff --git a/src/views/modules/pms/reportPreview/index.vue b/src/views/modules/pms/reportPreview/index.vue
index 50fba87..0138fc6 100644
--- a/src/views/modules/pms/reportPreview/index.vue
+++ b/src/views/modules/pms/reportPreview/index.vue
@@ -11,14 +11,20 @@ export default {
data() {
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/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() {
- this.url += "?_u=db:" + this.$route.query.name // + ".ureport.xml";
if (this.$route.query.substrateId) {
this.url += "&substrateId=" + this.$route.query.substrateId;
}
@@ -34,9 +40,10 @@ export default {
if (this.$route.query.id) {
this.url += "&id=" + this.$route.query.id;
}
- const iframe = this.$refs['report-view']
- console.log('iframe', iframe)
- iframe.onload = () => this.loading = false
+ const iframe = this.$refs["report-view"];
+ iframe.onload = () => {
+ this.loading = false;
+ };
},
methods: {},
};