|
@@ -18,6 +18,10 @@ |
|
@@ -18,6 +18,10 @@ |
|
18
|
/>
|
18
|
/>
|
|
19
|
|
19
|
|
|
20
|
<div class="right-menu">
|
20
|
<div class="right-menu">
|
|
|
|
21
|
+ <el-radio-group v-model="state.user.jobStatus" @change="updataState">
|
|
|
|
22
|
+ <el-radio label="0">在岗</el-radio>
|
|
|
|
23
|
+ <el-radio label="1">离岗</el-radio>
|
|
|
|
24
|
+ </el-radio-group>
|
|
21
|
<template v-if="appStore.device !== 'mobile'">
|
25
|
<template v-if="appStore.device !== 'mobile'">
|
|
22
|
<header-search id="header-search" class="right-menu-item" />
|
26
|
<header-search id="header-search" class="right-menu-item" />
|
|
23
|
|
27
|
|
|
@@ -54,6 +58,7 @@ |
|
@@ -54,6 +58,7 @@ |
|
54
|
|
58
|
|
|
55
|
<script setup>
|
59
|
<script setup>
|
|
56
|
import { ElMessageBox } from "element-plus";
|
60
|
import { ElMessageBox } from "element-plus";
|
|
|
|
61
|
+import { getUserProfile, updateUserProfile } from "@/api/system/user";
|
|
57
|
import Breadcrumb from "@/components/Breadcrumb";
|
62
|
import Breadcrumb from "@/components/Breadcrumb";
|
|
58
|
import TopNav from "@/components/TopNav";
|
63
|
import TopNav from "@/components/TopNav";
|
|
59
|
import Hamburger from "@/components/Hamburger";
|
64
|
import Hamburger from "@/components/Hamburger";
|
|
@@ -63,10 +68,32 @@ import useAppStore from "@/store/modules/app"; |
|
@@ -63,10 +68,32 @@ import useAppStore from "@/store/modules/app"; |
|
63
|
import useUserStore from "@/store/modules/user";
|
68
|
import useUserStore from "@/store/modules/user";
|
|
64
|
import useSettingsStore from "@/store/modules/settings";
|
69
|
import useSettingsStore from "@/store/modules/settings";
|
|
65
|
|
70
|
|
|
|
|
71
|
+const { proxy } = getCurrentInstance();
|
|
66
|
const appStore = useAppStore();
|
72
|
const appStore = useAppStore();
|
|
67
|
const userStore = useUserStore();
|
73
|
const userStore = useUserStore();
|
|
68
|
const settingsStore = useSettingsStore();
|
74
|
const settingsStore = useSettingsStore();
|
|
69
|
|
75
|
|
|
|
|
76
|
+const state = reactive({
|
|
|
|
77
|
+ user: {},
|
|
|
|
78
|
+ roleGroup: {},
|
|
|
|
79
|
+ postGroup: {},
|
|
|
|
80
|
+});
|
|
|
|
81
|
+
|
|
|
|
82
|
+function getUser() {
|
|
|
|
83
|
+ getUserProfile().then((response) => {
|
|
|
|
84
|
+ state.user = response.data;
|
|
|
|
85
|
+ state.roleGroup = response.roleGroup;
|
|
|
|
86
|
+ state.postGroup = response.postGroup;
|
|
|
|
87
|
+ });
|
|
|
|
88
|
+}
|
|
|
|
89
|
+
|
|
|
|
90
|
+getUser();
|
|
|
|
91
|
+
|
|
|
|
92
|
+const updataState = () => {
|
|
|
|
93
|
+ updateUserProfile(state.user).then((response) => {
|
|
|
|
94
|
+ proxy.$modal.msgSuccess("修改成功");
|
|
|
|
95
|
+ });
|
|
|
|
96
|
+};
|
|
70
|
function toggleSideBar() {
|
97
|
function toggleSideBar() {
|
|
71
|
appStore.toggleSideBar();
|
98
|
appStore.toggleSideBar();
|
|
72
|
}
|
99
|
}
|