Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
ShanghaiGongwei
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
宁路鹏
ShanghaiGongwei
Commits
b39b20a5
Commit
b39b20a5
authored
Nov 03, 2022
by
nlp97
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
e43de15e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1004 additions
and
1342 deletions
+1004
-1342
src/components/page3.vue
+15
-10
src/components/page4.vue
+522
-768
src/components/page5.vue
+324
-498
src/components/page7.vue
+53
-56
src/lang/Uygur.js
+23
-5
src/lang/zh.js
+65
-3
src/store/modules/user.js
+2
-2
No files found.
src/components/page3.vue
View file @
b39b20a5
...
...
@@ -2,7 +2,7 @@
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: ninglupeng
* @LastEditTime: 2022-1
0-31 15:05:09
* @LastEditTime: 2022-1
1-01 10:07:10
* @Description:
-->
<
template
>
...
...
@@ -44,31 +44,36 @@
:placeholder=
"$t('agreementFloor')"
:rules=
"[{ required: true, message: `请填写${$t('agreementFloor')}` }]"
@
blur=
"setLocalStorge('agreementFloor')"
></van-field>
<van-field
colon
clearable
v-model=
"bedNumber"
name=
"bedNumber"
label=
"床号"
placeholder=
"床号"
@
blur=
"setLocalStorge('bedNumber')"
:rules=
"[{ required: true, message: '请填写床号' }]"
></van-field>
<van-field
colon
clearable
v-model=
"bedNumber"
name=
"bedNumber"
:label=
"$t('bedNumber')"
:placeholder=
"`${$t('bedNumber')}`"
@
blur=
"setLocalStorge('bedNumber')"
:rules=
"[{ required: true, message: `请填写${$t('bedNumber')}` }]"
></van-field>
<van-field
colon
clearable
v-model=
"agreementSign"
name=
"agreementSign"
label=
"患者签字"
placeholder=
"患者签字"
readonly
:rules=
"[{ required: true, message: '请患者签字' }]"
>
<van-field
colon
clearable
v-model=
"agreementSign"
name=
"agreementSign"
:label=
"$t('agreementSign')"
:placeholder=
"$t('agreementSign')"
readonly
:rules=
"[{ required: true, message: `请{${$t('agreementSign')}}` }]"
>
<
template
#
input
>
<img
class=
"Signimg"
v-show=
"agreementSign"
:src=
"agreementSign"
alt=
""
:style=
"
{ width: agreementSign ? '70%' : '' }" />
<van-button
size=
"small"
@
click=
"showSignHandleVue = true"
block
type=
"primary"
native-type=
"button"
:style=
"
{ width: !agreementSign ? '50%' : '30%' }">
{{
agreementSign
?
"重签"
:
"点击签字"
}}
</van-button>
:style=
"
{ width: !agreementSign ? '50%' : '30%' }">
{{
agreementSign
?
`${$t('countersign')
}
`
:
`${$t('clickSign')
}
`
}}
<
/van-button
>
<
/template
>
<
/van-field
>
<van-field
colon
clearable
readonly
clickable
name=
"agreementDate"
:value=
"agreementDate"
label=
"签字日期"
placeholder=
"点击选择签字日期"
@
click=
"showCalendar = true"
:rules=
"[
<
van
-
field
colon
clearable
readonly
clickable
name
=
"agreementDate"
:
value
=
"agreementDate"
:
label
=
"$t('agreementDate')"
:
placeholder
=
"`点击选择${$t('agreementDate')
}
`"
@
click
=
"showCalendar = true"
:
rules
=
"[
{
required: true,
message:
'请选择签字日期'
,
message:
`请选择${$t('agreementDate')
}
`
,
}
,
]"
/>
<
van
-
popup
v
-
model
=
"showCalendar"
position
=
"bottom"
>
<
van
-
datetime
-
picker
type
=
"date"
:
min
-
date
=
"minAgreementDate"
:
max
-
date
=
"maxDate"
@
confirm
=
"onAgreementDate"
@
cancel
=
"showCalendar = false"
:
formatter
=
"formatter"
v
-
model
=
"agreementDate1"
/>
<
/van-popup
>
<jlPopup
title=
"签名
"
v-if=
"showSignHandleVue"
@
onCancel=
"onCancel"
>
<
jlPopup
:
title
=
"$t('autograph')
"
v
-
if
=
"showSignHandleVue"
@
onCancel
=
"onCancel"
>
<
/jlPopup
>
<
/div
>
<
/template
>
...
...
src/components/page4.vue
View file @
b39b20a5
<!--
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors:
wsq
* @LastEditTime: 2022-
04-21 10:54:4
3
* @LastEditors:
ninglupeng
* @LastEditTime: 2022-
11-01 10:26:0
3
* @Description:
-->
<
template
>
<div
class=
"page4"
>
<van-field
colon
clearable
v-model=
"patientName"
name=
"patientName"
label=
"患者姓名"
placeholder=
"患者姓名"
:rules=
"[
{ required: true, message: '请填写患者姓名' }]"
@blur="setLocalStorge('patientName')"
>
</van-field>
<van-field
colon
clearable
name=
"orNotByEntry"
label=
"近期是否由国外入境"
>
<template
#
input
>
<van-radio-group
@
change=
"setLocalStorge('orNotByEntry')"
v-model=
"orNotByEntry"
direction=
"horizontal"
>
<van-radio
name=
"是"
>
是
</van-radio>
<van-radio
name=
"否"
>
否
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
colon
clearable
name=
"nationality"
label=
"国籍"
readonly
:value=
"nationality"
@
click=
"shownationality = true"
:rules=
"[{ required: true, message: '请填写国籍' }]"
>
</van-field>
<van-popup
v-model=
"shownationality"
position=
"bottom"
>
<van-picker
title=
"国籍"
show-toolbar
:columns=
"nationalityList"
@
confirm=
"
(value, index) => {
nationality = value;
setLocalStorge('nationality');
shownationality = false;
}
"
@
cancel=
"
() => {
shownationality = false;
}
"
/>
</van-popup>
<van-field
colon
v-if=
"nationality != '中国'"
clearable
v-model=
"passportId"
name=
"passportId"
label=
"护照号"
placeholder=
"护照号"
:rules=
"[
{
required: nationality != '中国' ? true : false,
message: '请填写护照号',
},
]"
></van-field>
<van-field
colon
clearable
v-if=
"nationality == '中国'"
v-model=
"idCard"
name=
"idCard"
label=
"身份证号"
placeholder=
"身份证号"
@
blur=
"getdate"
:rules=
"[
{ required: true, message: '请填写身份证号' },
{ validator, message: '身份证号码格式错误!' },
]"
></van-field>
<van-field
colon
clearable
name=
"gender"
label=
"性别"
>
<
template
#
input
>
<van-radio-group
@
change=
"
() =>
{
setLocalStorge('gender');
if (gender == '男') {
isConceive = '未孕';
gestationalWeeks = '';
setValue('isConceive', '未孕');
setValue('gestationalWeeks', '');
}
}
"
v-model="gender"
direction="horizontal"
>
<van-radio
name=
"男"
>
男
</van-radio>
<van-radio
name=
"女"
>
女
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
colon
clearable
readonly
clickable
name=
"birthday"
:value=
"birthday"
label=
"出生日期"
placeholder=
"出生日期"
@
click=
"showbirthday = true"
:rules=
"[{ required: true, message: '请选择出生日期' }]"
/>
<van-popup
v-model=
"showbirthday"
position=
"bottom"
>
<van-datetime-picker
type=
"date"
:min-date=
"minbirthday"
:max-date=
"maxDate"
@
confirm=
"onbirthday"
@
cancel=
"showbirthday = false"
:formatter=
"formatter"
/>
</van-popup>
<van-field
colon
clearable
v-model=
"age"
name=
"age"
label=
"年龄"
placeholder=
"年龄"
type=
"digit"
@
blur=
"setLocalStorge('age')"
:rules=
"[{ required: true, message: '请填写年龄' }]"
></van-field>
<van-field
colon
clearable
v-model=
"height"
name=
"height"
label=
"身高"
placeholder=
"身高"
type=
"digit"
@
blur=
"setLocalStorge('height')"
:rules=
"[{ required: true, message: '请填写身高' }]"
>
<
template
#
extra
>
CM
</
template
>
</van-field>
<van-field
colon
clearable
v-model=
"weight"
name=
"weight"
label=
"体重"
placeholder=
"体重"
type=
"number"
@
blur=
"setLocalStorge('weight')"
:rules=
"[{ required: true, message: '请填写体重' }]"
>
<
template
#
extra
>
KG
</
template
>
</van-field>
<van-field
colon
clearable
name=
"maritalStatus"
label=
"婚姻状况"
>
<
template
#
input
>
<van-radio-group
@
change=
"setLocalStorge('maritalStatus')"
v-model=
"maritalStatus"
direction=
"horizontal"
>
<van-radio
name=
"已婚"
>
已婚
</van-radio>
<van-radio
name=
"未婚"
>
未婚
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
colon
clearable
v-if=
"gender == '女'"
name=
"isConceive"
label=
"怀孕状况"
>
<
template
#
input
>
<van-radio-group
@
change=
"setLocalStorge('isConceive')"
v-model=
"isConceive"
direction=
"horizontal"
>
<van-radio
name=
"未孕"
>
未孕
</van-radio>
<van-radio
name=
"已孕"
>
已孕
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
colon
clearable
v-if=
"gender == '女' && isConceive == '已孕'"
v-model=
"gestationalWeeks"
name=
"gestationalWeeks"
label=
"怀孕周期"
placeholder=
"怀孕周期"
type=
"number"
@
blur=
"setLocalStorge('gestationalWeeks')"
:rules=
"[
{
required: gender == '女' && isConceive == '已孕' ? true : false,
message: '请填写怀孕周期',
},
]"
>
<
template
#
extra
>
周
</
template
>
</van-field>
<van-field
colon
clearable
name=
"occupation"
label=
"职业"
readonly
:value=
"occupation"
@
click=
"showoccupation = true"
:rules=
"[{ required: true, message: '请填写职业' }]"
>
</van-field>
<van-popup
v-model=
"showoccupation"
position=
"bottom"
>
<van-picker
title=
"职业"
show-toolbar
:columns=
"occupationList"
@
confirm=
"
(value, index) => {
occupation = value;
setLocalStorge('occupation');
showoccupation = false;
}
"
@
cancel=
"
() => {
showoccupation = false;
}
"
/>
</van-popup>
<van-field
colon
v-show=
"occupation == '其他'"
clearable
autosize
type=
"textarea"
v-model=
"otherOccupation"
name=
"otherOccupation"
label=
"其他职业"
placeholder=
"其他职业"
:rules=
"[
{
required: occupation == '其他' ? true : false,
message: '请填写其他职业',
},
]"
@
blur=
"setLocalStorge('otherOccupation')"
></van-field>
<van-field
colon
clearable
v-model=
"contactInformation"
name=
"contactInformation"
label=
"联系方式"
placeholder=
"联系方式"
@
blur=
"setLocalStorge('contactInformation')"
:rules=
"[{ required: true, message: '请填写联系方式' }]"
></van-field>
<van-field
colon
clearable
v-model=
"FamilyMembersPhone"
name=
"FamilyMembersPhone"
label=
"家属联系方式"
placeholder=
"家属联系方式"
@
blur=
"setLocalStorge('FamilyMembersPhone')"
:rules=
"[{ required: true, message: '请填写家属联系方式' }]"
></van-field>
<van-field
colon
clearable
readonly
clickable
name=
"province"
:value=
"province"
label=
"户籍地(省)"
v-show=
"false"
/>
<van-field
colon
clearable
readonly
clickable
name=
"city"
:value=
"city"
label=
"户籍地(市)"
v-show=
"false"
/>
<van-field
colon
clearable
readonly
clickable
name=
"Registeredresidence"
:value=
"Registeredresidence"
label=
"户籍地"
placeholder=
"点击选择户籍地"
@
click=
"showArea = true"
:rules=
"[{ required: true, message: '请点击选择户籍地' }]"
/>
<van-popup
v-model=
"showArea"
position=
"bottom"
>
<van-area
:area-list=
"areaList"
:columns-num=
"2"
@
confirm=
"onConfirm"
@
cancel=
"showArea = false"
/>
</van-popup>
<van-field
colon
clearable
autosize
type=
"textarea"
v-model=
"address"
name=
"address"
label=
"现居住地"
placeholder=
"现居住地"
@
blur=
"setLocalStorge('address')"
:rules=
"[{ required: true, message: '请填写现居住地' }]"
></van-field>
<van-field
colon
clearable
name=
"typeOfMedicalInsurance"
label=
"医保类型"
readonly
:value=
"typeOfMedicalInsurance"
@
click=
"showtypeOfMedicalInsurance = true"
:rules=
"[{ required: true, message: '请填写医保类型' }]"
>
</van-field>
<van-popup
v-model=
"showtypeOfMedicalInsurance"
position=
"bottom"
>
<van-picker
title=
"医保类型"
show-toolbar
:columns=
"typeOfMedicalInsuranceList"
@
confirm=
"
(value, index) => {
typeOfMedicalInsurance = value;
setLocalStorge('typeOfMedicalInsurance');
showtypeOfMedicalInsurance = false;
}
"
@
cancel=
"
() => {
showtypeOfMedicalInsurance = false;
}
"
/>
</van-popup>
<!-- 有无商业保险 -->
<van-field
colon
clearable
name=
"insurance"
label=
"商业保险"
>
<
template
#
input
>
<van-radio-group
@
change=
"setLocalStorge('insurance')"
v-model=
"insurance"
direction=
"horizontal"
>
<van-radio
name=
"有"
>
有
</van-radio>
<van-radio
name=
"无"
>
无
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
style=
"margin-left: -35px;"
colon
clearable
name=
"HasSymptom"
label-width=
"130px"
label=
"是否有症状"
>
<
template
#
input
>
<van-radio-group
@
change=
"
() =>
{
if (HasSymptom == '否') {
symptom = [];
otherSymptom = '';
setValue('symptom','');
setValue('otherSymptom', '');
}
setLocalStorge('HasSymptom');
}
"
v-model="HasSymptom"
direction="horizontal"
>
<van-radio
name=
"是"
>
是
</van-radio>
<van-radio
name=
"否"
>
否
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
style=
"margin-left: -35px;"
v-if=
"HasSymptom == '是'"
colon
:rules=
"[
{
required: HasSymptom == '是' ? true : false,
message: '请选择症状',
},
]"
clearable
name=
"symptom"
label=
"症状"
label-width=
"130px"
>
<
template
#
input
>
<van-checkbox-group
@
change=
"
() =>
{
setLocalStorge('symptom');
}
"
v-model="symptom"
direction="horizontal"
class="symptom"
>
<template
v-for=
"(item, index) in symptomList"
>
<van-checkbox
:key=
"index"
:name=
"item.element"
shape=
"square"
>
{{
item
.
element
}}
</van-checkbox
>
</
template
>
</van-checkbox-group>
</template>
</van-field>
<van-field
style=
"margin-left: 10px;"
colon
v-if=
"symptom.includes('其他') && HasSymptom == '是' "
clearable
autosize
type=
"textarea"
v-model=
"otherSymptom"
name=
"otherSymptom"
label=
"其他症状"
placeholder=
"其他症状"
:rules=
"[
{
required: symptom.includes('其他') && HasSymptom == '是' ? true : false,
message: '请填写其他症状',
},
]"
@
blur=
"setLocalStorge('otherSymptom')"
></van-field>
</div>
<div
class=
"page4"
>
<van-field
colon
clearable
v-model=
"patientName"
name=
"patientName"
:label=
"$t('patientName')"
:placeholder=
"$t('patientName')"
:rules=
"[
{ required: true, message: `请填写${$t('patientName')}` }]"
@blur="setLocalStorge('patientName')">
</van-field>
<van-field
colon
clearable
name=
"orNotByEntry"
:label=
"$t('orNotByEntry')"
>
<template
#
input
>
<van-radio-group
@
change=
"setLocalStorge('orNotByEntry')"
v-model=
"orNotByEntry"
direction=
"horizontal"
>
<van-radio
name=
"是"
>
是
</van-radio>
<van-radio
name=
"否"
>
否
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
colon
clearable
name=
"nationality"
:label=
"$t('nationality')"
readonly
:value=
"nationality"
@
click=
"shownationality = true"
:rules=
"[{ required: true, message: `请填写${$t('nationality')}` }]"
>
</van-field>
<van-popup
v-model=
"shownationality"
position=
"bottom"
>
<van-picker
:title=
"$t('nationality')"
show-toolbar
:columns=
"nationalityList"
@
confirm=
"
(value, index) => {
nationality = value;
setLocalStorge('nationality');
shownationality = false;
}
"
@
cancel=
"
() => {
shownationality = false;
}
"
/>
</van-popup>
<van-field
colon
v-if=
"nationality != '中国'"
clearable
v-model=
"passportId"
name=
"passportId"
:label=
"$t('passportId')"
:placeholder=
"$t('passportId')"
:rules=
"[
{
required: nationality != '中国' ? true : false,
message: `请填写${$t('passportId')}`,
},
]"
></van-field>
<van-field
colon
clearable
v-if=
"nationality == '中国'"
v-model=
"idCard"
name=
"idCard"
:label=
"$t('idCard')"
:placeholder=
"$t('idCard')"
@
blur=
"getdate"
:rules=
"[
{ required: true, message: '请填写身份证号' },
{ validator, message: '身份证号码格式错误!' },
]"
></van-field>
<van-field
colon
clearable
name=
"gender"
:label=
"$t('gender')"
>
<
template
#
input
>
<van-radio-group
@
change=
"
() =>
{
setLocalStorge('gender');
if (gender == '男') {
isConceive = '未孕';
gestationalWeeks = '';
setValue('isConceive', '未孕');
setValue('gestationalWeeks', '');
}
}
" v-model="gender" direction="horizontal">
<van-radio
name=
"男"
>
男
</van-radio>
<van-radio
name=
"女"
>
女
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
colon
clearable
readonly
clickable
name=
"birthday"
:value=
"birthday"
label=
"出生日期"
placeholder=
"出生日期"
@
click=
"showbirthday = true"
:rules=
"[{ required: true, message: '请选择出生日期' }]"
/>
<van-popup
v-model=
"showbirthday"
position=
"bottom"
>
<van-datetime-picker
type=
"date"
:min-date=
"minbirthday"
:max-date=
"maxDate"
@
confirm=
"onbirthday"
@
cancel=
"showbirthday = false"
:formatter=
"formatter"
/>
</van-popup>
<van-field
colon
clearable
v-model=
"age"
name=
"age"
label=
"年龄"
placeholder=
"年龄"
type=
"digit"
@
blur=
"setLocalStorge('age')"
:rules=
"[{ required: true, message: '请填写年龄' }]"
></van-field>
<van-field
colon
clearable
v-model=
"height"
name=
"height"
label=
"身高"
placeholder=
"身高"
type=
"digit"
@
blur=
"setLocalStorge('height')"
:rules=
"[{ required: true, message: '请填写身高' }]"
>
<
template
#
extra
>
CM
</
template
>
</van-field>
<van-field
colon
clearable
v-model=
"weight"
name=
"weight"
label=
"体重"
placeholder=
"体重"
type=
"number"
@
blur=
"setLocalStorge('weight')"
:rules=
"[{ required: true, message: '请填写体重' }]"
>
<
template
#
extra
>
KG
</
template
>
</van-field>
<van-field
colon
clearable
name=
"maritalStatus"
label=
"婚姻状况"
>
<
template
#
input
>
<van-radio-group
@
change=
"setLocalStorge('maritalStatus')"
v-model=
"maritalStatus"
direction=
"horizontal"
>
<van-radio
name=
"已婚"
>
已婚
</van-radio>
<van-radio
name=
"未婚"
>
未婚
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
colon
clearable
v-if=
"gender == '女'"
name=
"isConceive"
label=
"怀孕状况"
>
<
template
#
input
>
<van-radio-group
@
change=
"setLocalStorge('isConceive')"
v-model=
"isConceive"
direction=
"horizontal"
>
<van-radio
name=
"未孕"
>
未孕
</van-radio>
<van-radio
name=
"已孕"
>
已孕
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
colon
clearable
v-if=
"gender == '女' && isConceive == '已孕'"
v-model=
"gestationalWeeks"
name=
"gestationalWeeks"
label=
"怀孕周期"
placeholder=
"怀孕周期"
type=
"number"
@
blur=
"setLocalStorge('gestationalWeeks')"
:rules=
"[
{
required: gender == '女' && isConceive == '已孕' ? true : false,
message: '请填写怀孕周期',
},
]"
>
<
template
#
extra
>
周
</
template
>
</van-field>
<van-field
colon
clearable
name=
"occupation"
label=
"职业"
readonly
:value=
"occupation"
@
click=
"showoccupation = true"
:rules=
"[{ required: true, message: '请填写职业' }]"
>
</van-field>
<van-popup
v-model=
"showoccupation"
position=
"bottom"
>
<van-picker
title=
"职业"
show-toolbar
:columns=
"occupationList"
@
confirm=
"
(value, index) => {
occupation = value;
setLocalStorge('occupation');
showoccupation = false;
}
"
@
cancel=
"
() => {
showoccupation = false;
}
"
/>
</van-popup>
<van-field
colon
v-show=
"occupation == '其他'"
clearable
autosize
type=
"textarea"
v-model=
"otherOccupation"
name=
"otherOccupation"
label=
"其他职业"
placeholder=
"其他职业"
:rules=
"[
{
required: occupation == '其他' ? true : false,
message: '请填写其他职业',
},
]"
@
blur=
"setLocalStorge('otherOccupation')"
></van-field>
<van-field
colon
clearable
v-model=
"contactInformation"
name=
"contactInformation"
label=
"联系方式"
placeholder=
"联系方式"
@
blur=
"setLocalStorge('contactInformation')"
:rules=
"[{ required: true, message: '请填写联系方式' }]"
></van-field>
<van-field
colon
clearable
v-model=
"FamilyMembersPhone"
name=
"FamilyMembersPhone"
label=
"家属联系方式"
placeholder=
"家属联系方式"
@
blur=
"setLocalStorge('FamilyMembersPhone')"
:rules=
"[{ required: true, message: '请填写家属联系方式' }]"
></van-field>
<van-field
colon
clearable
readonly
clickable
name=
"province"
:value=
"province"
label=
"户籍地(省)"
v-show=
"false"
/>
<van-field
colon
clearable
readonly
clickable
name=
"city"
:value=
"city"
label=
"户籍地(市)"
v-show=
"false"
/>
<van-field
colon
clearable
readonly
clickable
name=
"Registeredresidence"
:value=
"Registeredresidence"
label=
"户籍地"
placeholder=
"点击选择户籍地"
@
click=
"showArea = true"
:rules=
"[{ required: true, message: '请点击选择户籍地' }]"
/>
<van-popup
v-model=
"showArea"
position=
"bottom"
>
<van-area
:area-list=
"areaList"
:columns-num=
"2"
@
confirm=
"onConfirm"
@
cancel=
"showArea = false"
/>
</van-popup>
<van-field
colon
clearable
autosize
type=
"textarea"
v-model=
"address"
name=
"address"
label=
"现居住地"
placeholder=
"现居住地"
@
blur=
"setLocalStorge('address')"
:rules=
"[{ required: true, message: '请填写现居住地' }]"
>
</van-field>
<van-field
colon
clearable
name=
"typeOfMedicalInsurance"
label=
"医保类型"
readonly
:value=
"typeOfMedicalInsurance"
@
click=
"showtypeOfMedicalInsurance = true"
:rules=
"[{ required: true, message: '请填写医保类型' }]"
>
</van-field>
<van-popup
v-model=
"showtypeOfMedicalInsurance"
position=
"bottom"
>
<van-picker
title=
"医保类型"
show-toolbar
:columns=
"typeOfMedicalInsuranceList"
@
confirm=
"
(value, index) => {
typeOfMedicalInsurance = value;
setLocalStorge('typeOfMedicalInsurance');
showtypeOfMedicalInsurance = false;
}
"
@
cancel=
"
() => {
showtypeOfMedicalInsurance = false;
}
"
/>
</van-popup>
<!-- 有无商业保险 -->
<van-field
colon
clearable
name=
"insurance"
label=
"商业保险"
>
<
template
#
input
>
<van-radio-group
@
change=
"setLocalStorge('insurance')"
v-model=
"insurance"
direction=
"horizontal"
>
<van-radio
name=
"有"
>
有
</van-radio>
<van-radio
name=
"无"
>
无
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
style=
"margin-left: -35px;"
colon
clearable
name=
"HasSymptom"
label-width=
"130px"
label=
"是否有症状"
>
<
template
#
input
>
<van-radio-group
@
change=
"
() =>
{
if (HasSymptom == '否') {
symptom = [];
otherSymptom = '';
setValue('symptom', '');
setValue('otherSymptom', '');
}
setLocalStorge('HasSymptom');
}
" v-model="HasSymptom" direction="horizontal">
<van-radio
name=
"是"
>
是
</van-radio>
<van-radio
name=
"否"
>
否
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
style=
"margin-left: -35px;"
v-if=
"HasSymptom == '是'"
colon
:rules=
"[
{
required: HasSymptom == '是' ? true : false,
message: '请选择症状',
},
]"
clearable
name=
"symptom"
label=
"症状"
label-width=
"130px"
>
<
template
#
input
>
<van-checkbox-group
@
change=
"
() =>
{
setLocalStorge('symptom');
}
" v-model="symptom" direction="horizontal" class="symptom">
<template
v-for=
"(item, index) in symptomList"
>
<van-checkbox
:key=
"index"
:name=
"item.element"
shape=
"square"
>
{{
item
.
element
}}
</van-checkbox>
</
template
>
</van-checkbox-group>
</template>
</van-field>
<van-field
style=
"margin-left: 10px;"
colon
v-if=
"symptom.includes('其他') && HasSymptom == '是'"
clearable
autosize
type=
"textarea"
v-model=
"otherSymptom"
name=
"otherSymptom"
label=
"其他症状"
placeholder=
"其他症状"
:rules=
"[
{
required: symptom.includes('其他') && HasSymptom == '是' ? true : false,
message: '请填写其他症状',
},
]"
@
blur=
"setLocalStorge('otherSymptom')"
></van-field>
</div>
</template>
<
script
>
...
...
@@ -507,300 +261,300 @@ import { areaList } from "@vant/area-data";
import
{
formatDate
}
from
"../utils/common.js"
;
export
default
{
name
:
"page4"
,
inject
:
[
"setLoading"
],
data
()
{
return
{
patientName
:
""
,
//患者姓名
orNotByEntry
:
"否"
,
//近期是否由国外入境
nationality
:
"中国"
,
//国籍
passportId
:
""
,
//护照号
age
:
""
,
//年龄
height
:
""
,
//身高
weight
:
""
,
gender
:
"男"
,
//性别
maritalStatus
:
"未婚"
,
//婚姻状况
birthday
:
""
,
//出生日期
isConceive
:
"未孕"
,
//怀孕状况
gestationalWeeks
:
""
,
//怀孕周期
occupation
:
""
,
//职业
otherOccupation
:
""
,
//其他职业
contactInformation
:
""
,
//联系方式
FamilyMembersPhone
:
""
,
//家属联系方式
// workOrNotCovid: "否",
Registeredresidence
:
""
,
//籍贯 (包括省市)
province
:
""
,
//籍贯 (省)
city
:
""
,
//籍贯 (市)
address
:
""
,
//地址
idCard
:
""
,
//身份证号
typeOfMedicalInsurance
:
"上海医保"
,
//医保类型
insurance
:
"无"
,
//商业保险
HasSymptom
:
"否"
,
//有无症状
symptom
:
[],
//患者症状
otherSymptom
:
""
,
//其他症状
symptomList
:
[],
//症状列表
areaList
,
//地址数据选项列表
showArea
:
false
,
//控制地址弹窗
showbirthday
:
false
,
//出生时间弹窗
minbirthday
:
new
Date
(
1920
,
0
,
1
),
occupationList
:
[],
showoccupation
:
false
,
nationalityList
:
[],
//国籍列表
typeOfMedicalInsuranceList
:
[],
shownationality
:
false
,
showtypeOfMedicalInsurance
:
false
,
maxDate
:
new
Date
(),
};
},
mounted
()
{
this
.
getResource
();
this
.
setLastValue
();
},
methods
:
{
setLastValue
()
{
if
(
this
.
getLocalStorge
(
"symptom"
))
{
this
.
symptom
=
this
.
getLocalStorge
(
"symptom"
).
split
(
","
);
}
let
arr
=
[
"patientName"
,
//患者姓名
"nationality"
,
//国籍
"passportId"
,
//护照号
"HasSymptom"
,
//是否有症状
"otherSymptom"
,
//其他症状
"otherOccupation"
,
//其他职业
"age"
,
//年龄
"gender"
,
//性别
"height"
,
//身高
"weight"
,
//体重
"maritalStatus"
,
//婚姻状况
"birthday"
,
//出生日期
"isConceive"
,
//怀孕状况
"gestationalWeeks"
,
//怀孕周期
"occupation"
,
//职业
"contactInformation"
,
//联系方式
"FamilyMembersPhone"
,
//家属联系方式
"Registeredresidence"
,
//籍贯 (包括省市)
"province"
,
//籍贯 (省)
"city"
,
//籍贯 (市)
"address"
,
//地址
"idCard"
,
//身份证号
"typeOfMedicalInsurance"
,
//医保类型
"insurance"
,
//商业保险
];
arr
.
map
((
item
)
=>
{
if
(
this
.
getLocalStorge
(
item
))
{
this
[
`
${
item
}
`
]
=
this
.
getLocalStorge
(
item
);
}
});
name
:
"page4"
,
inject
:
[
"setLoading"
],
data
()
{
return
{
patientName
:
""
,
//患者姓名
orNotByEntry
:
"否"
,
//近期是否由国外入境
nationality
:
"中国"
,
//国籍
passportId
:
""
,
//护照号
age
:
""
,
//年龄
height
:
""
,
//身高
weight
:
""
,
gender
:
"男"
,
//性别
maritalStatus
:
"未婚"
,
//婚姻状况
birthday
:
""
,
//出生日期
isConceive
:
"未孕"
,
//怀孕状况
gestationalWeeks
:
""
,
//怀孕周期
occupation
:
""
,
//职业
otherOccupation
:
""
,
//其他职业
contactInformation
:
""
,
//联系方式
FamilyMembersPhone
:
""
,
//家属联系方式
// workOrNotCovid: "否",
Registeredresidence
:
""
,
//籍贯 (包括省市)
province
:
""
,
//籍贯 (省)
city
:
""
,
//籍贯 (市)
address
:
""
,
//地址
idCard
:
""
,
//身份证号
typeOfMedicalInsurance
:
"上海医保"
,
//医保类型
insurance
:
"无"
,
//商业保险
HasSymptom
:
"否"
,
//有无症状
symptom
:
[],
//患者症状
otherSymptom
:
""
,
//其他症状
symptomList
:
[],
//症状列表
areaList
,
//地址数据选项列表
showArea
:
false
,
//控制地址弹窗
showbirthday
:
false
,
//出生时间弹窗
minbirthday
:
new
Date
(
1920
,
0
,
1
),
occupationList
:
[],
showoccupation
:
false
,
nationalityList
:
[],
//国籍列表
typeOfMedicalInsuranceList
:
[],
shownationality
:
false
,
showtypeOfMedicalInsurance
:
false
,
maxDate
:
new
Date
(),
};
},
getLocalStorge
(
key
)
{
return
window
.
localStorage
.
getItem
(
key
);
mounted
()
{
this
.
getResource
();
this
.
setLastValue
(
);
},
methods
:
{
setLastValue
()
{
if
(
this
.
getLocalStorge
(
"symptom"
))
{
this
.
symptom
=
this
.
getLocalStorge
(
"symptom"
).
split
(
","
);
}
let
arr
=
[
"patientName"
,
//患者姓名
"nationality"
,
//国籍
"passportId"
,
//护照号
"HasSymptom"
,
//是否有症状
"otherSymptom"
,
//其他症状
"otherOccupation"
,
//其他职业
"age"
,
//年龄
"gender"
,
//性别
"height"
,
//身高
"weight"
,
//体重
"maritalStatus"
,
//婚姻状况
"birthday"
,
//出生日期
"isConceive"
,
//怀孕状况
"gestationalWeeks"
,
//怀孕周期
"occupation"
,
//职业
"contactInformation"
,
//联系方式
"FamilyMembersPhone"
,
//家属联系方式
"Registeredresidence"
,
//籍贯 (包括省市)
"province"
,
//籍贯 (省)
"city"
,
//籍贯 (市)
"address"
,
//地址
"idCard"
,
//身份证号
"typeOfMedicalInsurance"
,
//医保类型
"insurance"
,
//商业保险
];
arr
.
map
((
item
)
=>
{
if
(
this
.
getLocalStorge
(
item
))
{
this
[
`
${
item
}
`
]
=
this
.
getLocalStorge
(
item
);
}
});
},
setLocalStorge
(
key
)
{
window
.
localStorage
.
setItem
(
key
,
this
[
`
${
key
}
`
]);
},
setValue
(
key
,
value
)
{
window
.
localStorage
.
setItem
(
key
,
value
);
},
onConfirm
(
values
)
{
console
.
log
(
values
);
this
.
Registeredresidence
=
values
.
filter
((
item
)
=>
!!
item
)
.
map
((
item
)
=>
item
.
name
)
.
join
(
"/"
);
getLocalStorge
(
key
)
{
return
window
.
localStorage
.
getItem
(
key
);
},
this
.
province
=
values
[
0
].
name
;
this
.
city
=
values
[
1
].
name
;
setLocalStorge
(
key
)
{
window
.
localStorage
.
setItem
(
key
,
this
[
`
${
key
}
`
]);
},
setValue
(
key
,
value
)
{
window
.
localStorage
.
setItem
(
key
,
value
);
},
onConfirm
(
values
)
{
console
.
log
(
values
);
this
.
Registeredresidence
=
values
.
filter
((
item
)
=>
!!
item
)
.
map
((
item
)
=>
item
.
name
)
.
join
(
"/"
);
this
.
setLocalStorge
(
"Registeredresidence"
);
this
.
setLocalStorge
(
"province"
);
this
.
setLocalStorge
(
"city"
);
this
.
province
=
values
[
0
].
name
;
this
.
city
=
values
[
1
].
name
;
this
.
showArea
=
false
;
},
this
.
setLocalStorge
(
"Registeredresidence"
);
this
.
setLocalStorge
(
"province"
);
this
.
setLocalStorge
(
"city"
);
validator
(
val
)
{
const
card15
=
/^
[
1-9
]\d{5}\d{2}((
0
[
1-9
])
|
(
10|11|12
))(([
0-2
][
1-9
])
|10|20|30|31
)\d{2}[
0-9Xx
]
$/
;
const
card18
=
/^
[
1-9
]\d{5}(
18|19|
([
23
]\d))\d{2}((
0
[
1-9
])
|
(
10|11|12
))(([
0-2
][
1-9
])
|10|20|30|31
)\d{3}[
0-9Xx
]
$/
;
return
card15
.
test
(
val
)
||
card18
.
test
(
val
);
},
this
.
showArea
=
false
;
},
getResource
()
{
this
.
setLoading
(
true
);
this
.
$http
.
get
(
`/Research/Resource`
,
{}).
then
((
data
)
=>
{
let
arr
=
data
.
filter
((
item
)
=>
{
return
item
.
category
==
"国籍"
;
});
let
arr1
=
data
.
filter
((
item
)
=>
{
return
item
.
category
==
"医保类型"
;
});
let
arr2
=
data
.
filter
((
item
)
=>
{
return
item
.
category
==
"职业"
;
});
this
.
symptomList
=
data
.
filter
((
item
)
=>
{
return
item
.
category
==
"症状"
;
});
this
.
nationalityList
=
arr
.
map
((
item
)
=>
{
return
item
.
element
;
});
this
.
typeOfMedicalInsuranceList
=
arr1
.
map
((
item
)
=>
{
return
item
.
element
;
});
this
.
occupationList
=
arr2
.
map
((
item
)
=>
{
return
item
.
element
;
});
this
.
setLoading
(
false
);
});
},
validator
(
val
)
{
const
card15
=
/^
[
1-9
]\d{5}\d{2}((
0
[
1-9
])
|
(
10|11|12
))(([
0-2
][
1-9
])
|10|20|30|31
)\d{2}[
0-9Xx
]
$/
;
const
card18
=
/^
[
1-9
]\d{5}(
18|19|
([
23
]\d))\d{2}((
0
[
1-9
])
|
(
10|11|12
))(([
0-2
][
1-9
])
|10|20|30|31
)\d{3}[
0-9Xx
]
$/
;
return
card15
.
test
(
val
)
||
card18
.
test
(
val
);
},
getdate
()
{
let
obj
=
this
.
getInfo
(
this
.
idCard
);
getResource
()
{
this
.
setLoading
(
true
);
this
.
$http
.
get
(
`/Research/Resource`
,
{}).
then
((
data
)
=>
{
let
arr
=
data
.
filter
((
item
)
=>
{
return
item
.
category
==
"国籍"
;
});
let
arr1
=
data
.
filter
((
item
)
=>
{
return
item
.
category
==
"医保类型"
;
});
let
arr2
=
data
.
filter
((
item
)
=>
{
return
item
.
category
==
"职业"
;
});
this
.
symptomList
=
data
.
filter
((
item
)
=>
{
return
item
.
category
==
"症状"
;
});
this
.
nationalityList
=
arr
.
map
((
item
)
=>
{
return
item
.
element
;
});
this
.
typeOfMedicalInsuranceList
=
arr1
.
map
((
item
)
=>
{
return
item
.
element
;
});
this
.
occupationList
=
arr2
.
map
((
item
)
=>
{
return
item
.
element
;
});
this
.
setLoading
(
false
);
});
},
if
(
this
.
validator
(
this
.
idCard
))
{
this
.
age
=
obj
.
age
;
this
.
birthday
=
obj
.
birth
;
this
.
gender
=
obj
.
sex
==
1
?
"男"
:
"女"
;
getdate
()
{
let
obj
=
this
.
getInfo
(
this
.
idCard
);
this
.
setLocalStorge
(
"idCard"
);
this
.
setLocalStorge
(
"birthday"
);
this
.
setLocalStorge
(
"age"
);
this
.
setLocalStorge
(
"gender"
);
}
},
if
(
this
.
validator
(
this
.
idCard
))
{
this
.
age
=
obj
.
age
;
this
.
birthday
=
obj
.
birth
;
this
.
gender
=
obj
.
sex
==
1
?
"男"
:
"女"
;
//根据身份证号码获取出生年月 年龄 性别
getInfo
(
idCard
)
{
let
sex
=
null
;
let
birth
=
null
;
let
myDate
=
new
Date
();
let
month
=
myDate
.
getMonth
()
+
1
;
let
day
=
myDate
.
getDate
();
let
age
=
0
;
if
(
idCard
.
length
===
18
)
{
age
=
myDate
.
getFullYear
()
-
idCard
.
substring
(
6
,
10
)
-
1
;
sex
=
idCard
.
substring
(
16
,
17
);
birth
=
idCard
.
substring
(
6
,
10
)
+
"-"
+
idCard
.
substring
(
10
,
12
)
+
"-"
+
idCard
.
substring
(
12
,
14
);
if
(
idCard
.
substring
(
10
,
12
)
<
month
||
(
idCard
.
substring
(
10
,
12
)
===
month
&&
idCard
.
substring
(
12
,
14
)
<=
day
)
)
age
++
;
}
if
(
idCard
.
length
===
15
)
{
age
=
myDate
.
getFullYear
()
-
idCard
.
substring
(
6
,
8
)
-
1901
;
sex
=
idCard
.
substring
(
13
,
14
);
birth
=
"19"
+
idCard
.
substring
(
6
,
8
)
+
"-"
+
idCard
.
substring
(
8
,
10
)
+
"-"
+
idCard
.
substring
(
10
,
12
);
if
(
idCard
.
substring
(
8
,
10
)
<
month
||
(
idCard
.
substring
(
8
,
10
)
===
month
&&
idCard
.
substring
(
10
,
12
)
<=
day
)
)
age
++
;
}
if
(
sex
%
2
===
0
)
sex
=
0
;
// 性别代码 1代表男,0代表女,暂时不涉及其他类型性别
else
sex
=
1
;
return
{
age
,
sex
,
birth
,
};
},
this
.
setLocalStorge
(
"idCard"
);
this
.
setLocalStorge
(
"birthday"
);
this
.
setLocalStorge
(
"age"
);
this
.
setLocalStorge
(
"gender"
);
}
},
onbirthday
(
date
)
{
this
.
birthday
=
formatDate
(
date
,
"yyyy-MM-dd "
);
console
.
log
(
"🚀 ~ file: page4.vue ~ line 630 ~ onbirthday ~ this.birthday"
,
this
.
birthday
);
this
.
setLocalStorge
(
"birthday"
);
// this.getdate();
this
.
age
=
this
.
ages
(
formatDate
(
date
,
"yyyy-MM-dd "
));
this
.
showbirthday
=
false
;
},
//根据身份证号码获取出生年月 年龄 性别
getInfo
(
idCard
)
{
let
sex
=
null
;
let
birth
=
null
;
let
myDate
=
new
Date
();
let
month
=
myDate
.
getMonth
()
+
1
;
let
day
=
myDate
.
getDate
();
let
age
=
0
;
if
(
idCard
.
length
===
18
)
{
age
=
myDate
.
getFullYear
()
-
idCard
.
substring
(
6
,
10
)
-
1
;
sex
=
idCard
.
substring
(
16
,
17
);
birth
=
idCard
.
substring
(
6
,
10
)
+
"-"
+
idCard
.
substring
(
10
,
12
)
+
"-"
+
idCard
.
substring
(
12
,
14
);
if
(
idCard
.
substring
(
10
,
12
)
<
month
||
(
idCard
.
substring
(
10
,
12
)
===
month
&&
idCard
.
substring
(
12
,
14
)
<=
day
)
)
age
++
;
}
if
(
idCard
.
length
===
15
)
{
age
=
myDate
.
getFullYear
()
-
idCard
.
substring
(
6
,
8
)
-
1901
;
sex
=
idCard
.
substring
(
13
,
14
);
birth
=
"19"
+
idCard
.
substring
(
6
,
8
)
+
"-"
+
idCard
.
substring
(
8
,
10
)
+
"-"
+
idCard
.
substring
(
10
,
12
);
if
(
idCard
.
substring
(
8
,
10
)
<
month
||
(
idCard
.
substring
(
8
,
10
)
===
month
&&
idCard
.
substring
(
10
,
12
)
<=
day
)
)
age
++
;
}
ages
(
birth
)
{
birth
=
birth
.
replace
(
/-/g
,
"/"
);
//把格式中的"-"替换为"/"
birth
=
new
Date
(
birth
);
//替换后转为Date类型
var
now
=
new
Date
();
//获取当前日期
var
nowYear
=
now
.
getFullYear
();
//当前日期的年份
var
nowMonth
=
now
.
getMonth
();
var
nowDay
=
now
.
getDay
();
var
birthYear
=
birth
.
getFullYear
();
var
birthMonth
=
birth
.
getMonth
();
var
birthDay
=
birth
.
getDay
();
//出生日期的日数
var
age
;
if
(
birth
>
now
)
{
return
false
;
}
else
if
(
nowYear
==
birthYear
||
(
nowYear
>
birthYear
&&
nowMonth
>=
birthMonth
&&
nowDay
>=
birthDay
)
)
{
age
=
nowYear
-
birthYear
;
}
else
{
age
=
nowYear
-
birthYear
-
1
;
//简而言之,没过生日岁数不能+1
}
return
age
;
},
if
(
sex
%
2
===
0
)
sex
=
0
;
// 性别代码 1代表男,0代表女,暂时不涉及其他类型性别
else
sex
=
1
;
return
{
age
,
sex
,
birth
,
};
},
onbirthday
(
date
)
{
this
.
birthday
=
formatDate
(
date
,
"yyyy-MM-dd "
);
console
.
log
(
"🚀 ~ file: page4.vue ~ line 630 ~ onbirthday ~ this.birthday"
,
this
.
birthday
);
this
.
setLocalStorge
(
"birthday"
);
// this.getdate();
this
.
age
=
this
.
ages
(
formatDate
(
date
,
"yyyy-MM-dd "
));
this
.
showbirthday
=
false
;
},
formatter
(
type
,
val
)
{
if
(
type
===
"year"
)
{
return
`
${
val
}
年`
;
}
if
(
type
===
"month"
)
{
return
`
${
val
}
月`
;
}
else
if
(
type
===
"day"
)
{
return
`
${
val
}
日`
;
}
else
if
(
type
===
"hour"
)
{
return
`
${
val
}
时`
;
}
else
if
(
type
===
"minute"
)
{
return
`
${
val
}
分`
;
}
return
val
;
ages
(
birth
)
{
birth
=
birth
.
replace
(
/-/g
,
"/"
);
//把格式中的"-"替换为"/"
birth
=
new
Date
(
birth
);
//替换后转为Date类型
var
now
=
new
Date
();
//获取当前日期
var
nowYear
=
now
.
getFullYear
();
//当前日期的年份
var
nowMonth
=
now
.
getMonth
();
var
nowDay
=
now
.
getDay
();
var
birthYear
=
birth
.
getFullYear
();
var
birthMonth
=
birth
.
getMonth
();
var
birthDay
=
birth
.
getDay
();
//出生日期的日数
var
age
;
if
(
birth
>
now
)
{
return
false
;
}
else
if
(
nowYear
==
birthYear
||
(
nowYear
>
birthYear
&&
nowMonth
>=
birthMonth
&&
nowDay
>=
birthDay
)
)
{
age
=
nowYear
-
birthYear
;
}
else
{
age
=
nowYear
-
birthYear
-
1
;
//简而言之,没过生日岁数不能+1
}
return
age
;
},
formatter
(
type
,
val
)
{
if
(
type
===
"year"
)
{
return
`
${
val
}
年`
;
}
if
(
type
===
"month"
)
{
return
`
${
val
}
月`
;
}
else
if
(
type
===
"day"
)
{
return
`
${
val
}
日`
;
}
else
if
(
type
===
"hour"
)
{
return
`
${
val
}
时`
;
}
else
if
(
type
===
"minute"
)
{
return
`
${
val
}
分`
;
}
return
val
;
},
},
},
computed
:
{},
computed
:
{},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.page4
{
.symptom
{
.van-checkbox--horizontal
{
margin-right
:
0.32rem
;
min-width
:
35%
;
margin-bottom
:
5%
;
.symptom
{
.van-checkbox--horizontal
{
margin-right
:
0.32rem
;
min-width
:
35%
;
margin-bottom
:
5%
;
}
}
}
}
</
style
>
src/components/page5.vue
View file @
b39b20a5
<!--
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors:
wsq
* @LastEditTime: 2022-
05-07 09:19:03
* @LastEditors:
ninglupeng
* @LastEditTime: 2022-
11-03 13:17:45
* @Description:
-->
<
template
>
<div
class=
"page5"
>
<van-field
colon
clearable
name=
"HasOnlineClass"
label-width=
"130px"
label=
"是否上网课"
>
<template
#
input
>
<van-radio-group
@
change=
"setLocalStorge('HasOnlineClass')"
v-model=
"HasOnlineClass"
direction=
"horizontal"
>
<van-radio
name=
"是"
>
是
</van-radio>
<van-radio
name=
"否"
>
否
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
colon
clearable
name=
"purpose"
label=
"来沪目的"
readonly
:value=
"purpose"
label-width=
"130px"
@
click=
"showPurpose = true"
>
</van-field>
<van-popup
v-model=
"showPurpose"
position=
"bottom"
>
<van-picker
title=
"来沪目的"
show-toolbar
:columns=
"purposeList"
@
confirm=
"onpurpose"
/>
</van-popup>
<van-field
colon
clearable
name=
"workOrNotCovid"
label=
"日常工作是否需要接触新冠病"
style=
"margin-left: 40px;"
>
<
template
#
input
>
<van-radio-group
@
change=
"setLocalStorge('workOrNotCovid')"
v-model=
"workOrNotCovid"
direction=
"horizontal"
>
<van-radio
name=
"是"
>
是
</van-radio>
<van-radio
name=
"否"
>
否
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
colon
clearable
name=
"thirtyDays"
label=
"近两月是否离开过上海"
label-width=
"130px"
:rules=
"[{ required: true, message: '请选择近两月是否离开过上海' }]"
>
<
template
#
input
>
<van-radio-group
@
change=
"
setLocalStorge('thirtyDays')
"
v-model=
"thirtyDays"
direction=
"horizontal"
>
<van-radio
name=
"是"
>
是
</van-radio>
<van-radio
name=
"否"
>
否
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
v-if=
"thirtyDays == '是'"
colon
clearable
v-model=
"LeaveShangHai"
name=
"LeaveShangHai"
label=
"回上海天数"
label-width=
"130px"
placeholder=
"回上海天数"
type=
"digit"
@
blur=
"setLocalStorge('LeaveShangHai')"
:rules=
"[
{
required: thirtyDays == '是' ? true : false,
message: '请填写回上海天数',
},
{ validator, message: '天数不能大于三十天' },
]"
>
<
template
#
extra
v-if=
"thirtyDays == '是'"
>
天
</
template
></van-field
>
<van-field
colon
clearable
readonly
clickable
name=
"normalDate"
:value=
"normalDate"
label-width=
"130px"
label=
"未发生异常时间"
placeholder=
"点击选择未发生异常时间"
@
click=
"showNormalDate = true"
:rules=
"[{ required: true, message: '请选择未发生异常时间' }]"
/>
<van-popup
v-model=
"showNormalDate"
position=
"bottom"
>
<van-datetime-picker
type=
"date"
v-model=
"normalDate1"
:min-date=
"minNormalDate"
:max-date=
"maxDate"
@
confirm=
"onNormalDate"
@
cancel=
"showNormalDate = false"
:formatter=
"formatter"
/>
</van-popup>
<van-field
colon
clearable
readonly
clickable
name=
"unusualDate"
:value=
"unusualDate"
label=
"核酸检测异常时间"
label-width=
"130px"
placeholder=
"点击选择核酸检测异常时间"
@
click=
"showUnusualDate = true"
:rules=
"[{ required: true, message: '请选择核酸检测异常时间' }]"
/>
<van-popup
v-model=
"showUnusualDate"
position=
"bottom"
>
<van-datetime-picker
type=
"date"
v-model=
"unusualDate1"
:min-date=
"minUnusualDate"
:max-date=
"maxDate"
@
confirm=
"onUnusualDate"
@
cancel=
"showUnusualDate = false"
:formatter=
"formatter"
/>
</van-popup>
<van-field
colon
clearable
readonly
clickable
label-width=
"130px"
name=
"inHospitalDate"
:value=
"inHospitalDate"
label=
"120转运时间或者入院时间"
placeholder=
"点击选择120转运时间或者入院时间"
@
click=
"showInHospitalDate = true"
:rules=
"[{ required: true, message: '请选择120转运时间或者入院时间' }]"
/>
<van-popup
v-model=
"showInHospitalDate"
position=
"bottom"
>
<van-datetime-picker
type=
"date"
v-model=
"inHospitalDate1"
:min-date=
"minInHospitalDate"
:max-date=
"maxDate"
@
confirm=
"onInHospitalDate"
@
cancel=
"showInHospitalDate = false"
:formatter=
"formatter"
/>
</van-popup>
<van-field
colon
clearable
autosize
label-width=
"130px"
type=
"textarea"
v-model=
"beforeIsolationPoint"
name=
"beforeIsolationPoint"
label=
"之前隔离点(无隔离点填救护车出发地址)"
placeholder=
"请填写之前隔离点"
@
blur=
"setLocalStorge('beforeIsolationPoint')"
:rules=
"[{ required: true, message: '请填写之前隔离点' }]"
></van-field>
<van-field
v-if=
"hasCOVIDVaccine=='是' || hasCOVIDVaccine=='否'"
colon
clearable
name=
"hasCOVIDVaccine"
label-width=
"130px"
label=
"是否接种过疫苗"
>
<
template
#
input
>
<van-radio-group
@
change=
"
() =>
{
setLocalStorge('hasCOVIDVaccine');
if (hasCOVIDVaccine == '否') {
covidVaccine = '';
vaccineType = [];
othervaccines = '';
setValue('covidVaccine', '');
setValue('vaccineType', '');
setValue('othervaccines', '');
}
}
"
v-model="hasCOVIDVaccine"
direction="horizontal"
>
<van-radio
name=
"是"
>
是
</van-radio>
<van-radio
name=
"否"
>
否
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
v-if=
"hasCOVIDVaccine == '是'"
colon
clearable
v-model=
"covidVaccine"
name=
"covidVaccine"
label=
"接种针数"
placeholder=
"接种针数"
label-width=
"130px"
type=
"number"
@
blur=
"setLocalStorge('covidVaccine')"
:rules=
"[{ required: true, message: '请填写接种针数' }]"
>
<
template
#
extra
v-if=
"hasCOVIDVaccine == '是'"
>
针
</
template
></van-field
>
<van-field
v-if=
"hasCOVIDVaccine == '是'"
colon
clearable
label-width=
"130px"
name=
"vaccineType"
label=
"疫苗公司"
:rules=
"[
{
required: hasCOVIDVaccine == '是' ? true : false,
message: '请选择疫苗公司',
},
]"
>
<
template
#
input
>
<van-checkbox-group
v-model=
"vaccineType"
direction=
"horizontal"
class=
"vaccineType"
@
change=
"
() =>
{
setLocalStorge('vaccineType');
}
"
>
<template
v-for=
"(item, index) in vaccineTypeList"
>
<van-checkbox
:key=
"index"
:name=
"item.element"
shape=
"square"
>
{{
item
.
element
}}
</van-checkbox>
</
template
>
</van-checkbox-group>
</template>
</van-field>
<van-field
colon
v-if=
"vaccineType.includes('其他')"
clearable
autosize
type=
"textarea"
label-width=
"130px"
v-model=
"othervaccines"
name=
"othervaccines"
label=
"其他疫苗"
placeholder=
"其他疫苗"
:rules=
"[
{
required: vaccineType.includes('其他') ? true : false,
message: '请填写其他疫苗',
},
]"
@
blur=
"setLocalStorge('othervaccines')"
></van-field>
<van-field
v-if=
"hasCOVIDVaccine == '是'"
colon
clearable
readonly
clickable
name=
"vaccineDate"
:value=
"vaccineDate"
label=
"最后一次接种日期"
label-width=
"130px"
placeholder=
"点击选择最后一次接种日期"
@
click=
"showVaccineDate = true"
:rules=
"[
{
required: covidVaccine > 0 ? true : false,
message: '请选择最后一次接种日期',
},
]"
/>
<van-popup
v-model=
"showVaccineDate"
position=
"bottom"
>
<van-datetime-picker
type=
"date"
v-model=
"vaccineDate1"
:min-date=
"minVaccineDate"
:max-date=
"maxDate"
@
confirm=
"onVaccineDate"
@
cancel=
"showVaccineDate = false"
:formatter=
"formatter"
/>
</van-popup>
</div>
<div
class=
"page5"
>
<van-field
colon
clearable
name=
"HasOnlineClass"
label-width=
"130px"
label=
"是否上网课"
>
<template
#
input
>
<van-radio-group
@
change=
"setLocalStorge('HasOnlineClass')"
v-model=
"HasOnlineClass"
direction=
"horizontal"
>
<van-radio
name=
"是"
>
是
</van-radio>
<van-radio
name=
"否"
>
否
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
colon
clearable
name=
"purpose"
label=
"来沪目的"
readonly
:value=
"purpose"
label-width=
"130px"
@
click=
"showPurpose = true"
>
</van-field>
<van-popup
v-model=
"showPurpose"
position=
"bottom"
>
<van-picker
title=
"来沪目的"
show-toolbar
:columns=
"purposeList"
@
confirm=
"onpurpose"
/>
</van-popup>
<van-field
colon
clearable
name=
"workOrNotCovid"
label=
"日常工作是否需要接触新冠病"
style=
"margin-left: 40px;"
>
<
template
#
input
>
<van-radio-group
@
change=
"setLocalStorge('workOrNotCovid')"
v-model=
"workOrNotCovid"
direction=
"horizontal"
>
<van-radio
:name=
"$t('yes')"
>
{{
$t
(
'yes'
)
}}
</van-radio>
<van-radio
name=
"否"
>
否
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
colon
clearable
name=
"thirtyDays"
label=
"近两月是否离开过上海"
label-width=
"130px"
:rules=
"[{ required: true, message: '请选择近两月是否离开过上海' }]"
>
<
template
#
input
>
<van-radio-group
@
change=
"
setLocalStorge('thirtyDays')
"
v-model=
"thirtyDays"
direction=
"horizontal"
>
<van-radio
name=
"是"
>
是
</van-radio>
<van-radio
name=
"否"
>
否
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
v-if=
"thirtyDays == '是'"
colon
clearable
v-model=
"LeaveShangHai"
name=
"LeaveShangHai"
label=
"回上海天数"
label-width=
"130px"
placeholder=
"回上海天数"
type=
"digit"
@
blur=
"setLocalStorge('LeaveShangHai')"
:rules=
"[
{
required: thirtyDays == '是' ? true : false,
message: '请填写回上海天数',
},
{ validator, message: '天数不能大于三十天' },
]"
>
<
template
#
extra
v-if=
"thirtyDays == '是'"
>
天
</
template
>
</van-field>
<van-field
colon
clearable
readonly
clickable
name=
"normalDate"
:value=
"normalDate"
label-width=
"130px"
label=
"未发生异常时间"
placeholder=
"点击选择未发生异常时间"
@
click=
"showNormalDate = true"
:rules=
"[{ required: true, message: '请选择未发生异常时间' }]"
/>
<van-popup
v-model=
"showNormalDate"
position=
"bottom"
>
<van-datetime-picker
type=
"date"
v-model=
"normalDate1"
:min-date=
"minNormalDate"
:max-date=
"maxDate"
@
confirm=
"onNormalDate"
@
cancel=
"showNormalDate = false"
:formatter=
"formatter"
/>
</van-popup>
<van-field
colon
clearable
readonly
clickable
name=
"unusualDate"
:value=
"unusualDate"
label=
"核酸检测异常时间"
label-width=
"130px"
placeholder=
"点击选择核酸检测异常时间"
@
click=
"showUnusualDate = true"
:rules=
"[{ required: true, message: '请选择核酸检测异常时间' }]"
/>
<van-popup
v-model=
"showUnusualDate"
position=
"bottom"
>
<van-datetime-picker
type=
"date"
v-model=
"unusualDate1"
:min-date=
"minUnusualDate"
:max-date=
"maxDate"
@
confirm=
"onUnusualDate"
@
cancel=
"showUnusualDate = false"
:formatter=
"formatter"
/>
</van-popup>
<van-field
colon
clearable
readonly
clickable
label-width=
"130px"
name=
"inHospitalDate"
:value=
"inHospitalDate"
label=
"120转运时间或者入院时间"
placeholder=
"点击选择120转运时间或者入院时间"
@
click=
"showInHospitalDate = true"
:rules=
"[{ required: true, message: '请选择120转运时间或者入院时间' }]"
/>
<van-popup
v-model=
"showInHospitalDate"
position=
"bottom"
>
<van-datetime-picker
type=
"date"
v-model=
"inHospitalDate1"
:min-date=
"minInHospitalDate"
:max-date=
"maxDate"
@
confirm=
"onInHospitalDate"
@
cancel=
"showInHospitalDate = false"
:formatter=
"formatter"
/>
</van-popup>
<van-field
colon
clearable
autosize
label-width=
"130px"
type=
"textarea"
v-model=
"beforeIsolationPoint"
name=
"beforeIsolationPoint"
label=
"之前隔离点(无隔离点填救护车出发地址)"
placeholder=
"请填写之前隔离点"
@
blur=
"setLocalStorge('beforeIsolationPoint')"
:rules=
"[{ required: true, message: '请填写之前隔离点' }]"
>
</van-field>
<van-field
v-if=
"hasCOVIDVaccine == '是' || hasCOVIDVaccine == '否'"
colon
clearable
name=
"hasCOVIDVaccine"
label-width=
"130px"
label=
"是否接种过疫苗"
>
<
template
#
input
>
<van-radio-group
@
change=
"
() =>
{
setLocalStorge('hasCOVIDVaccine');
if (hasCOVIDVaccine == '否') {
covidVaccine = '';
vaccineType = [];
othervaccines = '';
setValue('covidVaccine', '');
setValue('vaccineType', '');
setValue('othervaccines', '');
}
}
" v-model="hasCOVIDVaccine" direction="horizontal">
<van-radio
name=
"是"
>
是
</van-radio>
<van-radio
name=
"否"
>
否
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
v-if=
"hasCOVIDVaccine == '是'"
colon
clearable
v-model=
"covidVaccine"
name=
"covidVaccine"
label=
"接种针数"
placeholder=
"接种针数"
label-width=
"130px"
type=
"number"
@
blur=
"setLocalStorge('covidVaccine')"
:rules=
"[{ required: true, message: '请填写接种针数' }]"
>
<
template
#
extra
v-if=
"hasCOVIDVaccine == '是'"
>
针
</
template
>
</van-field>
<van-field
v-if=
"hasCOVIDVaccine == '是'"
colon
clearable
label-width=
"130px"
name=
"vaccineType"
label=
"疫苗公司"
:rules=
"[
{
required: hasCOVIDVaccine == '是' ? true : false,
message: '请选择疫苗公司',
},
]"
>
<
template
#
input
>
<van-checkbox-group
v-model=
"vaccineType"
direction=
"horizontal"
class=
"vaccineType"
@
change=
"
() =>
{
setLocalStorge('vaccineType');
}
">
<template
v-for=
"(item, index) in vaccineTypeList"
>
<van-checkbox
:key=
"index"
:name=
"item.element"
shape=
"square"
>
{{
item
.
element
}}
</van-checkbox>
</
template
>
</van-checkbox-group>
</template>
</van-field>
<van-field
colon
v-if=
"vaccineType.includes('其他')"
clearable
autosize
type=
"textarea"
label-width=
"130px"
v-model=
"othervaccines"
name=
"othervaccines"
label=
"其他疫苗"
placeholder=
"其他疫苗"
:rules=
"[
{
required: vaccineType.includes('其他') ? true : false,
message: '请填写其他疫苗',
},
]"
@
blur=
"setLocalStorge('othervaccines')"
></van-field>
<van-field
v-if=
"hasCOVIDVaccine == '是'"
colon
clearable
readonly
clickable
name=
"vaccineDate"
:value=
"vaccineDate"
label=
"最后一次接种日期"
label-width=
"130px"
placeholder=
"点击选择最后一次接种日期"
@
click=
"showVaccineDate = true"
:rules=
"[
{
required: covidVaccine > 0 ? true : false,
message: '请选择最后一次接种日期',
},
]"
/>
<van-popup
v-model=
"showVaccineDate"
position=
"bottom"
>
<van-datetime-picker
type=
"date"
v-model=
"vaccineDate1"
:min-date=
"minVaccineDate"
:max-date=
"maxDate"
@
confirm=
"onVaccineDate"
@
cancel=
"showVaccineDate = false"
:formatter=
"formatter"
/>
</van-popup>
</div>
</template>
<
script
>
...
...
@@ -346,190 +172,190 @@ import { mapState, mapMutations } from "vuex";
import
{
formatDate
}
from
"../utils/common.js"
;
export
default
{
inject
:
[
"setLoading"
],
name
:
"page5"
,
data
()
{
return
{
workOrNotCovid
:
"否"
,
//是否需要接触新冠
HasOnlineClass
:
"否"
,
//是否上网课
purpose
:
"学习"
,
// 来沪目的
thirtyDays
:
"是"
,
//近三十天内无离开上海
LeaveShangHai
:
""
,
//回上海天数
unusualDate
:
""
,
//核酸检测异常时间
normalDate
:
""
,
//未发生异常时间
beforeIsolationPoint
:
""
,
//之前隔离点
inHospitalDate
:
""
,
//120转运时间
// HasSymptom: "否", //有无症状
// symptom: [], //患者症状
// otherSymptom: "", //其他症状
//symptomList: [],
hasCOVIDVaccine
:
"是"
,
covidVaccine
:
""
,
//接种针数
vaccineType
:
[],
//疫苗公司
othervaccines
:
""
,
//其他疫苗
vaccineDate
:
""
,
//最后一次接种日期
vaccineTypeList
:
[],
showNormalDate
:
false
,
//未发生异常时间弹窗
showUnusualDate
:
false
,
//核酸时间弹窗
showInHospitalDate
:
false
,
//120时间弹窗
showVaccineDate
:
false
,
//120时间弹窗
purposeList
:
[
"学习"
,
"工作"
,
"旅游"
,
"商务"
,
"其他"
],
minNormalDate
:
new
Date
(
2021
,
0
,
1
),
minUnusualDate
:
new
Date
(
2021
,
0
,
1
),
minInHospitalDate
:
new
Date
(
2021
,
0
,
1
),
minVaccineDate
:
new
Date
(
2020
,
0
,
1
),
maxDate
:
new
Date
(),
showPurpose
:
false
,
/**时间弹窗默认时间 */
unusualDate1
:
new
Date
(),
//核酸检测异常时间
normalDate1
:
new
Date
(),
//未发生异常时间
inHospitalDate1
:
new
Date
(),
//120转运时间
vaccineDate1
:
new
Date
(),
//最后一次接种日期
};
},
mounted
()
{
this
.
getResource
();
this
.
setDefDate
();
this
.
setLastValue
();
},
methods
:
{
setLastValue
()
{
if
(
this
.
getLocalStorge
(
"symptom"
))
{
this
.
symptom
=
this
.
getLocalStorge
(
"symptom"
).
split
(
","
);
}
let
arr
=
[
"HasOnlineClass"
,
//是否上网课
"purpose"
,
// 来沪目的
"thirtyDays"
,
//近三十天内无离开上海
"LeaveShangHai"
,
//回上海天数
"unusualDate"
,
//核酸检测异常时间
"normalDate"
,
//未发生异常时间
"inHospitalDate"
,
//120转运时间
"otherSymptom"
,
//其他症状
"vaccineType"
,
"beforeIsolationPoint"
,
//之前隔离点
"HasSymptom"
,
//有无症状
"hasCOVIDVaccine"
,
//是否接种过疫苗
"covidVaccine"
,
//接种针数
"othervaccines"
,
//其他疫苗
"vaccineDate"
,
//最后一次接种日期
];
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
this
.
getLocalStorge
(
arr
[
i
]))
{
this
[
`
${
arr
[
i
]}
`
]
=
this
.
getLocalStorge
(
arr
[
i
]);
}
}
if
(
this
.
getLocalStorge
(
"vaccineType"
))
{
this
.
vaccineType
=
this
.
getLocalStorge
(
"vaccineType"
).
split
(
","
);
}
inject
:
[
"setLoading"
],
name
:
"page5"
,
data
()
{
return
{
workOrNotCovid
:
"否"
,
//是否需要接触新冠
HasOnlineClass
:
"否"
,
//是否上网课
purpose
:
"学习"
,
// 来沪目的
thirtyDays
:
"是"
,
//近三十天内无离开上海
LeaveShangHai
:
""
,
//回上海天数
unusualDate
:
""
,
//核酸检测异常时间
normalDate
:
""
,
//未发生异常时间
beforeIsolationPoint
:
""
,
//之前隔离点
inHospitalDate
:
""
,
//120转运时间
// HasSymptom: "否", //有无症状
// symptom: [], //患者症状
// otherSymptom: "", //其他症状
//symptomList: [],
hasCOVIDVaccine
:
"是"
,
covidVaccine
:
""
,
//接种针数
vaccineType
:
[],
//疫苗公司
othervaccines
:
""
,
//其他疫苗
vaccineDate
:
""
,
//最后一次接种日期
vaccineTypeList
:
[],
showNormalDate
:
false
,
//未发生异常时间弹窗
showUnusualDate
:
false
,
//核酸时间弹窗
showInHospitalDate
:
false
,
//120时间弹窗
showVaccineDate
:
false
,
//120时间弹窗
purposeList
:
[
"学习"
,
"工作"
,
"旅游"
,
"商务"
,
"其他"
],
minNormalDate
:
new
Date
(
2021
,
0
,
1
),
minUnusualDate
:
new
Date
(
2021
,
0
,
1
),
minInHospitalDate
:
new
Date
(
2021
,
0
,
1
),
minVaccineDate
:
new
Date
(
2020
,
0
,
1
),
maxDate
:
new
Date
(),
showPurpose
:
false
,
/**时间弹窗默认时间 */
unusualDate1
:
new
Date
(),
//核酸检测异常时间
normalDate1
:
new
Date
(),
//未发生异常时间
inHospitalDate1
:
new
Date
(),
//120转运时间
vaccineDate1
:
new
Date
(),
//最后一次接种日期
};
},
mounted
()
{
this
.
getResource
();
this
.
setDefDate
();
getLocalStorge
(
key
)
{
return
window
.
localStorage
.
getItem
(
key
);
this
.
setLastValue
();
},
methods
:
{
setLastValue
()
{
if
(
this
.
getLocalStorge
(
"symptom"
))
{
this
.
symptom
=
this
.
getLocalStorge
(
"symptom"
).
split
(
","
);
}
setLocalStorge
(
key
)
{
window
.
localStorage
.
setItem
(
key
,
this
[
`
${
key
}
`
]);
},
let
arr
=
[
"HasOnlineClass"
,
//是否上网课
"purpose"
,
// 来沪目的
"thirtyDays"
,
//近三十天内无离开上海
"LeaveShangHai"
,
//回上海天数
"unusualDate"
,
//核酸检测异常时间
"normalDate"
,
//未发生异常时间
"inHospitalDate"
,
//120转运时间
"otherSymptom"
,
//其他症状
"vaccineType"
,
"beforeIsolationPoint"
,
//之前隔离点
"HasSymptom"
,
//有无症状
"hasCOVIDVaccine"
,
//是否接种过疫苗
"covidVaccine"
,
//接种针数
"othervaccines"
,
//其他疫苗
"vaccineDate"
,
//最后一次接种日期
];
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
this
.
getLocalStorge
(
arr
[
i
]))
{
this
[
`
${
arr
[
i
]}
`
]
=
this
.
getLocalStorge
(
arr
[
i
]);
}
}
setValue
(
key
,
value
)
{
window
.
localStorage
.
setItem
(
key
,
value
);
},
if
(
this
.
getLocalStorge
(
"vaccineType"
))
{
this
.
vaccineType
=
this
.
getLocalStorge
(
"vaccineType"
).
split
(
","
);
setDefDate
()
{
// this.unusualDate = formatDate(new Date(), "yyyy-MM-dd"); //核酸检测异常时间
// this.normalDate = formatDate(new Date(), "yyyy-MM-dd"); //未发生异常时间
// this.inHospitalDate = formatDate(new Date(), "yyyy-MM-dd"); //120转运时间
// this.vaccineDate = formatDate(new Date(), "yyyy-MM-dd"); //最后一次接种日期
},
}
},
onpurpose
(
value
,
index
)
{
this
.
purpose
=
value
;
this
.
setLocalStorge
(
"purpose"
);
this
.
showPurpose
=
false
;
},
getLocalStorge
(
key
)
{
return
window
.
localStorage
.
getItem
(
key
);
},
validator
(
val
)
{
return
val
<
61
||
val
==
61
;
},
setLocalStorge
(
key
)
{
window
.
localStorage
.
setItem
(
key
,
this
[
`
${
key
}
`
])
;
},
getResource
()
{
this
.
setLoading
(
true
);
this
.
$http
.
get
(
`/Research/Resource`
,
{}).
then
((
data
)
=>
{
this
.
symptomList
=
data
.
filter
((
item
)
=>
{
return
item
.
category
==
"症状"
;
});
setValue
(
key
,
value
)
{
window
.
localStorage
.
setItem
(
key
,
value
);
},
this
.
vaccineTypeList
=
data
.
filter
((
item
)
=>
{
return
item
.
category
==
"新冠疫苗种类"
;
});
setDefDate
()
{
// this.unusualDate = formatDate(new Date(), "yyyy-MM-dd"); //核酸检测异常时间
// this.normalDate = formatDate(new Date(), "yyyy-MM-dd"); //未发生异常时间
// this.inHospitalDate = formatDate(new Date(), "yyyy-MM-dd"); //120转运时间
// this.vaccineDate = formatDate(new Date(), "yyyy-MM-dd"); //最后一次接种日期
},
this
.
setLoading
(
false
);
});
},
onpurpose
(
value
,
index
)
{
this
.
purpose
=
value
;
this
.
setLocalStorge
(
"purpose"
);
this
.
showPurpose
=
false
;
},
formatter
(
type
,
val
)
{
if
(
type
===
"year"
)
{
return
`
${
val
}
年`
;
}
if
(
type
===
"month"
)
{
return
`
${
val
}
月`
;
}
else
if
(
type
===
"day"
)
{
return
`
${
val
}
日`
;
}
else
if
(
type
===
"hour"
)
{
return
`
${
val
}
时`
;
}
else
if
(
type
===
"minute"
)
{
return
`
${
val
}
分`
;
}
return
val
;
},
onNormalDate
(
date
)
{
this
.
normalDate
=
formatDate
(
date
,
"yyyy-MM-dd "
);
this
.
setLocalStorge
(
"normalDate"
);
this
.
showNormalDate
=
false
;
},
onUnusualDate
(
date
)
{
this
.
unusualDate
=
formatDate
(
date
,
"yyyy-MM-dd"
);
this
.
setLocalStorge
(
"unusualDate"
);
validator
(
val
)
{
return
val
<
61
||
val
==
61
;
},
this
.
showUnusualDate
=
false
;
},
getResource
()
{
this
.
setLoading
(
true
);
this
.
$http
.
get
(
`/Research/Resource`
,
{}).
then
((
data
)
=>
{
this
.
symptomList
=
data
.
filter
((
item
)
=>
{
return
item
.
category
==
"症状"
;
});
onInHospitalDate
(
date
)
{
this
.
inHospitalDate
=
formatDate
(
date
,
"yyyy-MM-dd "
);
this
.
setLocalStorge
(
"inHospitalDate"
);
this
.
showInHospitalDate
=
false
;
},
this
.
vaccineTypeList
=
data
.
filter
((
item
)
=>
{
return
item
.
category
==
"新冠疫苗种类"
;
});
this
.
setLoading
(
false
);
});
},
formatter
(
type
,
val
)
{
if
(
type
===
"year"
)
{
return
`
${
val
}
年`
;
}
if
(
type
===
"month"
)
{
return
`
${
val
}
月`
;
}
else
if
(
type
===
"day"
)
{
return
`
${
val
}
日`
;
}
else
if
(
type
===
"hour"
)
{
return
`
${
val
}
时`
;
}
else
if
(
type
===
"minute"
)
{
return
`
${
val
}
分`
;
}
return
val
;
},
onNormalDate
(
date
)
{
this
.
normalDate
=
formatDate
(
date
,
"yyyy-MM-dd "
);
this
.
setLocalStorge
(
"normalDate"
);
this
.
showNormalDate
=
false
;
},
onUnusualDate
(
date
)
{
this
.
unusualDate
=
formatDate
(
date
,
"yyyy-MM-dd"
);
this
.
setLocalStorge
(
"unusualDate"
);
this
.
showUnusualDate
=
false
;
},
onVaccineDate
(
date
)
{
this
.
vaccineDate
=
formatDate
(
date
,
"yyyy-MM-dd"
);
this
.
setLocalStorge
(
"vaccineDate"
);
this
.
showVaccineDate
=
false
;
onInHospitalDate
(
date
)
{
this
.
inHospitalDate
=
formatDate
(
date
,
"yyyy-MM-dd "
);
this
.
setLocalStorge
(
"inHospitalDate"
);
this
.
showInHospitalDate
=
false
;
},
onVaccineDate
(
date
)
{
this
.
vaccineDate
=
formatDate
(
date
,
"yyyy-MM-dd"
);
this
.
setLocalStorge
(
"vaccineDate"
);
this
.
showVaccineDate
=
false
;
},
},
},
computed
:
{},
computed
:
{},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.page5
{
.vaccineType
{
.van-checkbox
{
width
:
43%
;
margin-bottom
:
5%
;
.vaccineType
{
.van-checkbox
{
width
:
43%
;
margin-bottom
:
5%
;
}
}
}
}
</
style
>
src/components/page7.vue
View file @
b39b20a5
...
...
@@ -2,83 +2,80 @@
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: ninglupeng
* @LastEditTime: 2022-
03-29 11:31:3
1
* @LastEditTime: 2022-
11-03 12:58:5
1
* @Description:
-->
<
template
>
<div
class=
"page7"
>
<div
class=
"page7_topbg"
>
<span
class=
"page7_topbg_title"
>
您已完成本次填写内容 ,感谢您的帮助和支持。
</span>
</div>
<div
class=
"page7"
>
<div
class=
"page7_topbg"
>
<span
class=
"page7_topbg_title"
>
{{
$t
(
'concludingRemarks'
)
}}
</span>
</div>
<div
class=
"page7_bottom"
>
<van-button
native-type=
"button"
class=
"index_form_next"
@
click=
"goback"
round
type=
"info"
>
返回
</van-button
>
<div
class=
"page7_bottom"
>
<van-button
native-type=
"button"
class=
"index_form_next"
@
click=
"goback"
round
type=
"info"
>
{{
$t
(
'goBack'
)
}}
</van-button>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
mapState
,
mapMutations
}
from
"vuex"
;
export
default
{
name
:
"page7"
,
data
()
{
return
{};
},
mounted
()
{},
methods
:
{
goback
()
{
this
.
$store
.
dispatch
(
"user/setpage"
,
1
);
name
:
"page7"
,
data
()
{
return
{};
},
mounted
()
{
},
methods
:
{
goback
()
{
this
.
$store
.
dispatch
(
"user/setpage"
,
1
);
},
},
},
computed
:
{},
computed
:
{},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.page7
{
width
:
100%
;
height
:
100vh
;
overflow
:
hidden
;
background-color
:
#f2f2f2
;
&_topbg
{
background-image
:
url("../assets/img/page1bg.png")
;
width
:
100%
;
height
:
390px
;
background-size
:
cover
;
background-position
:
center
center
;
height
:
100vh
;
overflow
:
hidden
;
background-color
:
#f2f2f2
;
&_topbg
{
background-image
:
url("../assets/img/page1bg.png")
;
width
:
100%
;
height
:
390px
;
background-size
:
cover
;
background-position
:
center
center
;
@include
flex_column;
@include
align_center;
justify-content
:
space-evenly
;
position
:
relative
;
&_title
{
font-size
:
24px
;
font-family
:
Roboto-Bold
,
Roboto
;
font-weight
:
bold
;
color
:
#000000
;
line-height
:
28px
;
@include
flex_column;
@include
align_center;
justify-content
:
space-evenly
;
position
:
relative
;
text-align
:
center
;
margin
:
20px
;
&_title
{
font-size
:
24px
;
font-family
:
Roboto-Bold
,
Roboto
;
font-weight
:
bold
;
color
:
#000000
;
line-height
:
28px
;
text-align
:
center
;
margin
:
20px
;
}
}
}
&
_bottom
{
width
:
100%
;
@include
flex_column;
@include
align_center;
position
:
absolute
;
bottom
:
350px
;
}
&
_bottom
{
width
:
100%
;
@include
flex_column;
@include
align_center;
position
:
absolute
;
bottom
:
350px
;
}
}
</
style
>
src/lang/Uygur.js
View file @
b39b20a5
...
...
@@ -2,19 +2,18 @@
* @Author: ninglupeng
* @Date: 2022-10-31 14:22:41
* @LastEditors: ninglupeng
* @LastEditTime: 2022-1
0-31 14:57:57
* @LastEditTime: 2022-1
1-03 13:12:44
* @Description:
*/
module
.
exports
=
{
//第一
部分
//第一
页、第二页
'project'
:
''
,
'paragraph1'
:
' '
,
"paragraph2"
:
' '
,
"paragraph3"
:
' '
,
"isAgree"
:
' '
,
//第二部分
//第三页
"AgreementMode"
:
''
,
//本人决定选择以下方式
"Mode1"
:
''
,
"Mode2"
:
''
,
...
...
@@ -23,7 +22,26 @@ module.exports = {
"agreementFloor"
:
''
,
//楼层
"bedNumber"
:
''
,
//床号
"agreementSign"
:
''
,
// 患者签字
"agreementDate"
:
''
// 签字日期
"agreementDate"
:
''
,
// 签字日期
//第四页
//第五页
"HasOnlineClass"
:
""
,
// 是否上网课
//第六页
//第七页
"concludingRemarks"
:
'سىز بۇ قېتىمقى تولدۇرۇش مەزمۇنىنى تاماملاپ بولدىڭىز، ياردىمىڭىز ۋە قوللىغىنىڭىزغا رەھمەت.'
,
"goBack"
:
'ئالدىغا قايتىش'
...
...
src/lang/zh.js
View file @
b39b20a5
...
...
@@ -2,18 +2,18 @@
* @Author: ninglupeng
* @Date: 2022-10-31 14:22:35
* @LastEditors: ninglupeng
* @LastEditTime: 2022-1
0-31 14:58:33
* @LastEditTime: 2022-1
1-03 13:17:25
* @Description:
*/
module
.
exports
=
{
//第一
部分
//第一
页、第二页
'project'
:
'入院信息采集'
,
'paragraph1'
:
' 为保障您在我院住院治疗期间享有充分的知情同意权,医务人员将向您告知您的病情、主要医疗措施、医疗风险等情況,解答您对疾病的咨询。未经您本人充分知情和签名同意,医务人员将不得进行手术等重大医疗行为。但由于各人心理承受能力不同,以及疾病发展具有不可预测性,为有利于治疗,请您现授权委托一位您充分信任的代理人,代为行使您的知情同意权。我院将依据您签名出具的授权委托书,视代理人的代理行为为您本人真实意思的表示。如您末满18周岁或没有民事行为能力和限制民事行为能力的,您的法定监护人为您的法定伐理人,代为行使知情同意权。 '
,
"paragraph2"
:
' 为了让医生给您制定最佳的洽疗方案,请您务必客观,真实地向医生提供您的病情资料和相关情況。 '
,
"paragraph3"
:
' 特此告知 '
,
"isAgree"
:
' 上述告知书内容本人己充分了解 '
,
//第
二部分
//第
三页
"AgreementMode"
:
'本人决定选择以下方式'
,
//本人决定选择以下方式
"Mode1"
:
'向贵院出具授权委托书指定代理人'
,
"Mode2"
:
'向贵院出具户籍等相关证明,明确法定代理人'
,
...
...
@@ -22,6 +22,67 @@ module.exports = {
"agreementFloor"
:
'楼层'
,
//楼层
"bedNumber"
:
'床号'
,
//床号
"agreementSign"
:
'患者签字'
,
// 患者签字
"countersign"
:
'重签'
,
//重签
"clickSign"
:
'点击签字'
,
//点击签字
"agreementDate"
:
'签字日期'
,
//签字日期
"autograph"
:
'签名'
,
//签名
// 第四页
"patientName"
:
"患者姓名"
,
//患者姓名
"orNotByEntry"
:
"近期是否由国外入境"
,
//近期是否由国外入境
"nationality"
:
"国籍"
,
//国籍
"passportId"
:
"护照号"
,
//护照号
"HasSymptom"
:
"是否有症状"
,
//是否有症状
"otherSymptom"
:
"其他症状"
,
//其他症状
"otherOccupation"
:
"其他职业"
,
//其他职业
"age"
:
"年龄"
,
//年龄
"gender"
:
"性别"
,
//性别
"height"
:
"身高"
,
//身高
"weight"
:
"体重"
,
//体重
"maritalStatus"
:
"婚姻状况"
,
//婚姻状况
"birthday"
:
"出生日期"
,
//出生日期
"isConceive"
:
"怀孕状况"
,
//怀孕状况
"gestationalWeeks"
:
"怀孕周期"
,
//怀孕周期
"occupation"
:
"职业"
,
//职业
"contactInformation"
:
"联系方式"
,
//联系方式
"FamilyMembersPhone"
:
"家属联系方式"
,
//家属联系方式
"Registeredresidence"
:
"户籍地"
,
//户籍地
// "province", //籍贯 (省)
// "city", //籍贯 (市)
"address"
:
"现居住地"
,
//现居住地
"idCard"
:
"身份证号"
,
//身份证号
"typeOfMedicalInsurance"
:
"医保类型"
,
//医保类型
"insurance"
:
"商业保险"
,
//商业保险
//第五页
"HasOnlineClass"
:
"是否上网课"
,
// 是否上网课
//第六页
//第七页
"concludingRemarks"
:
'您已完成本次填写内容 ,感谢您的帮助和支持。'
,
"goBack"
:
'返回'
,
"yes"
:
'是'
,
"no"
:
"否"
,
"have"
:
"有"
,
"noHave"
:
"没有"
}
\ No newline at end of file
src/store/modules/user.js
View file @
b39b20a5
...
...
@@ -2,7 +2,7 @@
* @Author: ninglupeng
* @Date: 2022-03-17 15:06:50
* @LastEditors: ninglupeng
* @LastEditTime: 2022-
03-22 16:09:11
* @LastEditTime: 2022-
11-01 10:27:25
* @Description:
*/
import
http
from
'@/http/index'
...
...
@@ -13,7 +13,7 @@ const state = {
token
:
''
,
name
:
''
,
userInfo
:
{},
page
:
1
,
page
:
6
,
}
const
mutations
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment