524ee142 by lxs

全景数字地图更新

1 parent 54426d6a
......@@ -242,6 +242,28 @@ const routes: RouteRecordRaw[] = [
}
}
]
},
{
path: '/data-meta/portraitMap',
component: Layout,
meta: {
title: '全景地图',
icon: 'sidebar-videos',
},
children: [
{
path: '',
name: 'portraitMap',
component: () => import('@/views/data_meta/portraitMap.vue'),
meta: {
title: '全景地图',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true
},
}
]
}
]
......
......@@ -177,6 +177,9 @@ const useMenuStore = defineStore(
if ((data== "/data-meta/reports/iframePage" || data== "/data-meta/report/budgetDataIndex") && r.path?.includes('/data-meta/report')) {
return true;
}
if (data== "/data-meta/portraitMap" && r.path?.includes('/data-meta/portraitMap')) {
return true;
}
if (data.indexOf(`${r.path}/`) === 0 || data === r.path) {
return true;
}
......
......@@ -157,9 +157,9 @@ const useRouteStore = defineStore(
};
}
r = routes.find((route: any) => {
return route.path === path || route.path === m.path || `/${route.path}` === m.path || ((path.includes('budgetDataIndex') && path.includes('/data-meta/report') && route.path.includes('/data-meta/report')) || (path.includes('iframePage') && path.includes('/data-meta/report')));
return route.path === path || route.path === m.path || `/${route.path}` === m.path || ((path.includes('budgetDataIndex') && path.includes('/data-meta/report') && route.path.includes('/data-meta/report')) || (path.includes('iframePage') && path.includes('/data-meta/report')) || (path.includes('/data-meta/portraitMap') && route.path.includes('/data-meta/portraitMap')));
});
if (r && (path.includes('budgetDataIndex') || path.includes('iframePage'))) {
if (r && (path.includes('budgetDataIndex') || path.includes('iframePage')) || path.includes('portraitMap')) {
r.path = path;
}
if(r && m.icon && m.icon !== "{}") {
......
<route lang="yaml">
# 组件名称
name: ""
</route>
<template>
<div class="container_wrap" v-loading="loading">
<iframe :src="link" frameborder="0" @load="iframeLoad"></iframe>
</div>
</template>
<script lang="ts" setup name="portraitMap">
import { ref, reactive, computed } from "vue";
import { JSEncrypt } from 'jsencrypt';
import useUserStore from '@/store/modules/user'
const route = useRoute()
const encryptor = new JSEncrypt()
const publicKey = '-----BEGIN PUBLIC KEY-----MIGeMA0GCSqGSIb3DQEBAQUAA4GMADCBiAKBgFiv3Ko6rOBvWDK96tIExpdyuuQAGgZo0YmQxpT10hD3qu/MnNKlIJgo4+NwUHcwpleKE2DBOxgvCeMtUoP4FDWt8q18X+4+7t8p0D/57NhA0liNKQ/Ise6b5i293ht1XPen3XhR5xIcDNxauQ5vKqdwwzhoonsbJDtbowoinLQbAgMBAAE=-----END PUBLIC KEY-----';
function encrypt(txt) {
encryptor.setPublicKey(publicKey) // 设置公钥
return encryptor.encrypt(txt); // 对数据进行加密
}
const userStore = useUserStore()
const userInfoData = JSON.parse(localStorage.userData)
const url: any = 'https://scm-operation-test.csbr.cn/portraitBMap?fUrl=portraitMap';
// const url: any = 'http://localhost:8086/portraitBMap?fUrl=portraitMap';
const link = ref('')
const loading = ref(true);
const iframeLoad = () => {
loading.value = false;
}
// 搜索区域的schema
onBeforeMount(() => {
const loginInfo = JSON.stringify({
username: '13822222222',
pwd: '666666',
timestamp: new Date().getTime()
})
let linkValue = decodeURIComponent(url) + '&loginInfo=' + encodeURI(encrypt(loginInfo));
link.value = linkValue;
});
onActivated(() => {
let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === route.fullPath);
if (tab) {
tab.meta.title = route.query.title || '全景地图';
}
})
</script>
<style lang="scss" scoped>
.container_wrap {
width: 100%;
height: 100%;
padding: 0;
iframe {
width: 100%;
height: 100%;
}
}
</style>
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!