NurseStationPersonAppletUl/pages/homepage/homepage.vue
2023-04-06 15:52:19 +08:00

268 lines
5.5 KiB
Vue

<template>
<view class="app">
<image class="circular" :src="beijingurl" mode=""></image>
<view class="topfloat">
<image src="../../static/gongdan.png" mode=""></image>
<view class="tapbtn" @tap="goMymission('')">
立即处理
</view>
<view class="btns">
<view class="btn" @tap="goMymission('NOT_FINISH')">
<view class="number">
{{selectOrderByNursePersonCountlist.notFinshCount}}
</view>
<view class="text">
待处理
</view>
</view>
<view class="btn" @tap="goMymission('COMPLETE')">
<view class="number" style="color: #333333;">
{{selectOrderByNursePersonCountlist.completeCount}}
</view>
<view class="text">
已完成
</view>
</view>
</view>
</view>
<view class="TemplateMessage" @tap='goTemplate' v-if="personRoleLoginFlag=='护理站'">
管理员模板消息订阅
</view>
<view class="centerfloat">
<view class="title">
在线学习
</view>
<view class="cards">
<image src="../../static/xxpx.png" mode=""></image>
<image src="../../static/jnks.png" mode=""></image>
<image src="../../static/zxkf.png" mode=""></image>
</view>
</view>
<view class="centerfloat bottomfloat">
<view class="title">
护理新闻
</view>
<view class="righttitle">
查看更多
<u-icon name="arrow-right" color='#969494'></u-icon>
</view>
<view class="items">
<view class="item">
<image src="../../static/jnks.png" mode=""></image>
<view class="toptext">
护理 I 致力于打造专业护理人才
</view>
<view class="centertext">
生活小窍门,是指人们在日常生活中总结出来的知识和经验,和生活小常识非常相似
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
selectOrderByNursePersonCount
} from '@/api/homepage/index.js'
import baseurl from '@/api/baseurl.js'
export default {
data() {
return {
beijingurl: null, //背景
nurserStationPresonId: 35, //护理员id
selectOrderByNursePersonCountlist: {}, //项目数量对象
personRoleLoginFlag: null, //身份认证
};
},
onShow() {
this.beijingurl = baseurl + '/profile/nursePersonAppletPicture/person_center.png'
this.OrderByNursePersonCount();
var that = this
const value = uni.getStorageSync('personRoleLoginFlag');
if (value) {
that.personRoleLoginFlag = value
} else {}
},
methods: {
//项目数量
OrderByNursePersonCount() {
selectOrderByNursePersonCount(this.nurserStationPresonId).then(res => {
this.selectOrderByNursePersonCountlist = res
})
},
goMymission(item) {
uni.navigateTo({
url: `/pages/Mymission/Mymission?orderStatus=${item}`
})
},
//跳转到模板消息订阅界面
goTemplate() {
uni.navigateTo({
url: "/pages/template/template"
})
},
},
}
</script>
<style lang="scss">
page {
background-color: #fff;
}
.app {
position: relative;
.TemplateMessage {
width: 94%;
margin: 40rpx auto;
background-color: #f4f6f7;
height: 150rpx;
line-height: 150rpx;
text-align: center;
font-size: 36rpx;
}
.bottomfloat {
position: relative;
.items {
width: 100%;
.item {
position: relative;
height: 150rpx;
width: 100%;
color: #666666;
image {
position: absolute;
top: 0;
left: 0;
width: 130rpx;
height: 130rpx;
}
.centertext {
font-size: 22rpx;
position: absolute;
top: 60rpx;
left: 150rpx;
overflow: hidden; //超出的文本隐藏
display: -webkit-box;
-webkit-line-clamp: 2; // 超出多少行
-webkit-box-orient: vertical;
}
.toptext {
font-size: 30rpx;
position: absolute;
top: 5rpx;
left: 150rpx;
width: 75%;
overflow: hidden; //超出的文本隐藏
display: -webkit-box;
-webkit-line-clamp: 1; // 超出多少行
-webkit-box-orient: vertical;
// overflow: hidden; //超出的文本隐藏
// text-overflow: ellipsis; //溢出用省略号显示
// white-space: nowrap; // 默认不换行;
}
}
}
.righttitle {
position: absolute;
right: 20rpx;
top: 0;
color: #969494;
font-size: 24rpx;
}
}
.centerfloat {
width: 94%;
margin: 50rpx auto 0;
.cards {
display: flex;
justify-content: space-between;
image {
width: 31%;
height: 240rpx;
}
}
.title {
height: 29rpx;
font-size: 30rpx;
line-height: 29rpx;
color: #333333;
margin: 0 0 40rpx 0;
padding-left: 10rpx;
border-left: 6rpx solid #4271B9;
}
}
.topfloat {
z-index: 999;
display: block;
width: 94%;
height: 510rpx;
margin: 160rpx auto 0;
position: relative;
box-shadow: 0rpx 3rpx 18rpx 0rpx rgba(79, 108, 254, 0.43);
.btns {
position: absolute;
top: 380rpx;
display: flex;
justify-content: space-around;
width: 100%;
text-align: center;
.btn {
width: 200rpx;
.text {
font-size: 30rpx;
color: #999999;
}
.number {
font-size: 34rpx;
color: #F14941;
}
}
}
.tapbtn {
width: 239rpx;
height: 70rpx;
background: #4271B9;
border-radius: 35rpx;
text-align: center;
line-height: 70rpx;
color: #fff;
position: absolute;
top: 210rpx;
left: 60rpx;
}
image {
width: 100%;
height: 100%;
}
}
.circular {
z-index: -1;
width: 100%;
height: 500rpx;
position: absolute;
top: 0;
}
}
</style>