|
|
@ -1,135 +1,115 @@ |
|
|
|
<template> |
|
|
|
<view> |
|
|
|
<form class="padding-lr cu-form-group flex-direction"> |
|
|
|
<view class="cu-form-group flex flex-direction padding-tb"> |
|
|
|
<view class="title padding-bottom-sm"> |
|
|
|
<span class="text-red padding-right-xs">*</span>当前所在地区 |
|
|
|
</view> |
|
|
|
<view class="flex align-center"> |
|
|
|
<input |
|
|
|
@tap="handleSelectLocation" |
|
|
|
class="flex-sub padding-left-xs" |
|
|
|
name="input" |
|
|
|
placeholder="请选择当前所在地区" |
|
|
|
type="btn" |
|
|
|
v-model="district" |
|
|
|
/> |
|
|
|
<text class="cuIcon-location timer"></text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="cu-form-group flex flex-direction padding-tb"> |
|
|
|
<view class="title padding-bottom-sm"> |
|
|
|
<span class="text-red padding-right-xs">*</span>当前所在详细地址 |
|
|
|
</view> |
|
|
|
<input name="input" placeholder="请输入详细地址(含门牌号)" type="text" v-model="address" /> |
|
|
|
</view> |
|
|
|
<view class="cu-form-group flex flex-direction padding-top"> |
|
|
|
<view class="title padding-bottom-sm"> |
|
|
|
<span class="text-red padding-right-xs">*</span>当前状态 |
|
|
|
</view> |
|
|
|
<radio-group @change="StateChange" class="block"> |
|
|
|
<view class="cu-list menu text-left"> |
|
|
|
<view :key="index" class="cu-item" v-for="(state,index) in status"> |
|
|
|
<label class="flex justify-between align-center"> |
|
|
|
<radio |
|
|
|
:checked="index === healthTypeId" |
|
|
|
:value="state.id" |
|
|
|
class="round margin-right-xs" |
|
|
|
></radio> |
|
|
|
<view class="flex-sub" style="font-size: 34rpx;">{{ state.name }}</view> |
|
|
|
</label> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</radio-group> |
|
|
|
</view> |
|
|
|
<view class="cu-form-group flex flex-direction padding-tb"> |
|
|
|
<view class="title padding-bottom-sm">就诊医院(若无填无)</view> |
|
|
|
<input name="input" placeholder="请输入就诊医院" type="text" v-model="hospital" /> |
|
|
|
</view> |
|
|
|
<view class="cu-form-group flex flex-direction padding-top"> |
|
|
|
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>最近14天是否有武汉居住史、旅游史或武汉亲戚来访</view> |
|
|
|
<radio-group @change="TourChange" class="block"> |
|
|
|
<view class="flex"> |
|
|
|
<view :key="index" class="flex-sub margin-tb-sm" v-for="(tour,index) in tours"> |
|
|
|
<label class="flex justify-between align-center"> |
|
|
|
<radio |
|
|
|
:checked="index === touchHubei" |
|
|
|
:value="tour.value" |
|
|
|
class="round margin-right-xs" |
|
|
|
></radio> |
|
|
|
<text class="flex-sub" style="font-size: 34rpx;">{{ tour.name }}</text> |
|
|
|
</label> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</radio-group> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<form class="padding-lr cu-form-group flex-direction"> |
|
|
|
<view class="cu-form-group flex flex-direction padding-tb"> |
|
|
|
<view class="title padding-bottom-sm"> |
|
|
|
<span class="text-red padding-right-xs">*</span>当前所在地区 |
|
|
|
</view> |
|
|
|
<view class="flex align-center"> |
|
|
|
<input @tap="handleSelectLocation" class="flex-sub padding-left-xs" name="input" placeholder="请选择当前所在地区" type="btn" |
|
|
|
v-model="district" maxlength="128" /> |
|
|
|
<text class="cuIcon-location timer"></text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="cu-form-group flex flex-direction padding-tb"> |
|
|
|
<view class="title padding-bottom-sm"> |
|
|
|
<span class="text-red padding-right-xs">*</span>当前所在详细地址 |
|
|
|
</view> |
|
|
|
<input name="input" placeholder="请输入详细地址(含门牌号)" type="text" v-model="address" maxlength="128" /> |
|
|
|
</view> |
|
|
|
<view class="cu-form-group flex flex-direction padding-top"> |
|
|
|
<view class="title padding-bottom-sm"> |
|
|
|
<span class="text-red padding-right-xs">*</span>当前状态 |
|
|
|
</view> |
|
|
|
<radio-group @change="StateChange" class="block"> |
|
|
|
<view class="cu-list menu text-left"> |
|
|
|
<view :key="index" class="cu-item" v-for="(state,index) in status"> |
|
|
|
<label class="flex justify-between align-center"> |
|
|
|
<radio :checked="index === healthTypeId" :value="state.id" class="round margin-right-xs"></radio> |
|
|
|
<view class="flex-sub" style="font-size: 34rpx;">{{ state.name }}</view> |
|
|
|
</label> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</radio-group> |
|
|
|
</view> |
|
|
|
<view class="cu-form-group flex flex-direction padding-tb"> |
|
|
|
<view class="title padding-bottom-sm">就诊医院(若无填无)</view> |
|
|
|
<input name="input" placeholder="请输入就诊医院" type="text" v-model="hospital" maxlength="32" /> |
|
|
|
</view> |
|
|
|
<view class="cu-form-group flex flex-direction padding-top"> |
|
|
|
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>最近14天是否有武汉居住史、旅游史或武汉亲戚来访</view> |
|
|
|
<radio-group @change="TourChange" class="block"> |
|
|
|
<view class="flex"> |
|
|
|
<view :key="index" class="flex-sub margin-tb-sm" v-for="(tour,index) in tours"> |
|
|
|
<label class="flex justify-between align-center"> |
|
|
|
<radio :checked="index === touchHubei" :value="tour.value" class="round margin-right-xs"></radio> |
|
|
|
<text class="flex-sub" style="font-size: 34rpx;">{{ tour.name }}</text> |
|
|
|
</label> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</radio-group> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="cu-form-group flex flex-direction padding-top"> |
|
|
|
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>最近14天是否有新冠肺炎患者或疑似患者接触史</view> |
|
|
|
<radio-group @change="TouchChange" class="block"> |
|
|
|
<view class="flex"> |
|
|
|
<view :key="index" class="flex-sub margin-tb-sm" v-for="(touch,index) in touches"> |
|
|
|
<label class="flex justify-between align-center"> |
|
|
|
<radio |
|
|
|
:checked="index === touchSick" |
|
|
|
:value="touch.value" |
|
|
|
class="round margin-right-xs" |
|
|
|
></radio> |
|
|
|
<text class="flex-sub" style="font-size: 34rpx;">{{ touch.name }}</text> |
|
|
|
</label> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</radio-group> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="cu-form-group flex flex-direction padding-top"> |
|
|
|
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>最近14天有无接触过近期境外返回人员</view> |
|
|
|
<radio-group class="block" @change="TouchOverseasChange"> |
|
|
|
<view class="flex"> |
|
|
|
<view class="flex-sub margin-tb-sm" v-for="(touch,index) in overseas" :key="index"> |
|
|
|
<label class="flex justify-between align-center"> |
|
|
|
<radio class="round margin-right-xs" :checked="index === touchOverseas" :value="touch.value"></radio> |
|
|
|
<text class="flex-sub" style="font-size: 34rpx;">{{ touch.name }}</text> |
|
|
|
</label> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</radio-group> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="cu-form-group flex flex-direction padding-top"> |
|
|
|
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>是否在学校所在地</view> |
|
|
|
<radio-group class="block" @change="SchoolLocationChange"> |
|
|
|
<view class="flex"> |
|
|
|
<view class="flex-sub margin-tb-sm" v-for="(location,index) in locations" :key="location.value"> |
|
|
|
<label class="flex justify-between align-center"> |
|
|
|
<radio class="round margin-right-xs" :checked="index === schoolLocation" :value="location.value"></radio> |
|
|
|
<text class="flex-sub" style="font-size: 34rpx;">{{ location.name }}</text> |
|
|
|
</label> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</radio-group> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="cu-form-group flex flex-direction padding-tb"> |
|
|
|
<view class="title padding-bottom-sm"> |
|
|
|
<span class="text-red padding-right-xs">*</span>当前体温(℃) |
|
|
|
</view> |
|
|
|
<input name="input" placeholder="请输入当前真实体温" type="digit" v-model="animalHeat" /> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="cu-form-group flex flex-direction padding-tb"> |
|
|
|
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>紧急联系人</view> |
|
|
|
<view class="flex"> |
|
|
|
<input placeholder="姓名" class="flex flex-sub" name="input" type="text" v-model="emergencyName"/> |
|
|
|
<input placeholder="联系方式" class="flex flex-sub" name="input" type="number" v-model="emergencyPhone"/> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="cu-form-group flex flex-direction padding-tb"> |
|
|
|
<view class="title padding-bottom-sm">备注(选填)</view> |
|
|
|
<textarea placeholder="请填写具体情况..." name="input" v-model="remark"/> |
|
|
|
|
|
|
|
<!-- 上传图片 --> |
|
|
|
<view class="cu-form-group flex flex-direction padding-top"> |
|
|
|
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>最近14天是否有新冠肺炎患者或疑似患者接触史</view> |
|
|
|
<radio-group @change="TouchChange" class="block"> |
|
|
|
<view class="flex"> |
|
|
|
<view :key="index" class="flex-sub margin-tb-sm" v-for="(touch,index) in touches"> |
|
|
|
<label class="flex justify-between align-center"> |
|
|
|
<radio :checked="index === touchSick" :value="touch.value" class="round margin-right-xs"></radio> |
|
|
|
<text class="flex-sub" style="font-size: 34rpx;">{{ touch.name }}</text> |
|
|
|
</label> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</radio-group> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="cu-form-group flex flex-direction padding-top"> |
|
|
|
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>最近14天有无接触过近期境外返回人员</view> |
|
|
|
<radio-group class="block" @change="TouchOverseasChange"> |
|
|
|
<view class="flex"> |
|
|
|
<view class="flex-sub margin-tb-sm" v-for="(touch,index) in overseas" :key="index"> |
|
|
|
<label class="flex justify-between align-center"> |
|
|
|
<radio class="round margin-right-xs" :checked="index === touchOverseas" :value="touch.value"></radio> |
|
|
|
<text class="flex-sub" style="font-size: 34rpx;">{{ touch.name }}</text> |
|
|
|
</label> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</radio-group> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="cu-form-group flex flex-direction padding-top"> |
|
|
|
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>是否在学校所在地</view> |
|
|
|
<radio-group class="block" @change="SchoolLocationChange"> |
|
|
|
<view class="flex"> |
|
|
|
<view class="flex-sub margin-tb-sm" v-for="(location,index) in locations" :key="location.value"> |
|
|
|
<label class="flex justify-between align-center"> |
|
|
|
<radio class="round margin-right-xs" :checked="index === schoolLocation" :value="location.value"></radio> |
|
|
|
<text class="flex-sub" style="font-size: 34rpx;">{{ location.name }}</text> |
|
|
|
</label> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</radio-group> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="cu-form-group flex flex-direction padding-tb"> |
|
|
|
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>当前体温(℃)</view> |
|
|
|
<input placeholder="请输入当前体温" name="input" type="digit" v-model="animalHeat" /> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="cu-form-group flex flex-direction padding-tb"> |
|
|
|
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>紧急联系人</view> |
|
|
|
<view class="flex"> |
|
|
|
<input placeholder="姓名" maxlength="6" class="flex flex-sub" name="input" type="text" v-model="emergencyName" /> |
|
|
|
<input placeholder="联系方式" maxlength="11" class="flex flex-sub" name="input" type="number" v-model="emergencyPhone" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="cu-form-group flex flex-direction padding-tb"> |
|
|
|
<view class="title padding-bottom-sm">备注(选填)</view> |
|
|
|
<textarea placeholder="请填写具体情况..." name="input" v-model="remark" /> |
|
|
|
|
|
|
|
<!-- 上传图片 --> |
|
|
|
<view class="grid col-4 grid-square flex-sub"> |
|
|
|
<view class="bg-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" :data-url="imgList[index]"> |
|
|
|
<image :src="imgList[index]" mode="aspectFill"></image> |
|
|
@ -295,9 +275,9 @@ export default { |
|
|
|
|
|
|
|
ChooseImage() { |
|
|
|
uni.chooseImage({ |
|
|
|
count: 9, //默认9 |
|
|
|
count: 1, //默认9 |
|
|
|
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 |
|
|
|
sourceType: ['album'], //从相册选择 |
|
|
|
sourceType: ['album', 'camera'], //从相册选择 |
|
|
|
success: (res) => { |
|
|
|
if (this.imgList.length != 0) { |
|
|
|
this.imgList = this.imgList.concat(res.tempFilePaths) |
|
|
@ -305,7 +285,7 @@ export default { |
|
|
|
this.imgList = res.tempFilePaths |
|
|
|
} |
|
|
|
uni.uploadFile({ |
|
|
|
url: `https://test.tall.wiki/gateway${HEALTH_FILE}`, |
|
|
|
url: `https://www.tall.wiki/gateway${HEALTH_FILE}`, |
|
|
|
filePath: res.tempFilePaths[0], |
|
|
|
fileType: 'image', |
|
|
|
name: 'file', |
|
|
@ -322,7 +302,9 @@ export default { |
|
|
|
title: '图片提交成功', |
|
|
|
duration: 1000, |
|
|
|
}); |
|
|
|
console.log(this.fileIdList); |
|
|
|
},fail: (err) => { |
|
|
|
console.log('uploadImage fail', err); |
|
|
|
uni.showModal({ |
|
|
|
content: err.errMsg, |
|
|
|
showCancel: false |
|
|
@ -442,9 +424,9 @@ export default { |
|
|
|
showToast('请选择状态'); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!animalHeat) { |
|
|
|
showToast('请输入当前体温'); |
|
|
|
return; |
|
|
|
if (!animalHeat || animalHeat<30 || animalHeat>45) { |
|
|
|
showToast('请输入正确的体温值(范围:30℃~45℃)'); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!emergencyName) { |
|
|
|
showToast('请输入紧急联系人姓名'); |
|
|
|