gaosp
2024-01-14 0d626ae57149d5ed40a32bd8b808ca6069aa6d5e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<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>