😎代码优化
This commit is contained in:
parent
852506182d
commit
761de56b49
@ -90,7 +90,7 @@
|
|||||||
"@vitejs/plugin-vue": "^5.1.3",
|
"@vitejs/plugin-vue": "^5.1.3",
|
||||||
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
||||||
"@vue/compiler-sfc": "^3.4.38",
|
"@vue/compiler-sfc": "^3.4.38",
|
||||||
"code-inspector-plugin": "^0.16.0",
|
"code-inspector-plugin": "^0.16.1",
|
||||||
"eslint": "^9.9.1",
|
"eslint": "^9.9.1",
|
||||||
"eslint-plugin-vue": "^9.27.0",
|
"eslint-plugin-vue": "^9.27.0",
|
||||||
"globals": "^15.8.0",
|
"globals": "^15.8.0",
|
||||||
|
|||||||
@ -21,12 +21,12 @@ import VForm3 from 'vform3-builds';
|
|||||||
import 'vform3-builds/dist/designer.style.css';
|
import 'vform3-builds/dist/designer.style.css';
|
||||||
// Vxe-Table
|
// Vxe-Table
|
||||||
import { setupVXETable } from '/@/hooks/setupVXETableHook';
|
import { setupVXETable } from '/@/hooks/setupVXETableHook';
|
||||||
|
// IM聊天框
|
||||||
|
import JwChat from 'jwchat';
|
||||||
|
import 'jwchat/lib/style.css';
|
||||||
// 关闭自动打印
|
// 关闭自动打印
|
||||||
import { disAutoConnect } from 'vue-plugin-hiprint';
|
import { disAutoConnect } from 'vue-plugin-hiprint';
|
||||||
disAutoConnect();
|
disAutoConnect();
|
||||||
// IM聊天框
|
|
||||||
import JwChat from 'jwchat';
|
|
||||||
import 'jwchat/style.css';
|
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
|
|
||||||
|
|||||||
3
Web/src/types/global.d.ts
vendored
3
Web/src/types/global.d.ts
vendored
@ -9,6 +9,9 @@ declare module 'qs';
|
|||||||
declare module 'sortablejs';
|
declare module 'sortablejs';
|
||||||
declare module 'vue-plugin-hiprint';
|
declare module 'vue-plugin-hiprint';
|
||||||
declare module 'vcrontab-3';
|
declare module 'vcrontab-3';
|
||||||
|
declare module 'vue-signature-pad';
|
||||||
|
declare module 'vform3-builds';
|
||||||
|
declare module 'jwchat';
|
||||||
|
|
||||||
// 声明一个模块,防止引入文件时报错
|
// 声明一个模块,防止引入文件时报错
|
||||||
declare module '*.json';
|
declare module '*.json';
|
||||||
|
|||||||
3
Web/src/views/system/onlineUser/component/jwChat.vue
Normal file
3
Web/src/views/system/onlineUser/component/jwChat.vue
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<template>
|
||||||
|
<div></div>
|
||||||
|
</template>
|
||||||
@ -140,7 +140,7 @@ onMounted(async () => {
|
|||||||
// 强制下线
|
// 强制下线
|
||||||
signalR.off('ForceOffline');
|
signalR.off('ForceOffline');
|
||||||
signalR.on('ForceOffline', async (data: any) => {
|
signalR.on('ForceOffline', async (data: any) => {
|
||||||
console.log('强制下线', data);
|
// console.log('强制下线', data);
|
||||||
await signalR.stop();
|
await signalR.stop();
|
||||||
|
|
||||||
await getAPI(SysAuthApi).apiSysAuthLogoutPost();
|
await getAPI(SysAuthApi).apiSysAuthLogoutPost();
|
||||||
@ -191,6 +191,20 @@ const resetQuery = () => {
|
|||||||
handleQuery();
|
handleQuery();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 表格事件
|
||||||
|
const gridEvents: VxeGridListeners<SysOnlineUser> = {
|
||||||
|
// 只对 pager-config 配置时有效,分页发生改变时会触发该事件
|
||||||
|
async pageChange({ pageSize }) {
|
||||||
|
state.localPageParam.pageSize = pageSize;
|
||||||
|
Local.set(localPageParamKey, state.localPageParam);
|
||||||
|
},
|
||||||
|
// 当排序条件发生变化时会触发该事件
|
||||||
|
async sortChange({ field, order }) {
|
||||||
|
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||||
|
Local.set(localPageParamKey, state.localPageParam);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
// 发送消息
|
// 发送消息
|
||||||
const openSendMessage = (row: any) => {
|
const openSendMessage = (row: any) => {
|
||||||
sendMessageRef.value?.openDialog(row);
|
sendMessageRef.value?.openDialog(row);
|
||||||
@ -211,20 +225,6 @@ const forceOffline = async (row: any) => {
|
|||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 表格事件
|
|
||||||
const gridEvents: VxeGridListeners<SysOnlineUser> = {
|
|
||||||
// 只对 pager-config 配置时有效,分页发生改变时会触发该事件
|
|
||||||
async pageChange({ pageSize }) {
|
|
||||||
state.localPageParam.pageSize = pageSize;
|
|
||||||
Local.set(localPageParamKey, state.localPageParam);
|
|
||||||
},
|
|
||||||
// 当排序条件发生变化时会触发该事件
|
|
||||||
async sortChange({ field, order }) {
|
|
||||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
|
||||||
Local.set(localPageParamKey, state.localPageParam);
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
// 导出对象
|
// 导出对象
|
||||||
defineExpose({ openDrawer });
|
defineExpose({ openDrawer });
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user