引入webSocket测试连接成功,后续在此基础上修改

This commit is contained in:
2025-07-29 16:06:38 +08:00
parent b0a7a76518
commit ceda60e919
9 changed files with 635 additions and 2 deletions

View File

@@ -155,6 +155,13 @@ export default {
icon: 'fas fa-cog',
bgColor: 'bg-indigo-500',
link: '/system/menu'
},
{
title: 'WebSocket测试',
description: '实时通信功能测试',
icon: 'fas fa-comments',
bgColor: 'bg-teal-500',
link: '/websocket-test.html'
}
],
resourceCharts: [
@@ -216,7 +223,12 @@ export default {
}
},
handleLink(item) {
this.$router.push(item);
// 如果是外部链接以http开头或.html结尾则在新窗口打开
if (item.startsWith('http') || item.endsWith('.html')) {
window.open(item, '_blank');
} else {
this.$router.push(item);
}
},
getGreeting() {
const hour = new Date().getHours();
@@ -236,6 +248,7 @@ export default {
case 'bg-purple-500': return 'bg-purple';
case 'bg-red-500': return 'bg-red';
case 'bg-indigo-500': return 'bg-indigo';
case 'bg-teal-500': return 'bg-teal';
default: return '';
}
},
@@ -449,6 +462,7 @@ export default {
.bg-purple { background: #a855f7; }
.bg-red { background: #ef4444; }
.bg-indigo { background: #6366f1; }
.bg-teal { background: #14b8a6; }
.business-module-title {
font-size: 16px;
font-weight: 500;