修改登录日志

master
wuzuowei 4 months ago
parent 5ed09ebc15
commit c6192a37f4

@ -36,10 +36,10 @@ export class SystemData extends RemoteRequest {
} }
}) })
} }
public setlog = async (obj: any) => { // public setlog = async (obj: any) => {
// console.log("日志参数11111111111111", obj); // // console.log("日志参数11111111111111", obj);
return request.post('/Personnel/Personnelapi/LogRecording', obj) // return request.post('/Personnel/Personnelapi/LogRecording', obj)
} // }
public logout = async () => { public logout = async () => {
await this.request.delete(WebApi.logout, true).then(() => { }); await this.request.delete(WebApi.logout, true).then(() => { });

@ -160,12 +160,12 @@ export default class RuntimeUser {
, userData?.Name , userData?.Name
, userData?.OrganName) , userData?.OrganName)
await MicroApps.GetRuntimeLogger().success(Log.Login, loginId) await MicroApps.GetRuntimeLogger().success(Log.Login, loginId)
let obj = { // let obj = {
OperateUser: loginId || "未登录", // OperateUser: loginId || "未登录",
Operate: `${loginId}登陆了工艺数据管理子系统` // Operate: `${loginId}登陆了工艺数据管理子系统`
} // }
this.model.setlog(obj) // this.model.setlog(obj)
// console.log("日志参数", obj, loginId,); // console.log("日志参数", obj, loginId,);
return true return true
} }

@ -114,13 +114,21 @@ const TechLoginView = () => {
// history.push(`/animate?url=${encodeURIComponent(jumpTo)}`) // history.push(`/animate?url=${encodeURIComponent(jumpTo)}`)
let obj = {
OperateUser: loginId || "未登录",
Operate: `${loginId}登陆了工艺数据管理子系统`
}
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(obj),
};
// let obj = {
// OperateUser: loginId || "未登录", fetch('/Personnel/Personnelapi/LogRecording', options)
// Operate: `${loginId}登陆了工艺数据管理子系统`
// }
// request.post('/Personnel/Personnelapi/LogRecording', obj)
if (pathValue == "notice") { if (pathValue == "notice") {
sessionStorage.setItem("notice", encodeURIComponent(JSON.stringify(pathValue))) sessionStorage.setItem("notice", encodeURIComponent(JSON.stringify(pathValue)))

Loading…
Cancel
Save