健康上报

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

View File

@@ -1,14 +1,14 @@
<template> <template>
<div class="OtherUser"> <div class="OtherUser">
<AiTopFixed> <!-- <AiTopFixed>
<div class="seachObjs"> <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> <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> </div>
</AiTopFixed> </AiTopFixed> -->
<div class="user-list"> <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"> <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>
<div class="right"> <div class="right">
<span :class="item.status == 1 ? '' : 'color-F5A319'">{{item.status == 1 ? '今日已上报' : '今日未上报'}}</span><img src="./components/img/right-icon.png" alt=""> <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: '', keyword: '',
current: 1, current: 1,
girdMemberId: '', girdMemberId: '',
list: [] list: [],
total: 1
} }
}, },
computed: { computed: {
@@ -43,8 +44,8 @@ export default {
document.title = '其他成员' document.title = '其他成员'
}, },
methods: { methods: {
toOtherSta(id) { toOtherSta(id, wxUserId) {
uni.navigateTo({ url: `./OtherStatistics?id=${id}`}) uni.navigateTo({ url: `./OtherStatistics?id=${id}&wxUserId=${wxUserId}`})
}, },
handerClear() { handerClear() {
this.keyword = '' this.keyword = ''
@@ -52,14 +53,17 @@ export default {
}, },
getListInit() { getListInit() {
this.current = 1 this.current = 1
this.total = 1
this.list = []
this.getUserList() this.getUserList()
}, },
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) => { 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 (res.code == 0) {
if (this.current > 1 && this.current > res.data.pages) { this.total = res.data.total
return
}
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
} }
}) })