|
@@ -1,12 +1,18 @@
|
|
|
<template>
|
|
|
<view class="personal-page">
|
|
|
<!-- <u-navbar :is-back="false" title="个人中心" :title-color="'#FFFFFF'" :background="{ background: background }"></u-navbar> -->
|
|
|
+ <view class="navBarBox">
|
|
|
+ <view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view>
|
|
|
+ <view class="navBar">
|
|
|
+ <view class="navBar-title">个人中心</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="personal-place"></view>
|
|
|
<view class="personal-info">
|
|
|
<view class="personal-info-left">
|
|
|
<view class="personal-name">
|
|
|
<span>{{userinfo.nickName || '微信用户'}}</span>
|
|
|
- <span class="personal-phone">{{' / ' + userinfo.phonenumber || '-'}}</span>
|
|
|
+ <span class="personal-phone">/{{userinfo.phonenumber || '-'}}</span>
|
|
|
</view>
|
|
|
<view class="personal-role">
|
|
|
{{userinfo.roles[0].roleName || '-'}}
|
|
@@ -18,13 +24,22 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="toPage">
|
|
|
- <view class="toPage-items" v-for="(item, index) in dataList" :key="index" @click="toPage(item)">
|
|
|
+ <view class="toPage-items" @click="toPage(0)">
|
|
|
+ <u-icon size="40" name="order"></u-icon>
|
|
|
+ <view class="toPage-title">
|
|
|
+ 工单上报
|
|
|
+ </view>
|
|
|
+ <view class="toPage-next">
|
|
|
+ {{esOrder + ' >'}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="toPage-items" @click="toPage(1)">
|
|
|
<u-icon size="40" name="order"></u-icon>
|
|
|
<view class="toPage-title">
|
|
|
- {{item.title}}
|
|
|
+ 参与工单
|
|
|
</view>
|
|
|
<view class="toPage-next">
|
|
|
- >
|
|
|
+ {{processRecords + ' >'}}
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -51,12 +66,16 @@
|
|
|
dataInfo: {},
|
|
|
background: null,
|
|
|
userinfo: {},
|
|
|
+ //上报工单
|
|
|
+ esOrder: 0,
|
|
|
+ //参与工单
|
|
|
+ processRecords: 0,
|
|
|
+ // 状态栏高度
|
|
|
+ statusBarHeight: 0,
|
|
|
+ // 导航栏高度
|
|
|
+ navBarHeight: 82+11,
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
- let userinfo = uni.getStorageSync('user')
|
|
|
- this.userinfo = JSON.parse(userinfo)
|
|
|
- },
|
|
|
computed: {
|
|
|
usernameFirst: {
|
|
|
get() {
|
|
@@ -72,13 +91,49 @@
|
|
|
},
|
|
|
onLoad() {
|
|
|
this.background = myPrimary;
|
|
|
+ this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight'];
|
|
|
+ let systemInfoSync = uni.getSystemInfoSync();
|
|
|
+ this.screenHeight = systemInfoSync.screenHeight - 500;
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ let userinfo = uni.getStorageSync('user')
|
|
|
+ if(userinfo) {
|
|
|
+ this.userinfo = JSON.parse(userinfo)
|
|
|
+ }
|
|
|
+ this.getMyRecordData();
|
|
|
},
|
|
|
methods: {
|
|
|
- toPage(item) {
|
|
|
- uni.navigateTo({
|
|
|
- url: item.path + '?type=' + item.type
|
|
|
- })
|
|
|
+ //跳转详情
|
|
|
+ toPage(type) {
|
|
|
+ let token = uni.getStorageSync('token')
|
|
|
+ if(!token) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/public/login'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/ucenter/mineNotes?type=' + type
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
+ //获取我的记录数据
|
|
|
+ getMyRecordData() {
|
|
|
+ const _that = this;
|
|
|
+ _that.dataInfo = {};
|
|
|
+ uni.showLoading({
|
|
|
+ title: '搜索中...',
|
|
|
+ })
|
|
|
+ _that.$http.getMyRecord('').then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+ if(res.code == 200) {
|
|
|
+ let {esOrder, processRecords} = res.data
|
|
|
+ _that.esOrder = esOrder;
|
|
|
+ _that.processRecords = processRecords;
|
|
|
+ } else {
|
|
|
+ // _that.$utils.msg(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -108,7 +163,7 @@
|
|
|
display: flex;
|
|
|
padding: 0 30rpx;
|
|
|
.personal-info-left {
|
|
|
- width: 70%;
|
|
|
+ width: 80%;
|
|
|
.personal-name {
|
|
|
font-size: 40rpx;
|
|
|
font-family: PingFang SC-Semibold, PingFang SC;
|
|
@@ -175,5 +230,36 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .navBarBox{position: fixed;}
|
|
|
+ .navBarBox .statusBar {}
|
|
|
+ .navBarBox .navBar {
|
|
|
+ padding: 3rpx 50rpx;
|
|
|
+ padding-bottom: 8rpx;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ position: fixed;
|
|
|
+ .navBar-title {
|
|
|
+ height: 24px;
|
|
|
+ font-size: 17px;
|
|
|
+ font-family: PingFang SC-Medium, PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #000000;
|
|
|
+ line-height: 24px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .navBarBox .navBar .logo {
|
|
|
+ width: 82rpx;
|
|
|
+ height: 82rpx;
|
|
|
+ margin-right: 10rpx;
|
|
|
+ }
|
|
|
+ .grace-loading {
|
|
|
+ position: relative;
|
|
|
+ text-align: center;
|
|
|
+ padding-top: 100rpx;
|
|
|
+ height: 300rpx;
|
|
|
+ color: #979797;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|