<template>
  <!-- 经纪人管理: 经纪人管理-->
  <div class="iframe-container">
    <iframe :src="url"></iframe>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue';
import { initData } from '@/common/methods';
import { getToken } from '@/services/bus/token';
import { serviceURL } from '@/services/request/serviceURL';
import { getThirdMenuData } from '@/common/setup/table/button';

export default defineComponent({
    name: 'platinum_broker_management_tab',
    components: {},
    setup() {
        const token = getToken();
        const url = ref<string>('');
        const list = getThirdMenuData();

        initData(() => {
            if (list.length) {
                let resourcePCMenu = 'resourcepcmenu=info';
                const children = list[0].children;
                const fn = (code: string) => children.find((e) => e.code === code);
                if (fn('platinum_broker_management_check')) {
                    resourcePCMenu += ':check';
                }
                url.value = `${serviceURL.pcMangerUrl}${list[0].url}?token=${token}&tabindex=2&${resourcePCMenu}`;
            }
        });
        return { url };
    },
});
</script>

<style lang="less">
</style
>;
