全景数字地图更新
Showing
4 changed files
with
95 additions
and
2 deletions
| ... | @@ -242,6 +242,28 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -242,6 +242,28 @@ const routes: RouteRecordRaw[] = [ |
| 242 | } | 242 | } |
| 243 | } | 243 | } |
| 244 | ] | 244 | ] |
| 245 | }, | ||
| 246 | { | ||
| 247 | path: '/data-meta/portraitMap', | ||
| 248 | component: Layout, | ||
| 249 | meta: { | ||
| 250 | title: '全景地图', | ||
| 251 | icon: 'sidebar-videos', | ||
| 252 | }, | ||
| 253 | children: [ | ||
| 254 | { | ||
| 255 | path: '', | ||
| 256 | name: 'portraitMap', | ||
| 257 | component: () => import('@/views/data_meta/portraitMap.vue'), | ||
| 258 | meta: { | ||
| 259 | title: '全景地图', | ||
| 260 | sidebar: false, | ||
| 261 | breadcrumb: false, | ||
| 262 | cache: true, | ||
| 263 | reuse: true | ||
| 264 | }, | ||
| 265 | } | ||
| 266 | ] | ||
| 245 | } | 267 | } |
| 246 | ] | 268 | ] |
| 247 | 269 | ... | ... |
| ... | @@ -177,6 +177,9 @@ const useMenuStore = defineStore( | ... | @@ -177,6 +177,9 @@ const useMenuStore = defineStore( |
| 177 | if ((data== "/data-meta/reports/iframePage" || data== "/data-meta/report/budgetDataIndex") && r.path?.includes('/data-meta/report')) { | 177 | if ((data== "/data-meta/reports/iframePage" || data== "/data-meta/report/budgetDataIndex") && r.path?.includes('/data-meta/report')) { |
| 178 | return true; | 178 | return true; |
| 179 | } | 179 | } |
| 180 | if (data== "/data-meta/portraitMap" && r.path?.includes('/data-meta/portraitMap')) { | ||
| 181 | return true; | ||
| 182 | } | ||
| 180 | if (data.indexOf(`${r.path}/`) === 0 || data === r.path) { | 183 | if (data.indexOf(`${r.path}/`) === 0 || data === r.path) { |
| 181 | return true; | 184 | return true; |
| 182 | } | 185 | } | ... | ... |
| ... | @@ -157,9 +157,9 @@ const useRouteStore = defineStore( | ... | @@ -157,9 +157,9 @@ const useRouteStore = defineStore( |
| 157 | }; | 157 | }; |
| 158 | } | 158 | } |
| 159 | r = routes.find((route: any) => { | 159 | r = routes.find((route: any) => { |
| 160 | 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'))); | 160 | 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'))); |
| 161 | }); | 161 | }); |
| 162 | if (r && (path.includes('budgetDataIndex') || path.includes('iframePage'))) { | 162 | if (r && (path.includes('budgetDataIndex') || path.includes('iframePage')) || path.includes('portraitMap')) { |
| 163 | r.path = path; | 163 | r.path = path; |
| 164 | } | 164 | } |
| 165 | if(r && m.icon && m.icon !== "{}") { | 165 | if(r && m.icon && m.icon !== "{}") { | ... | ... |
src/views/data_meta/portraitMap.vue
0 → 100644
| 1 | <route lang="yaml"> | ||
| 2 | # 组件名称 | ||
| 3 | name: "" | ||
| 4 | </route> | ||
| 5 | |||
| 6 | <template> | ||
| 7 | <div class="container_wrap" v-loading="loading"> | ||
| 8 | <iframe :src="link" frameborder="0" @load="iframeLoad"></iframe> | ||
| 9 | </div> | ||
| 10 | </template> | ||
| 11 | |||
| 12 | <script lang="ts" setup name="portraitMap"> | ||
| 13 | |||
| 14 | import { ref, reactive, computed } from "vue"; | ||
| 15 | |||
| 16 | import { JSEncrypt } from 'jsencrypt'; | ||
| 17 | import useUserStore from '@/store/modules/user' | ||
| 18 | const route = useRoute() | ||
| 19 | |||
| 20 | const encryptor = new JSEncrypt() | ||
| 21 | const publicKey = '-----BEGIN PUBLIC KEY-----MIGeMA0GCSqGSIb3DQEBAQUAA4GMADCBiAKBgFiv3Ko6rOBvWDK96tIExpdyuuQAGgZo0YmQxpT10hD3qu/MnNKlIJgo4+NwUHcwpleKE2DBOxgvCeMtUoP4FDWt8q18X+4+7t8p0D/57NhA0liNKQ/Ise6b5i293ht1XPen3XhR5xIcDNxauQ5vKqdwwzhoonsbJDtbowoinLQbAgMBAAE=-----END PUBLIC KEY-----'; | ||
| 22 | function encrypt(txt) { | ||
| 23 | encryptor.setPublicKey(publicKey) // 设置公钥 | ||
| 24 | return encryptor.encrypt(txt); // 对数据进行加密 | ||
| 25 | } | ||
| 26 | const userStore = useUserStore() | ||
| 27 | const userInfoData = JSON.parse(localStorage.userData) | ||
| 28 | const url: any = 'https://scm-operation-test.csbr.cn/portraitBMap?fUrl=portraitMap'; | ||
| 29 | // const url: any = 'http://localhost:8086/portraitBMap?fUrl=portraitMap'; | ||
| 30 | |||
| 31 | const link = ref('') | ||
| 32 | const loading = ref(true); | ||
| 33 | const iframeLoad = () => { | ||
| 34 | loading.value = false; | ||
| 35 | } | ||
| 36 | |||
| 37 | // 搜索区域的schema | ||
| 38 | onBeforeMount(() => { | ||
| 39 | const loginInfo = JSON.stringify({ | ||
| 40 | username: '13822222222', | ||
| 41 | pwd: '666666', | ||
| 42 | timestamp: new Date().getTime() | ||
| 43 | }) | ||
| 44 | let linkValue = decodeURIComponent(url) + '&loginInfo=' + encodeURI(encrypt(loginInfo)); | ||
| 45 | link.value = linkValue; | ||
| 46 | }); | ||
| 47 | |||
| 48 | onActivated(() => { | ||
| 49 | let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === route.fullPath); | ||
| 50 | if (tab) { | ||
| 51 | tab.meta.title = route.query.title || '全景地图'; | ||
| 52 | } | ||
| 53 | }) | ||
| 54 | |||
| 55 | </script> | ||
| 56 | |||
| 57 | <style lang="scss" scoped> | ||
| 58 | .container_wrap { | ||
| 59 | width: 100%; | ||
| 60 | height: 100%; | ||
| 61 | padding: 0; | ||
| 62 | |||
| 63 | iframe { | ||
| 64 | width: 100%; | ||
| 65 | height: 100%; | ||
| 66 | } | ||
| 67 | } | ||
| 68 | </style> |
-
Please register or sign in to post a comment