NurseStationPersonAppletUl/pages/homepage/homepage.vue

317 lines
7.0 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-13 15:40:16 +08:00
<image @tap='goTemplate' class="TemplateMessage" src="../../static/dingyue.png" mode=""
v-if="personRoleLoginFlag=='stationRole'||personRoleLoginFlag=='wholeRole'||personRoleLoginFlag=='nursePersonRole'">
</image>
2023-04-03 14:55:17 +08:00
<view class="centerfloat">
<view class="title">
在线学习
</view>
<view class="cards">
2023-04-21 15:44:00 +08:00
<image src="../../static/xxpx.png" mode="" @tap='goLearningtraining'></image>
2023-04-10 16:48:17 +08:00
<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-13 11:23:41 +08:00
<view class="righttitle" @tap='goHealthknowledge'>
2023-04-03 14:55:17 +08:00
查看更多
<u-icon name="arrow-right" color='#969494'></u-icon>
</view>
2023-04-13 11:23:41 +08:00
<view class="items" @tap='goHealthknowledge'>
2023-05-05 16:20:55 +08:00
<view class="item" v-for='(item,index) in NurseNewslist' @tap='goHealthitem(item)'>
2023-05-05 15:46:11 +08:00
<image :src="item.leadThumbnailUrl" mode=""></image>
2023-04-03 14:55:17 +08:00
<view class="toptext">
2023-05-05 15:46:11 +08:00
{{item.informationTitle}}
2023-04-03 14:55:17 +08:00
</view>
2023-03-28 10:02:47 +08:00
</view>
</view>
</view>
</view>
</template>
<script>
import {
2023-05-05 15:46:11 +08:00
selectOrderByNursePersonCount,
selectNurseNews
2023-04-03 14:55:17 +08:00
} 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-05-05 15:46:11 +08:00
NurseNewslist: [],
2023-03-28 10:02:47 +08:00
};
},
onShow() {
2023-05-05 15:46:11 +08:00
this.selectNurseNewsinfo();
2023-04-13 10:41:41 +08:00
this.personRoleLoginFlag = "notRoleName"
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-13 15:18:45 +08:00
uni.navigateTo({
url: `/pages/Mymission/Mymission?orderStatus=${item}`
})
2023-03-28 10:02:47 +08:00
},
2023-04-06 15:52:19 +08:00
//跳转到模板消息订阅界面
goTemplate() {
2023-04-13 15:18:45 +08:00
if (this.personRoleLoginFlag == 'stationRole' || this.personRoleLoginFlag == 'wholeRole') {
uni.navigateTo({
url: "/pages/template/template"
})
2023-04-13 15:33:46 +08:00
} else if (this.personRoleLoginFlag == 'nursePersonRole') {
2023-04-13 15:18:45 +08:00
this.personopenPopup();
}
2023-04-06 15:52:19 +08:00
},
2023-04-10 16:48:17 +08:00
gostudy() {
uni.navigateTo({
url: '/pages/study/study'
})
},
2023-04-13 11:23:41 +08:00
goHealthknowledge() {
uni.navigateTo({
url: '/pages/Healthknowledge/Healthknowledge',
});
},
2023-04-21 15:44:00 +08:00
//跳转学习培训
goLearningtraining() {
uni.navigateTo({
url: '/pages/Learningtraining/Learningtraining'
})
},
2023-05-05 15:46:11 +08:00
//护理新闻
selectNurseNewsinfo() {
selectNurseNews().then(res => {
if (res.rows) {
res.rows.forEach(e => {
e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl
})
}
this.NurseNewslist = res.rows
})
},
2023-05-05 16:20:55 +08:00
//跳转详情
goHealthitem(item) {
uni.navigateTo({
url: `/pages/Healthitem/Healthitem?item=${encodeURIComponent(JSON.stringify(item))}`
})
},
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;
2023-05-05 16:20:55 +08:00
height: 170rpx;
2023-04-03 14:55:17 +08:00
width: 100%;
color: #666666;
2023-05-05 16:20:55 +08:00
padding: 0 0 20rpx;
margin: 20rpx 0;
border-bottom: 1rpx solid #cdc9c9;
2023-04-03 14:55:17 +08:00
image {
position: absolute;
top: 0;
left: 0;
2023-05-05 15:46:11 +08:00
width: 150rpx;
height: 150rpx;
2023-04-03 14:55:17 +08:00
}
.toptext {
2023-05-05 15:46:11 +08:00
line-height: 30rpx;
font-size: 26rpx;
2023-04-03 14:55:17 +08:00
position: absolute;
top: 5rpx;
2023-05-05 15:46:11 +08:00
left: 170rpx;
width: 70%;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
2023-04-03 14:55:17 +08:00
display: -webkit-box;
2023-05-05 15:46:11 +08:00
-webkit-line-clamp: 5; //行数需设置
line-clamp: 5;
2023-04-03 14:55:17 +08:00
-webkit-box-orient: vertical;
2023-05-05 15:46:11 +08:00
text-align: justify;
2023-04-03 14:55:17 +08:00
}
}
}
.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>