<!--  -->
<template>
    <el-dialog
        width="80%"
        class=""
        title="导出"
        @close="closeModal"
        :append-to-body="true"
        :close-on-click-modal="false"
        v-model="showExportDialog">
        <div :style="{'height': dialogHeight + 'px'}">
            <iframe :src="'/demo/reportJsp/showReport.jsp?rpx=' + rpx + '.rpx&width=1526&height=592&' + 'rgstrId=' + rgstrId + '&name=' + name + '&type=' + professionType + '&word=' + rightTableName" frameborder="0" width="100%" height="100%" style="overflow: auto"></iframe>
        </div>
    </el-dialog>
</template>

<script>
//这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）
//例如：import 《组件名称》 from '《组件路径》';

export default {
    //import引入的组件需要注入到对象中才能使用
    props:['rgstrId','professionType','rightTableName'],
    components: {},
    data() {
    //这里存放数据
        return {
            showExportDialog: true,
            dialogHeight:window.innerHeight - 300,
            rpx: 'js_TAC_FINAL_WORD1',
            name: '前期与设计',
        };
    },
    //监听属性 类似于data概念
    computed: {},
    //监控data中的数据变化
    watch: {
        currentNodeId(n,o){
            this.currentNodeId = n;
        },
        listType(n,o){
            this.listType = n;
        }
    },
    //方法集合
    methods: {
        closeModal(){
            this.$emit('dialogClose')
        }
    },
    //生命周期 - 创建完成（可以访问当前this实例）
    created() {
        let n = this.professionType;
        let rightTableName = this.rightTableName;
        if(n == '1'){
            // this.rpx = 'js_TAC_FINAL_WORD1'
            if(rightTableName == '基本情况'){
                this.rpx = 'js_TAC_FINAL_WORD_BASE'
            }else if(rightTableName == '问题清单'){
                this.rpx = 'js_TAC_FINAL_WORD_PBLM'
            }
            this.name = '前期与设计'
        }else if(n == '2'){
            // this.rpx = 'js_TAC_FINAL_WORD2'
            if(rightTableName == '基本情况'){
                this.rpx = 'js_TAC_FINAL_WORD_BASE'
            }else if(rightTableName == '问题清单'){
                this.rpx = 'js_TAC_FINAL_WORD_PBLM'
            }
            this.name = '建设管理'
        }else if(n == '3'){
            // this.rpx = 'js_TAC_FINAL_WORD3'
            if(rightTableName == '基本情况'){
                this.rpx = 'js_TAC_FINAL_WORD_BASE'
            }else if(rightTableName == '问题清单'){
                this.rpx = 'js_TAC_FINAL_WORD_PBLM'
            }
            this.name = '计划下达与执行'
        }else if(n == '4'){
            // this.rpx = 'js_TAC_FINAL_WORD4'
            if(rightTableName == '基本情况'){
                this.rpx = 'js_TAC_FINAL_WORD_BASE'
            }else if(rightTableName == '问题清单'){
                this.rpx = 'js_TAC_FINAL_WORD_PBLM'
            }
            this.name = '资金使用与管理'
        }else if(n == '5'){
            // this.rpx = 'js_TAC_FINAL_WORD5'
            if(rightTableName == '基本情况'){
                this.rpx = 'js_TAC_FINAL_WORD_BASE'
            }else if(rightTableName == '问题清单'){
                this.rpx = 'js_TAC_FINAL_WORD_PBLM'
            }
            this.name = '工程质量'
        }else if(n == '6'){
            // this.rpx = 'js_TAC_FINAL_WORD6'
            if(rightTableName == '基本情况'){
                this.rpx = 'js_TAC_FINAL_WORD_BASE'
            }else if(rightTableName == '问题清单'){
                this.rpx = 'js_TAC_FINAL_WORD_PBLM'
            }
            this.name = '工程安全'
        }

    },
    //生命周期 - 挂载完成（可以访问DOM元素）
    mounted() {
    },
}
</script>
<style scoped>

</style>
