mirror of
https://gitee.com/dromara/go-view.git
synced 2025-10-13 22:12:11 +08:00
style: 初始化 禁用一些页面 跳转改为让宿主执行
This commit is contained in:
parent
81e2e4784d
commit
b9268d89ec
6
.env
6
.env
@ -2,7 +2,9 @@
|
||||
VITE_DEV_PORT = '8080'
|
||||
|
||||
# development path
|
||||
VITE_DEV_PATH = 'https://demo.mtruning.club'
|
||||
# VITE_DEV_PATH = 'https://demo.mtruning.club'
|
||||
VITE_DEV_PATH = 'http://192.168.0.120:3001'
|
||||
|
||||
# production path
|
||||
VITE_PRO_PATH = 'https://demo.mtruning.club'
|
||||
# VITE_PRO_PATH = 'https://demo.mtruning.club'
|
||||
VITE_PRO_PATH = 'http://192.168.0.120:3001'
|
||||
|
@ -109,11 +109,3 @@ export const http = (type?: RequestHttpEnum) => {
|
||||
* build: 影响项目构建或依赖修改
|
||||
* style: 不影响程序逻辑的代码修改
|
||||
* chore: 不属于以上类型的其他类型(日常事务)
|
||||
|
||||
## 交流
|
||||
|
||||
QQ 群:1030129384
|
||||
|
||||

|
||||
|
||||

|
||||
|
@ -10,7 +10,7 @@
|
||||
<slot name="ri-left"></slot>
|
||||
</template>
|
||||
<template #ri-right>
|
||||
<go-user-info></go-user-info>
|
||||
<!-- <go-user-info></go-user-info> -->
|
||||
<slot name="ri-right"></slot>
|
||||
</template>
|
||||
</layout-header>
|
||||
|
@ -28,7 +28,7 @@ const RootRoute: Array<RouteRecordRaw> = [
|
||||
]
|
||||
|
||||
|
||||
export const constantRouter: any[] = [LoginRoute, ...RootRoute, ReloadRoute];
|
||||
export const constantRouter: any[] = [...RootRoute, ReloadRoute];
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(''),
|
||||
|
@ -28,9 +28,9 @@ export function createRouterGuards(router: Router) {
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
if (!routerAllowList.includes(to.name) && !loginCheck()) {
|
||||
next({ name: PageEnum.BASE_LOGIN_NAME })
|
||||
}
|
||||
// if (!routerAllowList.includes(to.name) && !loginCheck()) {
|
||||
// next({ name: PageEnum.BASE_LOGIN_NAME })
|
||||
// }
|
||||
next()
|
||||
})
|
||||
|
||||
|
@ -62,12 +62,27 @@ export const routerTurnByPath = (
|
||||
path: string,
|
||||
query?: Array<string | number>,
|
||||
isReplace?: boolean,
|
||||
windowOpen?: boolean
|
||||
windowOpen?: boolean,
|
||||
isCallByParent?: boolean
|
||||
) => {
|
||||
let fullPath = ''
|
||||
if (query?.length) {
|
||||
fullPath = `${path}/${query.join('/')}`
|
||||
}
|
||||
if (isCallByParent) {
|
||||
// 获取父页面的 window 对象
|
||||
var parentWindow = window.parent;
|
||||
const message = {
|
||||
// 属于哪个页面
|
||||
page: 'customLargeScreen',
|
||||
// 属于什么类型
|
||||
type: 'changeRouter',
|
||||
url: fullPath,
|
||||
openNew: windowOpen ? 1 : 0
|
||||
}
|
||||
parentWindow.postMessage(JSON.stringify(message), '*');
|
||||
return
|
||||
}
|
||||
if (windowOpen) {
|
||||
return openNewWindow(fullPath)
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ const editHandle = () => {
|
||||
if (!path) return
|
||||
const id = fetchRouteParamsLocation()
|
||||
updateToSession(id)
|
||||
routerTurnByPath(path, [id], undefined, true)
|
||||
routerTurnByPath(path, [id], undefined, true, true)
|
||||
}, 2000)
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ const previewHandle = () => {
|
||||
setSessionStorage(StorageEnum.GO_CHART_STORAGE_LIST, [{ id: previewId, ...storageInfo }])
|
||||
}
|
||||
// 跳转
|
||||
routerTurnByPath(path, [previewId], undefined, true)
|
||||
routerTurnByPath(path, [previewId], undefined, true, true)
|
||||
}
|
||||
|
||||
// 模态弹窗
|
||||
|
@ -102,7 +102,7 @@ function importJSON() {
|
||||
}
|
||||
|
||||
// 同步数据编辑页
|
||||
window.opener.addEventListener(SavePageEnum.CHART, (e: any) => {
|
||||
window?.opener?.addEventListener(SavePageEnum.CHART, (e: any) => {
|
||||
window['$message'].success('正在进行更新...')
|
||||
setSessionStorage(StorageEnum.GO_CHART_STORAGE_LIST, [e.detail])
|
||||
content.value = JSONStringify(e.detail)
|
||||
|
@ -27,16 +27,16 @@
|
||||
import { ProjectLayoutSider } from './layout/components/ProjectLayoutSider'
|
||||
import { LayoutHeaderPro } from '@/layout/components/LayoutHeaderPro'
|
||||
import { LayoutTransitionMain } from '@/layout/components/LayoutTransitionMain/index'
|
||||
import { goDialog } from '@/utils'
|
||||
// import { goDialog } from '@/utils'
|
||||
|
||||
// 提示
|
||||
goDialog({
|
||||
message: '不要在官方后端上发布任何私密数据,任何人都看得到并进行删除!!!!',
|
||||
isMaskClosable: true,
|
||||
closeNegativeText: true,
|
||||
transformOrigin: 'center',
|
||||
onPositiveCallback: () => {}
|
||||
})
|
||||
// // 提示
|
||||
// goDialog({
|
||||
// message: '不要在官方后端上发布任何私密数据,任何人都看得到并进行删除!!!!',
|
||||
// isMaskClosable: true,
|
||||
// closeNegativeText: true,
|
||||
// transformOrigin: 'center',
|
||||
// onPositiveCallback: () => {}
|
||||
// })
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -23,7 +23,7 @@ export const useModalDataInit = () => {
|
||||
const editHandle = (cardData: Chartype) => {
|
||||
if (!cardData) return
|
||||
const path = fetchPathByName(ChartEnum.CHART_HOME_NAME, 'href')
|
||||
routerTurnByPath(path, [cardData.id], undefined, true)
|
||||
routerTurnByPath(path, [cardData.id], undefined, true, true)
|
||||
}
|
||||
|
||||
// 预览处理
|
||||
|
@ -26,7 +26,8 @@
|
||||
<n-text>{{ $t('global.doc') }}</n-text>
|
||||
</n-button>
|
||||
|
||||
<n-tooltip v-if="collapsed" placement="right" trigger="hover">
|
||||
<!-- 官方地址 -->
|
||||
<!-- <n-tooltip v-if="collapsed" placement="right" trigger="hover">
|
||||
<template #trigger>
|
||||
<n-button secondary @click="handleDoc">
|
||||
<template #icon>
|
||||
@ -48,7 +49,7 @@
|
||||
</n-icon>
|
||||
</template>
|
||||
<n-text v-show="!collapsed">{{ $t('global.code_addr') }}</n-text>
|
||||
</n-button>
|
||||
</n-button> -->
|
||||
</n-space>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -100,7 +100,7 @@ const btnHandle = async (key: string) => {
|
||||
|
||||
const { id } = res.data
|
||||
const path = fetchPathByName(ChartEnum.CHART_HOME_NAME, 'href')
|
||||
routerTurnByPath(path, [id], undefined, true)
|
||||
routerTurnByPath(path, [id], undefined, true, true)
|
||||
closeHandle()
|
||||
}
|
||||
} catch (error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user