update
1.更新im(专业人员/操作人员单点登陆,因为im模块)
This commit is contained in:
@@ -606,6 +606,7 @@ export default class TUICallService implements ITUICallService {
|
|||||||
private _handleKickedOut(event: any): void {
|
private _handleKickedOut(event: any): void {
|
||||||
console.log(`${NAME.PREFIX}kickOut event data: ${JSON.stringify(event)}.`);
|
console.log(`${NAME.PREFIX}kickOut event data: ${JSON.stringify(event)}.`);
|
||||||
this.kickedOut && this.kickedOut(event);
|
this.kickedOut && this.kickedOut(event);
|
||||||
|
window.parent.postMessage(JSON.stringify({ code: 'kickOut' }), '*');
|
||||||
TUIStore.update(StoreName.CALL, NAME.CALL_TIPS, generateText(TUIStore, CallTips.KICK_OUT));
|
TUIStore.update(StoreName.CALL, NAME.CALL_TIPS, generateText(TUIStore, CallTips.KICK_OUT));
|
||||||
this._resetCallStore();
|
this._resetCallStore();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,4 +53,4 @@
|
|||||||
},
|
},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
};</script><script src="js/vendors~app.de88239f.js"></script><script src="js/app.9b29fc46.js"></script></body></html>
|
};</script><script src="js/vendors~app.de88239f.js"></script><script src="js/app.c17189d0.js"></script></body></html>
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2
-2
@@ -92,8 +92,8 @@ export function getPermCode() {
|
|||||||
return defHttp.get({ url: Api.GetPermCode });
|
return defHttp.get({ url: Api.GetPermCode });
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doLogout() {
|
export function doLogout(isNeedResponse = true) {
|
||||||
return defHttp.get({ url: Api.Logout });
|
return defHttp.get({ url: Api.Logout }, { isTransformResponse: isNeedResponse });
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCodeInfo(currdatetime) {
|
export function getCodeInfo(currdatetime) {
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import { JDragConfigEnum } from '/@/enums/jeecgEnum';
|
|||||||
import { useSso } from '/@/hooks/web/useSso';
|
import { useSso } from '/@/hooks/web/useSso';
|
||||||
import { getDictCache, setDictCache } from '/@/utils/dict';
|
import { getDictCache, setDictCache } from '/@/utils/dict';
|
||||||
import { loginAnYanApi } from '/@/views/system/loginmini/login.api';
|
import { loginAnYanApi } from '/@/views/system/loginmini/login.api';
|
||||||
|
import { message, notification } from 'ant-design-vue';
|
||||||
|
|
||||||
interface UserState {
|
interface UserState {
|
||||||
userInfo: Nullable<UserInfo>;
|
userInfo: Nullable<UserInfo>;
|
||||||
@@ -321,6 +322,44 @@ export const useUserStore = defineStore({
|
|||||||
}
|
}
|
||||||
goLogin && (await router.push(PageEnum.BASE_LOGIN));
|
goLogin && (await router.push(PageEnum.BASE_LOGIN));
|
||||||
},
|
},
|
||||||
|
async passiveLogout() {
|
||||||
|
if (this.getToken) {
|
||||||
|
try {
|
||||||
|
await doLogout(false);
|
||||||
|
} catch {
|
||||||
|
console.log('注销Token失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// //update-begin-author:taoyan date:2022-5-5 for: src/layouts/default/header/index.vue showLoginSelect方法 获取tenantId 退出登录后再次登录依然能获取到值,没有清空
|
||||||
|
// let username:any = this.userInfo && this.userInfo.username;
|
||||||
|
// if(username){
|
||||||
|
// removeAuthCache(username)
|
||||||
|
// }
|
||||||
|
// //update-end-author:taoyan date:2022-5-5 for: src/layouts/default/header/index.vue showLoginSelect方法 获取tenantId 退出登录后再次登录依然能获取到值,没有清空
|
||||||
|
|
||||||
|
this.setToken('', false);
|
||||||
|
this.setSessionTimeout(false);
|
||||||
|
this.setUserInfo(null, false);
|
||||||
|
this.setLoginInfo(null, false);
|
||||||
|
this.setTenant(null);
|
||||||
|
//update-begin-author:liusq date:2022-5-5 for:退出登录后清除拖拽模块的接口前缀
|
||||||
|
localStorage.removeItem(JDragConfigEnum.DRAG_BASE_URL);
|
||||||
|
//update-end-author:liusq date:2022-5-5 for: 退出登录后清除拖拽模块的接口前缀
|
||||||
|
|
||||||
|
//如果开启单点登录,则跳转到单点统一登录中心
|
||||||
|
const openSso = useGlobSetting().openSso;
|
||||||
|
if (openSso == 'true') {
|
||||||
|
await useSso().ssoLoginOut();
|
||||||
|
}
|
||||||
|
await router.push(PageEnum.BASE_LOGIN).then(() => {
|
||||||
|
notification.open({
|
||||||
|
message: '提示',
|
||||||
|
description: '检测到您的账号在另一台设备登录,当前已退出登陆。若非本人操作,请立即检查账号安全。',
|
||||||
|
duration: null,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 登录事件
|
* 登录事件
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -76,6 +76,7 @@
|
|||||||
import { imAddressSrc } from '/@/utils/imAddressSrc';
|
import { imAddressSrc } from '/@/utils/imAddressSrc';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
const { createConfirm } = useMessage();
|
const { createConfirm } = useMessage();
|
||||||
|
|
||||||
const stat = ref<Object>({ emeResRate: 0, seriousRate: 0 });
|
const stat = ref<Object>({ emeResRate: 0, seriousRate: 0 });
|
||||||
@@ -194,6 +195,9 @@
|
|||||||
case 'permissionError':
|
case 'permissionError':
|
||||||
message.error(result.msg);
|
message.error(result.msg);
|
||||||
break;
|
break;
|
||||||
|
case 'kickOut':
|
||||||
|
useUserStore().passiveLogout();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const closeLoading = () => {
|
const closeLoading = () => {
|
||||||
|
|||||||
@@ -169,6 +169,7 @@
|
|||||||
|
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
imProps: Object,
|
imProps: Object,
|
||||||
});
|
});
|
||||||
@@ -222,8 +223,12 @@
|
|||||||
case 'permissionError':
|
case 'permissionError':
|
||||||
message.error(result.msg);
|
message.error(result.msg);
|
||||||
break;
|
break;
|
||||||
|
case 'kickOut':
|
||||||
|
useUserStore().passiveLogout();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const closeLoading = () => {
|
const closeLoading = () => {
|
||||||
loadingVisible.value = false;
|
loadingVisible.value = false;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import { BasicColumn, FormSchema } from '/@/components/Table';
|
||||||
|
|
||||||
|
export const columns: BasicColumn[] = [];
|
||||||
|
|
||||||
|
export const searchScheme: FormSchema[] = [];
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<template>
|
||||||
|
<BasicTable @register="registerTable"> </BasicTable>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { BasicTable } from '/@/components/Table';
|
||||||
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
|
import { list } from '/@/views/healthMonitor/healMonitorManage/monitorToll/toolManagement/toolManagement.api';
|
||||||
|
import { columns, searchScheme } from '/@/views/healthMonitor/anY/cottage/cottage.data';
|
||||||
|
const { tableContext } = useListPage({
|
||||||
|
tableProps: {
|
||||||
|
api: list,
|
||||||
|
columns,
|
||||||
|
immediate: true,
|
||||||
|
canResize: false,
|
||||||
|
showIndexColumn: true,
|
||||||
|
formConfig: {
|
||||||
|
schemas: searchScheme,
|
||||||
|
autoSubmitOnEnter: true,
|
||||||
|
showAdvancedButton: false,
|
||||||
|
fieldMapToNumber: [],
|
||||||
|
fieldMapToTime: [],
|
||||||
|
},
|
||||||
|
actionColumn: {
|
||||||
|
width: 200,
|
||||||
|
fixed: 'right',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const [registerTable, {}, {}] = tableContext;
|
||||||
|
</script>
|
||||||
|
<style scoped lang="less"></style>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import { BasicColumn, FormSchema } from '/@/components/Table';
|
||||||
|
|
||||||
|
export const columns: BasicColumn[] = [];
|
||||||
|
|
||||||
|
export const searchScheme: FormSchema[] = [];
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<template>
|
||||||
|
<BasicTable @register="registerTable"> </BasicTable>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { BasicTable } from '/@/components/Table';
|
||||||
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
|
import { list } from '/@/views/healthMonitor/healMonitorManage/monitorToll/toolManagement/toolManagement.api';
|
||||||
|
import { columns, searchScheme } from '/@/views/healthMonitor/anY/physical/physical.data';
|
||||||
|
const { tableContext } = useListPage({
|
||||||
|
tableProps: {
|
||||||
|
api: list,
|
||||||
|
columns,
|
||||||
|
immediate: true,
|
||||||
|
canResize: false,
|
||||||
|
showIndexColumn: true,
|
||||||
|
formConfig: {
|
||||||
|
schemas: searchScheme,
|
||||||
|
autoSubmitOnEnter: true,
|
||||||
|
showAdvancedButton: false,
|
||||||
|
fieldMapToNumber: [],
|
||||||
|
fieldMapToTime: [],
|
||||||
|
},
|
||||||
|
actionColumn: {
|
||||||
|
width: 200,
|
||||||
|
fixed: 'right',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const [registerTable, {}, {}] = tableContext;
|
||||||
|
</script>
|
||||||
|
<style scoped lang="less"></style>
|
||||||
Reference in New Issue
Block a user