2023-07-15 17:51:20 +08:00
|
|
|
|
<template>
|
2023-08-19 16:39:16 +08:00
|
|
|
|
<view class="my">
|
2023-08-24 10:31:35 +08:00
|
|
|
|
<view class="head_box" style="position: relative;">
|
2023-08-19 16:39:16 +08:00
|
|
|
|
<!-- <image class="head_img" src="../../static/img/home/head-bg.png"></image> -->
|
2023-08-25 15:50:26 +08:00
|
|
|
|
<view style="position: absolute;bottom: 0;left: 0;overflow: hidden;border-radius: 0;">
|
2023-08-25 18:39:40 +08:00
|
|
|
|
<hx-lottie :options="options" ref="lottie" style="width: 100vw;height: 460rpx;transform: scale(1.2);background-color: #0122c7;"/>
|
2023-08-24 10:31:35 +08:00
|
|
|
|
</view>
|
2023-08-19 16:39:16 +08:00
|
|
|
|
<!-- #ifdef APP-PLUS||H5 -->
|
|
|
|
|
<view style="height: var(--status-bar-height);"></view>
|
|
|
|
|
<view style="height: 100rpx"></view>
|
|
|
|
|
<!-- #endif -->
|
|
|
|
|
<view class="personage">
|
|
|
|
|
<view class="my_msg flex_a_c_j_sb">
|
|
|
|
|
<view class="flex_a_c">
|
|
|
|
|
<u--image :showLoading="true" :src="oaUserInfo.avatar||'../../static/img/public/avatar.png'"
|
|
|
|
|
width="130.28rpx" height="130.28rpx" shape="circle">
|
|
|
|
|
</u--image>
|
|
|
|
|
<view v-if="!$store.state.app.token" @click="login" class="name_work">
|
|
|
|
|
<view class="name">
|
|
|
|
|
<text class="nickname">立即登录</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="work">
|
|
|
|
|
登录后可查看更多
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-else class="name_work">
|
|
|
|
|
<view class="name">
|
|
|
|
|
<text class="nickname">姓名:{{ oaUserInfo.nickname }}</text>
|
|
|
|
|
({{ oaUserInfo.admin_id?'超级管理员':'普通用户'}})
|
|
|
|
|
<!-- <text class="omit" v-if="oaUserInfo.admin.company">所属公司:{{ oaUserInfo.admin.company.company_name }}</text> -->
|
|
|
|
|
</view>
|
|
|
|
|
<view class="work">
|
|
|
|
|
电话:{{oaUserInfo.account}}<br />
|
|
|
|
|
公司:<text v-if="oaUserInfo.company">{{ oaUserInfo.company.company_name }}</text><br />
|
|
|
|
|
公司类型:<text
|
|
|
|
|
v-if="oaUserInfo.company">{{ oaUserInfo.company.company_type_name }}</text><br />
|
|
|
|
|
<!-- {{ oaUserInfo.did_name }}({{ oaUserInfo.label_name }}) -->
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- <view v-if="$store.state.app.token" class="compile" @click="navTo()">
|
2023-07-18 17:10:34 +08:00
|
|
|
|
<view class="iconfont icon-bianji"></view>
|
2023-08-07 10:19:52 +08:00
|
|
|
|
<view class="">编辑</view>
|
|
|
|
|
</view> -->
|
2023-08-19 16:39:16 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="other_guide">
|
|
|
|
|
<block v-for="(item,i) in myOaData" :key="i">
|
|
|
|
|
|
|
|
|
|
<view class="other_item flex_a_c_j_sb" @click="navTo(item.url)">
|
|
|
|
|
<view class="flex_a_c left">
|
|
|
|
|
<!-- <view class="iconfont2" :class="item.icon"></view> -->
|
|
|
|
|
<image :src="item.icon"></image>
|
|
|
|
|
<view class="text">{{ item.name }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<uni-icons type="forward"></uni-icons>
|
|
|
|
|
</view>
|
|
|
|
|
</block>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="log_out" v-if="$store.state.app.token" @click="modelShow=true">退出登录</view>
|
|
|
|
|
<view class="log_out" v-else @click="login">登录账号</view>
|
|
|
|
|
|
|
|
|
|
<u-modal :show="modelShow" title="警告" content='确定要退出登录吗' closeOnClickOverlay showCancelButton
|
|
|
|
|
@close="modelShow=false" @cancel="modelShow=false" @confirm="logout"></u-modal>
|
|
|
|
|
<!-- <tabbar></tabbar> -->
|
|
|
|
|
</view>
|
2023-07-15 17:51:20 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-08-19 16:39:16 +08:00
|
|
|
|
import {
|
|
|
|
|
mapActions
|
|
|
|
|
} from 'vuex'
|
|
|
|
|
import {
|
|
|
|
|
getUserIndexAPI
|
|
|
|
|
} from '@/api/oaApi.js'
|
|
|
|
|
import {
|
|
|
|
|
userInfo
|
|
|
|
|
} from '@/api/oaUser.js'
|
|
|
|
|
import {
|
|
|
|
|
Toast
|
|
|
|
|
} from '@/libs/uniApi.js'
|
|
|
|
|
import {
|
|
|
|
|
myOaData
|
|
|
|
|
} from '@/static/server/server.js'
|
2023-08-24 10:31:35 +08:00
|
|
|
|
import bj from "@/static/animation/home.json"
|
2023-08-19 16:39:16 +08:00
|
|
|
|
// import tabbar from '../components/tabbar'
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
// tabbar
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2023-08-24 10:31:35 +08:00
|
|
|
|
options: {
|
|
|
|
|
data: '',
|
|
|
|
|
},
|
2023-08-19 16:39:16 +08:00
|
|
|
|
myOaData: myOaData,
|
|
|
|
|
src: 'https://cdn.uviewui.com/uview/album/1.jpg',
|
|
|
|
|
modelShow: false
|
|
|
|
|
}
|
|
|
|
|
},
|
2023-08-24 10:31:35 +08:00
|
|
|
|
onLoad() {
|
|
|
|
|
this.options.data = bj;
|
|
|
|
|
},
|
2023-08-19 16:39:16 +08:00
|
|
|
|
onShow() {
|
|
|
|
|
this.getOaUserInfo();
|
|
|
|
|
},
|
|
|
|
|
onHide() {
|
|
|
|
|
this.modelShow = false;
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
eyeType() {
|
|
|
|
|
return this.$store.state.config.eyeType;
|
|
|
|
|
},
|
|
|
|
|
oaUserInfo() {
|
|
|
|
|
return this.$store.state.app.userInfo || {
|
|
|
|
|
avatar: '',
|
|
|
|
|
admin: {
|
|
|
|
|
company: {
|
|
|
|
|
company_name: ''
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
},
|
2023-08-24 11:52:40 +08:00
|
|
|
|
watch:{
|
|
|
|
|
modelShow: function(n,o){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
2023-08-19 16:39:16 +08:00
|
|
|
|
methods: {
|
|
|
|
|
...mapActions(['getWxLogin']),
|
|
|
|
|
login() {
|
2023-08-25 18:39:40 +08:00
|
|
|
|
uni.reLaunch({
|
2023-08-19 16:39:16 +08:00
|
|
|
|
url: '/pages/oaLogin/oaLogin'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
logout() {
|
|
|
|
|
let that = this;
|
|
|
|
|
// uni.showModal({
|
|
|
|
|
// content: '确定要退出登录吗',
|
|
|
|
|
// success: (e) => {
|
|
|
|
|
// if (e.confirm) {
|
2023-08-25 18:39:40 +08:00
|
|
|
|
uni.reLaunch({
|
2023-08-19 16:39:16 +08:00
|
|
|
|
url: '/pages/oaLogin/oaLogin?clear=' + true,
|
|
|
|
|
success() {
|
|
|
|
|
that.$store.commit('CLEAR');
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
},
|
|
|
|
|
async getOaUserInfo() {
|
|
|
|
|
const res = await userInfo();
|
|
|
|
|
this.$store.commit('setUserInfo', res.data);
|
|
|
|
|
},
|
2023-08-24 16:30:23 +08:00
|
|
|
|
navTo (url) {
|
|
|
|
|
if(url){
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
title: '加载中',
|
|
|
|
|
mask: true
|
|
|
|
|
});
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: url,
|
|
|
|
|
success() {
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
},
|
|
|
|
|
fail () {
|
|
|
|
|
uni.switchTab({
|
|
|
|
|
url: url,
|
|
|
|
|
success() {
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
},
|
|
|
|
|
fail() {
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
}else Toast('暂未开放')
|
2023-08-19 16:39:16 +08:00
|
|
|
|
},
|
|
|
|
|
alterMyInfo() {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pages/views/personal_center'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onPullDownRefresh() {
|
|
|
|
|
this.getOaUserInfo()
|
|
|
|
|
uni.stopPullDownRefresh()
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-07-15 17:51:20 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.my {
|
|
|
|
|
.head_box {
|
|
|
|
|
position: relative;
|
|
|
|
|
padding: 28rpx;
|
|
|
|
|
width: 100vw;
|
|
|
|
|
margin-bottom: 30rpx;
|
2023-08-21 11:35:12 +08:00
|
|
|
|
// background-image: url('../../static/img/home/my_bg.png');
|
|
|
|
|
background-color: $theme-oa-color;
|
|
|
|
|
border-radius: 0 0 30rpx 30rpx;
|
|
|
|
|
// background-size 100% 100%;
|
|
|
|
|
// background-repeat: no-repeat;
|
2023-07-18 17:10:34 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
// .head_img {
|
|
|
|
|
// position: absolute;
|
|
|
|
|
// // z-index: -1;
|
|
|
|
|
// width: 100%;
|
|
|
|
|
// height: 100%;
|
|
|
|
|
// top: 0;
|
|
|
|
|
// left: 0;
|
|
|
|
|
// }
|
|
|
|
|
}
|
2023-07-18 17:10:34 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
}
|
2023-07-18 17:10:34 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.my_head {
|
|
|
|
|
height: 90.39rpx;
|
|
|
|
|
position: relative;
|
|
|
|
|
// z-index: 1;
|
|
|
|
|
// top: 20rpx;
|
|
|
|
|
// background-color: $theme-oa-color;
|
|
|
|
|
// background-image: url('../../static/img/home/head-bg.png');
|
2023-07-15 17:51:20 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.department {
|
|
|
|
|
// padding-top: 38.6rpx;
|
|
|
|
|
font-size: 31.58rpx;
|
|
|
|
|
color: #fff;
|
2023-07-15 17:51:20 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.section {
|
|
|
|
|
margin-right: 57.89rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-07-15 17:51:20 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.personage {
|
|
|
|
|
// position: relative;
|
|
|
|
|
padding-bottom: 28rpx;
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
// background-color: #fff;
|
|
|
|
|
color: #fff;
|
|
|
|
|
width: 694rpx;
|
|
|
|
|
margin-left: 50%;
|
|
|
|
|
transform: translate(-50%);
|
2023-07-15 17:51:20 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.name_work {
|
|
|
|
|
margin-left: 31.58rpx;
|
|
|
|
|
font-size: 28.07rpx;
|
2023-07-25 10:49:58 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.name {
|
|
|
|
|
.nickname {
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
margin-right: 30rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-07-25 10:49:58 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.work {
|
|
|
|
|
margin-top: 14.04rpx;
|
|
|
|
|
}
|
2023-07-25 10:49:58 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.omit {
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
/* 禁止换行 */
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
/* 溢出隐藏 */
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
/* 使用省略号代表被截断的文本 */
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-07-15 17:51:20 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.my_msg {
|
|
|
|
|
.compile {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-07-15 17:51:20 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.assess {
|
|
|
|
|
height: 170.18rpx;
|
|
|
|
|
}
|
2023-07-15 17:51:20 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.ass_cent {
|
|
|
|
|
width: 100%;
|
|
|
|
|
padding: 31.58rpx 66.67rpx;
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 0;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
height: 170.18rpx;
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
background-color: rgba(#fff, 0.18);
|
|
|
|
|
justify-content: space-around;
|
2023-07-15 17:51:20 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.cent_item {
|
|
|
|
|
font-size: 24.56rpx;
|
|
|
|
|
color: #fff;
|
|
|
|
|
text-align: center;
|
2023-07-15 17:51:20 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.num {
|
|
|
|
|
font-size: 38.6rpx;
|
|
|
|
|
margin-bottom: 21.05rpx;
|
|
|
|
|
}
|
2023-07-15 17:51:20 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-07-15 17:51:20 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.other_guide {
|
|
|
|
|
width: 694.74rpx;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
padding: 28.07rpx;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border-radius: 12px;
|
2023-07-15 17:51:20 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.other_item {
|
|
|
|
|
height: 87.72rpx;
|
|
|
|
|
border-bottom: 1px solid #F0F5F7;
|
2023-07-15 17:51:20 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.text {
|
|
|
|
|
font-size: 28.07rpx;
|
|
|
|
|
margin-left: 20.56rpx;
|
|
|
|
|
}
|
2023-07-25 10:49:58 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.left {
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
2023-07-25 10:49:58 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
image {
|
|
|
|
|
width: 42rpx;
|
|
|
|
|
height: 42rpx;
|
|
|
|
|
}
|
2023-07-15 17:51:20 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.iconfont2 {
|
|
|
|
|
font-size: 42.11rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-07-15 17:51:20 +08:00
|
|
|
|
|
2023-08-19 16:39:16 +08:00
|
|
|
|
.log_out {
|
|
|
|
|
color: #fff;
|
|
|
|
|
border-radius: 100px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
line-height: 84.21rpx;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
margin-top: 84.21rpx;
|
2023-08-21 12:06:59 +08:00
|
|
|
|
width: 694rpx;
|
2023-08-19 16:39:16 +08:00
|
|
|
|
height: 84.21rpx;
|
2023-08-21 11:35:12 +08:00
|
|
|
|
background: $theme-oa-color;
|
2023-08-19 16:39:16 +08:00
|
|
|
|
box-shadow: 0px 9px 26px 1px #E9EFF5;
|
|
|
|
|
}
|
2023-07-18 17:10:34 +08:00
|
|
|
|
</style>
|