|
@@ -50,6 +50,9 @@ import { openModal } from '@/common/setup/modal/index';
|
|
|
import { UserOutlined } from '@ant-design/icons-vue';
|
|
import { UserOutlined } from '@ant-design/icons-vue';
|
|
|
import Setting from '@/views/setting/index.vue';
|
|
import Setting from '@/views/setting/index.vue';
|
|
|
import { getUserName } from '@/services/bus/user';
|
|
import { getUserName } from '@/services/bus/user';
|
|
|
|
|
+import { logout } from '@/services/bus/login';
|
|
|
|
|
+import APP from '@/services';
|
|
|
|
|
+import Router from '@/router';
|
|
|
|
|
|
|
|
// 设置
|
|
// 设置
|
|
|
const setFn = () => {
|
|
const setFn = () => {
|
|
@@ -66,9 +69,13 @@ const setFn = () => {
|
|
|
];
|
|
];
|
|
|
const { openAction } = openModal('logout');
|
|
const { openAction } = openModal('logout');
|
|
|
function chooseSetMenu(path: string) {
|
|
function chooseSetMenu(path: string) {
|
|
|
- // chooseSetupItem.value = path;
|
|
|
|
|
- openAction();
|
|
|
|
|
- console.log(path);
|
|
|
|
|
|
|
+ if (path === 'logout') {
|
|
|
|
|
+ logout();
|
|
|
|
|
+ APP.closeServer();
|
|
|
|
|
+ Router.replace('/login');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ openAction();
|
|
|
|
|
+ }
|
|
|
visible.value = false;
|
|
visible.value = false;
|
|
|
}
|
|
}
|
|
|
|
|
|