From 08e7dc4d33968f0d26973f533cf3566990053690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=BA=A2=E4=B8=BD?= <1181930680@qq.com> Date: Mon, 18 Nov 2024 17:07:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/generator-routers.ts | 3 +- src/views/monitor/online/columns.ts | 58 ------------------ src/views/monitor/online/index.vue | 92 +++++++++++++++++++++++------ 3 files changed, 77 insertions(+), 76 deletions(-) delete mode 100644 src/views/monitor/online/columns.ts diff --git a/src/router/generator-routers.ts b/src/router/generator-routers.ts index bef1c61..b40dddf 100644 --- a/src/router/generator-routers.ts +++ b/src/router/generator-routers.ts @@ -20,7 +20,7 @@ LayoutMap.set('IFRAME', Iframe); */ export const routerGenerator = (routerMap): any[] => { return routerMap.map((item) => { - const names = /http(s)?:/.test(item.component)?item.component:item.path.replaceAll('/','') + const names = item.target == 2 ? item.component : item.path.replaceAll('/', ''); item.meta = { title:item.parentId==0 && item.children.length==0?'':item.name, icon:constantRouterIcon[item.icon2]|| null, @@ -107,6 +107,7 @@ export const generatorDynamicRouter = (): Promise => { adminMenus() .then((result) => { const routeList = routerGenerator(result) + console.log(routeList) asyncImportRoute(routeList); resolve(routeList); }) diff --git a/src/views/monitor/online/columns.ts b/src/views/monitor/online/columns.ts deleted file mode 100644 index abf3443..0000000 --- a/src/views/monitor/online/columns.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { h } from 'vue'; - -export const columns = [ - { - title: '序号', - render: (_, index) => { - return `${index + 1}` - }, - fixed: 'left', - width: 80, - }, - { - title: '会话编号', - key: 'tokenId', - width: 300, - }, - { - title: '登录名称', - key: 'username', - width: 100, - }, - { - title: '部门名称', - key: 'deptName', - width: 150, - }, - { - title: 'IP地址', - key: 'ipAddr', - width: 150, - }, - { - title: '登录地点', - key: 'loginLocation', - width: 100, - }, - { - title: '浏览器', - key: 'browser', - width: 150, - }, - { - title: '操作系统', - key: 'os', - width: 150, - }, - { - title: '登录时间', - key: 'loginTime', - width: 180, - }, - { - title: '操作', - fixed: 'right', - key: 'action', - width: 100, - }, -]; diff --git a/src/views/monitor/online/index.vue b/src/views/monitor/online/index.vue index cd2f50d..b322684 100644 --- a/src/views/monitor/online/index.vue +++ b/src/views/monitor/online/index.vue @@ -11,18 +11,6 @@ - @@ -30,12 +18,12 @@