|
...
|
...
|
@@ -18,6 +18,10 @@ |
|
|
|
/>
|
|
|
|
|
|
|
|
<div class="right-menu">
|
|
|
|
<el-radio-group v-model="state.user.jobStatus" @change="updataState">
|
|
|
|
<el-radio label="0">在岗</el-radio>
|
|
|
|
<el-radio label="1">离岗</el-radio>
|
|
|
|
</el-radio-group>
|
|
|
|
<template v-if="appStore.device !== 'mobile'">
|
|
|
|
<header-search id="header-search" class="right-menu-item" />
|
|
|
|
|
|
...
|
...
|
@@ -54,6 +58,7 @@ |
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ElMessageBox } from "element-plus";
|
|
|
|
import { getUserProfile, updateUserProfile } from "@/api/system/user";
|
|
|
|
import Breadcrumb from "@/components/Breadcrumb";
|
|
|
|
import TopNav from "@/components/TopNav";
|
|
|
|
import Hamburger from "@/components/Hamburger";
|
|
...
|
...
|
@@ -63,10 +68,32 @@ import useAppStore from "@/store/modules/app"; |
|
|
|
import useUserStore from "@/store/modules/user";
|
|
|
|
import useSettingsStore from "@/store/modules/settings";
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
const appStore = useAppStore();
|
|
|
|
const userStore = useUserStore();
|
|
|
|
const settingsStore = useSettingsStore();
|
|
|
|
|
|
|
|
const state = reactive({
|
|
|
|
user: {},
|
|
|
|
roleGroup: {},
|
|
|
|
postGroup: {},
|
|
|
|
});
|
|
|
|
|
|
|
|
function getUser() {
|
|
|
|
getUserProfile().then((response) => {
|
|
|
|
state.user = response.data;
|
|
|
|
state.roleGroup = response.roleGroup;
|
|
|
|
state.postGroup = response.postGroup;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
getUser();
|
|
|
|
|
|
|
|
const updataState = () => {
|
|
|
|
updateUserProfile(state.user).then((response) => {
|
|
|
|
proxy.$modal.msgSuccess("修改成功");
|
|
|
|
});
|
|
|
|
};
|
|
|
|
function toggleSideBar() {
|
|
|
|
appStore.toggleSideBar();
|
|
|
|
}
|
...
|
...
|
|