替换页面列表字段翻译

parent 24df1e15
<!--
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: ninglupeng
* @LastEditTime: 2022-11-01 10:07:10
* @LastEditors: wsq
* @LastEditTime: 2022-11-04 12:46:25
* @Description:
-->
<template>
......@@ -91,7 +91,7 @@ export default {
inject: ["setLoading"],
data() {
return {
AgreementMode: "向贵院出具授权委托书指定代理人",
AgreementMode:this.$i18n.locale=='zh'?"向贵院出具授权委托书指定代理人":'دوختۇخانغا ۋاكالەتچى بەلگىلەنگەن ھوقۇق بېرىش ھاۋالە خىتى چىقىرىپ بىرىمەن',
buildingNumber: "", //楼号
agreementFloor: "", //楼层
bedNumber: "", //床号
......@@ -108,7 +108,7 @@ export default {
},
mounted() {
this.getResource();
console.log('this.$i18n.locale',this.$i18n.locale);
this.setAgreementDate();
this.setLastValue();
},
......
......@@ -2,58 +2,102 @@
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: wsq
* @LastEditTime: 2022-11-03 16:08:42
* @LastEditTime: 2022-11-04 15:47:22
* @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
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
@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
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="
<van-picker
:title="$t('nationality')"
show-toolbar
:columns="nationalityList"
@confirm="
(value, index) => {
nationality = value;
setLocalStorge('nationality');
shownationality = false;
}
" @cancel="
"
@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="[
<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="[
]"
></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>
<van-field colon clearable name="gender" :label="$t('gender')">
<template #input>
<van-radio-group @change="
<van-radio-group
@change="
() => {
setLocalStorge('gender');
if (gender == $t('boy')) {
......@@ -63,143 +107,314 @@
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>
"
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-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-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')}`}]">
<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')}` }]">
<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')">
<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
@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')">
<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
@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="[
<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,
required:
gender == $t('girl') && isConceive == $t('pregnant') ? true : false,
message: `请填写${$t('gestationalWeeks')}`,
},
]">
<template #extra>{{$t('week')}} </template>
]"
>
<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
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="
<van-picker
:title="$t('occupation')"
show-toolbar
:columns="occupationList"
@confirm="
(value, index) => {
occupation = value;
setLocalStorge('occupation');
showoccupation = false;
}
" @cancel="
"
@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="[
<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>
]"
@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" />
<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-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-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
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
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="
<van-picker
:title="$t('typeOfMedicalInsurance')"
show-toolbar
:columns="typeOfMedicalInsuranceList"
@confirm="
(value, index) => {
typeOfMedicalInsurance = value;
setLocalStorge('typeOfMedicalInsurance');
showtypeOfMedicalInsurance = false;
}
" @cancel="
"
@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
@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')">
<van-field
style="margin-left: -35px;"
colon
clearable
name="HasSymptom"
label-width="130px"
:label="$t('HasSymptom')"
>
<template #input>
<van-radio-group @change="
<van-radio-group
@change="
() => {
if (HasSymptom == $t('no')) {
symptom = [];
......@@ -210,45 +425,73 @@
}
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>
"
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="[
<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">
]"
clearable
name="symptom"
:label="$t('symptom')"
label-width="130px"
>
<template #input>
<van-checkbox-group @change="
<van-checkbox-group
@change="
() => {
setLocalStorge('symptom');
}
" v-model="symptom" direction="horizontal" class="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>
{{ 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="[
<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')}` ,
required:
symptom.includes($t('other')) && HasSymptom == $t('yes')
? true
: false,
message: `请填写${$t('otherSymptom')}`,
},
]" @blur="setLocalStorge('otherSymptom')"></van-field>
]"
@blur="setLocalStorge('otherSymptom')"
></van-field>
</div>
</template>
......@@ -263,19 +506,19 @@ export default {
data() {
return {
patientName: "", //患者姓名
orNotByEntry: "否", //近期是否由国外入境
nationality: "中国", //国籍
orNotByEntry: this.$i18n.locale == "zh" ? "否" : "ياق", //近期是否由国外入境 ---默认值 否
nationality: "", //国籍--默认值 中国
passportId: "", //护照号
age: "", //年龄
height: "", //身高
weight: "",
gender: "男", //性别
maritalStatus: "未婚", //婚姻状况
gender: this.$i18n.locale == "zh" ? "男" : "ئەر", //性别--默认值 男
maritalStatus: this.$i18n.locale == "zh" ? "未婚" : "نىكاھلانغانمىغان", //婚姻状况--默认值 未婚
birthday: "", //出生日期
isConceive: "未孕", //怀孕状况
isConceive: this.$i18n.locale == "zh" ? "未孕" : "ھامىلدار", //怀孕状况--默认值 未孕
gestationalWeeks: "", //怀孕周期
occupation: "", //职业
otherOccupation: "",//其他职业
otherOccupation: "", //其他职业
contactInformation: "", //联系方式
FamilyMembersPhone: "", //家属联系方式
// workOrNotCovid: "否",
......@@ -284,13 +527,13 @@ export default {
city: "", //籍贯 (市)
address: "", //地址
idCard: "", //身份证号
typeOfMedicalInsurance: "上海医保", //医保类型
insurance: "无", //商业保险
typeOfMedicalInsurance: this.$i18n.locale == "", //医保类型---默认值 上海医保
insurance: this.$i18n.locale == "zh" ? "无" : "يوق", //商业保险---默认值 无
HasSymptom: "否", //有无症状
HasSymptom: this.$i18n.locale == "zh" ? "否" : "ياق", //有无症状---默认值 否
symptom: [], //患者症状
otherSymptom: "", //其他症状
symptomList: [],//症状列表
symptomList: [], //症状列表
areaList, //地址数据选项列表
showArea: false, //控制地址弹窗
......@@ -308,7 +551,49 @@ export default {
};
},
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: {
......@@ -320,9 +605,9 @@ export default {
"patientName", //患者姓名
"nationality", //国籍
"passportId", //护照号
"HasSymptom",//是否有症状
"otherSymptom",//其他症状
"otherOccupation",//其他职业
"HasSymptom", //是否有症状
"otherSymptom", //其他症状
"otherOccupation", //其他职业
"age", //年龄
"gender", //性别
"height", //身高
......@@ -341,7 +626,6 @@ export default {
"idCard", //身份证号
"typeOfMedicalInsurance", //医保类型
"insurance", //商业保险
];
arr.map((item) => {
......@@ -401,15 +685,15 @@ export default {
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;
});
......
......@@ -2,100 +2,215 @@
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: wsq
* @LastEditTime: 2022-11-03 16:43:33
* @LastEditTime: 2022-11-04 15:59:06
* @Description:
-->
<template>
<div class="page5">
<van-field colon clearable name="HasOnlineClass" label-width="130px" :label="$t('HasOnlineClass')">
<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
@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
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-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;">
<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
@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')}`}]">
<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
@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="[
<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>
{ 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-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-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-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-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-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-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
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')" >
<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="
<van-radio-group
@change="
() => {
setLocalStorge('hasCOVIDVaccine');
......@@ -108,33 +223,61 @@
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>
"
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
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')"
<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="
<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>
......@@ -143,26 +286,56 @@
</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="[
<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="[
]"
@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-datetime-picker
type="date"
v-model="vaccineDate1"
:min-date="minVaccineDate"
:max-date="maxDate"
@confirm="onVaccineDate"
@cancel="showVaccineDate = false"
:formatter="formatter"
/>
</van-popup>
</div>
</template>
......@@ -176,21 +349,21 @@ export default {
name: "page5",
data() {
return {
workOrNotCovid: "否",//是否需要接触新冠
HasOnlineClass: "否", //是否上网课
purpose: "学习", // 来沪目的
thirtyDays: "是", //近三十天内无离开上海
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: "否", //有无症状
// HasSymptom: "否", //有无症状--- 默认值 否
// symptom: [], //患者症状
// otherSymptom: "", //其他症状
//symptomList: [],
hasCOVIDVaccine: "是",
hasCOVIDVaccine: this.$i18n.locale == "zh" ? "是" : "بار", //--- 默认值 是
covidVaccine: "", //接种针数
vaccineType: [], //疫苗公司
othervaccines: "", //其他疫苗
......@@ -198,12 +371,20 @@ export default {
vaccineTypeList: [],
showNormalDate: false, //未发生异常时间弹窗
showUnusualDate: false, //核酸时间弹窗
showInHospitalDate: false, //120时间弹窗
showVaccineDate: false, //120时间弹窗
purposeList: ["学习", "工作", "旅游", "商务", "其他"],
purposeList:
this.$i18n.locale == "zh"
? ["学习", "工作", "旅游", "商务", "其他"]
: [
"ئوقۇش سەۋەپ بىلەن",
"خىزمەت سەۋەپ بىلەن",
"ساياھەت قىلىش ئۈچۈن",
"سودا ئۈچۈن",
"باشقا سەۋەپ",
],
minNormalDate: new Date(2021, 0, 1),
minUnusualDate: new Date(2021, 0, 1),
minInHospitalDate: new Date(2021, 0, 1),
......@@ -220,7 +401,23 @@ export default {
};
},
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();
......@@ -243,7 +440,7 @@ export default {
"vaccineType",
"beforeIsolationPoint", //之前隔离点
"HasSymptom", //有无症状
"hasCOVIDVaccine",//是否接种过疫苗
"hasCOVIDVaccine", //是否接种过疫苗
"covidVaccine", //接种针数
"othervaccines", //其他疫苗
"vaccineDate", //最后一次接种日期
......@@ -257,7 +454,6 @@ export default {
if (this.getLocalStorge("vaccineType")) {
this.vaccineType = this.getLocalStorge("vaccineType").split(",");
}
},
......@@ -300,7 +496,6 @@ export default {
this.vaccineTypeList = data.filter((item) => {
return item.category == "新冠疫苗种类";
});
this.setLoading(false);
});
},
......@@ -356,6 +551,5 @@ export default {
margin-bottom: 5%;
}
}
}
</style>
......@@ -2,14 +2,21 @@
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: wsq
* @LastEditTime: 2022-11-03 15:14:27
* @LastEditTime: 2022-11-04 15:59:15
* @Description:
-->
<template>
<div class="page6">
<van-field colon clearable name="hasHistoryAllergies" label-width="125px" :label="$t('hasHistoryAllergies')">
<van-field
colon
clearable
name="hasHistoryAllergies"
label-width="125px"
:label="$t('hasHistoryAllergies')"
>
<template #input>
<van-radio-group @change="
<van-radio-group
@change="
() => {
setLocalStorge('hasHistoryAllergies');
if (hasHistoryAllergies == $t('noHave')) {
......@@ -21,34 +28,66 @@
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>
"
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
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
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
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')">
<van-field
colon
clearable
name="hasHistorySurgery"
label-width="125px"
:label="$t('hasHistorySurgery')"
>
<template #input>
<van-radio-group @change="
<van-radio-group
@change="
() => {
setLocalStorge('hasHistorySurgery');
if (hasHistorySurgery == $t('noHave')) {
......@@ -57,26 +96,45 @@
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>
"
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="[
<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')">
<van-field
colon
clearable
name="HasPreviousHistory"
label-width="125px"
:label="$t('HasPreviousHistory')"
>
<template #input>
<van-radio-group @change="
<van-radio-group
@change="
() => {
setLocalStorge('HasPreviousHistory');
if (HasPreviousHistory == $t('noHave')) {
......@@ -88,22 +146,35 @@
setValue('tuberculosisDate', '');
}
}
" v-model="HasPreviousHistory" direction="horizontal">
<van-radio :name="$t('have')">{{ $t('have') }}</van-radio>
"
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="[
<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-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">{{
......@@ -115,36 +186,71 @@
</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="[
<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="[
]"
@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('肺结核')
HasPreviousHistory != $t('noHave') &&
previousHistory.includes('肺结核')
? true
: false,
message: `请选择${$t('tuberculosisDate')}`,
},
]" name="tuberculosisDate" :value="tuberculosisDate" :label="$t('tuberculosisDate')" :placeholder="`点击选择${$t('tuberculosisDate')}`"
@click="showPicker = true" />
]"
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-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">
<van-field
colon
clearable
name="whetherSmoking"
:label="$t('whetherSmoking')"
label-width="125px"
>
<template #input>
<van-radio-group @change="
<van-radio-group
@change="
() => {
setLocalStorge('whetherSmoking');
if (whetherSmoking == $t('no')) {
......@@ -158,16 +264,30 @@
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>
"
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 == '是'">
<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">
<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
......@@ -177,26 +297,53 @@
</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')}`}]">
<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')}}
{{ $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')}` }]">
<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')}}
{{ $t("branch") }}
</template>
</van-field>
<van-field colon clearable label-width="125px" name="whetherNoSmoking" :label="$t('whetherNoSmoking')"
v-if="whetherSmoking == $t('yes')">
<van-field
colon
clearable
label-width="125px"
name="whetherNoSmoking"
:label="$t('whetherNoSmoking')"
v-if="whetherSmoking == $t('yes')"
>
<template #input>
<van-radio-group @change="
<van-radio-group
@change="
() => {
setLocalStorge('whetherNoSmoking');
if (whetherNoSmoking == $t('no')) {
......@@ -204,24 +351,44 @@
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>
"
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')}` }]">
<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')}}
{{ $t("year") }}
</template>
</van-field>
<van-field colon clearable name="whetherPassivitySmoking" :label="$t('noSmokingYears')" label-width="125px">
<van-field
colon
clearable
name="whetherPassivitySmoking"
:label="$t('noSmokingYears')"
label-width="125px"
>
<template #input>
<van-radio-group @change="
<van-radio-group
@change="
() => {
setLocalStorge('whetherPassivitySmoking');
if (whetherPassivitySmoking == $t('no')) {
......@@ -229,30 +396,54 @@
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>
"
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')">
<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')}}
{{ $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-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')">
<van-field
colon
clearable
name="yesOrNoCt"
label-width="125px"
:label="$t('yesOrNoCt')"
>
<template #input>
<van-radio-group @change="
<van-radio-group
@change="
() => {
setLocalStorge('yesOrNoCt');
if (yesOrNoCt == $t('noHave')) {
......@@ -262,38 +453,69 @@
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>
"
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')">
<van-field
v-if="yesOrNoCt == $t('have')"
colon
clearable
name="ChestCT"
label-width="125px"
:label="$t('ChestCT')"
>
<template #input>
<van-radio-group @change="
<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>
"
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="[
<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-datetime-picker
type="date"
:min-date="minChestCTDate"
:max-date="maxDate"
@confirm="onChestCT"
@cancel="showCalendar = false"
:formatter="formatter"
v-model="ChestCTDate1"
/>
</van-popup>
</div>
</template>
......@@ -306,22 +528,22 @@ export default {
name: "page6",
data() {
return {
hasHistoryAllergies: "无", //过敏史
hasHistoryAllergies: this.$i18n.locale == "zh" ? "无" : "يوق", //过敏史 ---默认值 无
historyAllergies: "", //过敏原
foodAllergy: "", //食物过敏
drugAllergy: "", //药物过敏
otherAllergy: "", //其他过敏
hasHistorySurgery: "无", //手术史
hasHistorySurgery: this.$i18n.locale == "zh" ? "无" : "يوق", //手术史---默认值 无
historySurgery: "", //具体内容
HasPreviousHistory: "无", //有无既往史
HasPreviousHistory: this.$i18n.locale == "zh" ? "无" : "يوق", //有无既往史---默认值 无
previousHistory: [], //既往史
otherPastHistory: "", //其他既往史
tuberculosisDate: "", //既往史发生时间
yesOrNoCt: "无",
ChestCT: "无", //有无CT
yesOrNoCt: this.$i18n.locale == "zh" ? "无" : "يوق", //---默认值 无
ChestCT: this.$i18n.locale == "zh" ? "无" : "يوق", //有无CT ---默认值 无
ChestCTDate: "", //CT拍照时间
whetherSmoking: "", //是否吸烟
smokingTypes: [], //烟草类型
......@@ -346,7 +568,28 @@ export default {
};
},
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();
......@@ -387,22 +630,21 @@ export default {
// }
}
});
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')
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(",");
this.previousHistory = this.getLocalStorge("previousHistory").split(
","
);
}
if (this.smokingTypes.length > 0) {
this.smokingTypes = this.getLocalStorge("smokingTypes").split(",");
}
},
getLocalStorge(key) {
return window.localStorage.getItem(key);
},
......@@ -421,6 +663,8 @@ export default {
getResource() {
this.setLoading(true);
this.$http.get(`/Research/Resource`, {}).then((data) => {
console.log('data',data);
this.previousHistoryList = data.filter((item) => {
return item.category == "既往史";
});
......
/*
* @Author: ninglupeng
* @Date: 2022-10-31 14:22:41
* @LastEditors: ninglupeng
* @LastEditTime: 2022-11-04 10:39:05
* @LastEditors: wsq
* @LastEditTime: 2022-11-04 13:50:40
* @Description:
*/
module.exports = {
......@@ -65,14 +65,14 @@ module.exports = {
"typeOfMedicalInsurance": "داۋالىنىش سۇغۇرتىسى تىپى", //医保类型
"insurance": "سودا سۇغۇرتىسى", //商业保险
"boy": 'ئەر',
"girl": 'ئايال',
"boy": 'ئەر',//男
"girl": 'ئايال',//女
"Nonpregnant": 'ھامىلدار ئەمەس',
"pregnant": 'ھامىلدار',
"Nonpregnant": 'ھامىلدار ئەمەس',//未孕
"pregnant": 'ھامىلدار',//已孕
"unmarried": 'نىكاھلانغانمىغان',
"married": 'نىكاھلانغان',
"unmarried": 'نىكاھلانغانمىغان',//未婚
"married": 'نىكاھلانغان',//已婚
//第五页
"HasOnlineClass": "تور دەرىسى ئوقامدۇ?", // 是否上网课
......@@ -131,12 +131,12 @@ module.exports = {
"concludingRemarks": 'سىز بۇ قېتىمقى تولدۇرۇش مەزمۇنىنى تاماملاپ بولدىڭىز، ياردىمىڭىز ۋە قوللىغىنىڭىزغا رەھمەت.',//您已完成本次填写内容 ,感谢您的帮助和支持
"goBack": 'ئالدىغا قايتىش',//返回
"yes": 'ھە ئە',//是
"yes": 'بار',//是
"no": "ياق",//否
"have": "بار ",//有
"noHave": "يوق ",//无
"have": "بار",//有
"noHave": "يوق",//无
"other": "باشقا سەۋەپ",//其他
"week": 'جۇڭگو',//周
"week": 'ھەپتە',//周
"China": 'جۇڭگو',//中国
"Previousstep": 'ئالدىنقى قەدەم',//上一步
"nextstep": 'كېيىنكى قەدەم',//下一步
......
......@@ -123,7 +123,7 @@ Vue.prototype.$deepCopy = function (data) {
/*---------使用语言包-----------*/
const i18n = new VueI18n({
locale: 'zh', // 语言标识
locale: 'Uygur', // 语言标识
//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