liukangdong
2024-05-31 bc2cda03481cd62a1b04959d2653678053e60b18
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
<template>
  <div   style="text-align: center;background: white;width: 100%;height: 100%;">
    <div v-if="url!=null"  >
      <iframe :src="url" width="100%"  style="border:none"  height="600"></iframe>
    </div>
    <div  v-else >
      <div style="padding-top: 200px;font-size: 28px;color: #3C77DA">{{message}}</div>
    </div>
    <template v-if="1===2">
      <div style="bottom: 20px;position: fixed;text-align: center;width: 90%;height: 60px">
        {{url}}<br>
        <el-button type="primary" :loading="loading" @click="getUrl()">重新加载页面</el-button>
      </div>
    </template>
  </div>
</template>
<script>
import BaseTable from '@/components/base/BaseTable'
export default {
  name: 'otherLoginService',
  extends: BaseTable,
  data () {
    return {
      url: null,
      loading: false,
      message: '正在努力登录组件服务...'
    }
  },
  created () {
    this.config({
      module: '设备管otherLoginService理信息表',
      api: '/other/other',
      'field.id': 'id',
      'field.main': 'id'
    })
    this.getUrl()
  },
  methods: {
    getUrl () {
      this.loading = true
      this.api.getServiceUrl({ label: 'HK_SERVICE_COPAS_URL' })
        .then(res => {
          this.message = '正在做努力加载组件!'
          this.url = res
        })
        .catch(e => {
          this.message = '登录组件服务失败,请联系系统管理员检查!'
        })
        .finally(() => {
          this.loading = false
        })
    }
  }
}
</script>
 
<style>
</style>