✨ 新页面打开执行日志.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<a-link target="_blank" href="https://gitee.com/lijiahangmax/orion-ops-pro">gitee</a-link>
|
||||
<a-link target="_blank" href="https://lijiahangmax.gitee.io/orion-ops-pro">文档</a-link>
|
||||
<a-link target="_blank" href="https://github.com/lijiahangmax/orion-ops-pro/blob/main/LICENSE">License</a-link>
|
||||
<span title="当前版本">v{{ version }}</span>
|
||||
<a-link target="_blank" :href="`https://github.com/lijiahangmax/orion-ops-pro/releases/tag/v${version}`">v{{ version }} 开源版</a-link>
|
||||
</a-space>
|
||||
<span class="copyright">
|
||||
Copyright<icon-copyright /> 2024 Li Jiahang All rights reserved.
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<a-button class="nav-btn"
|
||||
type="outline"
|
||||
shape="circle"
|
||||
@click="openNewRoute('terminal')">
|
||||
@click="openNewRoute({ name: 'terminal' })">
|
||||
<template #icon>
|
||||
<icon-code-square />
|
||||
</template>
|
||||
@@ -213,10 +213,10 @@
|
||||
import { openAppSettingKey, toggleDrawerMenuKey } from '@/types/symbol';
|
||||
import { preferenceTipsKey } from './const';
|
||||
import { REDIRECT_ROUTE_NAME, routerToTag } from '@/router/constants';
|
||||
import { openWindow } from '@/utils';
|
||||
import { openNewRoute } from '@/router';
|
||||
import MenuTree from '@/components/system/menu/tree/index.vue';
|
||||
import UpdatePasswordModal from '@/components/user/user/update-password-modal/index.vue';
|
||||
import MessageBox from '@/components/system/message-box/index.vue';
|
||||
import UpdatePasswordModal from '@/components/user/user/update-password-modal/index.vue';
|
||||
|
||||
const tipsStore = useTipsStore();
|
||||
const appStore = useAppStore();
|
||||
@@ -280,12 +280,6 @@
|
||||
triggerMouseEvent(localeRef);
|
||||
};
|
||||
|
||||
// 打开新页面
|
||||
const openNewRoute = (name: string) => {
|
||||
const { href } = router.resolve({ name });
|
||||
openWindow(href);
|
||||
};
|
||||
|
||||
// 刷新页面
|
||||
const reloadCurrent = async () => {
|
||||
if (appStore.tabBar) {
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
|
||||
// 加载字典值
|
||||
onMounted(async () => {
|
||||
await loadKeys([...dictKeys]);
|
||||
await loadKeys(dictKeys);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@@ -25,12 +25,13 @@
|
||||
<script lang="ts" setup>
|
||||
import type { ExecLogQueryResponse } from '@/api/exec/exec-log';
|
||||
import type { ILogAppender } from './const';
|
||||
import { onUnmounted, ref, nextTick } from 'vue';
|
||||
import { onUnmounted, ref, nextTick, onMounted } from 'vue';
|
||||
import { getExecLogStatus } from '@/api/exec/exec-log';
|
||||
import { execHostStatus, execStatus } from './const';
|
||||
import { dictKeys, execHostStatus, execStatus } from './const';
|
||||
import ExecHost from './exec-host.vue';
|
||||
import LogView from './log-view.vue';
|
||||
import LogAppender from '@/components/exec/log/panel/log-appender';
|
||||
import { useDictStore } from '@/store';
|
||||
|
||||
const props = defineProps<{
|
||||
visibleBack: boolean
|
||||
@@ -145,12 +146,18 @@
|
||||
clearInterval(finishIntervalId.value);
|
||||
};
|
||||
|
||||
// 加载字典值
|
||||
onMounted(async () => {
|
||||
const dictStore = useDictStore();
|
||||
await dictStore.loadKeys(dictKeys);
|
||||
});
|
||||
|
||||
onUnmounted(closeAll);
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@host-width: 420px;
|
||||
@host-width: 380px;
|
||||
@host-real-width: @host-width + 16px;
|
||||
|
||||
.log-panel-container {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
import { useAppStore } from '@/store';
|
||||
import { listenerRouteChange } from '@/utils/route-listener';
|
||||
import { openWindow, regexUrl } from '@/utils';
|
||||
import { openNewRoute } from '@/router';
|
||||
import useMenuTree from './use-menu-tree';
|
||||
|
||||
export default defineComponent({
|
||||
@@ -39,10 +40,9 @@
|
||||
const { hideInMenu, activeMenu, newWindow } = item.meta as RouteMeta;
|
||||
// 新页面打开
|
||||
if (newWindow || e.ctrlKey) {
|
||||
const { href } = router.resolve({
|
||||
openNewRoute({
|
||||
name: item.name,
|
||||
});
|
||||
openWindow(href);
|
||||
return;
|
||||
}
|
||||
// 设置 selectedKey
|
||||
|
||||
Reference in New Issue
Block a user