|
@@ -5,7 +5,7 @@
|
|
<div class="name">工作台</div>
|
|
<div class="name">工作台</div>
|
|
<div class="actions">
|
|
<div class="actions">
|
|
<div class="message" @click="linkToMessage">
|
|
<div class="message" @click="linkToMessage">
|
|
- <image class="icon" src="/static/index/message.png" mode="widthFix"></image>
|
|
|
|
|
|
+ <image v-if="user.userAvatar" class="icon" src="/static/index/message.png" mode="widthFix"></image>
|
|
</div>
|
|
</div>
|
|
<div class="scan" @click="scanQrcode">
|
|
<div class="scan" @click="scanQrcode">
|
|
<image class="icon" src="/static/index/scanner.png" mode="widthFix"></image>
|
|
<image class="icon" src="/static/index/scanner.png" mode="widthFix"></image>
|
|
@@ -15,19 +15,20 @@
|
|
</view>
|
|
</view>
|
|
<view class="user-info">
|
|
<view class="user-info">
|
|
<div class="company">
|
|
<div class="company">
|
|
- <text class="company-name">某某股份有限公司</text>
|
|
|
|
|
|
+ <text class="company-name">{{user.ocName}}</text>
|
|
<image class="icon" src="/static/index/company.png" mode="widthFix"></image>
|
|
<image class="icon" src="/static/index/company.png" mode="widthFix"></image>
|
|
</div>
|
|
</div>
|
|
<div class="user">
|
|
<div class="user">
|
|
<view class="avatar-box">
|
|
<view class="avatar-box">
|
|
- <image class="avatar" src="/static/index/user.png" mode="widthFix"></image>
|
|
|
|
|
|
+ <image v-if="user.userAvatar" class="avatar" :src="user.userAvatar" mode="widthFix" @error="userAvatar=defaultAvatar"></image>
|
|
|
|
+ <image v-else class="avatar" :src="defaultAvatar" mode="widthFix"></image>
|
|
</view>
|
|
</view>
|
|
<view class="info">
|
|
<view class="info">
|
|
<view class="user-name">
|
|
<view class="user-name">
|
|
- 侯亚峰
|
|
|
|
|
|
+ {{user.userName}}
|
|
</view>
|
|
</view>
|
|
<view class="user-position">
|
|
<view class="user-position">
|
|
- 主管安全的副厂长
|
|
|
|
|
|
+ {{user.positionName}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</div>
|
|
</div>
|
|
@@ -41,7 +42,13 @@
|
|
<image class="icon" src="/static/index/notice.png" mode="widthFix"></image>
|
|
<image class="icon" src="/static/index/notice.png" mode="widthFix"></image>
|
|
<text>最近动态</text>
|
|
<text>最近动态</text>
|
|
</div>
|
|
</div>
|
|
- <div class="notice-cont">公司最近发布《公司2023年管理办法》</div>
|
|
|
|
|
|
+ <div class="notice-cont">
|
|
|
|
+ <uni-notice-bar
|
|
|
|
+ scrollable :text="notice"
|
|
|
|
+ background-color="#fff0"
|
|
|
|
+ :speed="20"
|
|
|
|
+ color="#333" />
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<view class="tab">
|
|
<view class="tab">
|
|
<div class="tab-item">
|
|
<div class="tab-item">
|
|
@@ -97,10 +104,25 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+ import {getNotices} from '@/api/system/art.js'
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- applist: []
|
|
|
|
|
|
+ applist: [],
|
|
|
|
+ defaultAvatar:"/static/components/avatar.png",
|
|
|
|
+ notice:"",
|
|
|
|
+ user:{
|
|
|
|
+ groupName: "",
|
|
|
|
+ ocName: "",
|
|
|
|
+ positionName: "",
|
|
|
|
+ roleName: "",
|
|
|
|
+ userAvatar: "",
|
|
|
|
+ userIntro: "",
|
|
|
|
+ userName: "",
|
|
|
|
+ userPhone: "",
|
|
|
|
+ userPhoto: "",
|
|
|
|
+ userRealName: ""
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
@@ -128,7 +150,20 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getData(){
|
|
getData(){
|
|
-
|
|
|
|
|
|
+ let user=uni.getStorageSync('accountInfo');
|
|
|
|
+ if(user){this.user=user}
|
|
|
|
+ let notice=""
|
|
|
|
+ getNotices({
|
|
|
|
+ page: 1,
|
|
|
|
+ limit: 10,
|
|
|
|
+ artCatId: 2,
|
|
|
|
+ artCatTitle: "最新动态"
|
|
|
|
+ }).then((res)=>{
|
|
|
|
+ for(let i=0;i<res.data.length;i++){
|
|
|
|
+ notice+=`${res.data[i].artTitle} 发布时间:${res.data[i].issuedAt};`
|
|
|
|
+ }
|
|
|
|
+ this.notice=notice
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -282,8 +317,12 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.notice-cont{
|
|
.notice-cont{
|
|
|
|
+ width: 500rpx;
|
|
|
|
+ height: 80rpx;
|
|
|
|
+ flex: 1;
|
|
font-size: 28rpx;
|
|
font-size: 28rpx;
|
|
color: rgba(0, 0, 0, 0.9);
|
|
color: rgba(0, 0, 0, 0.9);
|
|
|
|
+ // background-color: #fff;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.tab{
|
|
.tab{
|