update 更新报表预览

This commit is contained in:
lb 2023-03-06 16:15:12 +08:00
parent 770e8866a9
commit ff17c94e78
5 changed files with 56 additions and 11 deletions

View File

@ -326,7 +326,7 @@ export default {
return this.$router.push({
name: "pms-reportPreview",
query: {
name: data,
name: data.name,
},
});
}
@ -336,10 +336,9 @@ export default {
return this.$router.push({
name: "pms-reportDesign",
query: {
name: data,
name: data.name,
},
});
break;
}
}
},

View File

@ -1,5 +1,5 @@
<template>
<div></div>
<div>design</div>
</template>
<script>

View File

@ -1,5 +1,7 @@
<template>
<div></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>
<script>
@ -7,12 +9,51 @@ export default {
name: "ReportPreview",
props: {},
data() {
return {};
return {
loading: true,
// url: "/pms-am/ureport/preview", //
// url: "http://192.168.1.62:8080/pms-am/ureport/preview",
url: window.SITE_CONFIG['apiURL'] + '/ureport/preview'
};
},
created() {},
mounted() {},
mounted() {
this.url += "?_u=db:" + this.$route.query.name // + ".ureport.xml";
if (this.$route.query.substrateId) {
this.url += "&substrateId=" + this.$route.query.substrateId;
}
if (this.$route.query.equipmentId) {
this.url += "&equipmentId=" + this.$route.query.equipmentId;
}
if (this.$route.query.dataId) {
this.url += "&dataId=" + this.$route.query.dataId;
}
if (this.$route.query.workOrderNo) {
this.url += "&workOrderNo=" + this.$route.query.workOrderNo;
}
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
},
methods: {},
};
</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>

View File

@ -35,7 +35,7 @@ const CategoryList = {
// console.log('【报表分类】', item.value)
childOptions.push(h("el-option", { props: { label: item.label, value: item.value } }, null));
});
return h("el-select", { props: { value: this.pickedId }, on: { change: this.handleChange } }, childOptions);
return h("el-select", { props: { size: 'small', value: this.pickedId }, on: { change: this.handleChange } }, childOptions);
},
};
@ -59,8 +59,8 @@ export default function () {
width: 240,
subcomponent: TableOperaionComponent,
options: [
{ name: "preview", permission: "pms:reportSheet:preview" },
{ name: "design", permission: "pms:reportSheet:design" },
{ name: "preview", emitFull: true, permission: "pms:reportSheet:preview" },
{ name: "design", emitFull: true, permission: "pms:reportSheet:design" },
"edit",
{ name: "delete", emitFull: true, permission: "pms:reportSheet:delete" },
],

View File

@ -25,6 +25,11 @@ module.exports = {
overlay: {
errors: true,
warnings: true
},
proxy: {
'/pms-am/ureport/preview': {
target: 'http://192.168.1.62:8080/' // TODO: 线上发布时需修改此处
}
}
}
}