<script setup>
import { ref, reactive, onMounted } from 'vue'
import { useRoute } from "vue-router"

const route = useRoute()

let url = ref('')
function init(){
    const {startDate,endDate,edbInfoId,matterType,permissionId,permissionName} = route.query
    const queryObj={
        startDate,//当前月起始日
        endDate,//当前月终止日
        edbInfoId,//选中的指标id
        matterType,//指标类型
        permissionId,//品种id
        token:localStorage.getItem('token'),
        timestamp:new Date().getTime(),//防止缓存
    }
    let queryObjStr=''
    for (const key in queryObj) {
        if(!queryObjStr){
                queryObjStr=`${key}=${queryObj[key]}`
        }else{
            queryObjStr=`${queryObjStr}&${key}=${queryObj[key]}`
        }
    }
    const h5BaseUrl = import.meta.env.MODE==='production'?'https://details.hzinsights.com':'https://xcxh5test.hzinsights.com/xcx_h5'
    const baseUrl = h5BaseUrl+'/hzyb/forex/detail?'
    url.value = baseUrl+queryObjStr
    //document.title = startDate+permissionName+'事项详情'
}
init()
</script>

<template>
    <div class="edb-detail-pc-wrap">
        <iframe id='iframe' :src="url"></iframe>
    </div>
</template>

<style scoped lang="scss">
.edb-detail-pc-wrap{
    iframe{
        width: 100%;
        height: 800px;
        border: none;
    }
}
</style>
