提交 24bb9444 authored 作者: lidongxu's avatar lidongxu

Merge branch 'release' into dev

import { createWebHashHistory, createRouter } from 'vue-router'
import { createWebHashHistory, createRouter, createWebHistory } from 'vue-router'
/* Layout */
import Layout from '@/layout'
import { isMobile } from '@/utils'
......@@ -26,8 +26,26 @@ import { isMobile } from '@/utils'
*/
// 使用的路由
export let constantRoutes = []
export const publicRoutes = [
{
path: '/report/jmreport/view/:id',
component: () => import('@/views/jimureport/entry.vue'),
hidden: true
},
{
path: '/report/jmreport/index/:id',
component: () => import('@/views/jimureport/entry.vue'),
hidden: true
},
{
path: '/report/jmreport/shareView/:id',
component: () => import('@/views/jimureport/entry.vue'),
hidden: true
}
]
// PC端 公共路由
export const constantPCRoutes = [
...publicRoutes,
{
path: '/redirect',
component: Layout,
......@@ -90,6 +108,7 @@ export const constantPCRoutes = [
]
// 移动端 公共路由
export const constantMobileRoutes = [
...publicRoutes,
{
path: '/login',
component: () => import('@/views/login'),
......@@ -218,7 +237,8 @@ export const dynamicRoutes = [
]
const router = createRouter({
history: createWebHashHistory(),
// 路由模式:createWebHashHistory,createWebHistory
history: createWebHistory(),
routes: isMobile() ? [...constantMobileRoutes] : [...constantPCRoutes], // 移动端单独静态公共路由表
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {
......
......@@ -263,7 +263,7 @@ const getReportEditUrl = (row) => {
// 新建报表
const handleAdd = async () => {
const res = await addReportAPI()
window.open(`${reportBaseDomain}${reportEditURL}/${res.result.id}?menuType=${queryParams.reportType}`)
window.open(`${reportBaseDomain}${reportEditURL}/${res.result.id}?&token=${getToken()}&tenantId=${userStore.$state.userInfo.deptId}&menuType=${queryParams.reportType}`)
}
// 导入报表
const handleImport = () => {
......@@ -280,7 +280,6 @@ const handleImport = () => {
}).catch(err => {
proxy.$modal.msgError(err)
})
}
// 浏览报表
const handleView = (row) => {
......
<template>
<iframe
:src="openUrl"
frameborder="0"></iframe>
</template>
<script setup>
const reportBaseDomain = import.meta.env.VITE_APP_REPORT_URL // 基础域名
const route = useRoute()
const openUrl = reportBaseDomain + route.fullPath
</script>
<style scoped
lang="scss">
iframe {
width: 100%;
height: 100%;
}
</style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论