Commit eef26273 by nlp97

请选择、点击选择、保存、重签 等字段

parent d0147ae3
......@@ -2,7 +2,7 @@
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: ninglupeng
* @LastEditTime: 2022-10-31 14:38:03
* @LastEditTime: 2022-11-04 16:27:19
* @Description:
-->
<template>
......
<!--
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: wsq
* @LastEditTime: 2022-11-04 12:46:25
* @LastEditors: ninglupeng
* @LastEditTime: 2022-11-04 16:54:04
* @Description:
-->
<template>
......@@ -29,7 +29,8 @@
</van-field>
<van-field colon clearable name="buildingNumber" :label="$t('buildingNumber')" readonly :value="buildingNumber"
@click="showbuildingNumber = true" :rules="[{ required: true, message: `请填写${$t('buildingNumber')}` }]">
@click="showbuildingNumber = true"
:rules="[{ required: true, message: `${$t('fillIn')}${$t('buildingNumber')}` }]">
</van-field>
<van-popup v-model="showbuildingNumber" position="bottom">
<van-picker :title="$t('buildingNumber')" show-toolbar :columns="buildingNumberList"
......@@ -41,16 +42,17 @@
</van-popup>
<van-field colon clearable v-model="agreementFloor" name="agreementFloor" :label="$t('agreementFloor')"
:placeholder="$t('agreementFloor')" :rules="[{ required: true, message: `请填写${$t('agreementFloor')}` }]"
:placeholder="$t('agreementFloor')"
:rules="[{ required: true, message: `${$t('fillIn')}${$t('agreementFloor')}` }]"
@blur="setLocalStorge('agreementFloor')"></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>
:rules="[{ required: true, message: `${$t('fillIn')}${$t('bedNumber')}` }]"></van-field>
<van-field colon clearable v-model="agreementSign" name="agreementSign" :label="$t('agreementSign')"
:placeholder="$t('agreementSign')" readonly
:rules="[{ required: true, message: `请{${$t('agreementSign')}}` }]">
:rules="[{ required: true, message: `${$t('agreementSign')}` }]">
<template #input>
<img class="Signimg" v-show="agreementSign" :src="agreementSign" alt=""
:style="{ width: agreementSign ? '70%' : '' }" />
......@@ -62,11 +64,11 @@
</van-field>
<van-field colon clearable readonly clickable name="agreementDate" :value="agreementDate"
:label="$t('agreementDate')" :placeholder="`点击选择${$t('agreementDate')}`" @click="showCalendar = true"
:rules="[
:label="$t('agreementDate')" :placeholder="`${$t('clickSelect')}${$t('agreementDate')}`"
@click="showCalendar = true" :rules="[
{
required: true,
message: `请选择${$t('agreementDate')}`,
message: `${$t('select')}${$t('agreementDate')}`,
},
]" />
<van-popup v-model="showCalendar" position="bottom">
......@@ -91,7 +93,7 @@ export default {
inject: ["setLoading"],
data() {
return {
AgreementMode:this.$i18n.locale=='zh'?"向贵院出具授权委托书指定代理人":'دوختۇخانغا ۋاكالەتچى بەلگىلەنگەن ھوقۇق بېرىش ھاۋالە خىتى چىقىرىپ بىرىمەن',
AgreementMode: this.$i18n.locale == 'zh' ? "向贵院出具授权委托书指定代理人" : 'دوختۇخانغا ۋاكالەتچى بەلگىلەنگەن ھوقۇق بېرىش ھاۋالە خىتى چىقىرىپ بىرىمەن',
buildingNumber: "", //楼号
agreementFloor: "", //楼层
bedNumber: "", //床号
......@@ -108,7 +110,7 @@ export default {
},
mounted() {
this.getResource();
console.log('this.$i18n.locale',this.$i18n.locale);
console.log('this.$i18n.locale', this.$i18n.locale);
this.setAgreementDate();
this.setLastValue();
},
......
<!--
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: wsq
* @LastEditTime: 2022-11-04 15:47:22
* @LastEditors: ninglupeng
* @LastEditTime: 2022-11-04 16:39:07
* @Description:
-->
<template>
<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="$t('yes')">{{ $t("yes") }}</van-radio>
<van-radio :name="$t('no')">{{ $t("no") }}</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 != $t('China')"
clearable
v-model="passportId"
name="passportId"
:label="$t('passportId')"
:placeholder="$t('passportId')"
:rules="[
{
required: nationality != $t('China') ? true : false,
message: `请填写${$t('passportId')}`,
},
]"
></van-field>
<van-field
colon
clearable
v-if="nationality == $t('China')"
v-model="idCard"
name="idCard"
:label="$t('idCard')"
:placeholder="$t('idCard')"
@blur="getdate"
:rules="[
{ required: true, message: `请填写${$t('idCard')}` },
{ validator, message: `${$t('idCard')}格式错误!` },
]"
></van-field>
<van-field colon clearable name="gender" :label="$t('gender')">
<template #input>
<van-radio-group
@change="
() => {
setLocalStorge('gender');
if (gender == $t('boy')) {
isConceive = $t('Nonpregnant');
gestationalWeeks = '';
setValue('isConceive', $t('Nonpregnant'));
setValue('gestationalWeeks', '');
}
}
"
v-model="gender"
direction="horizontal"
>
<van-radio :name="$t('boy')">{{ $t("boy") }}</van-radio>
<van-radio :name="$t('girl')">{{ $t("girl") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
colon
clearable
readonly
clickable
name="birthday"
:value="birthday"
:label="$t('birthday')"
:placeholder="$t('birthday')"
@click="showbirthday = true"
:rules="[{ required: true, message: `请选择${$t('birthday')}` }]"
/>
<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="$t('age')"
:placeholder="$t('age')"
type="digit"
@blur="setLocalStorge('age')"
:rules="[{ required: true, message: `请填写${$t('age')}` }]"
></van-field>
<van-field
colon
clearable
v-model="height"
name="height"
:label="$t('height')"
:placeholder="$t('height')"
type="digit"
@blur="setLocalStorge('height')"
:rules="[{ required: true, message: `请填写${$t('height')}` }]"
>
<template #extra>
CM
</template>
</van-field>
<van-field
colon
clearable
v-model="weight"
name="weight"
:label="$t('weight')"
:placeholder="$t('weight')"
type="number"
@blur="setLocalStorge('weight')"
:rules="[{ required: true, message: `请填写${$t('weight')}` }]"
>
<template #extra>
KG
</template>
</van-field>
<van-field
colon
clearable
name="maritalStatus"
:label="$t('maritalStatus')"
>
<template #input>
<van-radio-group
@change="setLocalStorge('maritalStatus')"
v-model="maritalStatus"
direction="horizontal"
>
<van-radio :name="$t('married')">{{ $t("married") }}</van-radio>
<van-radio :name="$t('unmarried')">{{ $t("unmarried") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
colon
clearable
v-if="gender == $t('girl')"
name="isConceive"
:label="$t('isConceive')"
>
<template #input>
<van-radio-group
@change="setLocalStorge('isConceive')"
v-model="isConceive"
direction="horizontal"
>
<van-radio :name="$t('Nonpregnant')">{{
$t("Nonpregnant")
}}</van-radio>
<van-radio :name="$t('pregnant')">{{ $t("pregnant") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
colon
clearable
v-if="gender == $t('girl') && isConceive == $t('pregnant')"
v-model="gestationalWeeks"
name="gestationalWeeks"
:label="$t('gestationalWeeks')"
:placeholder="$t('gestationalWeeks')"
type="number"
@blur="setLocalStorge('gestationalWeeks')"
:rules="[
{
required:
gender == $t('girl') && isConceive == $t('pregnant') ? true : false,
message: `请填写${$t('gestationalWeeks')}`,
},
]"
>
<template #extra>{{ $t("week") }} </template>
</van-field>
<van-field
colon
clearable
name="occupation"
:label="$t('occupation')"
readonly
:value="occupation"
@click="showoccupation = true"
:rules="[{ required: true, message: `请填写${$t('occupation')}` }]"
>
</van-field>
<van-popup v-model="showoccupation" position="bottom">
<van-picker
:title="$t('occupation')"
show-toolbar
:columns="occupationList"
@confirm="
(value, index) => {
occupation = value;
setLocalStorge('occupation');
showoccupation = false;
}
"
@cancel="
() => {
showoccupation = false;
}
"
/>
</van-popup>
<van-field
colon
v-show="occupation == $t('other')"
clearable
autosize
type="textarea"
v-model="otherOccupation"
name="otherOccupation"
:label="$t('otherOccupation')"
:placeholder="$t('otherOccupation')"
:rules="[
{
required: occupation == $t('other') ? true : false,
message: `请填写${$t('otherOccupation')}`,
},
]"
@blur="setLocalStorge('otherOccupation')"
></van-field>
<van-field
colon
clearable
v-model="contactInformation"
name="contactInformation"
:label="$t('contactInformation')"
:placeholder="$t('contactInformation')"
@blur="setLocalStorge('contactInformation')"
:rules="[
{ required: true, message: `请填写${$t('contactInformation')}` },
]"
></van-field>
<van-field
colon
clearable
v-model="FamilyMembersPhone"
name="FamilyMembersPhone"
:label="$t('FamilyMembersPhone')"
:placeholder="$t('FamilyMembersPhone')"
@blur="setLocalStorge('FamilyMembersPhone')"
:rules="[
{ required: true, message: `请填写${$t('FamilyMembersPhone')}` },
]"
></van-field>
<!-- <van-field colon clearable readonly clickable name="province" :value="province" :label="$t('province')" v-show="false" />
<div class="page4">
<van-field colon clearable v-model="patientName" name="patientName" :label="$t('patientName')"
:placeholder="$t('patientName')"
:rules="[{ required: true, message: `${$t('fillIn')}${$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="$t('yes')">{{ $t("yes") }}</van-radio>
<van-radio :name="$t('no')">{{ $t("no") }}</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('fillIn')}${$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 != $t('China')" clearable v-model="passportId" name="passportId"
:label="$t('passportId')" :placeholder="$t('passportId')" :rules="[
{
required: nationality != $t('China') ? true : false,
message: `${$t('fillIn')}${$t('passportId')}`,
},
]"></van-field>
<van-field colon clearable v-if="nationality == $t('China')" v-model="idCard" name="idCard"
:label="$t('idCard')" :placeholder="$t('idCard')" @blur="getdate" :rules="[
{ required: true, message: `${$t('fillIn')}${$t('idCard')}` },
{ validator, message: `${$t('idCard')}格式错误!` },
]"></van-field>
<van-field colon clearable name="gender" :label="$t('gender')">
<template #input>
<van-radio-group @change="
() => {
setLocalStorge('gender');
if (gender == $t('boy')) {
isConceive = $t('Nonpregnant');
gestationalWeeks = '';
setValue('isConceive', $t('Nonpregnant'));
setValue('gestationalWeeks', '');
}
}
" v-model="gender" direction="horizontal">
<van-radio :name="$t('boy')">{{ $t("boy") }}</van-radio>
<van-radio :name="$t('girl')">{{ $t("girl") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field colon clearable readonly clickable name="birthday" :value="birthday" :label="$t('birthday')"
:placeholder="$t('birthday')" @click="showbirthday = true"
:rules="[{ required: true, message: `${$t('select')}${$t('birthday')}` }]" />
<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="$t('age')" :placeholder="$t('age')" type="digit"
@blur="setLocalStorge('age')" :rules="[{ required: true, message: `${$t('fillIn')}${$t('age')}` }]">
</van-field>
<van-field colon clearable v-model="height" name="height" :label="$t('height')" :placeholder="$t('height')"
type="digit" @blur="setLocalStorge('height')"
:rules="[{ required: true, message: `${$t('fillIn')}${$t('height')}` }]">
<template #extra>
CM
</template>
</van-field>
<van-field colon clearable v-model="weight" name="weight" :label="$t('weight')" :placeholder="$t('weight')"
type="number" @blur="setLocalStorge('weight')"
:rules="[{ required: true, message: `${$t('fillIn')}${$t('weight')}` }]">
<template #extra>
KG
</template>
</van-field>
<van-field colon clearable name="maritalStatus" :label="$t('maritalStatus')">
<template #input>
<van-radio-group @change="setLocalStorge('maritalStatus')" v-model="maritalStatus"
direction="horizontal">
<van-radio :name="$t('married')">{{ $t("married") }}</van-radio>
<van-radio :name="$t('unmarried')">{{ $t("unmarried") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field colon clearable v-if="gender == $t('girl')" name="isConceive" :label="$t('isConceive')">
<template #input>
<van-radio-group @change="setLocalStorge('isConceive')" v-model="isConceive" direction="horizontal">
<van-radio :name="$t('Nonpregnant')">{{
$t("Nonpregnant")
}}</van-radio>
<van-radio :name="$t('pregnant')">{{ $t("pregnant") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field colon clearable v-if="gender == $t('girl') && isConceive == $t('pregnant')"
v-model="gestationalWeeks" name="gestationalWeeks" :label="$t('gestationalWeeks')"
:placeholder="$t('gestationalWeeks')" type="number" @blur="setLocalStorge('gestationalWeeks')" :rules="[
{
required:
gender == $t('girl') && isConceive == $t('pregnant') ? true : false,
message: `${$t('fillIn')}${$t('gestationalWeeks')}`,
},
]">
<template #extra>{{ $t("week") }} </template>
</van-field>
<van-field colon clearable name="occupation" :label="$t('occupation')" readonly :value="occupation"
@click="showoccupation = true" :rules="[{ required: true, message: `${$t('fillIn')}${$t('occupation')}` }]">
</van-field>
<van-popup v-model="showoccupation" position="bottom">
<van-picker :title="$t('occupation')" show-toolbar :columns="occupationList" @confirm="
(value, index) => {
occupation = value;
setLocalStorge('occupation');
showoccupation = false;
}
" @cancel="
() => {
showoccupation = false;
}
" />
</van-popup>
<van-field colon v-show="occupation == $t('other')" clearable autosize type="textarea" v-model="otherOccupation"
name="otherOccupation" :label="$t('otherOccupation')" :placeholder="$t('otherOccupation')" :rules="[
{
required: occupation == $t('other') ? true : false,
message: `${$t('fillIn')}${$t('otherOccupation')}`,
},
]" @blur="setLocalStorge('otherOccupation')"></van-field>
<van-field colon clearable v-model="contactInformation" name="contactInformation"
:label="$t('contactInformation')" :placeholder="$t('contactInformation')"
@blur="setLocalStorge('contactInformation')" :rules="[
{ required: true, message: `${$t('fillIn')}${$t('contactInformation')}` },
]"></van-field>
<van-field colon clearable v-model="FamilyMembersPhone" name="FamilyMembersPhone"
:label="$t('FamilyMembersPhone')" :placeholder="$t('FamilyMembersPhone')"
@blur="setLocalStorge('FamilyMembersPhone')" :rules="[
{ required: true, message: `${$t('fillIn')}${$t('FamilyMembersPhone')}` },
]"></van-field>
<!-- <van-field colon clearable readonly clickable name="province" :value="province" :label="$t('province')" 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="$t('Registeredresidence')"
:placeholder="`点击选择${$t('Registeredresidence')}`"
@click="showArea = true"
:rules="[
{ required: true, message: `请点击选择${$t('Registeredresidence')}` },
]"
/>
<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="$t('address')"
:placeholder="$t('address')"
@blur="setLocalStorge('address')"
:rules="[{ required: true, message: `请填写${$t('address')}` }]"
>
</van-field>
<van-field
colon
clearable
name="typeOfMedicalInsurance"
:label="$t('typeOfMedicalInsurance')"
readonly
:value="typeOfMedicalInsurance"
@click="showtypeOfMedicalInsurance = true"
:rules="[
{ required: true, message: `请填写${$t('typeOfMedicalInsurance')}` },
]"
>
</van-field>
<van-popup v-model="showtypeOfMedicalInsurance" position="bottom">
<van-picker
:title="$t('typeOfMedicalInsurance')"
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="$t('insurance')">
<template #input>
<van-radio-group
@change="setLocalStorge('insurance')"
v-model="insurance"
direction="horizontal"
>
<van-radio :name="$t('have')">{{ $t("have") }}</van-radio>
<van-radio :name="$t('noHave')">{{ $t("noHave") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
style="margin-left: -35px;"
colon
clearable
name="HasSymptom"
label-width="130px"
:label="$t('HasSymptom')"
>
<template #input>
<van-radio-group
@change="
() => {
if (HasSymptom == $t('no')) {
symptom = [];
otherSymptom = '';
setValue('symptom', '');
setValue('otherSymptom', '');
}
setLocalStorge('HasSymptom');
}
"
v-model="HasSymptom"
direction="horizontal"
>
<van-radio :name="$t('yes')">{{ $t("yes") }}</van-radio>
<van-radio :name="$t('no')">{{ $t("no") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
style="margin-left: -35px;"
v-if="HasSymptom == $t('yes')"
colon
:rules="[
{
required: HasSymptom == $t('yes') ? true : false,
message: `请选择${$t('symptom')}`,
},
]"
clearable
name="symptom"
:label="$t('symptom')"
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($t('other')) && HasSymptom == $t('yes')"
clearable
autosize
type="textarea"
v-model="otherSymptom"
name="otherSymptom"
:label="$t('otherSymptom')"
:placeholder="$t('otherSymptom')"
:rules="[
{
required:
symptom.includes($t('other')) && HasSymptom == $t('yes')
? true
: false,
message: `请填写${$t('otherSymptom')}`,
},
]"
@blur="setLocalStorge('otherSymptom')"
></van-field>
</div>
<van-field colon clearable readonly clickable name="Registeredresidence" :value="Registeredresidence"
:label="$t('Registeredresidence')" :placeholder="`${$t('clickSelect')}${$t('Registeredresidence')}`"
@click="showArea = true" :rules="[
{ required: true, message: `${$t('clickSelect')}${$t('Registeredresidence')}` },
]" />
<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="$t('address')"
:placeholder="$t('address')" @blur="setLocalStorge('address')"
:rules="[{ required: true, message: `${$t('fillIn')}${$t('address')}` }]">
</van-field>
<van-field colon clearable name="typeOfMedicalInsurance" :label="$t('typeOfMedicalInsurance')" readonly
:value="typeOfMedicalInsurance" @click="showtypeOfMedicalInsurance = true" :rules="[
{ required: true, message: `${$t('fillIn')}${$t('typeOfMedicalInsurance')}` },
]">
</van-field>
<van-popup v-model="showtypeOfMedicalInsurance" position="bottom">
<van-picker :title="$t('typeOfMedicalInsurance')" 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="$t('insurance')">
<template #input>
<van-radio-group @change="setLocalStorge('insurance')" v-model="insurance" direction="horizontal">
<van-radio :name="$t('have')">{{ $t("have") }}</van-radio>
<van-radio :name="$t('noHave')">{{ $t("noHave") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field style="margin-left: -35px;" colon clearable name="HasSymptom" label-width="130px"
:label="$t('HasSymptom')">
<template #input>
<van-radio-group @change="
() => {
if (HasSymptom == $t('no')) {
symptom = [];
otherSymptom = '';
setValue('symptom', '');
setValue('otherSymptom', '');
}
setLocalStorge('HasSymptom');
}
" v-model="HasSymptom" direction="horizontal">
<van-radio :name="$t('yes')">{{ $t("yes") }}</van-radio>
<van-radio :name="$t('no')">{{ $t("no") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field style="margin-left: -35px;" v-if="HasSymptom == $t('yes')" colon :rules="[
{
required: HasSymptom == $t('yes') ? true : false,
message: `${$t('select')}${$t('symptom')}`,
},
]" clearable name="symptom" :label="$t('symptom')" 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($t('other')) && HasSymptom == $t('yes')"
clearable autosize type="textarea" v-model="otherSymptom" name="otherSymptom" :label="$t('otherSymptom')"
:placeholder="$t('otherSymptom')" :rules="[
{
required:
symptom.includes($t('other')) && HasSymptom == $t('yes')
? true
: false,
message: `${$t('fillIn')}${$t('otherSymptom')}`,
},
]" @blur="setLocalStorge('otherSymptom')"></van-field>
</div>
</template>
<script>
......@@ -501,341 +276,341 @@ import { areaList } from "@vant/area-data";
import { formatDate } from "../utils/common.js";
export default {
name: "page4",
inject: ["setLoading"],
data() {
return {
patientName: "", //患者姓名
orNotByEntry: this.$i18n.locale == "zh" ? "否" : "ياق", //近期是否由国外入境 ---默认值 否
nationality: "", //国籍--默认值 中国
passportId: "", //护照号
age: "", //年龄
height: "", //身高
weight: "",
gender: this.$i18n.locale == "zh" ? "男" : "ئەر", //性别--默认值 男
maritalStatus: this.$i18n.locale == "zh" ? "未婚" : "نىكاھلانغانمىغان", //婚姻状况--默认值 未婚
birthday: "", //出生日期
isConceive: this.$i18n.locale == "zh" ? "未孕" : "ھامىلدار", //怀孕状况--默认值 未孕
gestationalWeeks: "", //怀孕周期
occupation: "", //职业
otherOccupation: "", //其他职业
contactInformation: "", //联系方式
FamilyMembersPhone: "", //家属联系方式
// workOrNotCovid: "否",
Registeredresidence: "", //籍贯 (包括省市)
province: "", //籍贯 (省)
city: "", //籍贯 (市)
address: "", //地址
idCard: "", //身份证号
typeOfMedicalInsurance: this.$i18n.locale == "", //医保类型---默认值 上海医保
insurance: this.$i18n.locale == "zh" ? "无" : "يوق", //商业保险---默认值 无
HasSymptom: this.$i18n.locale == "zh" ? "否" : "ياق", //有无症状---默认值 否
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() {
if (this.$i18n.locale == "zh") {
this.getResource();
} else {
//症状列表
this.symptomList = [
{ id: 1, element: "يۇتقۇنچاق ئاغرىش", sort: 1 },
{ id: 2, element: "بۇرنى پۈتۈپ قىلىش", sort: 2 },
{ id: 3, element: "قىزىتماق", sort: 3 },
{ id: 5, element: "يۆتەل", sort: 5 },
{ id: 6, element: "بەلغەم يۆتەل", sort: 6 },
{ id: 7, element: "بېشى قايماق", sort: 7 },
{ id: 8, element: "باش ئاغرىقى", sort: 8 },
{ id: 9, element: "مۇسكۇل ئاغرىش", sort: 9 },
{ id: 10, element: "ماغدۇرسىزلىق", sort: 10 },
{ id: 11, element: "نەپەس قىيىنلىشىش", sort: 11 },
{ id: 12, element: "بۇرنىدىن سۇ ئېقىش", sort: 12 },
];
//国籍列表
this.nationalityList = [
"جۇڭگو",
"جۇڭگو شياڭگاڭ",
"جۇڭگو ئاۋمېن",
"جۇڭگو تەيۋەن",
"چەتئەل",
];
//医保类型列表
this.typeOfMedicalInsuranceList = [
"شاڭخەي داۋالىنىش سۇغۇرتىسى",
"سىرتتىكى داۋالىنىش سۇغۇرتىسى",
"ئۆزى چىقىم قىلىش",
];
//职业列表
this.occupationList = [
"خىزمەتچى",
"ئىشچى",
"مەمۇرى خادىم",
"دېھقان",
"دېھقان",
"ھەربىي سەپتىن چېكىنگەن",
"باشقا خىزمەت",
];
}
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: this.$i18n.locale == "zh" ? "否" : "ياق", //近期是否由国外入境 ---默认值 否
nationality: "", //国籍--默认值 中国
passportId: "", //护照号
age: "", //年龄
height: "", //身高
weight: "",
gender: this.$i18n.locale == "zh" ? "男" : "ئەر", //性别--默认值 男
maritalStatus: this.$i18n.locale == "zh" ? "未婚" : "نىكاھلانغانمىغان", //婚姻状况--默认值 未婚
birthday: "", //出生日期
isConceive: this.$i18n.locale == "zh" ? "未孕" : "ھامىلدار", //怀孕状况--默认值 未孕
gestationalWeeks: "", //怀孕周期
occupation: "", //职业
otherOccupation: "", //其他职业
contactInformation: "", //联系方式
FamilyMembersPhone: "", //家属联系方式
// workOrNotCovid: "否",
Registeredresidence: "", //籍贯 (包括省市)
province: "", //籍贯 (省)
city: "", //籍贯 (市)
address: "", //地址
idCard: "", //身份证号
typeOfMedicalInsurance: "", //医保类型---默认值
insurance: this.$i18n.locale == "zh" ? "无" : "يوق", //商业保险---默认值 无
HasSymptom: this.$i18n.locale == "zh" ? "否" : "ياق", //有无症状---默认值 否
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() {
if (this.$i18n.locale == "zh") {
this.getResource();
} else {
//症状列表
this.symptomList = [
{ id: 1, element: "يۇتقۇنچاق ئاغرىش", sort: 1 },
{ id: 2, element: "بۇرنى پۈتۈپ قىلىش", sort: 2 },
{ id: 3, element: "قىزىتماق", sort: 3 },
{ id: 5, element: "يۆتەل", sort: 5 },
{ id: 6, element: "بەلغەم يۆتەل", sort: 6 },
{ id: 7, element: "بېشى قايماق", sort: 7 },
{ id: 8, element: "باش ئاغرىقى", sort: 8 },
{ id: 9, element: "مۇسكۇل ئاغرىش", sort: 9 },
{ id: 10, element: "ماغدۇرسىزلىق", sort: 10 },
{ id: 11, element: "نەپەس قىيىنلىشىش", sort: 11 },
{ id: 12, element: "بۇرنىدىن سۇ ئېقىش", sort: 12 },
];
//国籍列表
this.nationalityList = [
"جۇڭگو",
"جۇڭگو شياڭگاڭ",
"جۇڭگو ئاۋمېن",
"جۇڭگو تەيۋەن",
"چەتئەل",
];
//医保类型列表
this.typeOfMedicalInsuranceList = [
"شاڭخەي داۋالىنىش سۇغۇرتىسى",
"سىرتتىكى داۋالىنىش سۇغۇرتىسى",
"ئۆزى چىقىم قىلىش",
];
//职业列表
this.occupationList = [
"خىزمەتچى",
"ئىشچى",
"مەمۇرى خادىم",
"دېھقان",
"دېھقان",
"ھەربىي سەپتىن چېكىنگەن",
"باشقا خىزمەت",
];
}
getLocalStorge(key) {
return window.localStorage.getItem(key);
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>
......@@ -6,338 +6,170 @@
* @Description:
-->
<template>
<div class="page5">
<van-field
colon
clearable
name="HasOnlineClass"
label-width="130px"
:label="$t('HasOnlineClass')"
>
<template #input>
<van-radio-group
@change="setLocalStorge('HasOnlineClass')"
v-model="HasOnlineClass"
direction="horizontal"
>
<van-radio :name="$t('yes')">{{ $t("yes") }}</van-radio>
<van-radio :name="$t('no')">{{ $t("no") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
colon
clearable
name="purpose"
:label="$t('purpose')"
readonly
:value="purpose"
label-width="130px"
@click="showPurpose = true"
>
</van-field>
<van-popup v-model="showPurpose" position="bottom">
<van-picker
:title="$t('HasOnlineClass')"
show-toolbar
:columns="purposeList"
@confirm="onpurpose"
/>
</van-popup>
<van-field
colon
clearable
name="workOrNotCovid"
:label="$t('workOrNotCovid')"
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="$t('no')">{{ $t("no") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
colon
clearable
name="thirtyDays"
:label="$t('thirtyDays')"
label-width="130px"
:rules="[{ required: true, message: `请选择${$t('thirtyDays')}` }]"
>
<template #input>
<van-radio-group
@change="setLocalStorge('thirtyDays')"
v-model="thirtyDays"
direction="horizontal"
>
<van-radio :name="$t('yes')">{{ $t("yes") }}</van-radio>
<van-radio :name="$t('no')">{{ $t("no") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
v-if="thirtyDays == $t('yes')"
colon
clearable
v-model="LeaveShangHai"
name="LeaveShangHai"
:label="$t('LeaveShangHai')"
label-width="130px"
:placeholder="$t('LeaveShangHai')"
type="digit"
@blur="setLocalStorge('LeaveShangHai')"
:rules="[
{
required: thirtyDays == $t('yes') ? true : false,
message: `请填写${$t('LeaveShangHai')}`,
},
{ validator, message: `${$t('More30days')}` }, //天数不能大于三十天
]"
>
<template #extra v-if="thirtyDays == $t('yes')">{{ $t("Day") }}</template>
</van-field>
<van-field
colon
clearable
readonly
clickable
name="normalDate"
:value="normalDate"
label-width="130px"
:label="$t('normalDate')"
:placeholder="`点击选择${$t('normalDate')}`"
@click="showNormalDate = true"
:rules="[{ required: true, message: `请选择${$t('normalDate')}` }]"
/>
<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="$t('unusualDate')"
label-width="130px"
:placeholder="`点击选择${$t('unusualDate')}`"
@click="showUnusualDate = true"
:rules="[{ required: true, message: `请选择${$t('unusualDate')}` }]"
/>
<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="$t('inHospitalDate')"
:placeholder="`点击选择${$t('inHospitalDate')}`"
@click="showInHospitalDate = true"
:rules="[{ required: true, message: `请选择${$t('inHospitalDate')}` }]"
/>
<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="$t('beforeIsolationPoint')"
:placeholder="`请填写${$t('beforeIsolationPoint')}`"
@blur="setLocalStorge('beforeIsolationPoint')"
:rules="[
{ required: true, message: `请填写${$t('beforeIsolationPoint')}` },
]"
>
</van-field>
<van-field
v-if="hasCOVIDVaccine == $t('yes') || hasCOVIDVaccine == $t('no')"
colon
clearable
name="hasCOVIDVaccine"
label-width="130px"
:label="$t('hasCOVIDVaccine')"
>
<template #input>
<van-radio-group
@change="
() => {
setLocalStorge('hasCOVIDVaccine');
if (hasCOVIDVaccine == $t('no')) {
covidVaccine = '';
vaccineType = [];
othervaccines = '';
setValue('covidVaccine', '');
setValue('vaccineType', '');
setValue('othervaccines', '');
}
}
"
v-model="hasCOVIDVaccine"
direction="horizontal"
>
<van-radio :name="$t('yes')">{{ $t("yes") }}</van-radio>
<van-radio :name="$t('no')">{{ $t("no") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
v-if="hasCOVIDVaccine == $t('yes')"
colon
clearable
v-model="covidVaccine"
name="covidVaccine"
:label="$t('covidVaccine')"
:placeholder="$t('covidVaccine')"
label-width="130px"
type="number"
@blur="setLocalStorge('covidVaccine')"
:rules="[{ required: true, message: `请填写${$t('covidVaccine')}` }]"
>
<template #extra v-if="hasCOVIDVaccine == $t('yes')">{{
$t("needle")
}}</template>
</van-field>
<van-field
v-if="hasCOVIDVaccine == $t('yes')"
colon
clearable
label-width="130px"
name="vaccineType"
:label="$t('vaccineType')"
:rules="[
{
required: hasCOVIDVaccine == $t('yes') ? true : false,
message: `请选择${$t('vaccineType')}`,
},
]"
>
<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($t('other'))"
clearable
autosize
type="textarea"
label-width="130px"
v-model="othervaccines"
name="othervaccines"
:label="$t('othervaccines')"
:placeholder="$t('othervaccines')"
:rules="[
{
required: vaccineType.includes($t('other')) ? true : false,
message: `请填写${$t('othervaccines')}`,
},
]"
@blur="setLocalStorge('othervaccines')"
></van-field>
<van-field
v-if="hasCOVIDVaccine == $t('yes')"
colon
clearable
readonly
clickable
name="vaccineDate"
:value="vaccineDate"
:label="$t('vaccineDate')"
label-width="130px"
:placeholder="`点击选择${$t('vaccineDate')}`"
@click="showVaccineDate = true"
:rules="[
{
required: covidVaccine > 0 ? true : false,
message: `请选择${$t('vaccineDate')}`,
},
]"
/>
<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="$t('HasOnlineClass')">
<template #input>
<van-radio-group @change="setLocalStorge('HasOnlineClass')" v-model="HasOnlineClass"
direction="horizontal">
<van-radio :name="$t('yes')">{{ $t("yes") }}</van-radio>
<van-radio :name="$t('no')">{{ $t("no") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field colon clearable name="purpose" :label="$t('purpose')" readonly :value="purpose" label-width="130px"
@click="showPurpose = true">
</van-field>
<van-popup v-model="showPurpose" position="bottom">
<van-picker :title="$t('HasOnlineClass')" show-toolbar :columns="purposeList" @confirm="onpurpose" />
</van-popup>
<van-field colon clearable name="workOrNotCovid" :label="$t('workOrNotCovid')" 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="$t('no')">{{ $t("no") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field colon clearable name="thirtyDays" :label="$t('thirtyDays')" label-width="130px"
:rules="[{ required: true, message: `${$t('select')}${$t('thirtyDays')}` }]">
<template #input>
<van-radio-group @change="setLocalStorge('thirtyDays')" v-model="thirtyDays" direction="horizontal">
<van-radio :name="$t('yes')">{{ $t("yes") }}</van-radio>
<van-radio :name="$t('no')">{{ $t("no") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field v-if="thirtyDays == $t('yes')" colon clearable v-model="LeaveShangHai" name="LeaveShangHai"
:label="$t('LeaveShangHai')" label-width="130px" :placeholder="$t('LeaveShangHai')" type="digit"
@blur="setLocalStorge('LeaveShangHai')" :rules="[
{
required: thirtyDays == $t('yes') ? true : false,
message: `${$t('fillIn')}${$t('LeaveShangHai')}`,
},
{ validator, message: `${$t('More30days')}` }, //天数不能大于三十天
]">
<template #extra v-if="thirtyDays == $t('yes')">{{ $t("Day") }}</template>
</van-field>
<van-field colon clearable readonly clickable name="normalDate" :value="normalDate" label-width="130px"
:label="$t('normalDate')" :placeholder="`${$t('clickSelect')}${$t('normalDate')}`"
@click="showNormalDate = true"
:rules="[{ required: true, message: `${$t('select')}${$t('normalDate')}` }]" />
<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="$t('unusualDate')"
label-width="130px" :placeholder="`${$t('clickSelect')}${$t('unusualDate')}`"
@click="showUnusualDate = true"
:rules="[{ required: true, message: `${$t('select')}${$t('unusualDate')}` }]" />
<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="$t('inHospitalDate')" :placeholder="`${$t('clickSelect')}${$t('inHospitalDate')}`"
@click="showInHospitalDate = true"
:rules="[{ required: true, message: `${$t('select')}${$t('inHospitalDate')}` }]" />
<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="$t('beforeIsolationPoint')"
:placeholder="`${$t('fillIn')}${$t('beforeIsolationPoint')}`" @blur="setLocalStorge('beforeIsolationPoint')"
:rules="[
{ required: true, message: `${$t('fillIn')}${$t('beforeIsolationPoint')}` },
]">
</van-field>
<van-field v-if="hasCOVIDVaccine == $t('yes') || hasCOVIDVaccine == $t('no')" colon clearable
name="hasCOVIDVaccine" label-width="130px" :label="$t('hasCOVIDVaccine')">
<template #input>
<van-radio-group @change="
() => {
setLocalStorge('hasCOVIDVaccine');
if (hasCOVIDVaccine == $t('no')) {
covidVaccine = '';
vaccineType = [];
othervaccines = '';
setValue('covidVaccine', '');
setValue('vaccineType', '');
setValue('othervaccines', '');
}
}
" v-model="hasCOVIDVaccine" direction="horizontal">
<van-radio :name="$t('yes')">{{ $t("yes") }}</van-radio>
<van-radio :name="$t('no')">{{ $t("no") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field v-if="hasCOVIDVaccine == $t('yes')" colon clearable v-model="covidVaccine" name="covidVaccine"
:label="$t('covidVaccine')" :placeholder="$t('covidVaccine')" label-width="130px" type="number"
@blur="setLocalStorge('covidVaccine')"
:rules="[{ required: true, message: `${$t('fillIn')}${$t('covidVaccine')}` }]">
<template #extra v-if="hasCOVIDVaccine == $t('yes')">{{
$t("needle")
}}</template>
</van-field>
<van-field v-if="hasCOVIDVaccine == $t('yes')" colon clearable label-width="130px" name="vaccineType"
:label="$t('vaccineType')" :rules="[
{
required: hasCOVIDVaccine == $t('yes') ? true : false,
message: `${$t('select')}${$t('vaccineType')}`,
},
]">
<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($t('other'))" clearable autosize type="textarea" label-width="130px"
v-model="othervaccines" name="othervaccines" :label="$t('othervaccines')" :placeholder="$t('othervaccines')"
:rules="[
{
required: vaccineType.includes($t('other')) ? true : false,
message: `${$t('fillIn')}${$t('othervaccines')}`,
},
]" @blur="setLocalStorge('othervaccines')"></van-field>
<van-field v-if="hasCOVIDVaccine == $t('yes')" colon clearable readonly clickable name="vaccineDate"
:value="vaccineDate" :label="$t('vaccineDate')" label-width="130px"
:placeholder="`${$t('clickSelect')}${$t('vaccineDate')}`" @click="showVaccineDate = true" :rules="[
{
required: covidVaccine > 0 ? true : false,
message: `${$t('select')}${$t('vaccineDate')}`,
},
]" />
<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>
......@@ -345,211 +177,211 @@ import { mapState, mapMutations } from "vuex";
import { formatDate } from "../utils/common.js";
export default {
inject: ["setLoading"],
name: "page5",
data() {
return {
workOrNotCovid: this.$i18n.locale == "zh" ? "否" : "ياق", //是否需要接触新冠 --- 默认值 否
HasOnlineClass: this.$i18n.locale == "zh" ? "否" : "ياق", //是否上网课--- 默认值 否
purpose: this.$i18n.locale == "zh" ? "学习" : "ئوقۇش سەۋەپ بىلەن", // 来沪目的--- 默认值 学习
thirtyDays: this.$i18n.locale == "zh" ? "是" : "بار", //近三十天内无离开上海--- 默认值 是
LeaveShangHai: "", //回上海天数
unusualDate: "", //核酸检测异常时间
normalDate: "", //未发生异常时间
beforeIsolationPoint: "", //之前隔离点
inHospitalDate: "", //120转运时间
// HasSymptom: "否", //有无症状--- 默认值 否
// symptom: [], //患者症状
// otherSymptom: "", //其他症状
//symptomList: [],
hasCOVIDVaccine: this.$i18n.locale == "zh" ? "是" : "بار", //--- 默认值 是
covidVaccine: "", //接种针数
vaccineType: [], //疫苗公司
othervaccines: "", //其他疫苗
vaccineDate: "", //最后一次接种日期
vaccineTypeList: [],
showNormalDate: false, //未发生异常时间弹窗
showUnusualDate: false, //核酸时间弹窗
showInHospitalDate: false, //120时间弹窗
showVaccineDate: false, //120时间弹窗
purposeList:
this.$i18n.locale == "zh"
? ["学习", "工作", "旅游", "商务", "其他"]
: [
"ئوقۇش سەۋەپ بىلەن",
"خىزمەت سەۋەپ بىلەن",
"ساياھەت قىلىش ئۈچۈن",
"سودا ئۈچۈن",
"باشقا سەۋەپ",
],
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() {
if (this.$i18n.locale == "zh") {
this.getResource();
} else {
this.vaccineTypeList = [
{ id: 13, element: "چاڭچۈن شىڭ ئوۇ", sort: 1 },
{ id: 14, element: "بېيجىڭ شىڭ ئوۇ", sort: 2 },
{ id: 82, element: "ئۇخەن شىڭ ئوۇ", sort: 2.5 },
{ id: 83, element: "بېيجىڭ كېشىڭ", sort: 2.6 },
{ id: 15, element: "نەنجىڭ شىڭوۇ", sort: 3 },
{ id: 89, element: "ئەنخۇي جيفىي", sort: 4 },
{ id: 90, element: "كاڭشىنو", sort: 5 },
{ id: 91, element: "چىڭدۇ شىڭ ئۇ", sort: 6 },
{ id: 92, element: "لەنجۇچ شىڭ ئوۇ", sort: 7 },
{ id: 27, element: "باشقا سەۋەپ", sort: 99 },
];
}
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]);
inject: ["setLoading"],
name: "page5",
data() {
return {
workOrNotCovid: this.$i18n.locale == "zh" ? "否" : "ياق", //是否需要接触新冠 --- 默认值 否
HasOnlineClass: this.$i18n.locale == "zh" ? "否" : "ياق", //是否上网课--- 默认值 否
purpose: this.$i18n.locale == "zh" ? "学习" : "ئوقۇش سەۋەپ بىلەن", // 来沪目的--- 默认值 学习
thirtyDays: this.$i18n.locale == "zh" ? "是" : "بار", //近三十天内无离开上海--- 默认值 是
LeaveShangHai: "", //回上海天数
unusualDate: "", //核酸检测异常时间
normalDate: "", //未发生异常时间
beforeIsolationPoint: "", //之前隔离点
inHospitalDate: "", //120转运时间
// HasSymptom: "否", //有无症状--- 默认值 否
// symptom: [], //患者症状
// otherSymptom: "", //其他症状
//symptomList: [],
hasCOVIDVaccine: this.$i18n.locale == "zh" ? "是" : "بار", //--- 默认值 是
covidVaccine: "", //接种针数
vaccineType: [], //疫苗公司
othervaccines: "", //其他疫苗
vaccineDate: "", //最后一次接种日期
vaccineTypeList: [],
showNormalDate: false, //未发生异常时间弹窗
showUnusualDate: false, //核酸时间弹窗
showInHospitalDate: false, //120时间弹窗
showVaccineDate: false, //120时间弹窗
purposeList:
this.$i18n.locale == "zh"
? ["学习", "工作", "旅游", "商务", "其他"]
: [
"ئوقۇش سەۋەپ بىلەن",
"خىزمەت سەۋەپ بىلەن",
"ساياھەت قىلىش ئۈچۈن",
"سودا ئۈچۈن",
"باشقا سەۋەپ",
],
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() {
if (this.$i18n.locale == "zh") {
this.getResource();
} else {
this.vaccineTypeList = [
{ id: 13, element: "چاڭچۈن شىڭ ئوۇ", sort: 1 },
{ id: 14, element: "بېيجىڭ شىڭ ئوۇ", sort: 2 },
{ id: 82, element: "ئۇخەن شىڭ ئوۇ", sort: 2.5 },
{ id: 83, element: "بېيجىڭ كېشىڭ", sort: 2.6 },
{ id: 15, element: "نەنجىڭ شىڭوۇ", sort: 3 },
{ id: 89, element: "ئەنخۇي جيفىي", sort: 4 },
{ id: 90, element: "كاڭشىنو", sort: 5 },
{ id: 91, element: "چىڭدۇ شىڭ ئۇ", sort: 6 },
{ id: 92, element: "لەنجۇچ شىڭ ئوۇ", sort: 7 },
{ id: 27, element: "باشقا سەۋەپ", sort: 99 },
];
}
}
if (this.getLocalStorge("vaccineType")) {
this.vaccineType = this.getLocalStorge("vaccineType").split(",");
}
},
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"); //最后一次接种日期
},
getLocalStorge(key) {
return window.localStorage.getItem(key);
},
onpurpose(value, index) {
this.purpose = value;
this.setLocalStorge("purpose");
this.showPurpose = false;
},
setLocalStorge(key) {
window.localStorage.setItem(key, this[`${key}`]);
},
validator(val) {
return val < 61 || val == 61;
},
setValue(key, value) {
window.localStorage.setItem(key, value);
},
getResource() {
this.setLoading(true);
this.$http.get(`/Research/Resource`, {}).then((data) => {
this.symptomList = data.filter((item) => {
return item.category == "症状";
});
this.vaccineTypeList = data.filter((item) => {
return item.category == "新冠疫苗种类";
});
this.setLoading(false);
});
},
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"); //最后一次接种日期
},
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");
onpurpose(value, index) {
this.purpose = value;
this.setLocalStorge("purpose");
this.showPurpose = false;
},
this.showUnusualDate = false;
},
validator(val) {
return val < 61 || val == 61;
},
onInHospitalDate(date) {
this.inHospitalDate = formatDate(date, "yyyy-MM-dd ");
this.setLocalStorge("inHospitalDate");
this.showInHospitalDate = false;
},
getResource() {
this.setLoading(true);
this.$http.get(`/Research/Resource`, {}).then((data) => {
this.symptomList = data.filter((item) => {
return item.category == "症状";
});
this.vaccineTypeList = data.filter((item) => {
return item.category == "新冠疫苗种类";
});
this.setLoading(false);
});
},
onVaccineDate(date) {
this.vaccineDate = formatDate(date, "yyyy-MM-dd");
this.setLocalStorge("vaccineDate");
this.showVaccineDate = 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;
},
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>
......@@ -6,713 +6,492 @@
* @Description:
-->
<template>
<div class="page6">
<van-field
colon
clearable
name="hasHistoryAllergies"
label-width="125px"
:label="$t('hasHistoryAllergies')"
>
<template #input>
<van-radio-group
@change="
() => {
setLocalStorge('hasHistoryAllergies');
if (hasHistoryAllergies == $t('noHave')) {
foodAllergy = '';
drugAllergy = '';
otherAllergy = '';
setValue('foodAllergy', '');
setValue('drugAllergy', '');
setValue('otherAllergy', '');
}
}
"
v-model="hasHistoryAllergies"
direction="horizontal"
>
<van-radio :name="$t('have')">{{ $t("have") }}</van-radio>
<van-radio :name="$t('noHave')">{{ $t("noHave") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
v-show="hasHistoryAllergies == $t('have')"
colon
clearable
label-width="125px"
v-model="foodAllergy"
name="foodAllergy"
:label="$t('foodAllergy')"
:placeholder="$t('foodAllergy')"
@blur="setLocalStorge('foodAllergy')"
>
</van-field>
<!-- 药物过敏原 -->
<van-field
v-show="hasHistoryAllergies == $t('have')"
colon
clearable
label-width="125px"
v-model="drugAllergy"
name="drugAllergy"
:label="$t('drugAllergy')"
:placeholder="$t('drugAllergy')"
@blur="setLocalStorge('drugAllergy')"
>
</van-field>
<!-- 其他过敏原 -->
<van-field
v-show="hasHistoryAllergies == $t('have')"
colon
clearable
label-width="125px"
v-model="otherAllergy"
name="otherAllergy"
:label="$t('otherAllergy')"
:placeholder="$t('otherAllergy')"
@blur="setLocalStorge('otherAllergy')"
>
</van-field>
<van-field
colon
clearable
name="hasHistorySurgery"
label-width="125px"
:label="$t('hasHistorySurgery')"
>
<template #input>
<van-radio-group
@change="
() => {
setLocalStorge('hasHistorySurgery');
if (hasHistorySurgery == $t('noHave')) {
historySurgery = '';
setValue('historySurgery', '');
}
}
"
v-model="hasHistorySurgery"
direction="horizontal"
>
<van-radio :name="$t('have')">{{ $t("have") }}</van-radio>
<van-radio :name="$t('noHave')">{{ $t("noHave") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
v-show="hasHistorySurgery == $t('have')"
colon
clearable
label-width="125px"
v-model="historySurgery"
name="historySurgery"
:label="$t('historySurgery')"
:placeholder="$t('historySurgery')"
@blur="setLocalStorge('historySurgery')"
:rules="[
{
required: hasHistorySurgery == $t('have') ? true : false,
message: `请填写${$t('historySurgery')}`,
},
]"
>
</van-field>
<van-field
colon
clearable
name="HasPreviousHistory"
label-width="125px"
:label="$t('HasPreviousHistory')"
>
<template #input>
<van-radio-group
@change="
() => {
setLocalStorge('HasPreviousHistory');
if (HasPreviousHistory == $t('noHave')) {
previousHistory = [];
otherPastHistory = '';
tuberculosisDate = '';
setValue('previousHistory', '');
setValue('otherPastHistory', '');
setValue('tuberculosisDate', '');
}
}
"
v-model="HasPreviousHistory"
direction="horizontal"
>
<van-radio :name="$t('have')">{{ $t("have") }}</van-radio>
<van-radio :name="$t('noHave')"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
colon
clearable
name="previousHistory"
label-width="125px"
:label="$t('previousHistory')"
v-show="HasPreviousHistory == $t('have')"
:rules="[
{
required: HasPreviousHistory == $t('have') ? true : false,
message: `请选择${$t('previousHistory')}`,
},
]"
>
<template #input>
<van-checkbox-group
@change="setLocalStorge('previousHistory')"
v-model="previousHistory"
>
<van-cell-group>
<van-cell v-for="(item, index) in previousHistoryList" :key="index">
<van-checkbox :name="item.element" shape="square">{{
item.element
}}</van-checkbox>
</van-cell>
</van-cell-group>
</van-checkbox-group>
</template>
</van-field>
<van-field
colon
v-show="previousHistory.includes($t('other'))"
clearable
autosize
type="textarea"
v-model="otherPastHistory"
name="otherPastHistory"
:label="$t('otherPastHistory')"
:placeholder="$t('otherPastHistory')"
:rules="[
{
required: previousHistory.includes($t('other')) ? true : false,
message: `请填写${$t('otherPastHistory')}`,
},
]"
@blur="setLocalStorge('otherPastHistory')"
></van-field>
<van-field
colon
clearable
readonly
clickable
v-if="
HasPreviousHistory != $t('noHave') && previousHistory.includes('肺结核')
"
:rules="[
{
required:
<div class="page6">
<van-field colon clearable name="hasHistoryAllergies" label-width="125px" :label="$t('hasHistoryAllergies')">
<template #input>
<van-radio-group @change="
() => {
setLocalStorge('hasHistoryAllergies');
if (hasHistoryAllergies == $t('noHave')) {
foodAllergy = '';
drugAllergy = '';
otherAllergy = '';
setValue('foodAllergy', '');
setValue('drugAllergy', '');
setValue('otherAllergy', '');
}
}
" v-model="hasHistoryAllergies" direction="horizontal">
<van-radio :name="$t('have')">{{ $t("have") }}</van-radio>
<van-radio :name="$t('noHave')">{{ $t("noHave") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field v-show="hasHistoryAllergies == $t('have')" colon clearable label-width="125px" v-model="foodAllergy"
name="foodAllergy" :label="$t('foodAllergy')" :placeholder="$t('foodAllergy')"
@blur="setLocalStorge('foodAllergy')">
</van-field>
<!-- 药物过敏原 -->
<van-field v-show="hasHistoryAllergies == $t('have')" colon clearable label-width="125px" v-model="drugAllergy"
name="drugAllergy" :label="$t('drugAllergy')" :placeholder="$t('drugAllergy')"
@blur="setLocalStorge('drugAllergy')">
</van-field>
<!-- 其他过敏原 -->
<van-field v-show="hasHistoryAllergies == $t('have')" colon clearable label-width="125px" v-model="otherAllergy"
name="otherAllergy" :label="$t('otherAllergy')" :placeholder="$t('otherAllergy')"
@blur="setLocalStorge('otherAllergy')">
</van-field>
<van-field colon clearable name="hasHistorySurgery" label-width="125px" :label="$t('hasHistorySurgery')">
<template #input>
<van-radio-group @change="
() => {
setLocalStorge('hasHistorySurgery');
if (hasHistorySurgery == $t('noHave')) {
historySurgery = '';
setValue('historySurgery', '');
}
}
" v-model="hasHistorySurgery" direction="horizontal">
<van-radio :name="$t('have')">{{ $t("have") }}</van-radio>
<van-radio :name="$t('noHave')">{{ $t("noHave") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field v-show="hasHistorySurgery == $t('have')" colon clearable label-width="125px" v-model="historySurgery"
name="historySurgery" :label="$t('historySurgery')" :placeholder="$t('historySurgery')"
@blur="setLocalStorge('historySurgery')" :rules="[
{
required: hasHistorySurgery == $t('have') ? true : false,
message: `${$t('fillIn')}${$t('historySurgery')}`,
},
]">
</van-field>
<van-field colon clearable name="HasPreviousHistory" label-width="125px" :label="$t('HasPreviousHistory')">
<template #input>
<van-radio-group @change="
() => {
setLocalStorge('HasPreviousHistory');
if (HasPreviousHistory == $t('noHave')) {
previousHistory = [];
otherPastHistory = '';
tuberculosisDate = '';
setValue('previousHistory', '');
setValue('otherPastHistory', '');
setValue('tuberculosisDate', '');
}
}
" v-model="HasPreviousHistory" direction="horizontal">
<van-radio :name="$t('have')">{{ $t("have") }}</van-radio>
<van-radio :name="$t('noHave')"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field colon clearable name="previousHistory" label-width="125px" :label="$t('previousHistory')"
v-show="HasPreviousHistory == $t('have')" :rules="[
{
required: HasPreviousHistory == $t('have') ? true : false,
message: `${$t('select')}${$t('previousHistory')}`,
},
]">
<template #input>
<van-checkbox-group @change="setLocalStorge('previousHistory')" v-model="previousHistory">
<van-cell-group>
<van-cell v-for="(item, index) in previousHistoryList" :key="index">
<van-checkbox :name="item.element" shape="square">{{
item.element
}}</van-checkbox>
</van-cell>
</van-cell-group>
</van-checkbox-group>
</template>
</van-field>
<van-field colon v-show="previousHistory.includes($t('other'))" clearable autosize type="textarea"
v-model="otherPastHistory" name="otherPastHistory" :label="$t('otherPastHistory')"
:placeholder="$t('otherPastHistory')" :rules="[
{
required: previousHistory.includes($t('other')) ? true : false,
message: `${$t('fillIn')}${$t('otherPastHistory')}`,
},
]" @blur="setLocalStorge('otherPastHistory')"></van-field>
<van-field colon clearable readonly clickable v-if="
HasPreviousHistory != $t('noHave') && previousHistory.includes('肺结核')
" :rules="[
{
required:
HasPreviousHistory != $t('noHave') &&
previousHistory.includes('肺结核')
? true
: false,
message: `请选择${$t('tuberculosisDate')}`,
},
]"
name="tuberculosisDate"
:value="tuberculosisDate"
:label="$t('tuberculosisDate')"
:placeholder="`点击选择${$t('tuberculosisDate')}`"
@click="showPicker = true"
/>
<van-popup v-model="showPicker" position="bottom">
<van-datetime-picker
:min-date="minDate"
:max-date="maxDate"
type="date"
@confirm="onConfirm"
@cancel="showPicker = false"
:formatter="formatter"
v-model="deathDate2"
/>
</van-popup>
<van-field
colon
clearable
name="whetherSmoking"
:label="$t('whetherSmoking')"
label-width="125px"
>
<template #input>
<van-radio-group
@change="
() => {
setLocalStorge('whetherSmoking');
if (whetherSmoking == $t('no')) {
smokingTypes = []; //烟草类型
smokingYears = ''; //吸烟年数
smokingCount = ''; //吸烟支数
whetherNoSmoking = ''; //是否戒烟
setValue('smokingTypes', '');
setValue('smokingYears', '');
setValue('smokingCount', '');
setValue('whetherNoSmoking', '');
}
}
"
v-model="whetherSmoking"
direction="horizontal"
>
<van-radio :name="$t('yes')">{{ $t("yes") }}</van-radio>
<van-radio :name="$t('no')">{{ $t("no") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
colon
clearable
label-width="125px"
name="smokingTypes"
:label="$t('smokingTypes')"
v-if="whetherSmoking == '是'"
>
<template #input>
<van-checkbox-group
@change="setLocalStorge('smokingTypes')"
v-model="smokingTypes"
direction="horizontal"
class="smokingTypes"
>
<template v-for="(item, index) in smokingTypesList">
<van-checkbox :key="index" :name="item.element" shape="square">{{
item.element
}}</van-checkbox>
</template>
</van-checkbox-group>
</template>
</van-field>
<van-field
v-if="whetherSmoking == $t('yes')"
colon
clearable
label-width="125px"
v-model="smokingYears"
name="smokingYears"
:label="$t('smokingYears')"
:placeholder="`${$t('smokingYears')}`"
type="digit"
@blur="setLocalStorge('smokingYears')"
:rules="[{ required: false, message: `请填写${$t('smokingYears')}` }]"
>
<template #extra>
{{ $t("year") }}
</template>
</van-field>
<van-field
v-if="whetherSmoking == $t('yes')"
label-width="125px"
colon
clearable
v-model="smokingCount"
name="smokingCount"
:label="$t('smokingCount')"
:placeholder="$t('smokingCount')"
type="digit"
@blur="setLocalStorge('smokingCount')"
:rules="[{ required: false, message: `请填写${$t('smokingCount')}` }]"
>
<template #extra>
{{ $t("branch") }}
</template>
</van-field>
<van-field
colon
clearable
label-width="125px"
name="whetherNoSmoking"
:label="$t('whetherNoSmoking')"
v-if="whetherSmoking == $t('yes')"
>
<template #input>
<van-radio-group
@change="
() => {
setLocalStorge('whetherNoSmoking');
if (whetherNoSmoking == $t('no')) {
noSmokingYears = ''; //戒烟年数
setValue('noSmokingYears', '');
}
}
"
v-model="whetherNoSmoking"
direction="horizontal"
>
<van-radio :name="$t('yes')">{{ $t("yes") }}</van-radio>
<van-radio :name="$t('no')">{{ $t("no") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
v-if="whetherNoSmoking == $t('yes')"
colon
label-width="125px"
clearable
v-model="noSmokingYears"
name="noSmokingYears"
:label="$t('noSmokingYears')"
:placeholder="$t('noSmokingYears')"
type="digit"
@blur="setLocalStorge('noSmokingYears')"
:rules="[{ required: false, message: `请填写${$t('noSmokingYears')}` }]"
>
<template #extra>
{{ $t("year") }}
</template>
</van-field>
<van-field
colon
clearable
name="whetherPassivitySmoking"
:label="$t('noSmokingYears')"
label-width="125px"
>
<template #input>
<van-radio-group
@change="
() => {
setLocalStorge('whetherPassivitySmoking');
if (whetherPassivitySmoking == $t('no')) {
passivitySmokingYears = ''; //被动吸烟年数
setValue('passivitySmokingYears', '');
}
}
"
v-model="whetherPassivitySmoking"
direction="horizontal"
>
<van-radio :name="$t('yes')">{{ $t("yes") }}</van-radio>
<van-radio :name="$t('no')">{{ $t("no") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
v-if="whetherPassivitySmoking == $t('yes')"
colon
label-width="125px"
clearable
v-model="passivitySmokingYears"
name="passivitySmokingYears"
:label="$t('passivitySmokingYears')"
:placeholder="$t('passivitySmokingYears')"
type="digit"
@blur="setLocalStorge('passivitySmokingYears')"
>
<template #extra>
{{ $t("year") }}
</template>
</van-field>
<van-popup v-model="showPicker" position="bottom">
<van-datetime-picker
:min-date="minDate"
:max-date="maxDate"
type="date"
@confirm="onConfirm"
@cancel="showPicker = false"
:formatter="formatter"
/>
</van-popup>
<van-field
colon
clearable
name="yesOrNoCt"
label-width="125px"
:label="$t('yesOrNoCt')"
>
<template #input>
<van-radio-group
@change="
() => {
setLocalStorge('yesOrNoCt');
if (yesOrNoCt == $t('noHave')) {
ChestCT = $t('noHave');
ChestCTDate = '';
setValue('ChestCT', '');
setValue('ChestCTDate', '');
}
}
"
v-model="yesOrNoCt"
direction="horizontal"
>
<van-radio :name="$t('have')">{{ $t("have") }}</van-radio>
<van-radio :name="$t('noHave')">{{ $t("noHave") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
v-if="yesOrNoCt == $t('have')"
colon
clearable
name="ChestCT"
label-width="125px"
:label="$t('ChestCT')"
>
<template #input>
<van-radio-group
@change="
() => {
setLocalStorge('ChestCT');
}
"
v-model="ChestCT"
direction="horizontal"
>
<van-radio :name="$t('have')">{{ $t("have") }}</van-radio>
<van-radio :name="$t('noHave')">{{ $t("noHave") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
v-if="yesOrNoCt == $t('have')"
colon
clearable
readonly
clickable
name="ChestCTDate"
:value="ChestCTDate"
:label="$t('ChestCTDate')"
label-width="125px"
:placeholder="`点击选择${$t('ChestCTDate')}`"
@click="showCalendar = true"
:rules="[
{
required: ChestCT == $t('have') ? true : false,
message: `请选择${$t('ChestCTDate')}`,
},
]"
/>
<van-popup v-model="showCalendar" position="bottom">
<van-datetime-picker
type="date"
:min-date="minChestCTDate"
:max-date="maxDate"
@confirm="onChestCT"
@cancel="showCalendar = false"
:formatter="formatter"
v-model="ChestCTDate1"
/>
</van-popup>
</div>
previousHistory.includes('肺结核')
? true
: false,
message: `${$t('select')}${$t('tuberculosisDate')}`,
},
]" name="tuberculosisDate" :value="tuberculosisDate" :label="$t('tuberculosisDate')"
:placeholder="`${$t('clickSelect')}${$t('tuberculosisDate')}`" @click="showPicker = true" />
<van-popup v-model="showPicker" position="bottom">
<van-datetime-picker :min-date="minDate" :max-date="maxDate" type="date" @confirm="onConfirm"
@cancel="showPicker = false" :formatter="formatter" v-model="deathDate2" />
</van-popup>
<van-field colon clearable name="whetherSmoking" :label="$t('whetherSmoking')" label-width="125px">
<template #input>
<van-radio-group @change="
() => {
setLocalStorge('whetherSmoking');
if (whetherSmoking == $t('no')) {
smokingTypes = []; //烟草类型
smokingYears = ''; //吸烟年数
smokingCount = ''; //吸烟支数
whetherNoSmoking = ''; //是否戒烟
setValue('smokingTypes', '');
setValue('smokingYears', '');
setValue('smokingCount', '');
setValue('whetherNoSmoking', '');
}
}
" v-model="whetherSmoking" direction="horizontal">
<van-radio :name="$t('yes')">{{ $t("yes") }}</van-radio>
<van-radio :name="$t('no')">{{ $t("no") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field colon clearable label-width="125px" name="smokingTypes" :label="$t('smokingTypes')"
v-if="whetherSmoking == '是'">
<template #input>
<van-checkbox-group @change="setLocalStorge('smokingTypes')" v-model="smokingTypes"
direction="horizontal" class="smokingTypes">
<template v-for="(item, index) in smokingTypesList">
<van-checkbox :key="index" :name="item.element" shape="square">{{
item.element
}}</van-checkbox>
</template>
</van-checkbox-group>
</template>
</van-field>
<van-field v-if="whetherSmoking == $t('yes')" colon clearable label-width="125px" v-model="smokingYears"
name="smokingYears" :label="$t('smokingYears')" :placeholder="`${$t('smokingYears')}`" type="digit"
@blur="setLocalStorge('smokingYears')"
:rules="[{ required: false, message: `${$t('fillIn')}${$t('smokingYears')}` }]">
<template #extra>
{{ $t("year") }}
</template>
</van-field>
<van-field v-if="whetherSmoking == $t('yes')" label-width="125px" colon clearable v-model="smokingCount"
name="smokingCount" :label="$t('smokingCount')" :placeholder="$t('smokingCount')" type="digit"
@blur="setLocalStorge('smokingCount')"
:rules="[{ required: false, message: `${$t('fillIn')}${$t('smokingCount')}` }]">
<template #extra>
{{ $t("branch") }}
</template>
</van-field>
<van-field colon clearable label-width="125px" name="whetherNoSmoking" :label="$t('whetherNoSmoking')"
v-if="whetherSmoking == $t('yes')">
<template #input>
<van-radio-group @change="
() => {
setLocalStorge('whetherNoSmoking');
if (whetherNoSmoking == $t('no')) {
noSmokingYears = ''; //戒烟年数
setValue('noSmokingYears', '');
}
}
" v-model="whetherNoSmoking" direction="horizontal">
<van-radio :name="$t('yes')">{{ $t("yes") }}</van-radio>
<van-radio :name="$t('no')">{{ $t("no") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field v-if="whetherNoSmoking == $t('yes')" colon label-width="125px" clearable v-model="noSmokingYears"
name="noSmokingYears" :label="$t('noSmokingYears')" :placeholder="$t('noSmokingYears')" type="digit"
@blur="setLocalStorge('noSmokingYears')"
:rules="[{ required: false, message: `${$t('fillIn')}${$t('noSmokingYears')}` }]">
<template #extra>
{{ $t("year") }}
</template>
</van-field>
<van-field colon clearable name="whetherPassivitySmoking" :label="$t('noSmokingYears')" label-width="125px">
<template #input>
<van-radio-group @change="
() => {
setLocalStorge('whetherPassivitySmoking');
if (whetherPassivitySmoking == $t('no')) {
passivitySmokingYears = ''; //被动吸烟年数
setValue('passivitySmokingYears', '');
}
}
" v-model="whetherPassivitySmoking" direction="horizontal">
<van-radio :name="$t('yes')">{{ $t("yes") }}</van-radio>
<van-radio :name="$t('no')">{{ $t("no") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field v-if="whetherPassivitySmoking == $t('yes')" colon label-width="125px" clearable
v-model="passivitySmokingYears" name="passivitySmokingYears" :label="$t('passivitySmokingYears')"
:placeholder="$t('passivitySmokingYears')" type="digit" @blur="setLocalStorge('passivitySmokingYears')">
<template #extra>
{{ $t("year") }}
</template>
</van-field>
<van-popup v-model="showPicker" position="bottom">
<van-datetime-picker :min-date="minDate" :max-date="maxDate" type="date" @confirm="onConfirm"
@cancel="showPicker = false" :formatter="formatter" />
</van-popup>
<van-field colon clearable name="yesOrNoCt" label-width="125px" :label="$t('yesOrNoCt')">
<template #input>
<van-radio-group @change="
() => {
setLocalStorge('yesOrNoCt');
if (yesOrNoCt == $t('noHave')) {
ChestCT = $t('noHave');
ChestCTDate = '';
setValue('ChestCT', '');
setValue('ChestCTDate', '');
}
}
" v-model="yesOrNoCt" direction="horizontal">
<van-radio :name="$t('have')">{{ $t("have") }}</van-radio>
<van-radio :name="$t('noHave')">{{ $t("noHave") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field v-if="yesOrNoCt == $t('have')" colon clearable name="ChestCT" label-width="125px"
:label="$t('ChestCT')">
<template #input>
<van-radio-group @change="
() => {
setLocalStorge('ChestCT');
}
" v-model="ChestCT" direction="horizontal">
<van-radio :name="$t('have')">{{ $t("have") }}</van-radio>
<van-radio :name="$t('noHave')">{{ $t("noHave") }}</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field v-if="yesOrNoCt == $t('have')" colon clearable readonly clickable name="ChestCTDate"
:value="ChestCTDate" :label="$t('ChestCTDate')" label-width="125px"
:placeholder="`${$t('clickSelect')}${$t('ChestCTDate')}`" @click="showCalendar = true" :rules="[
{
required: ChestCT == $t('have') ? true : false,
message: `${$t('select')}${$t('ChestCTDate')}`,
},
]" />
<van-popup v-model="showCalendar" position="bottom">
<van-datetime-picker type="date" :min-date="minChestCTDate" :max-date="maxDate" @confirm="onChestCT"
@cancel="showCalendar = false" :formatter="formatter" v-model="ChestCTDate1" />
</van-popup>
</div>
</template>
<script>
import { mapState, mapMutations } from "vuex";
import { formatDate } from "../utils/common.js";
export default {
inject: ["setLoading"],
name: "page6",
data() {
return {
hasHistoryAllergies: this.$i18n.locale == "zh" ? "无" : "يوق", //过敏史 ---默认值 无
historyAllergies: "", //过敏原
foodAllergy: "", //食物过敏
drugAllergy: "", //药物过敏
otherAllergy: "", //其他过敏
hasHistorySurgery: this.$i18n.locale == "zh" ? "无" : "يوق", //手术史---默认值 无
historySurgery: "", //具体内容
HasPreviousHistory: this.$i18n.locale == "zh" ? "无" : "يوق", //有无既往史---默认值 无
previousHistory: [], //既往史
otherPastHistory: "", //其他既往史
tuberculosisDate: "", //既往史发生时间
yesOrNoCt: this.$i18n.locale == "zh" ? "无" : "يوق", //---默认值 无
ChestCT: this.$i18n.locale == "zh" ? "无" : "يوق", //有无CT ---默认值 无
ChestCTDate: "", //CT拍照时间
whetherSmoking: "", //是否吸烟
smokingTypes: [], //烟草类型
smokingYears: "", //吸烟年数
smokingCount: "", //每天吸烟支数
whetherNoSmoking: "", //是否戒烟
noSmokingYears: "", //戒烟年数
whetherPassivitySmoking: "", //是否被动吸烟
passivitySmokingYears: "", //是否被动吸烟年数
smokingTypesList: [],
previousHistoryList: [],
showPicker: false,
showCalendar: false,
minChestCTDate: new Date(2020, 0, 1),
minDate: new Date(2010, 0, 1),
maxDate: new Date(),
deathDate2: new Date(),
ChestCTDate1: new Date(),
tuberculosisDate1: new Date(),
};
},
mounted() {
if (this.$i18n.locale == "zh") {
this.getResource();
} else {
//既往史列表
this.previousHistoryList = [
{ id: 20, element: "ئۆپكە تۇبېركۇليۇزى", sort: 1 },
{ id: 21, element: "ئاستا خارەكتىرلىق ئۆپكە توسۇلۇش", sort: 2 },
{ id: 22, element: "راك كېسىلى", sort: 3 },
{ id: 23, element: " يۈرەك كېسىلى", sort: 4 },
{ id: 24, element: "دىئابىت كېسىلى", sort: 5 },
{ id: 25, element: "قان بېسىم", sort: 6 },
{ id: 28, element: "باشقا سەۋەپ", sort: 7 },
];
//烟草类型
this.smokingTypesList = [
{element:'نورمال تاماكا'},
{element:'شۆ جيا'},
{element:'توكلۇق تاماكا'},
{element:'چىلىم'}
];
}
this.setChestCTDate();
this.setLastValue();
},
methods: {
setLastValue() {
let arr = [
"hasHistoryAllergies", //过敏史
"historyAllergies", //过敏原
"foodAllergy", //食物过敏
"drugAllergy", //药物过敏
"otherAllergy", //其他过敏
"hasHistorySurgery", //手术史
"historySurgery", //具体内容
"HasPreviousHistory", //有无既往史
"previousHistory", //既往史
"otherPastHistory", //其他既往史
"tuberculosisDate", //既往史发生时间
"yesOrNoCt",
"ChestCT", //有无CT
"ChestCTDate", //CT拍照时间
"whetherSmoking", //是否吸烟
"smokingTypes", //烟草类型
"smokingYears", //吸烟年数
"smokingCount", //每天吸烟支数
"whetherNoSmoking", //是否戒烟
"noSmokingYears", //戒烟年数
"whetherPassivitySmoking", //是否被动吸烟
"passivitySmokingYears", //是否被动吸烟年数
];
arr.map((item) => {
if (this.getLocalStorge(item)) {
// if (item == "previousHistory") {
// this[`${item}`] = this.getLocalStorge(item).split(",");
// } else if (item != "previousHistory") {
this[`${item}`] = this.getLocalStorge(item);
// }
}
});
this.tuberculosisDate = this.getLocalStorge("tuberculosisDate");
this.otherPastHistory = this.getLocalStorge("otherPastHistory");
this.foodAllergy = this.getLocalStorge("foodAllergy");
this.drugAllergy = this.getLocalStorge("drugAllergy");
this.otherAllergy = this.getLocalStorge("otherAllergy");
if (this.getLocalStorge("previousHistory")) {
this.previousHistory = this.getLocalStorge("previousHistory").split(
","
);
}
if (this.smokingTypes.length > 0) {
this.smokingTypes = this.getLocalStorge("smokingTypes").split(",");
}
inject: ["setLoading"],
name: "page6",
data() {
return {
hasHistoryAllergies: this.$i18n.locale == "zh" ? "无" : "يوق", //过敏史 ---默认值 无
historyAllergies: "", //过敏原
foodAllergy: "", //食物过敏
drugAllergy: "", //药物过敏
otherAllergy: "", //其他过敏
hasHistorySurgery: this.$i18n.locale == "zh" ? "无" : "يوق", //手术史---默认值 无
historySurgery: "", //具体内容
HasPreviousHistory: this.$i18n.locale == "zh" ? "无" : "يوق", //有无既往史---默认值 无
previousHistory: [], //既往史
otherPastHistory: "", //其他既往史
tuberculosisDate: "", //既往史发生时间
yesOrNoCt: this.$i18n.locale == "zh" ? "无" : "يوق", //---默认值 无
ChestCT: this.$i18n.locale == "zh" ? "无" : "يوق", //有无CT ---默认值 无
ChestCTDate: "", //CT拍照时间
whetherSmoking: "", //是否吸烟
smokingTypes: [], //烟草类型
smokingYears: "", //吸烟年数
smokingCount: "", //每天吸烟支数
whetherNoSmoking: "", //是否戒烟
noSmokingYears: "", //戒烟年数
whetherPassivitySmoking: "", //是否被动吸烟
passivitySmokingYears: "", //是否被动吸烟年数
smokingTypesList: [],
previousHistoryList: [],
showPicker: false,
showCalendar: false,
minChestCTDate: new Date(2020, 0, 1),
minDate: new Date(2010, 0, 1),
maxDate: new Date(),
deathDate2: new Date(),
ChestCTDate1: new Date(),
tuberculosisDate1: new Date(),
};
},
mounted() {
if (this.$i18n.locale == "zh") {
this.getResource();
} else {
//既往史列表
this.previousHistoryList = [
{ id: 20, element: "ئۆپكە تۇبېركۇليۇزى", sort: 1 },
{ id: 21, element: "ئاستا خارەكتىرلىق ئۆپكە توسۇلۇش", sort: 2 },
{ id: 22, element: "راك كېسىلى", sort: 3 },
{ id: 23, element: " يۈرەك كېسىلى", sort: 4 },
{ id: 24, element: "دىئابىت كېسىلى", sort: 5 },
{ id: 25, element: "قان بېسىم", sort: 6 },
{ id: 28, element: "باشقا سەۋەپ", sort: 7 },
];
//烟草类型
this.smokingTypesList = [
{ element: 'نورمال تاماكا' },
{ element: 'شۆ جيا' },
{ element: 'توكلۇق تاماكا' },
{ element: 'چىلىم' }
];
}
getLocalStorge(key) {
return window.localStorage.getItem(key);
},
this.setChestCTDate();
setLocalStorge(key) {
window.localStorage.setItem(key, this[`${key}`]);
this.setLastValue();
},
methods: {
setLastValue() {
let arr = [
"hasHistoryAllergies", //过敏史
"historyAllergies", //过敏原
"foodAllergy", //食物过敏
"drugAllergy", //药物过敏
"otherAllergy", //其他过敏
"hasHistorySurgery", //手术史
"historySurgery", //具体内容
"HasPreviousHistory", //有无既往史
"previousHistory", //既往史
"otherPastHistory", //其他既往史
"tuberculosisDate", //既往史发生时间
"yesOrNoCt",
"ChestCT", //有无CT
"ChestCTDate", //CT拍照时间
"whetherSmoking", //是否吸烟
"smokingTypes", //烟草类型
"smokingYears", //吸烟年数
"smokingCount", //每天吸烟支数
"whetherNoSmoking", //是否戒烟
"noSmokingYears", //戒烟年数
"whetherPassivitySmoking", //是否被动吸烟
"passivitySmokingYears", //是否被动吸烟年数
];
arr.map((item) => {
if (this.getLocalStorge(item)) {
// if (item == "previousHistory") {
// this[`${item}`] = this.getLocalStorge(item).split(",");
// } else if (item != "previousHistory") {
this[`${item}`] = this.getLocalStorge(item);
// }
}
});
this.tuberculosisDate = this.getLocalStorge("tuberculosisDate");
this.otherPastHistory = this.getLocalStorge("otherPastHistory");
this.foodAllergy = this.getLocalStorge("foodAllergy");
this.drugAllergy = this.getLocalStorge("drugAllergy");
this.otherAllergy = this.getLocalStorge("otherAllergy");
if (this.getLocalStorge("previousHistory")) {
this.previousHistory = this.getLocalStorge("previousHistory").split(
","
);
}
if (this.smokingTypes.length > 0) {
this.smokingTypes = this.getLocalStorge("smokingTypes").split(",");
}
},
setValue(key, value) {
window.localStorage.setItem(key, value);
},
getLocalStorge(key) {
return window.localStorage.getItem(key);
},
setChestCTDate() {
// this.ChestCTDate = formatDate(new Date(), "yyyy-MM-dd");
},
getResource() {
this.setLoading(true);
this.$http.get(`/Research/Resource`, {}).then((data) => {
console.log('data',data);
this.previousHistoryList = data.filter((item) => {
return item.category == "既往史";
});
this.smokingTypesList = data.filter((item) => {
return item.category == "烟草类型";
});
this.setLoading(false);
});
},
onConfirm(date) {
this.tuberculosisDate = formatDate(date, "yyyy-MM-dd");
this.setLocalStorge("tuberculosisDate");
this.showPicker = false;
},
setLocalStorge(key) {
window.localStorage.setItem(key, this[`${key}`]);
},
onChestCT(date) {
this.ChestCTDate = formatDate(date, "yyyy-MM-dd");
this.setLocalStorge("ChestCTDate");
this.showCalendar = false;
},
setValue(key, value) {
window.localStorage.setItem(key, value);
},
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;
setChestCTDate() {
// this.ChestCTDate = formatDate(new Date(), "yyyy-MM-dd");
},
getResource() {
this.setLoading(true);
this.$http.get(`/Research/Resource`, {}).then((data) => {
console.log('data', data);
this.previousHistoryList = data.filter((item) => {
return item.category == "既往史";
});
this.smokingTypesList = data.filter((item) => {
return item.category == "烟草类型";
});
this.setLoading(false);
});
},
onConfirm(date) {
this.tuberculosisDate = formatDate(date, "yyyy-MM-dd");
this.setLocalStorge("tuberculosisDate");
this.showPicker = false;
},
onChestCT(date) {
this.ChestCTDate = formatDate(date, "yyyy-MM-dd");
this.setLocalStorge("ChestCTDate");
this.showCalendar = 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;
},
},
},
computed: {},
computed: {},
};
</script>
<style lang="scss" scoped>
.page6 {
.smokingTypes {
.van-checkbox {
width: 43%;
margin-bottom: 5%;
.smokingTypes {
.van-checkbox {
width: 43%;
margin-bottom: 5%;
}
}
}
}
</style>
/*
* @Author: ninglupeng
* @Date: 2022-10-31 14:22:41
* @LastEditors: wsq
* @LastEditTime: 2022-11-04 13:50:40
* @LastEditors: ninglupeng
* @LastEditTime: 2022-11-04 16:39:58
* @Description:
*/
module.exports = {
......@@ -12,9 +12,9 @@ module.exports = {
'project': ' دوختۇرخانىغا كىرگەن ئۇچۇرنى توپلاش ',
'paragraph1': 'تىببى خادىملار دوختۇرخانىدا يېتىپ داۋالانغان مەزگىلدە ئەھۋالدىن خەۋەردار بولۇش ھوقۇقىدىن تولۇق بەھرىمان بولۇشىڭىزغا كاپالەتلىك قىلىش ئۈچۈن، كېسەللىك ئەھۋالى، ئاساسلىق داۋالاش تەدبىرلىرى، داۋالاش خەۋپ-خەتىرى قاتارلىق ئەھۋاللارنى ئۇقتۇرۇپ، كېسەللىك توغرىسىدىكى مەسلىھەتلىرىڭىزگە جاۋاب بېرىدۇ.سىزنىڭ تولۇق ئەھۋالدىن خەۋەردار بولۇشىڭنى ئالماي ۋە ئىمزا قويۇپ ماقۇللىقىڭىز ئالمايلا تىببى خادىملار ئوپېراتسىيە قىلىش قاتارلىق زور داۋالاش قىلمىشىنى قىلسا بولمايدۇ. لېكىن ھەرقايسى كىشىلەرنىڭ پسىخىكىلىق بەرداشلىق بېرىش ئىقتىدارى ئوخشىمىغاچقا ھەمدە كېسەللىكنىڭ تەرەققىياتىنى مۆلچەرلىگىلى بولمايدىغان بولغاچقا، داۋالاشقا پايدىلىق بولۇش ئۈچۈن، سىز تولۇق ئىشەنگەن بىر ۋاكالەتچىگە ھاۋالە قىلىپ، ئەھۋالدىن خەۋەردار بولۇش ھوقۇقىڭىزنى ۋاكالىتەن يۈرگۈزۈشكە ھوقۇق بېرىڭ.دوختۇرخانىمىز سىزنىڭ ئىمزا قويۇپ بەرگەن ھوقۇق ھاۋالە خېتىڭىزگە ئاساسەن، ۋاكالەتچىنىڭ ۋاكالەتچىلىك قىلمىشىغا قاراپ ئۆزىڭىزنىڭ ھەقىقىي مەنىسىگە ئاساسەن ئىپادىلىنىدۇ. ئەگەر سىزنىڭ ئاخىرقى 18 ياشقا توشقان ياكى ھەق تەلەپ قىلمىش ئىقتىدارىڭىز ۋە ھەق تەلەپ قىلمىشىنى چەكلەش ئىقتىدارىڭىز بولمىسا، سىزنىڭ قانۇندا بەلگىلەنگەن ھامىيلىقىڭىز سىزنىڭ قانۇندا بەلگىلەنگەن دەۋالاشقۇچىڭىز ئۈچۈن، ئەھۋالدىن خەۋەردار بولۇش ھوقۇقىڭىزنى ۋاكالىتەن يۈرگۈزىدۇ. ',
"paragraph2": 'دوختۇر سىزگە ئەڭ ياخشى داۋالاش لايىھىسىنى تۈزۈپ بېرىش ئۈچۈن، چوقۇم دوختۇرغا كېسەللىك ماتېرىياللىرى ۋە ئالاقىدار ئەھۋاللىرىڭىزنى ھەقىقىي تەمىنلەڭ. ',
"paragraph3": ' 特此告知 ',
"isAgree": ' 上述告知书内容本人己充分了解 ',
"paragraph2": 'دوختۇرنىڭ سىزنى ئەڭ ياخشى داۋالاش لايىھەسى تۈزۈشى ئۈچۈن ، سىز چوقۇم ئوبيېكتىپ ، دوختۇرغا ئۆزىڭىزنىڭ كېسەللىك ماتېرىيالى ۋە مۇناسىۋەتلىك ئەھۋاللارنى ئېيتىپ بېرىشىڭىز كېرەك.',
"paragraph3": ' ئالاھىدە ئۇقتۇرۇپ قويۇشى كېرەك. ',
"isAgree": ' يۇقىرىقى ئۇقتۇرۇشنىڭ مەزمۇنىنى مەن تولۇق چۈشەندىم. ',
//第三页
......@@ -28,9 +28,9 @@ module.exports = {
"agreementSign": 'بىمارنىڭ ئىمزاسى', // 患者签字
"agreementDate": 'ئىمزا قويغان ۋاقتى',// 签字日期
"countersign": '重签',//重签
"countersign": 'قايتا ئىمزا قويۇش.',//重签
"clickSign": 'بۇيەرنى بىسىپ ئىمزا قۇيۇڭ',//点击签字
"autograph": '签名',//签名
"autograph": 'ئىمزا قويۇش، قول قويۇش',//签名
"eliminate": '清除',//清除
......@@ -143,6 +143,9 @@ module.exports = {
"select": "", //请选择
"fillIn": "", //请填写
"clickSelect": "", //点击选择
}
......
......@@ -2,7 +2,7 @@
* @Author: ninglupeng
* @Date: 2022-10-31 14:22:35
* @LastEditors: ninglupeng
* @LastEditTime: 2022-11-04 10:39:55
* @LastEditTime: 2022-11-04 16:41:00
* @Description:
*/
module.exports = {
......@@ -147,4 +147,8 @@ module.exports = {
"Previousstep": '上一步',//上一步
"nextstep": '下一步',//下一步
"select": "请选择", //请选择
"fillIn": "请填写", //请填写
"clickSelect": "点击选择", //点击选择
}
\ No newline at end of file
......@@ -123,7 +123,7 @@ Vue.prototype.$deepCopy = function (data) {
/*---------使用语言包-----------*/
const i18n = new VueI18n({
locale: 'Uygur', // 语言标识
locale: 'zh', // 语言标识
//this.$i18n.locale // 通过切换locale的值来实现语言切换
messages: {
'zh': require('./lang/zh'), // 中文语言包
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment