<template>
    <div :style="{width: '100%', height: mainHeight}">
        <iframe id="orgIframe" width="100%" :height="(parseInt(mainHeight) - 4) + 'px'" name="orgIframe" style="border:0;" :src="src"></iframe>
    </div>
</template>

<script>
    export default {
        name: "BPMOrg",
        data() {
            return {
                src: './w?sid=' + this.$store.state.sessionId + '&cmd=com.actionsoft.apps.coe.pal_average_user_org',
                mainHeight: (parseInt(this.$store.getters.getTopMainHeightFn) - 4) + 'px',
            }
        },
        computed: {
            listenTopMainHeight() {
                return this.$store.getters.getTopMainHeightFn;
            }
        },
        watch: {
            listenTopMainHeight: function (newd, old) {
                this.mainHeight = (parseInt(this.$store.getters.getTopMainHeightFn) - 4) + 'px';
            }
        }
    }
</script>

<style scoped>

</style>