diff --git a/src/saas/AppHealthUp/AppHealthUp.vue b/src/saas/AppHealthUp/AppHealthUp.vue
index 2e0e6c01..a2c9de19 100644
--- a/src/saas/AppHealthUp/AppHealthUp.vue
+++ b/src/saas/AppHealthUp/AppHealthUp.vue
@@ -67,7 +67,7 @@
-
+
-
@@ -146,25 +152,99 @@ export default {
return {
tabList: [{ name: '健康上报'},{ name: '上报统计'}],
currentTabs: 0,
- form: {},
+ form: {temperature: '', touchInFourteen: '', health: []},
isUpload: false,
- weekList: ['一', '二', '三', '四', '五', '六', '日']
+ weekList: ['一', '二', '三', '四', '五', '六', '日'],
+ dayList: [],
+ month: '',
+ selectDay: '',
+ healthInfo: {},
+ isAdmin: false, //是否网格长
}
},
computed: {
...mapState(['user']),
},
onLoad() {
+ this.$dict.load('epidemicTouchInFourteen', 'epidemicRecentHealth')
+ var date = new Date();
+ this.selectDay = date.getDate()
+ this.month = date.getMonth() + 1
this.getStatis()
+ this.getCheckTodayReport()
},
onShow() {
document.title = '健康上报'
},
methods: {
+ dayClick(item) {
+ this.healthInfo = {}
+ this.selectDay = item.day
+ if(!item.id) {
+ return this.$u.toast("当日未上报");
+ }
+ this.$http.post(`/app/appepidemichealthreport/queryDetailById?id=${item.id}`).then((res) => {
+ if (res.code == 0) {
+ this.healthInfo = res.data
+ this.healthInfo.health = res.data.health.split(',')
+ }
+ })
+ },
+ submit() {
+ if (!this.form.temperature) {
+ return this.$u.toast("请输入当前体温");
+ }
+ if (!this.form.touchInFourteen) {
+ return this.$u.toast("请选择14天内是否接触新冠确诊或疑似患者");
+ }
+ if (!this.form.health.length) {
+ return this.$u.toast("请选择当前健康状况");
+ }
+ this.$http.post(`/app/appepidemichealthreport/addOrUpdate`, {
+ ...this.form,
+ health: this.form.health.join(',')
+ }).then((res) => {
+ if (res.code == 0) {
+ this.$u.toast("上报成功");
+ this.getCheckTodayReport()
+ this.getStatis()
+ }
+ });
+ },
+ getCheckTodayReport() {
+ this.$http.post(`/app/appepidemichealthreport/checkTodayReport`).then((res) => {
+ if (res.code == 0) {
+ this.isUpload = res.data
+ }
+ })
+ },
getStatis() {
+ this.dayList = []
this.$http.post(`/app/appepidemichealthreport/statistic`).then((res) => {
if (res.code == 0) {
- // this.dataInfo = res.data
+ Object.keys(res.data).forEach((key) => {
+ var info = {
+ week: res.data[key].week,
+ day: key,
+ status: res.data[key].status || '2',
+ id: res.data[key].id || '',
+ }
+ this.dayList.push(info)
+ })
+ var week = Number(this.dayList[0].week) - 1
+ if(week > 0) {
+ for(var i= 0; i
{
+ if(item.day == this.selectDay && item.id) {
+ this.dayClick(item)
+ }
+ })
}
})
},
@@ -173,7 +253,17 @@ export default {
},
toOther() {
uni.navigateTo({ url: './OtherUser'})
- }
+ },
+ isGirdUser() {
+ this.isAdmin = false
+ this.$http.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => {
+ if (res.code == 0) {
+ if (res.data.checkType == 2) {
+ this.isAdmin = true
+ }
+ }
+ })
+ },
},
}
@@ -298,8 +388,7 @@ uni-page-body {
display: flex;
align-items: center;
justify-content: space-between;
- height: 128px;
- padding-right: 28px;
+ padding: 40px 28px 40px 0;
border-bottom: 1px solid #dddddd;
input {
@@ -325,9 +414,7 @@ uni-page-body {
max-width: 400px;
margin-right: 8px;
color: #333333;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
+ word-break: break-all;
}
i {
@@ -437,7 +524,6 @@ uni-page-body {
font-size: 32px!important;
}
.group_title{
- width: 100%;
height: 116px;
line-height: 116px;
background: #FFF;
@@ -510,15 +596,14 @@ uni-page-body {
top: 60px;
left: 50%;
margin-left: -4px;
- background: #3B87F6;
}
- .status0{
+ .bg-2{
background: #999;
}
- .status1{
+ .bg-1{
background: #3B87F6;
}
- .status2{
+ .bg-0{
background: #f46;
}
}
@@ -537,5 +622,14 @@ uni-page-body {
.pad-b112{
padding-bottom: 112px;
}
+ .color-0{
+ color: #42D784;
+ }
+ .color-1{
+ color: #f46;
+ }
+ .color-2{
+ color: #1365DD;
+ }
}
diff --git a/src/saas/AppHealthUp/OtherStatistics.vue b/src/saas/AppHealthUp/OtherStatistics.vue
index 63c40b89..b4d227a9 100644
--- a/src/saas/AppHealthUp/OtherStatistics.vue
+++ b/src/saas/AppHealthUp/OtherStatistics.vue
@@ -7,32 +7,32 @@
姓名
- 张三
+