factory_mp_old/pages/my/myInfo.vue

192 lines
4.1 KiB
Vue

<template>
<view class="my-data">
<uni-nav-bar @clickLeft="goBack()" class="nav-bar" height="110rpx" leftWidth="200rpx" leftText="个人信息"
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
<view class="wrap-view wrap-top">
<view class="item">
<view class="title">姓名</view>
<view class="content">
<text>{{userInfo.name}}</text>
<!-- <input type="text" v-model="principal.mobile" maxlength="20" placeholder="请输入" /> -->
</view>
</view>
<view class="item">
<view class="title">编号</view>
<view class="content">
<text>{{userInfo.number}}</text>
</view>
</view>
<view class="item">
<view class="title">身份证号</view>
<view class="content">
<text>{{userInfo.id_number}}</text>
</view>
</view>
<view class="item">
<view class="title">手机号</view>
<view class="content">
<text>{{userInfo.phone}}</text>
</view>
</view>
<view class="item">
<view class="title">邮箱</view>
<view class="content">
<text>{{userInfo.email}}</text>
</view>
</view>
<view class="item">
<view class="title">学历</view>
<view class="content">
<text>{{userInfo.qualification}}</text>
</view>
</view>
<view class="item">
<view class="title">性别</view>
<view class="content">
<text>{{userInfo.gender}}</text>
</view>
</view>
<view class="item">
<view class="title">岗位</view>
<view class="content">
<text>{{userInfo.post_name}}</text>
</view>
</view>
<view class="item">
<view class="title">部门</view>
<view class="content">
<text>{{userInfo.belong_dept_name}}</text>
</view>
</view>
<view class="item">
<view class="title">人员照片</view>
<view class="content">
<!-- <u-upload ref="uUpload" :file-list="fileList" :max-count="1" ></u-upload> -->
<image :src="userInfo.photo" @click="preView(userInfo.photo)"></image>
</view>
</view>
<!-- <imgUpload :count="1" :header="header" :url="vuex_apifile" @obtain_img="imgUpdata" :list="fileList"></imgUpload> -->
</view>
<img-view ref="imgPreView" :imgSrc="preImgSrc" @cancelPreView="cancelPreView"></img-view>
</view>
</template>
<script>
import imgView from "@/components/image-view/image-view.vue";
// import imgUpload from '@/components/linzq-imgUpload/linzq-imgUpload.vue';
export default {
components: {
// imgUpload,
imgView
},
data() {
return {
userInfo: {},
// fileList:[],
preImgSrc:'',
head: {
Authorization: "Bearer " + this.vuex_token
},
}
},
onLoad(){
this.getHeader();
},
onShow() {
this.getUserInfo();
},
methods: {
getHeader() {
this.header = {
Authorization: "Bearer " + this.vuex_token
}
},
getUserInfo() {
let that = this;
that.$u.api.hrmUserInfo().then(res => {
if(res.photo){
res.photo = that.vuex_host + res.photo
}
that.userInfo = res;
that.fileList.push(res.photo);
})
},
preView(srcImg){
this.preImgSrc = srcImg;
this.$refs.imgPreView.open();
},
cancelPreView(){
this.preImgSrc = '';
},
imgUpdata(){
},
goBack() {
uni.navigateBack({
delta: 1
})
},
}
}
</script>
<style scoped>
>>>.uni-navbar__header,
>>>.uni-status-bar {
background-image: linear-gradient(254deg,
#0ca7ee 0%,
#005aff 100%,
#2a8cff 100%,
#54bdff 100%),
linear-gradient(#e60012,
#e60012);
}
>>>uni-image{
height: 200upx;
width: 200upx;
}
.my-data {
background-color: #f3fbff;
padding-bottom: 227rpx;
}
.nav-bar>>>.uni-navbar-btn-text text {
font-size: 32rpx !important;
}
.wrap-view {
width: 720rpx;
margin: 0 auto;
background-color: #ffffff;
border-radius: 10rpx;
line-height: 94rpx;
font-family: PingFang-SC-Medium;
font-size: 30rpx;
}
.wrap-top{
padding: 20upx 0;
line-height: 60upx;
}
.item {
margin: 0rpx 32rpx;
display: flex;
margin-top: 20rpx;
}
.item_bottom_border{
border-bottom: 1rpx solid #eeeeee;
}
.title {
color: #212121;
flex: 1;
}
.content {
flex: 3;
color: #414141;
}
</style>