管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-01-17 93a38ac31615b1aa053a4440c59814ea72353945
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
<!--入库质检--->
<template>
  <div class="wareBox">
    <iframe
      style="border:none"
      width="100%"
      height="100%"
      v-bind:src="reportUrl"
    ></iframe>
  </div>
</template>
 
<script>
import { getToken } from "@/utils/auth";
export default {
  data() {
    return {
      reportUrl: ''
    }
  },
  methods: {
    showChangeIfream(res) {
 
      if (res.indexOf('{host}') != -1) {
 
        res = res.replace('{host}',ipConfig )
      }
      if (res.indexOf('token=') != -1) {
        res = res + getToken();
      }
 
      this.$store.state.reporturl = res;
      this.reportUrl = res;
      // console.log("2", this.reportUrl)
    }
  },
  mounted() {
    this.showChangeIfream(this.$store.reporturl)
    // console.log("1", this.reportUrl)
    this.$bus.$on('changeNaveUrl', (res) => {
      this.showChangeIfream(res)
    });
  }
 
}
</script>
 
<style lang="less" scoped>
.wareBox {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #303030;
}
</style>