调整一下代码
This commit is contained in:
339
src/project/grid/AppHealthReport/AddReport.vue
Normal file
339
src/project/grid/AppHealthReport/AddReport.vue
Normal file
@@ -0,0 +1,339 @@
|
||||
<template>
|
||||
<div class="album">
|
||||
<div class="tips">请确保以下信息全部由本人填写,本人对所填写内容的真实性和完整性负责</div>
|
||||
|
||||
<div class="form-item__group">
|
||||
<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">
|
||||
<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">
|
||||
<AiRadio style="width: 100%;" v-model="form.healthCode" dict="epidemicHealthCode"></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">
|
||||
<textarea placeholder="请补充说明健康监测情况" v-model="form.temperature"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <u-picker mode="time" :params="dataParams" v-model="isShowDate" @confirm="onDateChange"></u-picker> -->
|
||||
<div class="btn-wrapper">
|
||||
<div class="btn" hover-class="text-hover" @click="submit">提交</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
appName:"上报今日状态",
|
||||
data() {
|
||||
return {
|
||||
isShowDate: false,
|
||||
dataParams: {
|
||||
year: true,
|
||||
month: true,
|
||||
day: true
|
||||
},
|
||||
form: {
|
||||
name: '',
|
||||
idNumber: '',
|
||||
checkPhoto: [],
|
||||
checkResult: '',
|
||||
health: '',
|
||||
healthCode: '',
|
||||
temperature: '',
|
||||
vaccine: '',
|
||||
checkTime: '',
|
||||
memberId: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
|
||||
onLoad(query) {
|
||||
this.form.memberId = query.id
|
||||
this.getInfo(query.id)
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo(id) {
|
||||
this.$instance.post(`/app/appepidemicreportmember/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.form.name = res.data.name
|
||||
this.form.idNumber = res.data.idNumber
|
||||
|
||||
this.form.checkTime = res.data.checkTime ? res.data.checkTime.split(' ')[0] : ''
|
||||
this.form.checkResult = res.data.checkResult || ''
|
||||
this.form.healthCode = res.data.healthCode || ''
|
||||
this.form.vaccine = res.data.vaccine || ''
|
||||
}
|
||||
|
||||
this.$hideLoading()
|
||||
}).catch(() => {
|
||||
this.$hideLoading()
|
||||
})
|
||||
},
|
||||
|
||||
onDateChange(e) {
|
||||
this.form.checkTime = `${e.year}-${e.month}-${e.day}`
|
||||
},
|
||||
|
||||
submit() {
|
||||
if (!this.form.temperature) {
|
||||
return this.$toast('请输入当前体温')
|
||||
}
|
||||
|
||||
if (!this.form.touchInFourteen) {
|
||||
return this.$toast('请选择14天内是否接触新冠确诊或疑似患者')
|
||||
}
|
||||
|
||||
if (!this.form.health.length) {
|
||||
return this.$toast('请选择当前健康状况')
|
||||
}
|
||||
if (!this.form.checkTime) {
|
||||
return this.$toast('请选择核酸检测日期')
|
||||
}
|
||||
|
||||
if (!this.form.checkResult) {
|
||||
return this.$toast('请选择核酸检测结果')
|
||||
}
|
||||
|
||||
if (!this.form.healthCode) {
|
||||
return this.$toast('请选择健康码类型')
|
||||
}
|
||||
|
||||
if (!this.form.vaccine) {
|
||||
return this.$toast('请选择已接种疫苗次数')
|
||||
}
|
||||
|
||||
this.$instance.post(`/app/appepidemichealthreport/addOrUpdate`, {
|
||||
...this.form,
|
||||
openid: this.user.openid,
|
||||
health: this.form.health.join(','),
|
||||
checkPhoto: JSON.stringify(this.form.checkPhoto),
|
||||
checkTime: this.form.checkTime + ' 00:00:00'
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
uni.$emit('update')
|
||||
this.$toast('提交成功')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 400)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.album {
|
||||
padding-bottom: 140px;
|
||||
|
||||
.tips {
|
||||
line-height: 1.3;
|
||||
padding: 32px 32px;
|
||||
color: #FF883C;
|
||||
font-size: 30px;
|
||||
text-align: justify;
|
||||
background: #FFF8F3;
|
||||
}
|
||||
|
||||
.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;
|
||||
height: 128px;
|
||||
padding-right: 28px;
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
|
||||
input {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
text-align: left;
|
||||
color: #333;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.form-item__right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 32px;
|
||||
|
||||
// .u-input {
|
||||
// display: block;
|
||||
// width: 100%;
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.form-item__wrapper_input {
|
||||
display: block;
|
||||
|
||||
}
|
||||
|
||||
&: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: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
&.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
327
src/project/grid/AppHealthReport/AddUser.vue
Normal file
327
src/project/grid/AppHealthReport/AddUser.vue
Normal file
@@ -0,0 +1,327 @@
|
||||
<template>
|
||||
<div class="album">
|
||||
<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.name" :maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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="请输入" type="idcard" v-model="form.idNumber" :maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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="请输入" type="number" v-model="form.phone" :maxlength="11"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
<i>*</i>
|
||||
<h2>所属地区</h2>
|
||||
</div>
|
||||
<div class="form-item__right">
|
||||
<AiAreaPicker class="ai-area" :areaId="$areaId" v-model="form.areaId" :fullName.sync="form.areaName">
|
||||
<div class="ai-area__wrapper">
|
||||
<span class="label" v-if="form.areaName">{{ form.areaName }}</span>
|
||||
<i v-else>请选择</i>
|
||||
<u-icon name="arrow-right" color="#ddd"/>
|
||||
</div>
|
||||
</AiAreaPicker>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-item form-item__textarea">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
<i>*</i>
|
||||
<h2>详细地址</h2>
|
||||
</div>
|
||||
<div class="form-item__right">
|
||||
<textarea auto-height v-model="form.address" :maxlength="500" placeholder="如住所、酒店、单位等"
|
||||
placeholder-style="font-size: 16px;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-wrapper">
|
||||
<div class="btn" hover-class="text-hover" @click="submit">提交</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
appName: "添加上报人员",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
address: '',
|
||||
areaId: '',
|
||||
areaName: '',
|
||||
idNumber: '',
|
||||
name: '',
|
||||
phone: ''
|
||||
},
|
||||
$areaId: '',
|
||||
flag: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
|
||||
methods: {
|
||||
submit() {
|
||||
if (!this.form.name) {
|
||||
return this.$toast('请输入上报人姓名')
|
||||
}
|
||||
|
||||
if (!this.form.idNumber) {
|
||||
return this.$toast('请输入上报人身份证号')
|
||||
}
|
||||
|
||||
if (!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(this.form.idNumber)) {
|
||||
return this.$toast('请输入正确的身份证账号')
|
||||
}
|
||||
if (!this.form.phone) {
|
||||
return this.$toast('请选择上报人手机号码')
|
||||
}
|
||||
|
||||
if (!/^1[0-9]{10,10}$/.test(this.form.phone)) {
|
||||
return this.$toast('请输入正确的手机号码')
|
||||
}
|
||||
|
||||
if (!this.form.areaId) {
|
||||
return this.$toast('请选择上报地区')
|
||||
}
|
||||
|
||||
if (this.form.areaId.substr(this.form.areaId.length - 3, 3) === '000') {
|
||||
return this.$toast('上报地区必须选到村或社区')
|
||||
}
|
||||
|
||||
if (!this.form.address) {
|
||||
return this.$toast('请输入详细地址')
|
||||
}
|
||||
if (this.flag) return
|
||||
this.flag = true
|
||||
|
||||
this.$loading()
|
||||
this.$instance.post(`/app/appepidemicreportmember/addOrUpdate`, {
|
||||
...this.form,
|
||||
openid: this.user.openid
|
||||
}).then(res => {
|
||||
this.$hideLoading()
|
||||
this.flag = false
|
||||
if (res.code == 0) {
|
||||
this.$toast('提交成功')
|
||||
uni.$emit('update')
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
url: `./Result?id=${res.data.id}`
|
||||
})
|
||||
}, 400)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.album {
|
||||
padding-bottom: 140px;
|
||||
|
||||
.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;
|
||||
height: 128px;
|
||||
padding-right: 28px;
|
||||
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;
|
||||
|
||||
span {
|
||||
max-width: 400px;
|
||||
margin-right: 8px;
|
||||
color: #333333;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
395
src/project/grid/AppHealthReport/AppHealthReport.vue
Normal file
395
src/project/grid/AppHealthReport/AppHealthReport.vue
Normal file
@@ -0,0 +1,395 @@
|
||||
<template>
|
||||
<div class="returnHomeRegister" v-if="pageShow">
|
||||
<div class="title">
|
||||
<h2>上报人员</h2>
|
||||
<div class="right">
|
||||
<span>共</span>
|
||||
<i>{{ total }}</i>
|
||||
<span>名</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="home-list">
|
||||
<div class="item" v-for="(item, index) in list" :key="index" >
|
||||
<div class="item-top" @click.stop="$linkTo('./Detail?id=' + item.id)">
|
||||
<div class="item-top__left">
|
||||
<h2>{{ item.name }}<span :class="item.status == 1? 'status0':'status1'">返乡人员</span></h2>
|
||||
<!-- <p @click.stop="$linkTo('./UserInfo?id=' + item.id)" hover-class="text-hover">查看个人信息></p> -->
|
||||
<div>
|
||||
<p>登记于2021-10-15</p>
|
||||
<span :class="item.status == 1? 'status0':'status1'">异常</span>
|
||||
</div>
|
||||
</div>
|
||||
<span v-if="item.status === '0'">健康数据异常</span>
|
||||
</div>
|
||||
<div class="item-bottom">
|
||||
<div class="item-bottom__left">
|
||||
<span>上报第</span>
|
||||
<i>{{ item.diffNum || 0 }}</i>
|
||||
<span>天</span>
|
||||
</div>
|
||||
<div class="item-bottom__right" hover-class="text-hover" v-if="item.today === '0'"
|
||||
@click.stop="$linkTo('./AddReport?id=' + item.id)">
|
||||
<span style="color: #FF883C">今日未上报</span>
|
||||
<u-icon name="arrow-right" color="#ddd"/>
|
||||
</div>
|
||||
<div class="item-bottom__right" hover-class="text-hover" v-else
|
||||
@click.stop="$linkTo('./RecordList?id=' + item.id)">
|
||||
<span style="color: #999999">今日已上报</span>
|
||||
<u-icon name="arrow-right" color="#ddd"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="list.length==0"/>
|
||||
</div>
|
||||
<div class="btn-wrapper">
|
||||
<div class="share" @click="show = true">分享</div>
|
||||
<div class="addBtn" @click="toReport" hover-class="text-hover">添加上报人员</div>
|
||||
</div>
|
||||
|
||||
<u-popup v-model="show" mode="bottom" border-radius="30">
|
||||
<div class="shareBox">
|
||||
<h2>分享到:</h2>
|
||||
<div class="card">
|
||||
<div class="itemCard" @click="registerCode()">
|
||||
<img src="components/code.png" alt="" class="imgs" />
|
||||
<div class="names">扫码登记</div>
|
||||
</div>
|
||||
<div class="itemCard" @click="invitation()">
|
||||
<img src="components/wechat.png" alt="" class="imgs" />
|
||||
<div class="names">微信邀请</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="close" @click="show = false">取消</div>
|
||||
</div>
|
||||
</u-popup>
|
||||
|
||||
<u-popup v-model="showCode" mode="center" border-radius="14" width="90%" height="450px">
|
||||
<div class="showCode">
|
||||
<div class="qrCode">
|
||||
<img src="components/code.png" alt="">
|
||||
</div>
|
||||
<h2>健康上报</h2>
|
||||
<p>请使用微信扫码,上报本人健康情况</p>
|
||||
<div class="btn">
|
||||
<div class="cancel" @click="showCode = false">取消</div>
|
||||
<div class="save" @click="savePoster">保存海报</div>
|
||||
</div>
|
||||
</div>
|
||||
</u-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: "AppHealthReport",
|
||||
appName: "健康上报",
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
pageShow: false,
|
||||
current: 1,
|
||||
total: 0,
|
||||
show: false,
|
||||
showCode: false,
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.$loading()
|
||||
this.$dict.load(['villageActivityStatus']).then(() => {
|
||||
this.getList()
|
||||
})
|
||||
|
||||
uni.$on('update', () => {
|
||||
this.current = 1
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
toReport() {
|
||||
this.$linkTo('./AddUser')
|
||||
},
|
||||
|
||||
// 扫码登记
|
||||
registerCode() {
|
||||
this.show = false;
|
||||
this.showCode = true;
|
||||
},
|
||||
// 微信邀请
|
||||
invitation() {
|
||||
console.log('222');
|
||||
},
|
||||
// 保存海报
|
||||
savePoster() {},
|
||||
|
||||
getList() {
|
||||
|
||||
this.$instance.post(`/app/appepidemicreportmember/list?openId=${this.user.openId}`, null, {
|
||||
params: {
|
||||
current: this.current,
|
||||
size: 15
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.total = res.data.total
|
||||
if (this.current > 1) {
|
||||
this.list = [...this.list, ...res.data.records]
|
||||
} else {
|
||||
this.list = res.data.records
|
||||
}
|
||||
uni.hideLoading()
|
||||
this.pageShow = true
|
||||
if (res.data.records.length < 15) {
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
this.current = this.current + 1
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
}
|
||||
}).catch(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" socped>
|
||||
.returnHomeRegister {
|
||||
padding: 0 0 150px 0;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 32px;
|
||||
padding: 48px 32px 0 32px;
|
||||
|
||||
& > h2 {
|
||||
font-size: 38px;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
color: #666666;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
i {
|
||||
color: #4181FF;
|
||||
font-style: normal;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
margin: 0 32px 24px;
|
||||
border-radius: 16px;
|
||||
background: #fff;
|
||||
|
||||
.item-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 152px;
|
||||
padding: 0 32px;
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
|
||||
.item-top__left {
|
||||
width: 100%;
|
||||
h2 {
|
||||
line-height: 44px;
|
||||
margin-bottom: 8px;
|
||||
color: #333;
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
span {
|
||||
padding: 4px 8px;
|
||||
font-size: 26px;
|
||||
font-weight: normal;
|
||||
margin-left: 24px;
|
||||
}
|
||||
}
|
||||
div {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
p {
|
||||
color: #999999;
|
||||
font-size: 26px;
|
||||
}
|
||||
span {
|
||||
padding: 4px 8px;
|
||||
font-size: 26px;
|
||||
}
|
||||
}
|
||||
.status0 {
|
||||
color: #FF4466;
|
||||
background: #FFF5F7;
|
||||
}
|
||||
.status1 {
|
||||
color: #1AAAFF;
|
||||
background: #E8F6FF;
|
||||
}
|
||||
.status2 {
|
||||
color: #42D784;
|
||||
background: #ECFBF2;
|
||||
}
|
||||
}
|
||||
|
||||
& > span {
|
||||
font-size: 26px;
|
||||
color: #FF4466;
|
||||
}
|
||||
}
|
||||
|
||||
.item-bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 104px;
|
||||
padding: 0 32px;
|
||||
|
||||
.item-bottom__right {
|
||||
span {
|
||||
color: #999999;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-bottom__left {
|
||||
span {
|
||||
color: #999999;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
i {
|
||||
color: #4181FF;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
& > div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-wrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20px 32px !important;
|
||||
box-sizing: border-box;
|
||||
.addBtn,
|
||||
.share {
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
text-align: center;
|
||||
}
|
||||
.share {
|
||||
width: 35%;
|
||||
border-radius: 16px;
|
||||
border: 1px solid #A0C0FF;
|
||||
}
|
||||
.addBtn {
|
||||
width: 60%;
|
||||
background: #4181FF;
|
||||
border-radius: 16px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.shareBox {
|
||||
padding-top: 32px;
|
||||
box-sizing: border-box;
|
||||
h2 {
|
||||
padding: 0 32px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.card {
|
||||
display: flex;
|
||||
padding: 60px 32px 32px 32px;
|
||||
.itemCard {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
// width: 25%;
|
||||
img {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ::v-deep .u-popup .u-drawer .u-drawer-bottom {
|
||||
// bottom: 50px;
|
||||
// }
|
||||
.close {
|
||||
height: 112px;
|
||||
line-height: 112px;
|
||||
text-align: center;
|
||||
border-top: 2px solid #EEEEEE;
|
||||
}
|
||||
}
|
||||
|
||||
.showCode {
|
||||
padding: 64px;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
.qrCode {
|
||||
img {
|
||||
width: 320px;
|
||||
height: 320px;
|
||||
}
|
||||
}
|
||||
h2 {
|
||||
font-size: 36px;
|
||||
font-weight: 600;
|
||||
padding: 32px 0;
|
||||
}
|
||||
p {
|
||||
font-size: 32px;
|
||||
margin-bottom: 80px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.cancel,
|
||||
.save {
|
||||
width: 45%;
|
||||
text-align: center;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
border-radius: 40px;
|
||||
}
|
||||
.cancel {
|
||||
background: #EFF2F7;
|
||||
}
|
||||
.save {
|
||||
background: #383A49;
|
||||
color: #FFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
271
src/project/grid/AppHealthReport/Detail.vue
Normal file
271
src/project/grid/AppHealthReport/Detail.vue
Normal file
@@ -0,0 +1,271 @@
|
||||
<template>
|
||||
<div class="detail">
|
||||
<div class="detail-header">
|
||||
<div class="name">
|
||||
<h2>张三<span>返乡人员</span></h2>
|
||||
<p @click="call(info.phone)"><u-icon name="phone" color="#4181FF" size="28"></u-icon>拨打电话</p>
|
||||
</div>
|
||||
<div class="idNumber">
|
||||
<span>身份证号:</span>
|
||||
<span>420107197309172837</span>
|
||||
</div>
|
||||
<div class="phone">
|
||||
<span>手机号码:</span>
|
||||
<span>13827263092</span>
|
||||
</div>
|
||||
<div class="address">
|
||||
<span>详细地址:</span>
|
||||
<span>辛店镇北靳楼-北靳楼大学学生宿舍560</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="detail-info">
|
||||
<div class="title">
|
||||
<div class="left">
|
||||
<h2>上报记录</h2>
|
||||
<p>个人连续无异常上报<span>7</span>>天后自动解除风险</p>
|
||||
</div>
|
||||
<div class="right">
|
||||
<span>3</span>/<span>7</span>天
|
||||
</div>
|
||||
</div>
|
||||
<div class="list">
|
||||
<div class="item">
|
||||
<div class="item_card">
|
||||
<div class="left">
|
||||
<span></span><span>2020-07-20</span><span>(自主上报)</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<span :class="'status0'">异常</span>
|
||||
<!-- :class="item.check ? 'img-active' : ''" -->
|
||||
<img src="components/down-icon.png" :class="checked == true ? '': 'img-active'" alt="" @click="putOn" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_info" v-if="checked">
|
||||
<div class="items">
|
||||
<label>当前健康状况</label>
|
||||
<div>发烧、乏力、咳嗽</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
appName:"上报记录",
|
||||
data () {
|
||||
return {
|
||||
info: {},
|
||||
checked: true,
|
||||
}
|
||||
},
|
||||
|
||||
onLoad (query) {
|
||||
this.$dict.load(['epidemicTouchInFourteen', 'epidemicRecentHealth', 'epidemicRecentTestResult', 'epidemicHealthCode', 'epidemicVaccineTime']).then(() => {
|
||||
this.getInfo(query.id)
|
||||
})
|
||||
this.getInfo(query.id)
|
||||
},
|
||||
|
||||
methods: {
|
||||
preview (url) {
|
||||
uni.previewImage({
|
||||
urls: this.info.checkPhoto.map(v => v.url),
|
||||
current: url
|
||||
})
|
||||
},
|
||||
|
||||
// 收起展开
|
||||
putOn() {
|
||||
this.checked = !this.checked
|
||||
},
|
||||
|
||||
call(phone) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phone
|
||||
})
|
||||
},
|
||||
|
||||
getInfo (id) {
|
||||
this.$instance.post(`/app/appepidemichealthreport/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
this.info.checkPhoto = JSON.parse(res.data.checkPhoto)
|
||||
let healthName = ''
|
||||
this.info.isHealth = false
|
||||
res.data.health.split(',').forEach(v => {
|
||||
if (v > 0) {
|
||||
this.info.isHealth = true
|
||||
}
|
||||
healthName = healthName + this.$dict.getLabel('epidemicRecentHealth', v)
|
||||
})
|
||||
this.info.healthName = healthName
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
call (phone) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phone
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.detail {
|
||||
padding-bottom: 40px;
|
||||
|
||||
.detail-header {
|
||||
padding: 32px;
|
||||
box-sizing: border-box;
|
||||
background: #FFF;
|
||||
|
||||
.name {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
h2 {
|
||||
font-weight: 600;
|
||||
font-size: 40px;
|
||||
span {
|
||||
font-weight: normal;
|
||||
font-size: 26px;
|
||||
padding: 4px 8px;
|
||||
margin-left: 16px;
|
||||
background: #FFF5F7;
|
||||
color: #FF4466;
|
||||
}
|
||||
}
|
||||
p {
|
||||
font-size: 26px;
|
||||
color: #4181FF;
|
||||
}
|
||||
}
|
||||
|
||||
.idNumber,
|
||||
.phone,
|
||||
.address {
|
||||
color: #999999;
|
||||
font-size: 26px;
|
||||
margin-top: 8px;
|
||||
|
||||
span:first-child {
|
||||
display: inline-block;
|
||||
width: 130px;
|
||||
vertical-align: top;
|
||||
}
|
||||
span:last-child {
|
||||
display: inline-block;
|
||||
width: calc(100% - 130px);
|
||||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
.idNumber {
|
||||
margin-top: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.detail-info {
|
||||
margin-top: 24px;
|
||||
.title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: #FFF;
|
||||
padding: 32px;
|
||||
box-sizing: border-box;
|
||||
.left {
|
||||
h2 {
|
||||
font-size: 38px;
|
||||
color: #333333;
|
||||
font-weight: 600;
|
||||
}
|
||||
p {
|
||||
font-size: 26px;
|
||||
color: #999999;
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
.right {
|
||||
display: flex;
|
||||
color: #999999;
|
||||
font-size: 28px;
|
||||
span:first-child {
|
||||
color: #4181FF;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
.item {
|
||||
.item_card {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 26px 32px;
|
||||
background: #FFF;
|
||||
|
||||
.left {
|
||||
span:first-child {
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 24px;
|
||||
background: #1365DD;
|
||||
vertical-align: center;
|
||||
margin-right: 12px;
|
||||
}
|
||||
}
|
||||
.right {
|
||||
span {
|
||||
display: inline-block;
|
||||
vertical-align: center;
|
||||
margin-right: 16px;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
.status0 {
|
||||
color: #FF4466;
|
||||
background: #FFF5F7;
|
||||
}
|
||||
.status1 {
|
||||
color: #1AAAFF;
|
||||
background: #E8F6FF;
|
||||
}
|
||||
.status2 {
|
||||
color: #42D784;
|
||||
background: #ECFBF2;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
transition: all 0.3s ease-in-out;
|
||||
transform: rotate(180deg);
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.img-active {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item_info {
|
||||
padding: 16px 32px;
|
||||
background: #FAFAFA;
|
||||
.items {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
116
src/project/grid/AppHealthReport/RecordList.vue
Normal file
116
src/project/grid/AppHealthReport/RecordList.vue
Normal file
@@ -0,0 +1,116 @@
|
||||
<template>
|
||||
<div class="record" v-if="pageShow">
|
||||
<div class="record-item" v-for="(item, index) in list" :key="index" @click="$linkTo('./Detail?id=' + item.id)"
|
||||
hover-class="bg-hover">
|
||||
<div class="left">{{ item.createTime.split(' ')[0] }}的健康上报</div>
|
||||
<div class="right">
|
||||
<i v-if="item.status === '0'">健康数据异常</i>
|
||||
<u-icon name="arrow-right" color="#ddd"/>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length && isMore"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
appName: "上报记录",
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
pageShow: false,
|
||||
current: 1,
|
||||
total: 0,
|
||||
isMore: false
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(query) {
|
||||
this.$loading()
|
||||
this.getList(query)
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList(query) {
|
||||
if (this.isMore) return
|
||||
|
||||
this.$instance.post(`/app/appepidemichealthreport/list?memberId=${query.id}`, null, {
|
||||
params: {
|
||||
current: this.current,
|
||||
size: 15
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.total = res.data.total
|
||||
if (this.current > 1) {
|
||||
this.list = [...this.list, ...res.data.records]
|
||||
} else {
|
||||
this.list = res.data.records
|
||||
}
|
||||
uni.hideLoading()
|
||||
this.pageShow = true
|
||||
if (res.data.records.length < 15) {
|
||||
this.isMore = true
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
this.current = this.current + 1
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
}
|
||||
}).catch(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.record {
|
||||
padding: 32px 0;
|
||||
|
||||
.record-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 686px;
|
||||
height: 112px;
|
||||
margin: 0 auto 24px;
|
||||
padding: 0 28px 0 32px;
|
||||
background: #FFFFFF;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
|
||||
border-radius: 16px;
|
||||
|
||||
.left {
|
||||
color: #333333;
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.right {
|
||||
i {
|
||||
width: 158px;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
margin-right: 8px;
|
||||
text-align: center;
|
||||
font-size: 26px;
|
||||
color: #FF4466;
|
||||
background: #FFF5F7;
|
||||
}
|
||||
}
|
||||
|
||||
& > div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
83
src/project/grid/AppHealthReport/Result.vue
Normal file
83
src/project/grid/AppHealthReport/Result.vue
Normal file
@@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<div class="result">
|
||||
<image src="/static/img/result.png" />
|
||||
<h2>添加成功!</h2>
|
||||
<div class="result-btn" hover-class="text-hover" @click="toReport">上报今日状态</div>
|
||||
<div class="result-backBtn" @click="back">返回</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
id: ''
|
||||
}
|
||||
},
|
||||
|
||||
onLoad (query) {
|
||||
this.id = query.id
|
||||
},
|
||||
|
||||
methods: {
|
||||
back () {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
|
||||
toReport () {
|
||||
uni.redirectTo({
|
||||
url: `./AddReport?id=${this.id}`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.result {
|
||||
min-height: 100vh;
|
||||
padding-top: 160px;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
|
||||
image {
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
}
|
||||
|
||||
.result-backBtn {
|
||||
width: 320px;
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
margin: 32px auto 0;
|
||||
text-align: center;
|
||||
border: 1px solid #4181FF;
|
||||
color: #4181FF;
|
||||
font-size: 34px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 32px 0 80px;
|
||||
font-weight: 600;
|
||||
font-size: 40px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.result-btn {
|
||||
width: 320px;
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
background: #4181FF;
|
||||
color: #fff;
|
||||
font-size: 34px;
|
||||
border-radius: 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
src/project/grid/AppHealthReport/components/code.png
Normal file
BIN
src/project/grid/AppHealthReport/components/code.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/project/grid/AppHealthReport/components/down-icon.png
Normal file
BIN
src/project/grid/AppHealthReport/components/down-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 486 B |
BIN
src/project/grid/AppHealthReport/components/wechat.png
Normal file
BIN
src/project/grid/AppHealthReport/components/wechat.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.4 KiB |
Reference in New Issue
Block a user