jiangping
2023-10-26 ea87c908fb6cdfc3e227a584a53e6730efb8262a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<template>
    <view class="info">
        <view class="info_portrait">
            <image :src="userInfo.avatar ? userInfo.avatar : avatar" mode="widthFix" />
            <text>用户名</text>
        </view>
        <view class="info_list">
            <view class="info_list_item">
                <text>昵称</text>
                <text>{{userInfo.realname ? userInfo.realname : '暂无昵称'}}</text>
            </view>
            <view class="info_list_item">
                <text>手机号</text>
                <text>{{userInfo.companyUser.phone ? userInfo.companyUser.phone : '暂无手机号'}}</text>
            </view>
            <view class="info_list_item">
                <text>所属部门</text>
                <text>{{userInfo.department.name ? userInfo.department.name : '暂无所属部门'}}</text>
            </view>
            <view class="info_list_item">
                <text>岗位</text>
                <text>{{userInfo.companyUser.positionName ? userInfo.companyUser.positionName : '暂无岗位'}}</text>
            </view>
            <view class="info_list_item">
                <text>当前组织</text>
                <text>{{userInfo.rootDepartment.name ? userInfo.rootDepartment.name : '暂无组织'}}</text>
            </view>
        </view>
    </view>
</template>
 
<script>
    import { mapState } from 'vuex'
    export default {
        data() {
            return {
                avatar: require('@/static/2@2x.png'),
            };
        },
        computed: mapState([
            'userInfo'
        ])
    }
</script>
 
<style lang="scss" scoped>
.info {
    padding: 30rpx;
    position: absolute;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background: white;
    .info_portrait {
        display: flex;
        align-items: center;
        flex-direction: column;
        margin-top: 60rpx;
        image {
            width: 140rpx;
            height: 140rpx;
            margin-bottom: 30rpx;
        }
        text {
            font-size: 30rpx;
            font-weight: 400;
            color: #222222;
        }
    }
    .info_list {
        margin-top: 30rpx;
        .info_list_item {
            height: 98rpx;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1rpx solid #E5E5E5;
            text {
                &:first-child {
                    font-size: 30rpx;
                    font-weight: 400;
                    color: #777777;
                }
                &:last-child {
                    font-size: 28rpx;
                    font-weight: 400;
                    color: #222222;
                }
            }
        }
    }
}
</style>