<template>
	<div style="margin: 20px;">
		<el-button type="success" @click="handleStartDesigner">启动设计器</el-button>
		<el-button type="primary" @click="handleShowTest">测试预览</el-button>
		<iframe :src="url"></iframe>
	</div>
</template>

<script>
	import {
		mapState
	} from 'vuex'

	export default {
		computed: {
			...mapState({
				serverName: state => state.app.serverName
			})
		},
		data() {
			return {
				url:'http://localhost:8080/thdemo/ureport/preview?_u=file:test.ureport.xml'
			}
		},
		methods: {
			handleStartDesigner() {
				console.log(this.serverName + 'ureport/designer')
				window.open(this.serverName + 'ureport/designer') 
			},
			handleShowTest() {
				console.log(this.serverName + 'ureport/designer')
				window.open(this.serverName + 'ureport/preview?_u=file:test.ureport.xml') 
			},
		}
	}
</script>

<style>
</style>
