1、解决在线用户强制退出功能 2、初始化系统配置,应用全局 3、预留功能:将把vuex改用pinia(下次上线)

This commit is contained in:
zhangtao
2025-01-10 08:10:12 +08:00
parent 4e15f2ad3d
commit 8d9a64aed3
13 changed files with 136 additions and 32 deletions
+4 -3
View File
@@ -81,12 +81,13 @@ const pageSize = ref(10);
const queryState = ref<QueryState>({
ipaddr: undefined,
user_name: undefined
name: undefined
});
const columns = [
{ title: '会话编号', dataIndex: 'session_id', key: 'sessionId', ellipsis: true },
{ title: '登录名称', dataIndex: 'user_name', key: 'userName', align: 'center', ellipsis: true },
{ title: '登录名称', dataIndex: 'name', key: 'name', align: 'center', ellipsis: true },
{ title: '用户账号', dataIndex: 'user_name', key: 'userName', align: 'center', ellipsis: true },
{ title: '主机', dataIndex: 'ipaddr', key: 'ipaddr', align: 'center', ellipsis: true },
{ title: '登录地点', dataIndex: 'login_location', key: 'loginLocation', align: 'center', ellipsis: true },
{ title: '操作系统', dataIndex: 'os', key: 'os', align: 'center', ellipsis: true },
@@ -146,7 +147,7 @@ const handleForceLogout = (row: OnlineUser) => {
content: `是否确认强退名称为"${row.user_name}"的用户?`,
async onOk() {
try {
await deleteOnline(row.session_id);
await deleteOnline(row.user_name);
await getList();
message.success('强退成功');
} catch (error) {
+2 -1
View File
@@ -1,12 +1,13 @@
export interface QueryState {
ipaddr?: string;
user_name?: string;
name?: string;
login_location?: string;
}
export interface OnlineUser {
session_id: string;
user_id: number;
name: string;
user_name: string;
ipaddr: string;
login_location: string;
@@ -34,6 +34,7 @@
:rowKey="record => record.id"
:tree-data="deptTreeData"
:defaultExpandAll="true"
:scroll="{ y: 1000 }"
:field-names="{ children: 'children', title: 'name', key: 'id' }"
@check="deptTreeCheck" checkable checkStrictly style="margin-top: 15px;" />
</div>
@@ -60,7 +61,7 @@
:data-source="menuTreeData"
:row-selection="menuRowSelection"
:loading="tableLoading"
:scroll="{ x: 500 }"
:scroll="{ y: 1000 }"
:pagination="false"
:style="{ minHeight: '700px' }"
:expandAll="true">