王旭
2022-10-12 410facfa35a29a14f2dc5a5d74629a8291148aff
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
<template>
  <div class="databaseMonitoring_box">
    <div class="table_box">
      <iframe
        id="iframe"
        :src="sql_Url"
        style="height: 100%"
        width="100%"
        frameborder="0"
      ></iframe>
    </div>
  </div>
</template>
 
<script>
import MyBread from "../../components/MyBread.vue";
import { getToken } from "../../utils/auth.js";
export default {
  //import引入的组件需要注入到对象中才能使用
  components: {
    MyBread,
  },
  data() {
    //这里存放数据
    return {
      sql_Url: "",
    };
  },
  //方法集合
  methods: {
    handleSelectionChange() {},
    getUrl() {
      if (this.$store.state.iframeMsg.indexOf("Token=") != -1) {
        this.sql_Url = this.$store.state.iframeMsg + getToken();
      } else {
        this.sql_Url = this.$store.state.iframeMsg;
      }
    },
  },
  created() {
    this.getUrl();
  },
  mounted() {},
};
</script>
<style lang="less" scoped>
//@import url(); 引入公共css类
.databaseMonitoring_box {
  background: rgb(240, 242, 245);
  border-radius: 10px;
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  .table_box {
    height: 90%;
    padding: 10px;
    background: #fff;
    border-radius: 5px;
    border: 1px solid rgb(202, 201, 204);
    overflow: hidden;
  }
}
</style>