mirror of
https://github.com/FatttSnake/Pinnacle-OA.git
synced 2026-04-05 23:11:24 +08:00
Add employee personal information
This commit is contained in:
@@ -7,6 +7,9 @@
|
||||
:data="taskData"
|
||||
border
|
||||
>
|
||||
<el-descriptions-item span="3" label="工作信息">{{
|
||||
taskData.content
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建者">{{ taskData.publisherName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{
|
||||
formatDate(taskData.createTime)
|
||||
@@ -14,7 +17,7 @@
|
||||
<el-descriptions-item label="结束时间">{{
|
||||
formatDate(taskData.deadline)
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">
|
||||
<el-descriptions-item span="2" label="状态">
|
||||
<el-progress :text-inside="true" :stroke-width="16" :percentage="taskData.progress" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="负责员工">
|
||||
@@ -22,11 +25,10 @@
|
||||
item.username
|
||||
}}</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="工作信息">{{ taskData.content }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script lang='ts'>
|
||||
export default {
|
||||
props: {
|
||||
taskData: {
|
||||
|
||||
@@ -138,7 +138,9 @@
|
||||
<template #default>
|
||||
<div style="display: flex; gap: 10px; flex-direction: column">
|
||||
<div>
|
||||
<el-button style="width: 100%">个人档案</el-button>
|
||||
<el-button @click="profile" style="width: 100%"
|
||||
>个人档案</el-button
|
||||
>
|
||||
</div>
|
||||
<div>
|
||||
<el-button @click="logout" style="width: 100%">退出</el-button>
|
||||
@@ -221,6 +223,9 @@ export default {
|
||||
changeCollapsed() {
|
||||
this.isCollapsed = !this.isCollapsed
|
||||
setLocalStorage('menuCollapsed', this.isCollapsed.toString())
|
||||
},
|
||||
profile() {
|
||||
this.$router.push('/profile')
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
|
||||
72
ui/src/pages/profile/PersonalProfile.vue
Normal file
72
ui/src/pages/profile/PersonalProfile.vue
Normal file
@@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<div class="profile">
|
||||
<el-form :model="form" label-width="72px" label-position="top">
|
||||
<el-row :gutter="40">
|
||||
<el-col :span="12" style="text-align: center">
|
||||
<el-avatar :size="128" style="margin-bottom: 20px" />
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名字">
|
||||
<el-input v-model="form.firstName" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓氏">
|
||||
<el-input v-model="form.lastName" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="用户ID">
|
||||
<el-input v-model="form.userId" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别">
|
||||
<el-select placeholder="Select" size="large">
|
||||
<el-option />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="生日">
|
||||
<el-date-picker />
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱">
|
||||
<el-input />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码">
|
||||
<el-input />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系地址">
|
||||
<el-input />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
userId: '',
|
||||
firstName: '',
|
||||
lastName: '',
|
||||
gender: '',
|
||||
birth: '',
|
||||
email: '',
|
||||
tel: '',
|
||||
address: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.profile {
|
||||
padding: 20px;
|
||||
}
|
||||
.profile .el-input {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -54,7 +54,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script lang='ts'>
|
||||
import request from '@/services'
|
||||
|
||||
export default {
|
||||
@@ -126,7 +126,7 @@ export default {
|
||||
setTaskStatus(userWork) {
|
||||
console.log(userWork)
|
||||
request
|
||||
.put('/work/setStatus', userWork)
|
||||
.put('/work/set_status', userWork)
|
||||
.then((response) => {
|
||||
console.log(response.data.data)
|
||||
this.getTableData()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<router-view></router-view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script lang='ts'>
|
||||
export default {
|
||||
name: 'TaskPage',
|
||||
data() {
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script lang='ts'>
|
||||
import request from '@/services'
|
||||
export default {
|
||||
name: 'TodoPage',
|
||||
@@ -116,7 +116,7 @@ export default {
|
||||
userWork.completeTime = new Date()
|
||||
console.log(userWork)
|
||||
request
|
||||
.put('/work/setStatus', userWork)
|
||||
.put('/work/set_status', userWork)
|
||||
.then((response) => {
|
||||
console.log(response.data.data)
|
||||
this.getTableData()
|
||||
|
||||
@@ -33,6 +33,11 @@ const router = createRouter({
|
||||
requiresAuth: false
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/profile',
|
||||
component: async () => await import('@/pages/profile/PersonalProfile.vue'),
|
||||
name: 'profile'
|
||||
},
|
||||
workRouter,
|
||||
noticeRouter,
|
||||
attendanceRouter,
|
||||
|
||||
Reference in New Issue
Block a user