This commit is contained in:
花有清香月有阴
2022-01-11 14:33:59 +08:00
parent 7a19fe8562
commit dcc512919d
2 changed files with 76 additions and 47 deletions

View File

@@ -41,11 +41,10 @@
<div class="line3"></div>
<template>
<!-- v-if="data.length" -->
<template v-if="data.length">
<div class="templates" v-for="(item, i) in 10" :key="i" @click="goDetail()">
<!-- <img :src="" alt="" v-if='item.avatar'/> -->
<img src="./components/img/user-img.png" alt="" />
<img :src="item.avatar" alt="" v-if="item.avatar" />
<img src="./components/img/user-img.png" alt="" v-else />
<div class="rightCont">
<div class="rightContLeft">
@@ -72,7 +71,7 @@
</div>
</template>
<!-- <AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty> -->
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
</div>
</div>
</template>
@@ -113,9 +112,33 @@ export default {
onLoad() {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
this.getList()
},
onShow() {
document.title = '健康监测'
},
onShow() {},
methods: {
getList() {
uni.showLoading({
title: '加载数据中',
})
this.$http
.post('/app/appepidemichealthreport/list', null, {
params: { size: 20, current: this.current, areaId: this.areaId, status: this.currentTabs == 1 ? '0' : '' },
})
.then((res) => {
if (res?.data) {
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
uni.hideLoading()
} else {
uni.hideLoading()
}
})
.catch(() => {
uni.hideLoading()
})
},
goDetail() {
uni.navigateTo({
url: `./HealthDetail`,
@@ -123,24 +146,24 @@ export default {
},
change(index) {
// this.data = []
this.data = []
this.areaId = this.user.areaId
this.keyword = ''
this.currentTabs = index
this.current = 1
// this.getList()
this.getList()
},
handerSearch(e) {
this.keyword = e
// this.current = 1
// this.getList()
this.current = 1
this.getList()
},
handerClear() {
this.keyword = ''
// this.current = 1
// this.getList()
this.current = 1
this.getList()
},
},
}