仪评指标联分析模块
This commit is contained in:
@@ -2,97 +2,105 @@
|
||||
import type {
|
||||
WorkbenchProjectItem,
|
||||
WorkbenchQuickNavItem,
|
||||
} from "@vben/common-ui";
|
||||
} from '@vben/common-ui';
|
||||
|
||||
import { useRouter } from "vue-router";
|
||||
import { WorkbenchHeader, WorkbenchQuickNav } from "@vben/common-ui";
|
||||
import { preferences } from "@vben/preferences";
|
||||
import { useUserStore } from "@vben/stores";
|
||||
import { openWindow } from "@vben/utils";
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import { WorkbenchHeader, WorkbenchQuickNav } from '@vben/common-ui';
|
||||
import { preferences } from '@vben/preferences';
|
||||
import { useUserStore } from '@vben/stores';
|
||||
import { openWindow } from '@vben/utils';
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
// 同样,这里的 url 也可以使用以 http 开头的外部链接
|
||||
const cv: WorkbenchQuickNavItem[] = [
|
||||
{
|
||||
color: "#3fb27f",
|
||||
color: '#3fb27f',
|
||||
authority: ['iva'],
|
||||
icon: "mdi:video",
|
||||
title: "视频智能分析",
|
||||
url: "/cv/iva"
|
||||
icon: 'mdi:video',
|
||||
title: '视频智能分析',
|
||||
url: '/cv/iva',
|
||||
},
|
||||
{
|
||||
color: "#3fb27f",
|
||||
color: '#3fb27f',
|
||||
authority: ['sca'],
|
||||
icon: "mdi:ice-cream",
|
||||
title: "蚕茧仪评分析",
|
||||
url: "/cv/sca"
|
||||
icon: 'mdi:ice-cream',
|
||||
title: '蚕茧仪评分析',
|
||||
url: '/cv/sca',
|
||||
},
|
||||
{
|
||||
color: "#3fb27f",
|
||||
color: '#3fb27f',
|
||||
authority: ['ysa'],
|
||||
icon: "mdi:waveform",
|
||||
title: "催青阶段分析",
|
||||
url: "/cv/ysa"
|
||||
icon: 'mdi:waveform',
|
||||
title: '催青阶段分析',
|
||||
url: '/cv/ysa',
|
||||
},
|
||||
{
|
||||
color: "#3fb27f",
|
||||
icon: "ion:bar-chart-outline",
|
||||
title: "标注平台入口",
|
||||
color: '#3fb27f',
|
||||
authority: ['ticket'],
|
||||
icon: 'mdi:ticket-confirmation',
|
||||
title: '仪评指标联分析',
|
||||
url: '/cv/ticket',
|
||||
},
|
||||
{
|
||||
color: '#3fb27f',
|
||||
icon: 'ion:bar-chart-outline',
|
||||
title: '标注平台入口',
|
||||
authority: ['user'],
|
||||
url: "http://171.212.101.199:13013/"
|
||||
url: 'http://171.212.101.199:13013/',
|
||||
},
|
||||
];
|
||||
const llm: WorkbenchQuickNavItem[] = [
|
||||
{
|
||||
color: "#1fdaca",
|
||||
color: '#1fdaca',
|
||||
authority: ['bot'],
|
||||
icon: "mdi:face-agent",
|
||||
title: "通用智能体",
|
||||
url: "/llm/bot"
|
||||
icon: 'mdi:face-agent',
|
||||
title: '通用智能体',
|
||||
url: '/llm/bot',
|
||||
},
|
||||
{
|
||||
color: "#1fdaca",
|
||||
color: '#1fdaca',
|
||||
authority: ['report'],
|
||||
icon: 'mdi:set-center',
|
||||
title: "智农观数阁",
|
||||
url: "/llm/report/report-chat"
|
||||
title: '智农观数阁',
|
||||
url: '/llm/report/report-chat',
|
||||
},
|
||||
{
|
||||
color: "#1fdaca",
|
||||
color: '#1fdaca',
|
||||
authority: ['service'],
|
||||
icon: 'mdi:android-head',
|
||||
title: "灵思智服阁",
|
||||
url: "/llm/service/service-chat"
|
||||
title: '灵思智服阁',
|
||||
url: '/llm/service/service-chat',
|
||||
},
|
||||
];
|
||||
const common: WorkbenchQuickNavItem[] = [
|
||||
{
|
||||
color: "#bf0c2c",
|
||||
color: '#bf0c2c',
|
||||
authority: ['remote'],
|
||||
icon: "carbon:workspace",
|
||||
title: "设备远程控制",
|
||||
url: "/remote"
|
||||
icon: 'carbon:workspace',
|
||||
title: '设备远程控制',
|
||||
url: '/remote',
|
||||
},
|
||||
{
|
||||
color: "#bf0c2c",
|
||||
color: '#bf0c2c',
|
||||
icon: 'ion:grid-outline',
|
||||
title: "RAGFlow",
|
||||
title: 'RAGFlow',
|
||||
authority: ['user'],
|
||||
url: "/out/rag"
|
||||
url: '/out/rag',
|
||||
},
|
||||
];
|
||||
const router = useRouter();
|
||||
|
||||
// 这是一个示例方法,实际项目中需要根据实际情况进行调整
|
||||
function navTo(nav: WorkbenchProjectItem | WorkbenchQuickNavItem) {
|
||||
if (nav.url?.startsWith("http")) {
|
||||
if (nav.url?.startsWith('http')) {
|
||||
openWindow(nav.url);
|
||||
return;
|
||||
}
|
||||
if (nav.url?.startsWith("/")) {
|
||||
if (nav.url?.startsWith('/')) {
|
||||
router.push(nav.url).catch((error) => {
|
||||
console.error("Navigation failed:", error);
|
||||
console.error('Navigation failed:', error);
|
||||
});
|
||||
} else {
|
||||
console.warn(`Unknown URL for navigation item: ${nav.title} -> ${nav.url}`);
|
||||
@@ -101,10 +109,10 @@ function navTo(nav: WorkbenchProjectItem | WorkbenchQuickNavItem) {
|
||||
|
||||
function getGreeting() {
|
||||
const hour = new Date().getHours();
|
||||
if (hour < 6) return "凌晨好";
|
||||
if (hour < 12) return "早安";
|
||||
if (hour < 18) return "下午好";
|
||||
return "晚上好";
|
||||
if (hour < 6) return '凌晨好';
|
||||
if (hour < 12) return '早安';
|
||||
if (hour < 18) return '下午好';
|
||||
return '晚上好';
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user