NurseStationPersonAppletUl/pages/homepage/homepage.vue

294 lines
6.4 KiB
Vue
Raw Normal View History

2023-03-28 10:02:47 +08:00
<template>
<view class="app">
2023-04-03 14:55:17 +08:00
<image class="circular" :src="beijingurl" mode=""></image>
<view class="topfloat">
2023-04-12 14:25:04 +08:00
<image src="../../static/gongdan.png" mode="" @tap="goMymission('')"></image>
2023-04-03 14:55:17 +08:00
<view class="tapbtn" @tap="goMymission('')">
立即处理
</view>
<view class="btns">
<view class="btn" @tap="goMymission('NOT_FINISH')">
2023-04-07 15:34:32 +08:00
<view class="number" v-if="selectOrderByNursePersonCountlist.notFinishCount>=0">
2023-04-07 14:28:41 +08:00
{{selectOrderByNursePersonCountlist.notFinishCount}}
2023-04-03 14:55:17 +08:00
</view>
2023-04-07 15:34:32 +08:00
<view class="number" v-else>
0
</view>
2023-04-03 14:55:17 +08:00
<view class="text">
待处理
</view>
</view>
<view class="btn" @tap="goMymission('COMPLETE')">
2023-04-07 15:34:32 +08:00
<view class="number" style="color: #333333;"
v-if='selectOrderByNursePersonCountlist.completeCount>=0'>
2023-04-03 14:55:17 +08:00
{{selectOrderByNursePersonCountlist.completeCount}}
</view>
2023-04-07 15:34:32 +08:00
<view class="number" style="color: #333333;" v-else>
0
</view>
2023-04-03 14:55:17 +08:00
<view class="text">
已完成
</view>
2023-03-28 10:02:47 +08:00
</view>
</view>
2023-04-03 14:55:17 +08:00
</view>
2023-04-12 11:22:20 +08:00
<image @tap='goTemplate' class="TemplateMessage" src="../../static/dingyue.png" mode=""
v-if="personRoleLoginFlag=='stationRole'||personRoleLoginFlag=='wholeRole'"></image>
2023-04-03 14:55:17 +08:00
<view class="centerfloat">
<view class="title">
在线学习
</view>
<view class="cards">
2023-04-10 16:48:17 +08:00
<image src="../../static/xxpx.png" mode="" @tap='gostudy'></image>
<image src="../../static/jnks.png" mode="" @tap='gostudy'></image>
<image src="../../static/zxkf.png" mode="" @tap='gostudy'></image>
2023-04-03 14:55:17 +08:00
</view>
</view>
<view class="centerfloat bottomfloat">
<view class="title">
护理新闻
</view>
2023-04-10 16:48:17 +08:00
<view class="righttitle" @tap='gostudy'>
2023-04-03 14:55:17 +08:00
查看更多
<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>
2023-03-28 10:02:47 +08:00
</view>
</view>
</view>
</view>
</template>
<script>
import {
2023-04-03 14:55:17 +08:00
selectOrderByNursePersonCount
} from '@/api/homepage/index.js'
2023-04-06 17:15:57 +08:00
import {
mapActions
} from "vuex";
2023-04-03 14:55:17 +08:00
import baseurl from '@/api/baseurl.js'
2023-03-28 10:02:47 +08:00
export default {
data() {
return {
2023-04-03 14:55:17 +08:00
beijingurl: null, //背景
2023-04-07 14:28:41 +08:00
nurserStationPersonId: null, //护理员id
2023-04-03 14:55:17 +08:00
selectOrderByNursePersonCountlist: {}, //项目数量对象
2023-04-10 09:27:09 +08:00
personRoleLoginFlag: 'notRoleName', //身份认证
2023-03-28 10:02:47 +08:00
};
},
onShow() {
2023-04-11 17:12:18 +08:00
this.selectOrderByNursePersonCountlist = {}
2023-04-03 14:55:17 +08:00
this.beijingurl = baseurl + '/profile/nursePersonAppletPicture/person_center.png'
2023-04-06 15:52:19 +08:00
var that = this
2023-04-07 14:28:41 +08:00
const value = uni.getStorageSync('nursePersonId');
2023-04-06 15:52:19 +08:00
if (value) {
2023-04-07 14:28:41 +08:00
that.nurserStationPersonId = value
that.OrderByNursePersonCount();
} else {}
const value2 = uni.getStorageSync('personRoleLoginFlag');
if (value2) {
that.personRoleLoginFlag = value2
2023-04-06 15:52:19 +08:00
} else {}
2023-03-28 10:02:47 +08:00
},
methods: {
2023-04-06 17:15:57 +08:00
...mapActions(["personopenPopup"]),
2023-04-03 14:55:17 +08:00
//项目数量
OrderByNursePersonCount() {
2023-04-07 14:28:41 +08:00
selectOrderByNursePersonCount(this.nurserStationPersonId).then(res => {
2023-04-07 14:46:28 +08:00
this.selectOrderByNursePersonCountlist = res.data
2023-03-28 10:02:47 +08:00
})
},
2023-04-03 14:55:17 +08:00
goMymission(item) {
2023-04-11 14:25:57 +08:00
if (this.personRoleLoginFlag == 'nursePersonRole' || this.personRoleLoginFlag == 'wholeRole') {
2023-04-06 17:15:57 +08:00
this.personopenPopup();
}
setTimeout(e => {
uni.navigateTo({
url: `/pages/Mymission/Mymission?orderStatus=${item}`
})
}, 0)
2023-03-28 10:02:47 +08:00
},
2023-04-06 15:52:19 +08:00
//跳转到模板消息订阅界面
goTemplate() {
uni.navigateTo({
url: "/pages/template/template"
})
},
2023-04-10 16:48:17 +08:00
gostudy() {
uni.navigateTo({
url: '/pages/study/study'
})
},
2023-03-28 10:02:47 +08:00
},
}
</script>
<style lang="scss">
2023-04-03 14:55:17 +08:00
page {
background-color: #fff;
}
.app {
position: relative;
2023-04-06 15:52:19 +08:00
.TemplateMessage {
2023-04-12 11:22:20 +08:00
display: block;
2023-04-06 15:52:19 +08:00
width: 94%;
2023-04-12 11:22:20 +08:00
margin: 30rpx auto;
2023-04-06 15:52:19 +08:00
background-color: #f4f6f7;
2023-04-12 11:22:20 +08:00
height: 100rpx;
line-height: 100rpx;
2023-04-06 15:52:19 +08:00
text-align: center;
font-size: 36rpx;
}
2023-04-03 14:55:17 +08:00
.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;
}
2023-03-28 10:02:47 +08:00
}
</style>