健康监测

This commit is contained in:
花有清香月有阴
2022-01-11 15:56:08 +08:00
parent 086c4fbc91
commit 2cbcf2198c
4 changed files with 109 additions and 12 deletions

View File

@@ -57,6 +57,7 @@ export default {
computed: {
...mapState(['user']),
},
onLoad() {},
onShow() {
document.title = '异常情况处理'
},

View File

@@ -2,19 +2,19 @@
<div class="Health">
<div class="header">
<div class="tab-item">
<h2 style="color: #2c51ce">274</h2>
<h2 style="color: #2c51ce">{{ userList.total }}</h2>
<p>返乡人员</p>
</div>
<div class="tab-item">
<h2 style="color: #5aad6a">274</h2>
<h2 style="color: #5aad6a">{{ userList.today }}</h2>
<p>今日返乡</p>
</div>
<div class="tab-item">
<h2 style="color: #f5a319">274</h2>
<h2 style="color: #f5a319">{{ userList.unReport }}</h2>
<p>今日异常</p>
</div>
<div class="tab-item">
<h2 style="color: #cd413a; border-right: 0">274</h2>
<h2 style="color: #cd413a; border-right: 0">{{ userList.unusual }}</h2>
<p>异常处理</p>
</div>
</div>
@@ -36,7 +36,7 @@
<div class="line2"></div>
<div class="bottom">
<div class="bottoms">
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#fff" inactive-color="#333" bar-width="192" active-color="#135AB8 " @change="change"></u-tabs>
<div class="line3"></div>
@@ -101,7 +101,7 @@ export default {
},
],
currentTabs: 0,
userList: [],
data: [],
}
},
@@ -113,6 +113,7 @@ export default {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
this.getList()
this.getUserList()
},
onShow() {
document.title = '健康监测'
@@ -123,7 +124,7 @@ export default {
title: '加载数据中',
})
this.$http
.post('/app/appepidemichealthreport/list', null, {
.post('/app/appepidemicreportmember/list', null, {
params: { size: 20, current: this.current, areaId: this.areaId, status: this.currentTabs == 1 ? '0' : '' },
})
.then((res) => {
@@ -139,12 +140,36 @@ export default {
})
},
getUserList() {
uni.showLoading({
title: '加载数据中',
})
this.$http
.post('/app/appepidemicreportmember/statistic')
.then((res) => {
if (res?.code == 0) {
this.userList = res.data
uni.hideLoading()
} else {
uni.hideLoading()
}
})
.catch(() => {
uni.hideLoading()
})
},
goDetail() {
uni.navigateTo({
url: `./HealthDetail`,
})
},
areaSelect(e) {
this.areaId = e
this.getList()
},
change(index) {
this.data = []
this.areaId = this.user.areaId
@@ -232,7 +257,11 @@ export default {
background: #f3f6f9;
}
.bottom {
.bottoms {
.u-tabs {
margin-bottom: -8px;
}
.line3 {
height: 4px;
background: #f3f6f9;

View File

@@ -66,15 +66,59 @@ export default {
data() {
return {
data: [],
id: '',
}
},
computed: {
...mapState(['user']),
},
watch: {},
onLoad() {},
onShow() {},
onLoad(o) {
if (o.id) {
this.id = o.id
this.getDetail()
}
this.getRecord()
},
onShow() {
document.title = '健康监测'
},
methods: {
getDetail() {
this.$loading()
this.$http
.post(`/app/appepidemichealthreport/list`)
.then((res) => {
if (res?.code == 0) {
console.log(res.data)
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
this.$hideLoading()
} else {
this.$hideLoading()
}
})
.catch(() => {
this.$hideLoading()
})
},
getRecord() {
this.$loading()
this.$http
.post(`/app/appepidemicunusuallog/list`)
.then((res) => {
if (res?.code == 0) {
console.log(res.data)
this.$hideLoading()
} else {
this.$hideLoading()
}
})
.catch(() => {
this.$hideLoading()
})
},
toUserDetail() {
uni.navigateTo({
url: `./UserDetail`,

View File

@@ -79,9 +79,32 @@ export default {
components: {},
props: {},
data() {
return {}
return {
id: '',
}
},
onLoad() {},
onShow() {
document.title = '健康监测'
},
methods: {
getDetail() {
this.$loading()
this.$http
.post(`/app/appepidemichealthreport/queryDetailById?memberId=${this.id}`)
.then((res) => {
if (res?.code == 0) {
console.log(res.data)
this.$hideLoading()
} else {
this.$hideLoading()
}
})
.catch(() => {
this.$hideLoading()
})
},
},
methods: {},
}
</script>