健康上报

This commit is contained in:
liuye
2022-02-09 17:51:05 +08:00
parent a20ae7328c
commit 458972a22d
2 changed files with 18 additions and 12 deletions

View File

@@ -7,7 +7,7 @@
<div class="form-item__title">
<span class="label">姓名</span>
</div>
<div class="form-item__right"><AiOpenData v-if="user.wxUserId" type="userName" :openid="user.wxUserId" /></div>
<div class="form-item__right"><AiOpenData v-if="wxUserId" type="userName" :openid="wxUserId" /></div>
</div>
</div>
</div>
@@ -77,7 +77,8 @@ export default {
month: '',
selectDay: '',
healthInfo: {},
userId: ''
userId: '',
wxUserId: ''
}
},
computed: {
@@ -85,6 +86,7 @@ export default {
},
onLoad(option) {
this.userId = option.id
this.wxUserId = option.wxUserId
var date = new Date();
this.selectDay = date.getDate()
this.month = date.getMonth() + 1

View File

@@ -1,14 +1,14 @@
<template>
<div class="OtherUser">
<AiTopFixed>
<!-- <AiTopFixed>
<div class="seachObjs">
<u-search v-model="keyword" :clearabled="true" placeholder="请输入姓名" :show-action="false" bg-color="#F5F5F5" search-icon-color="#E2E8F1" color="#666" height="58" @search="getListInit" @clear="handerClear"></u-search>
</div>
</AiTopFixed>
</AiTopFixed> -->
<div class="user-list">
<div class="item" v-for="(item, index) in list" :key="index" @click="toOtherSta(item.id)" >
<div class="item" v-for="(item, index) in list" :key="index" @click="toOtherSta(item.memberId, item.wxUserId)" >
<div class="left">
<img src="./components/img/user-icon.png" alt="">{{item.name}}
<img src="./components/img/user-icon.png" alt=""><AiOpenData v-if="item.wxUserId" type="userName" :openid="item.wxUserId" />
</div>
<div class="right">
<span :class="item.status == 1 ? '' : 'color-F5A319'">{{item.status == 1 ? '今日已上报' : '今日未上报'}}</span><img src="./components/img/right-icon.png" alt="">
@@ -29,7 +29,8 @@ export default {
keyword: '',
current: 1,
girdMemberId: '',
list: []
list: [],
total: 1
}
},
computed: {
@@ -43,8 +44,8 @@ export default {
document.title = '其他成员'
},
methods: {
toOtherSta(id) {
uni.navigateTo({ url: `./OtherStatistics?id=${id}`})
toOtherSta(id, wxUserId) {
uni.navigateTo({ url: `./OtherStatistics?id=${id}&wxUserId=${wxUserId}`})
},
handerClear() {
this.keyword = ''
@@ -52,14 +53,17 @@ export default {
},
getListInit() {
this.current = 1
this.total = 1
this.list = []
this.getUserList()
},
getUserList() {
if(this.list.length >= this.total) {
return
}
this.$http.post(`/app/appepidemichealthreport/other-report?girdMemberId=${this.girdMemberId}&name=${this.keyword}&size=20&current=${this.current}`).then((res) => {
if (res.code == 0) {
if (this.current > 1 && this.current > res.data.pages) {
return
}
this.total = res.data.total
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
}
})