整合上架版进入标准流程
This commit is contained in:
639
src/project/saas/AppHealthUp/AppHealthUp.vue
Normal file
639
src/project/saas/AppHealthUp/AppHealthUp.vue
Normal file
@@ -0,0 +1,639 @@
|
||||
<template>
|
||||
<div class="AppHealthUp">
|
||||
<AiTopFixed>
|
||||
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" @change="change"
|
||||
:bar-width="48" :bar-height="4" active-color="#fff" bg-color="#3975C6" inactive-color="#CDDCF0"></u-tabs>
|
||||
</AiTopFixed>
|
||||
<div v-if="currentTabs != 1">
|
||||
<div v-if="!isUpload">
|
||||
<div class="form-item__group">
|
||||
<div class="form-item">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
<i>*</i>
|
||||
<h2>姓名</h2>
|
||||
</div>
|
||||
<div class="form-item__right">
|
||||
<AiOpenData v-if="user.wxUserId" type="userName" :openid="user.wxUserId" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-item__group">
|
||||
<div class="form-item">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
<i>*</i>
|
||||
<h2>当前体温</h2>
|
||||
</div>
|
||||
<div class="form-item__right">
|
||||
<input
|
||||
placeholder="请输入"
|
||||
v-model="form.temperature"
|
||||
:maxlength="20"
|
||||
/>
|
||||
<i>℃</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-item form-item__imgs">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
<i>*</i>
|
||||
<h2>14天内是否接触新冠确诊或疑似患者</h2>
|
||||
</div>
|
||||
<div class="form-item__right">
|
||||
<AiRadio
|
||||
style="width: 100%"
|
||||
v-model="form.touchInFourteen"
|
||||
dict="epidemicTouchInFourteen"
|
||||
></AiRadio>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-item form-item__imgs">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
<i>*</i>
|
||||
<h2>当前健康状况(可多选)</h2>
|
||||
</div>
|
||||
<div class="form-item__right">
|
||||
<AiCheckbox
|
||||
style="width: 100%"
|
||||
v-model="form.health"
|
||||
dict="epidemicRecentHealth"
|
||||
></AiCheckbox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pad-b112" v-if="!isUpload && currentTabs != 1"></div>
|
||||
</div>
|
||||
<AiEmpty v-else :noPermit="true" description="今日已上报"></AiEmpty>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="form-item__group">
|
||||
<div class="group_title">基本信息</div>
|
||||
<div class="form-item">
|
||||
<div class="form-item__wrapper">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="time-content">
|
||||
<div class="title">上报记录<span>({{month}}月)</span></div>
|
||||
<div class="time">
|
||||
<div class="week-list">
|
||||
<span v-for="(item, index) in weekList" :key="index">{{item}}</span>
|
||||
</div>
|
||||
<div class="day-list">
|
||||
<div v-for="(item, index) in dayList" :key="index" class="item" :class="selectDay == item.day ? 'active' : ''" @click="dayClick(item)">
|
||||
<div class="num">{{item.day}}</div>
|
||||
<span class="status" :class="'bg-'+item.status" v-if="item.day"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-item__group" v-if="healthInfo.id">
|
||||
<div class="group_title">健康状况</div>
|
||||
<div class="form-item">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
<span class="label">当前体温</span>
|
||||
</div>
|
||||
<div class="form-item__right" :style="healthInfo.temperature >= 37.3 ? 'color:#f46;' : ''">{{healthInfo.temperature}}℃</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
<span class="label" style="width:190px;">14天内是否接触新冠确诊或疑似患者</span>
|
||||
</div>
|
||||
<div class="form-item__right">
|
||||
<div class="value" :class="'color-'+healthInfo.touchInFourteen">{{$dict.getLabel('epidemicTouchInFourteen', healthInfo.touchInFourteen)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
<span class="label">当前健康状况</span>
|
||||
</div>
|
||||
<div class="form-item__right">
|
||||
<span>
|
||||
<span v-for="(item, index) in healthInfo.health" :key="index" :style="item != 0 ? 'color:#FF4466;' : ''"><span v-if="index>0" :style="item != 0 ? 'color:#FF4466;' : ''">;</span>{{$dict.getLabel('epidemicRecentHealth', item)}}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pad-b112" v-if="currentTabs == 1 && isAdmin"></div>
|
||||
</div>
|
||||
|
||||
<div class="add-btn" v-if="!isUpload && currentTabs != 1" @click="submit">
|
||||
<div>提交</div>
|
||||
</div>
|
||||
<div class="add-btn" v-if="currentTabs == 1 && isAdmin" @click="toOther">
|
||||
<div>查看其他成员</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'AppHealthUp',
|
||||
appName: '健康上报',
|
||||
data() {
|
||||
return {
|
||||
tabList: [{ name: '健康上报'},{ name: '上报统计'}],
|
||||
currentTabs: 0,
|
||||
form: {temperature: '', touchInFourteen: '', health: []},
|
||||
isUpload: true,
|
||||
weekList: ['一', '二', '三', '四', '五', '六', '日'],
|
||||
dayList: [],
|
||||
month: '',
|
||||
selectDay: '',
|
||||
healthInfo: {},
|
||||
isAdmin: false, //是否网格长
|
||||
girdMemberId: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad() {
|
||||
this.$dict.load('epidemicTouchInFourteen', 'epidemicRecentHealth')
|
||||
let date = new Date();
|
||||
this.selectDay = date.getDate()
|
||||
this.month = date.getMonth() + 1
|
||||
this.getStatis()
|
||||
this.getCheckTodayReport()
|
||||
this.isGirdUser()
|
||||
},
|
||||
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.getCheckTodayReport()
|
||||
this.getStatis()
|
||||
uni.navigateTo({url: './Success?status=1'})
|
||||
}
|
||||
}).catch(() => {
|
||||
uni.navigateTo({url: './Success?status=0'})
|
||||
})
|
||||
},
|
||||
getCheckTodayReport() {
|
||||
this.$http.post(`/app/appepidemichealthreport/checkTodayReport`).then((res) => {
|
||||
if (res?.data) {
|
||||
this.isUpload = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getStatis() {
|
||||
this.dayList = []
|
||||
this.$http.post(`/app/appepidemichealthreport/statistic`).then((res) => {
|
||||
if (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<week; i++){
|
||||
var info = {
|
||||
id: '',
|
||||
}
|
||||
this.dayList.unshift(info)
|
||||
}
|
||||
}
|
||||
this.dayList.map((item) => {
|
||||
if(item.day == this.selectDay && item.id) {
|
||||
this.dayClick(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
change(index) {
|
||||
this.currentTabs = index
|
||||
},
|
||||
toOther() {
|
||||
uni.navigateTo({ url: `./OtherUser?girdMemberId=${this.girdMemberId}`})
|
||||
},
|
||||
isGirdUser() {
|
||||
this.isAdmin = false
|
||||
this.$http.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => {
|
||||
if (res.code == 0) {
|
||||
if (res.data.checkType == 2) {
|
||||
this.isAdmin = true
|
||||
this.girdMemberId = res.data.girdMemberId
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
uni-page-body {
|
||||
height: 100%;
|
||||
}
|
||||
.AppHealthUp {
|
||||
|
||||
.emptyWrap {
|
||||
margin: 0;
|
||||
}
|
||||
::v-deep .emptyText{
|
||||
text-align: center;
|
||||
}
|
||||
.add-btn{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
width: 100%;
|
||||
height: 112px;
|
||||
line-height: 112px;
|
||||
background: #3975C6;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFF;
|
||||
div{
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .u-tab-bar{
|
||||
bottom: 14px;
|
||||
}
|
||||
|
||||
.form-item__group {
|
||||
margin-bottom: 24px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
padding-left: 32px;
|
||||
|
||||
.form-item__checkbox {
|
||||
width: 100%;
|
||||
div {
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
margin-bottom: 24px;
|
||||
text-align: center;
|
||||
background: #ffffff;
|
||||
border-radius: 16px;
|
||||
color: #333333;
|
||||
font-size: 28px;
|
||||
border: 1px solid #cccccc;
|
||||
|
||||
&.active {
|
||||
background: #4181ff;
|
||||
color: #fff;
|
||||
border-color: #4181ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-item__radio {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
div {
|
||||
width: 212px;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
margin-right: 16px;
|
||||
margin-bottom: 8px;
|
||||
text-align: center;
|
||||
background: #ffffff;
|
||||
border-radius: 16px;
|
||||
color: #333333;
|
||||
font-size: 28px;
|
||||
border: 1px solid #cccccc;
|
||||
|
||||
&:nth-of-type(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: #4181ff;
|
||||
color: #fff;
|
||||
border-color: #4181ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ai-area__wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 100px;
|
||||
|
||||
span {
|
||||
color: #333;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
i {
|
||||
color: #999;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 16px;
|
||||
height: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.form-item__wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 40px 28px 40px 0;
|
||||
border-bottom: 1px solid #dddddd;
|
||||
|
||||
input {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
text-align: right;
|
||||
color: #333;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.form-item__right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 32px;
|
||||
|
||||
.select {
|
||||
._i {
|
||||
padding-left: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
max-width: 400px;
|
||||
margin-right: 8px;
|
||||
color: #333333;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
i {
|
||||
margin-right: 8px;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
.form-item__wrapper {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
.form-item__title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
i {
|
||||
font-size: 32px;
|
||||
color: #ff4466;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 28px;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
h2 {
|
||||
padding: 0 4px;
|
||||
font-weight: 600;
|
||||
font-size: 32px;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
&.form-item__imgs,
|
||||
&.form-item__textarea {
|
||||
.form-item__wrapper {
|
||||
display: block;
|
||||
height: auto;
|
||||
padding-bottom: 32px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
height: 90px;
|
||||
}
|
||||
|
||||
.form-item__title {
|
||||
padding: 32px 0;
|
||||
}
|
||||
|
||||
.form-item__right {
|
||||
padding-left: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn-wrapper {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
bottom: 0;
|
||||
z-index: 11;
|
||||
width: 100%;
|
||||
padding: 20px 0 20px 0 !important;
|
||||
transform: translateX(-50%);
|
||||
background: #f3f6f9;
|
||||
}
|
||||
|
||||
.btn-wrapper .btn {
|
||||
width: 686px;
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
margin: 0 auto;
|
||||
padding: 0 !important;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 34px;
|
||||
background: #4181FF;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.btn-wrapper .disabled {
|
||||
color: #B9E7D0;
|
||||
background: #50C48A;
|
||||
}
|
||||
|
||||
::v-deep .AiTopFixed {
|
||||
.placeholder {
|
||||
.content {
|
||||
padding: 0 !important;
|
||||
|
||||
}
|
||||
}
|
||||
.fixed {
|
||||
margin: 0 !important;
|
||||
background-color: #f5f5f5!important;
|
||||
.content {
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.label{
|
||||
width: 280px;
|
||||
font-size: 32px!important;
|
||||
}
|
||||
.group_title{
|
||||
height: 116px;
|
||||
line-height: 116px;
|
||||
background: #FFF;
|
||||
padding-left: 32px;
|
||||
font-size: 38px;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
.time-content{
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
.title{
|
||||
line-height: 96px;
|
||||
padding-left: 32px;
|
||||
font-size: 36px;
|
||||
font-family: PingFang-SC-Bold, PingFang-SC;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
span{
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
text-align: center;
|
||||
font-size: 26px;
|
||||
font-family: PingFang-SC-Heavy, PingFang-SC;
|
||||
color: #666;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
.time{
|
||||
padding: 0 32px 32px;
|
||||
background-color: #fff;
|
||||
margin-bottom: 24px;
|
||||
.week-list{
|
||||
span{
|
||||
display: inline-block;
|
||||
width: 98px;
|
||||
text-align: center;
|
||||
padding: 32px 0;
|
||||
font-size: 20px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
.day-list{
|
||||
.item{
|
||||
display: inline-block;
|
||||
width: 98px;
|
||||
height: 98px;
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
position: relative;
|
||||
.num{
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.status{
|
||||
position: absolute;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
top: 60px;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
}
|
||||
.bg-2{
|
||||
background: #999;
|
||||
}
|
||||
.bg-1{
|
||||
background: #3B87F6;
|
||||
}
|
||||
.bg-0{
|
||||
background: #f46;
|
||||
}
|
||||
}
|
||||
.active{
|
||||
.num{
|
||||
background: #3B87F6;
|
||||
color: #fff;
|
||||
}
|
||||
.status{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.pad-b112{
|
||||
padding-bottom: 112px;
|
||||
}
|
||||
.color-0{
|
||||
color: #42D784;
|
||||
}
|
||||
.color-1{
|
||||
color: #f46;
|
||||
}
|
||||
.color-2{
|
||||
color: #f46;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
519
src/project/saas/AppHealthUp/OtherStatistics.vue
Normal file
519
src/project/saas/AppHealthUp/OtherStatistics.vue
Normal file
@@ -0,0 +1,519 @@
|
||||
<template>
|
||||
<div class="OtherStatistics">
|
||||
<div class="form-item__group">
|
||||
<div class="group_title">基本信息</div>
|
||||
<div class="form-item">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
<span class="label">姓名</span>
|
||||
</div>
|
||||
<div class="form-item__right"><AiOpenData v-if="wxUserId" type="userName" :openid="wxUserId" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="time-content">
|
||||
<div class="title">上报记录<span>({{month}}月)</span></div>
|
||||
<div class="time">
|
||||
<div class="week-list">
|
||||
<span v-for="(item, index) in weekList" :key="index">{{item}}</span>
|
||||
</div>
|
||||
<div class="day-list">
|
||||
<div v-for="(item, index) in dayList" :key="index" class="item" :class="selectDay == item.day ? 'active' : ''" @click="dayClick(item)">
|
||||
<div class="num">{{item.day}}</div>
|
||||
<span class="status" :class="'bg-'+item.status" v-if="item.day"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-item__group" v-if="healthInfo.id">
|
||||
<div class="group_title">健康状况</div>
|
||||
<div class="form-item">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
<span class="label">当前体温</span>
|
||||
</div>
|
||||
<div class="form-item__right" :style="healthInfo.temperature >= 37.3 ? 'color:#f46;' : ''">{{healthInfo.temperature}}℃</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
<span class="label" style="width:190px;">14天内是否接触新冠确诊或疑似患者</span>
|
||||
</div>
|
||||
<div class="form-item__right">
|
||||
<div class="value" :class="'color-'+healthInfo.touchInFourteen">{{$dict.getLabel('epidemicTouchInFourteen', healthInfo.touchInFourteen)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
<span class="label">当前健康状况</span>
|
||||
</div>
|
||||
<div class="form-item__right">
|
||||
<span>
|
||||
<span v-for="(item, index) in healthInfo.health" :key="index" :style="item != 0 ? 'color:#FF4466;' : ''"><span v-if="index>0" :style="item != 0 ? 'color:#FF4466;' : ''">;</span>{{$dict.getLabel('epidemicRecentHealth', item)}}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="pad-b112"></div>
|
||||
<div class="add-btn" @click="back">
|
||||
<div>查看其他成员</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'OtherStatistics',
|
||||
data() {
|
||||
return {
|
||||
weekList: ['一', '二', '三', '四', '五', '六', '日'],
|
||||
dayList: [],
|
||||
month: '',
|
||||
selectDay: '',
|
||||
healthInfo: {},
|
||||
userId: '',
|
||||
wxUserId: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad(option) {
|
||||
this.userId = option.id
|
||||
this.wxUserId = option.wxUserId
|
||||
var date = new Date();
|
||||
this.selectDay = date.getDate()
|
||||
this.month = date.getMonth() + 1
|
||||
this.$dict.load('epidemicTouchInFourteen', 'epidemicRecentHealth').then(() => {
|
||||
this.getStatis()
|
||||
})
|
||||
},
|
||||
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(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
getStatis() {
|
||||
this.dayList = []
|
||||
this.$http.post(`/app/appepidemichealthreport/statistic`, this.userId, {
|
||||
headers: {
|
||||
'Content-Type': 'text/plain'
|
||||
}
|
||||
}).then((res) => {
|
||||
if (res.code == 0) {
|
||||
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<week; i++){
|
||||
var info = {
|
||||
id: '',
|
||||
}
|
||||
this.dayList.unshift(info)
|
||||
}
|
||||
}
|
||||
this.dayList.map((item) => {
|
||||
if(item.day == this.selectDay && item.id) {
|
||||
this.dayClick(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
back() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
uni-page-body {
|
||||
height: 100%;
|
||||
}
|
||||
.OtherStatistics {
|
||||
|
||||
.emptyWrap {
|
||||
background: #f5f5f5;
|
||||
margin: 0;
|
||||
}
|
||||
::v-deep .emptyText{
|
||||
text-align: center;
|
||||
}
|
||||
.add-btn{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
width: 100%;
|
||||
height: 112px;
|
||||
line-height: 112px;
|
||||
background: #3975C6;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFF;
|
||||
div{
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .u-tab-bar{
|
||||
bottom: 14px;
|
||||
}
|
||||
|
||||
.form-item__group {
|
||||
margin-bottom: 24px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
padding-left: 32px;
|
||||
|
||||
.form-item__checkbox {
|
||||
width: 100%;
|
||||
div {
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
margin-bottom: 24px;
|
||||
text-align: center;
|
||||
background: #ffffff;
|
||||
border-radius: 16px;
|
||||
color: #333333;
|
||||
font-size: 28px;
|
||||
border: 1px solid #cccccc;
|
||||
|
||||
&.active {
|
||||
background: #4181ff;
|
||||
color: #fff;
|
||||
border-color: #4181ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-item__radio {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
div {
|
||||
width: 212px;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
margin-right: 16px;
|
||||
margin-bottom: 8px;
|
||||
text-align: center;
|
||||
background: #ffffff;
|
||||
border-radius: 16px;
|
||||
color: #333333;
|
||||
font-size: 28px;
|
||||
border: 1px solid #cccccc;
|
||||
|
||||
&:nth-of-type(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: #4181ff;
|
||||
color: #fff;
|
||||
border-color: #4181ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ai-area__wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 100px;
|
||||
|
||||
span {
|
||||
color: #333;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
i {
|
||||
color: #999;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 16px;
|
||||
height: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.form-item__wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 40px 28px 40px 0;
|
||||
border-bottom: 1px solid #dddddd;
|
||||
|
||||
input {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
text-align: right;
|
||||
color: #333;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.form-item__right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 32px;
|
||||
|
||||
.select {
|
||||
._i {
|
||||
padding-left: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
max-width: 400px;
|
||||
margin-right: 8px;
|
||||
color: #333333;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
i {
|
||||
margin-right: 8px;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
.form-item__wrapper {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
.form-item__title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
i {
|
||||
font-size: 32px;
|
||||
color: #ff4466;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 28px;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
h2 {
|
||||
padding: 0 4px;
|
||||
font-weight: 600;
|
||||
font-size: 32px;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
&.form-item__imgs,
|
||||
&.form-item__textarea {
|
||||
.form-item__wrapper {
|
||||
display: block;
|
||||
height: auto;
|
||||
padding-bottom: 32px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
height: 90px;
|
||||
}
|
||||
|
||||
.form-item__title {
|
||||
padding: 32px 0;
|
||||
}
|
||||
|
||||
.form-item__right {
|
||||
padding-left: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn-wrapper {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
bottom: 0;
|
||||
z-index: 11;
|
||||
width: 100%;
|
||||
padding: 20px 0 20px 0 !important;
|
||||
transform: translateX(-50%);
|
||||
background: #f3f6f9;
|
||||
}
|
||||
|
||||
.btn-wrapper .btn {
|
||||
width: 686px;
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
margin: 0 auto;
|
||||
padding: 0 !important;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 34px;
|
||||
background: #4181FF;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.btn-wrapper .disabled {
|
||||
color: #B9E7D0;
|
||||
background: #50C48A;
|
||||
}
|
||||
|
||||
::v-deep .AiTopFixed {
|
||||
.placeholder {
|
||||
.content {
|
||||
padding: 0 !important;
|
||||
|
||||
}
|
||||
}
|
||||
.fixed {
|
||||
margin: 0 !important;
|
||||
background-color: #f5f5f5!important;
|
||||
.content {
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.label{
|
||||
width: 280px;
|
||||
font-size: 32px!important;
|
||||
}
|
||||
.group_title{
|
||||
height: 116px;
|
||||
line-height: 116px;
|
||||
background: #FFF;
|
||||
padding-left: 32px;
|
||||
font-size: 38px;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
.time-content{
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
.title{
|
||||
line-height: 96px;
|
||||
padding-left: 32px;
|
||||
font-size: 36px;
|
||||
font-family: PingFang-SC-Bold, PingFang-SC;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
span{
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
text-align: center;
|
||||
font-size: 26px;
|
||||
font-family: PingFang-SC-Heavy, PingFang-SC;
|
||||
color: #666;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
.time{
|
||||
padding: 0 32px 32px;
|
||||
background-color: #fff;
|
||||
margin-bottom: 24px;
|
||||
.week-list{
|
||||
span{
|
||||
display: inline-block;
|
||||
width: 98px;
|
||||
text-align: center;
|
||||
padding: 32px 0;
|
||||
font-size: 20px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
.day-list{
|
||||
.item{
|
||||
display: inline-block;
|
||||
width: 98px;
|
||||
height: 98px;
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
position: relative;
|
||||
.num{
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.status{
|
||||
position: absolute;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
top: 60px;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
}
|
||||
.bg-2{
|
||||
background: #999;
|
||||
}
|
||||
.bg-1{
|
||||
background: #3B87F6;
|
||||
}
|
||||
.bg-0{
|
||||
background: #f46;
|
||||
}
|
||||
}
|
||||
.active{
|
||||
.num{
|
||||
background: #3B87F6;
|
||||
color: #fff;
|
||||
}
|
||||
.status{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.pad-b112{
|
||||
padding-bottom: 112px;
|
||||
}
|
||||
.color-0{
|
||||
color: #42D784;
|
||||
}
|
||||
.color-1{
|
||||
color: #f46;
|
||||
}
|
||||
.color-2{
|
||||
color: #1365DD;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
142
src/project/saas/AppHealthUp/OtherUser.vue
Normal file
142
src/project/saas/AppHealthUp/OtherUser.vue
Normal file
@@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<div class="OtherUser">
|
||||
<!-- <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> -->
|
||||
<div class="user-list">
|
||||
<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=""><AiOpenData v-if="item.wxUserId" type="userName" :openid="item.wxUserId" style="display:inline-block;" />
|
||||
</div>
|
||||
<div class="right">
|
||||
<span :class="item.status == 1 ? '' : 'color-F5A319'">{{item.status == 1 ? '今日已上报' : '今日未上报'}}</span><img src="./components/img/right-icon.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'OtherUser',
|
||||
data() {
|
||||
return {
|
||||
keyword: '',
|
||||
current: 1,
|
||||
girdMemberId: '',
|
||||
list: [],
|
||||
total: 1
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad(option) {
|
||||
this.girdMemberId = option.girdMemberId
|
||||
this.getUserList()
|
||||
},
|
||||
onShow() {
|
||||
document.title = '其他成员'
|
||||
},
|
||||
methods: {
|
||||
toOtherSta(id, wxUserId) {
|
||||
uni.navigateTo({ url: `./OtherStatistics?id=${id}&wxUserId=${wxUserId}`})
|
||||
},
|
||||
handerClear() {
|
||||
this.keyword = ''
|
||||
this.getListInit()
|
||||
},
|
||||
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¤t=${this.current}`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.total = res.data.total
|
||||
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current ++
|
||||
this.getUserList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
uni-page-body{
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
.OtherUser {
|
||||
.user-list{
|
||||
.item{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #E4E5E6;
|
||||
padding: 24px 32px 22px 40px;
|
||||
background-color: #fff;
|
||||
.left{
|
||||
font-size: 36px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 50px;
|
||||
img{
|
||||
width: 74px;
|
||||
height: 74px;
|
||||
margin-right: 34px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
.right{
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #999;
|
||||
line-height: 74px;
|
||||
img{
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin-left: 8px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
.color-F5A319{
|
||||
color: #F5A319;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.emptyWrap {
|
||||
margin: 0;
|
||||
}
|
||||
::v-deep .emptyText{
|
||||
text-align: center;
|
||||
}
|
||||
.seachObjs {
|
||||
background: #fff;
|
||||
}
|
||||
::v-deep .content{
|
||||
padding: 20px 32px;
|
||||
}
|
||||
|
||||
::v-deep .u-search{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
68
src/project/saas/AppHealthUp/Success.vue
Normal file
68
src/project/saas/AppHealthUp/Success.vue
Normal file
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<div class="success">
|
||||
<img src="./components/img/success.png" alt="" v-if="status">
|
||||
<img src="./components/img/fail.png" alt="" v-else>
|
||||
<p>{{status ? '上报成功!' : '上报失败!'}}</p>
|
||||
<div class="footer" @click="back">{{status ? '确定' : '我知道了'}}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
status: 1
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
document.title = '健康上报'
|
||||
},
|
||||
onLoad(option) {
|
||||
this.status = option.status
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
uni-page-body{
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
.success {
|
||||
text-align: center;
|
||||
img{
|
||||
width: 192px;
|
||||
height: 192px;
|
||||
margin: 96px 0 16px 0;
|
||||
}
|
||||
p{
|
||||
line-height: 50px;
|
||||
color: #333;
|
||||
font-size: 36px;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
margin-bottom: 72px;
|
||||
}
|
||||
.footer{
|
||||
width: calc(100% - 96px);
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
background: #1365DD;
|
||||
box-shadow: inset 0px 1px 0px 0px #EEEEEE;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
border-radius: 8px;
|
||||
margin-left: 48px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
src/project/saas/AppHealthUp/components/img/fail.png
Normal file
BIN
src/project/saas/AppHealthUp/components/img/fail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
src/project/saas/AppHealthUp/components/img/right-icon.png
Normal file
BIN
src/project/saas/AppHealthUp/components/img/right-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 244 B |
BIN
src/project/saas/AppHealthUp/components/img/success.png
Normal file
BIN
src/project/saas/AppHealthUp/components/img/success.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
src/project/saas/AppHealthUp/components/img/user-icon.png
Normal file
BIN
src/project/saas/AppHealthUp/components/img/user-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Reference in New Issue
Block a user