<template>
	<div>
		<!-- <el-card :body-style="cardBodyStyle"> -->
		<iframe :src="urlFrame" width="100%" height="100%" frfameborder="0" ref="iframe"></iframe>
		<!-- </el-card> -->
	</div>
</template>
<script setup>
	import {
		ref, 
		onMounted, 
		getCurrentInstance
	} from 'vue'
	const {
		proxy
	} = getCurrentInstance() 
	onMounted(() => {
		get()
	})
	const urlFrame = ref('')
	const name = ref('rabbitmq')
	const iframe = ref(null) 
	const get = () => {
		var url = 'framework/Monitor/queryByName'
		var param = {
			name: name.value
		}
		proxy.$axios.get(url, param).then(response => {
			urlFrame.value = response.data.data.url
			iframe.value.contentWindow.location.reload()
		});
	}
</script>
 