✨ feat: 人事流程
This commit is contained in:
@@ -35,6 +35,28 @@
|
||||
<svg-icon icon-class="date" />创建日期
|
||||
<div class="pull-right">{{ user.createTime }}</div>
|
||||
</li>
|
||||
<li class="list-group-item" v-if="onBoardingInfo.status == '0'">
|
||||
转正申请
|
||||
<div class="pull-right">
|
||||
<el-button type="text" @click="toApplyProbation">申请转正</el-button>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item" v-else>
|
||||
<svg-icon icon-class="date" />转正日期
|
||||
<div class="pull-right">{{ onBoardingInfo.joiningDate }}</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
离职申请
|
||||
<div class="pull-right">
|
||||
<el-button type="danger" @click="toApplyQuit">申请离职</el-button>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
个人档案
|
||||
<div class="pull-right">
|
||||
<el-button type="text" @click="openFileDrawer">查看档案</el-button>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -55,6 +77,17 @@
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-drawer :title="`${user.nickName} - 文件管理`"
|
||||
:visible.sync="fileDrawerVisible"
|
||||
size="800px"
|
||||
direction="rtl"
|
||||
append-to-body>
|
||||
<user-file-manager
|
||||
:user-id="user.userId"
|
||||
:read-only="true"
|
||||
v-if="fileDrawerVisible" />
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -62,29 +95,55 @@
|
||||
import userAvatar from "./userAvatar";
|
||||
import userInfo from "./userInfo";
|
||||
import resetPwd from "./resetPwd";
|
||||
import UserFileManager from "@/components/FileList";
|
||||
import { getUserProfile } from "@/api/system/user";
|
||||
import { getOnboarding } from "@/api/oa/onboarding"
|
||||
|
||||
export default {
|
||||
name: "Profile",
|
||||
components: { userAvatar, userInfo, resetPwd },
|
||||
components: { userAvatar, userInfo, resetPwd, UserFileManager },
|
||||
data() {
|
||||
return {
|
||||
user: {},
|
||||
roleGroup: {},
|
||||
postGroup: {},
|
||||
activeTab: "userinfo"
|
||||
activeTab: "userinfo",
|
||||
fileDrawerVisible: false,
|
||||
onBoardingInfo: {}
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getUser();
|
||||
// 获取用户入职信息
|
||||
|
||||
},
|
||||
methods: {
|
||||
getUser() {
|
||||
getUserProfile().then(response => {
|
||||
this.user = response.data.user;
|
||||
console.log(this.user);
|
||||
this.roleGroup = response.data.roleGroup;
|
||||
this.postGroup = response.data.postGroup;
|
||||
this.getOnBoardInfo();
|
||||
});
|
||||
},
|
||||
async getOnBoardInfo() {
|
||||
const { data } = await getOnboarding(this.user.userId);
|
||||
this.onBoardingInfo = data;
|
||||
},
|
||||
openFileDrawer() {
|
||||
this.fileDrawerVisible = true;
|
||||
},
|
||||
// 跳转到申请转正页面
|
||||
toApplyProbation() {
|
||||
console.log("跳转到申请转正页面");
|
||||
this.$router.push('/people/apply');
|
||||
},
|
||||
// 跳转到离职页面
|
||||
toApplyQuit() {
|
||||
console.log("跳转到离职页面");
|
||||
this.$router.push('/people/addOffboarding');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user