<template>
|
<div class="app-container">
|
<div class="iframe">
|
<iframe id="iframeReport" :src="iframeUrlReport"></iframe>
|
</div>
|
</div>
|
</template>
|
|
<style scoped>
|
#iframeReport{display: block; width: 100%; border: 0; overflow: hidden}
|
</style>
|
|
<script>
|
export default {
|
data() {
|
return {
|
iframeUrlReport: ''
|
}
|
},
|
mounted() {
|
this.setReportHeight()
|
this.setReport(this.$route.fullPath)
|
},
|
watch: {
|
$route(val, from) {
|
console.log(val, from)
|
this.setReport(val.fullPath)
|
}
|
},
|
methods: {
|
setReportHeight() {
|
var iframe = document.getElementById('iframeReport')
|
var bodyheight = document.documentElement.clientHeight
|
iframe.height = bodyheight
|
},
|
setReport(path) {
|
if (path.indexOf('banCiNengLiYongLv') >= 0) {
|
this.showBanCiNengLiYongLv()
|
} else if (path.indexOf('sheBeiFengLeiLiYongLv') >= 0) {
|
this.showSheBeiFengLeiLiYongLv()
|
} else if (path.indexOf('shebeiguzhang') >= 0) {
|
this.showShebeiguzhang()
|
} else if (path.indexOf('shebeiliyonglvfenxi') >= 0) {
|
this.showShebeiliyonglvfenxi()
|
} else if (path.indexOf('shebeiliyonglvniandu') >= 0) {
|
this.showShebeiliyonglvniandu()
|
} else if (path.indexOf('sheBeiLiYongLvOld') >= 0) {
|
this.showSheBeiLiYongLvOld()
|
} else if (path.indexOf('sheBeiYueFenBanCiLiYongLvPaiXu') >= 0) {
|
this.showSheBeiYueFenBanCiLiYongLvPaiXu()
|
} else if (path.indexOf('week_use') >= 0) {
|
this.showWeekUse()
|
} else if (path.indexOf('tpmd') >= 0) {
|
this.showTpmd()
|
} else if (path.indexOf('tpmm') >= 0) {
|
this.showTpmm()
|
} else if (path.indexOf('base') >= 0) {
|
this.showBase()
|
} else if (path.indexOf('import19') >= 0) {
|
this.$router.push('/import19/index')
|
} else if (path.indexOf('importDownTime') >= 0) {
|
this.$router.push('/importDownTime/index')
|
} else if (path.indexOf('clearDownTime') >= 0) {
|
this.$router.push('/clearDownTime/index')
|
} else if (path.indexOf('workDays') >= 0) {
|
this.$router.push('/workDays/index')
|
} else if (path.indexOf('stateDistribution') >= 0) {
|
this.$router.push('/stateDistribution/index')
|
} else if (path.indexOf('dailyStateDistribution') >= 0) {
|
this.$router.push('/dailyStateDistribution/index')
|
} else {
|
this.showBanCiNengLiYongLv()
|
}
|
},
|
showBanCiNengLiYongLv() {
|
this.iframeUrlReport = 'http://192.168.234.2:8075/WebReport/ReportServer?reportlet=mdc/BanCiNengLiYongLv.cpt'
|
},
|
showSheBeiFengLeiLiYongLv() {
|
this.iframeUrlReport = 'http://192.168.234.2:8075/WebReport/ReportServer?reportlet=mdc/sheBeiFengLeiLiYongLv.cpt'
|
},
|
showShebeiguzhang() {
|
this.iframeUrlReport = 'http://192.168.234.2:8075/WebReport/ReportServer?reportlet=mdc/shebeiguzhang.cpt'
|
},
|
showShebeiliyonglvfenxi() {
|
this.iframeUrlReport = 'http://192.168.234.2:8075/WebReport/ReportServer?reportlet=mdc/shebeiliyonglvfenxi.cpt'
|
},
|
showShebeiliyonglvniandu() {
|
this.iframeUrlReport = 'http://192.168.234.2:8075/WebReport/ReportServer?reportlet=mdc/shebeiliyonglvniandu.cpt'
|
},
|
showSheBeiLiYongLvOld() {
|
this.iframeUrlReport = 'http://192.168.234.2:8075/WebReport/ReportServer?reportlet=mdc/sheBeiLiYongLvOld.cpt'
|
},
|
showSheBeiYueFenBanCiLiYongLvPaiXu() {
|
this.iframeUrlReport = 'http://192.168.234.2:8075/WebReport/ReportServer?reportlet=mdc/sheBeiYueFenBanCiLiYongLvPaiXu.cpt'
|
},
|
showWeekUse() {
|
this.iframeUrlReport = 'http://192.168.234.2:8075/WebReport/ReportServer?reportlet=mdc/week_use.cpt'
|
},
|
showTpmd() {
|
this.iframeUrlReport = 'http://192.168.234.2:8075/WebReport/ReportServer?reportlet=mdc/TPMD.cpt'
|
},
|
showTpmm() {
|
this.iframeUrlReport = 'http://192.168.234.2:8075/WebReport/ReportServer?reportlet=mdc/TPMM.cpt'
|
},
|
showBase() {
|
this.iframeUrlReport = 'http://192.168.234.2:8075/WebReport/ReportServer?reportlet=mdc/BASE.cpt'
|
}
|
}
|
}
|
</script>
|