postdischarge-applet/pages/HealthCalendar/HealthCalendar.vue
zhuangyuanke daf9159fca 1
2024-11-01 13:36:21 +08:00

149 lines
2.9 KiB
Vue

<template>
<view class="app">
<view class="" v-if="selectTask.length>0">
<view class="bodyitem" v-for="item in selectTask">
<view class="left">
<view class="timetop">
第{{item.routeNodeDay}}天
</view>
<view class="">
{{item.executeTime}}
</view>
</view>
<!-- <span class="times" v-if="item.executeTime">{{item.executeTime}}</span>
<span class="times" v-else></span> -->
<span class="name">{{item.manageRouteNodeName}}</span>
</view>
</view>
<u-empty v-else text="暂无内容" mode="list" icon-size="220"></u-empty>
</view>
</template>
<script>
import {
selectTaskExecuteRecord
} from '@/api/HealthCalendar/HealthCalendar.js'
export default {
data() {
return {
selectTask: [], //随访列表
total: 0,
query: {
pageNum: 1,
pageSize: 10,
// residentId: 4,
residentId: ''
},
}
},
onLoad() {
if (uni.getStorageSync('patientId')) {
this.query.residentId = uni.getStorageSync('patientId')
this.info();
}
},
methods: {
info() {
selectTaskExecuteRecord(this.query).then(res => {
this.selectTask = res.rows
this.total = res.total
})
},
},
onReachBottom() { //下滑加载
if (this.selectTask.length >= this.total) {} else {
this.query.pageNum++;
selectTaskExecuteRecord(this.query).then(res => {
if (res.rows) {
res.rows.forEach(e => {
this.selectTask.push(e)
})
}
})
}
},
onPullDownRefresh() { //下拉刷新
this.selectTask = []
this.query.pageNum = 1;
this.info();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
}
</script>
<style lang="scss">
page {
background-color: #F7F5F5;
}
::v-deep .u-empty {
margin-top: 100rpx !important;
}
.app {
padding: 30rpx 0;
.bodyitem {
width: 95%;
height: 183rpx;
background: #FFFFFF;
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 5rpx;
margin: 0rpx auto;
padding-right: 10px;
white-space: nowrap;
overflow: hidden;
display: flex;
align-items: center; /* 垂直居中 */
text-overflow: ellipsis;
border-bottom: 1rpx solid #CDC9C9;
// margin: 20rpx auto 0;
// margin: 30rpx 30rpx -28rpx 30rpx;
.left{
font-family: Source Han Sans CN;
font-size: 30rpx;
padding-left: 70rpx;
.timetop{
padding-bottom: 6rpx;
text-align: center;
}
}
.times {
display: inline-block;
width: 179rpx;
line-height: 183rpx;
font-size: 30rpx;
font-family: Source Han Sans CN;
font-weight: 500;
color: #000000;
margin-left: 70rpx;
}
.name {
line-height: 183rpx;
font-size: 30rpx;
font-family: Source Han Sans CN;
font-weight: 500;
color: #000000;
margin-left: 50rpx;
text-overflow: ellipsis;
overflow: hidden;
}
}
}
</style>