Commit e524f116 by wangshuangqing

添吸烟有关的字段

parent 04d82291
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: ninglupeng * @Author: ninglupeng
* @Date: 2020-11-24 16:18:58 * @Date: 2020-11-24 16:18:58
* @LastEditors: wsq * @LastEditors: wsq
* @LastEditTime: 2022-04-20 16:42:20 * @LastEditTime: 2022-05-05 21:16:16
* @Description: * @Description:
--> -->
<template> <template>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<!-- <leaveHospital v-show="page === 7"></leaveHospital> --> <!-- <leaveHospital v-show="page === 7"></leaveHospital> -->
<page7 v-show="page === 7"></page7> <page7 v-show="page === 7"></page7>
<!-- {{ symptom }} --> <!-- {{ symptom }} -->
<div class="index_form_footer" v-if="page != 1 && page != 2 && page !=7"> <div class="index_form_footer" v-if="page != 1 && page != 2 && page != 7">
<van-button <van-button
class="index_form_footer_next" class="index_form_footer_next"
round round
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
"typeOfMedicalInsurance", //医保类型 "typeOfMedicalInsurance", //医保类型
"HasSymptom", //是否有症状 "HasSymptom", //是否有症状
"otherSymptom", //其他症状 "otherSymptom", //其他症状
"otherOccupation",//其他职业 "otherOccupation", //其他职业
]) ])
.then(() => { .then(() => {
this.$store.dispatch("user/setpage", 5); this.$store.dispatch("user/setpage", 5);
...@@ -214,18 +214,27 @@ export default { ...@@ -214,18 +214,27 @@ export default {
this.$refs.vantform this.$refs.vantform
.validate([ .validate([
"hasHistoryAllergies", //过敏史 "hasHistoryAllergies", //过敏史
"historyAllergies", //过敏原
"foodAllergy", //食物过敏 "foodAllergy", //食物过敏
"drugAllergy", //药物过敏 "drugAllergy", //药物过敏
"otherAllergy", //其他过敏 "otherAllergy", //其他过敏
// "historyAllergies", //过敏原
"hasHistorySurgery", //手术史 "hasHistorySurgery", //手术史
"historySurgery", //具体内容 "historySurgery", //具体内容
"HasPreviousHistory", //有无既往史 "HasPreviousHistory", //有无既往史
"previousHistory", //既往史 "previousHistory", //既往史
"otherPastHistory", //其他既往史
"tuberculosisDate", //既往史发生时间 "tuberculosisDate", //既往史发生时间
"yesOrNoCt",
"ChestCT", //有无CT "ChestCT", //有无CT
"otherPastHistory", //其他既往史
"ChestCTDate", //CT拍照时间 "ChestCTDate", //CT拍照时间
"whetherSmoking", //是否吸烟
"smokingTypes", //烟草类型
"smokingYears", //吸烟年数
"smokingCount", //每天吸烟支数
"whetherNoSmoking", //是否戒烟
"noSmokingYears", //戒烟年数
"whetherPassivitySmoking", //是否被动吸烟
"passivitySmokingYears", //是否被动吸烟年数
]) ])
.then(() => { .then(() => {
this.$store.dispatch("user/setpage", 7); this.$store.dispatch("user/setpage", 7);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: ninglupeng * @Author: ninglupeng
* @Date: 2020-11-24 16:18:58 * @Date: 2020-11-24 16:18:58
* @LastEditors: wsq * @LastEditors: wsq
* @LastEditTime: 2022-04-20 15:51:42 * @LastEditTime: 2022-05-05 21:15:56
* @Description: * @Description:
--> -->
<template> <template>
...@@ -150,8 +150,8 @@ ...@@ -150,8 +150,8 @@
if (HasPreviousHistory == '无') { if (HasPreviousHistory == '无') {
previousHistory = []; previousHistory = [];
otherPastHistory = ''; otherPastHistory = '';
tuberculosisDate=''; tuberculosisDate = '';
setValue('previousHistory',''); setValue('previousHistory', '');
setValue('otherPastHistory', ''); setValue('otherPastHistory', '');
setValue('tuberculosisDate', ''); setValue('tuberculosisDate', '');
} }
...@@ -249,6 +249,175 @@ ...@@ -249,6 +249,175 @@
/> />
</van-popup> </van-popup>
<van-field colon clearable name="whetherSmoking" label="是否吸烟">
<template #input>
<van-radio-group
@change="
() => {
setLocalStorge('whetherSmoking');
if (whetherSmoking == '否') {
smokingTypes = []; //烟草类型
smokingYears = ''; //吸烟年数
smokingCount = ''; //吸烟支数
whetherNoSmoking = ''; //是否戒烟
setValue('smokingTypes', '');
setValue('smokingYears', '');
setValue('smokingCount', '');
setValue('whetherNoSmoking', '');
}
}
"
v-model="whetherSmoking"
direction="horizontal"
>
<van-radio name="是"></van-radio>
<van-radio name="否"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
colon
clearable
name="smokingTypes"
label="烟草类型"
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 == '是'"
colon
clearable
v-model="smokingYears"
name="smokingYears"
label="吸烟年数"
placeholder="吸烟年数"
type="digit"
@blur="setLocalStorge('smokingYears')"
:rules="[{ required: false, message: '请填写吸烟年数' }]"
>
<template #extra>
</template>
</van-field>
<van-field
v-if="whetherSmoking == '是'"
colon
clearable
v-model="smokingCount"
name="smokingCount"
label="每天吸烟支数"
placeholder="每天吸烟支数"
type="digit"
@blur="setLocalStorge('smokingCount')"
:rules="[{ required: false, message: '请填写每天吸烟支数' }]"
>
<template #extra>
</template>
</van-field>
<van-field
colon
clearable
name="whetherNoSmoking"
label="是否戒烟"
v-if="whetherSmoking == '是'"
>
<template #input>
<van-radio-group
@change="
() => {
setLocalStorge('whetherNoSmoking');
if (whetherNoSmoking == '否') {
noSmokingYears = ''; //戒烟年数
setValue('noSmokingYears', '');
}
}
"
v-model="whetherNoSmoking"
direction="horizontal"
>
<van-radio name="是"></van-radio>
<van-radio name="否"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
v-if="whetherNoSmoking == '是'"
colon
clearable
v-model="noSmokingYears"
name="noSmokingYears"
label="戒烟年数"
placeholder="戒烟年数"
type="digit"
@blur="setLocalStorge('noSmokingYears')"
:rules="[{ required: false, message: '请填写戒烟年数' }]"
>
<template #extra>
</template>
</van-field>
<van-field
colon
clearable
name="whetherPassivitySmoking"
label="是否被动吸烟"
>
<template #input>
<van-radio-group
@change="
() => {
setLocalStorge('whetherPassivitySmoking');
if (whetherPassivitySmoking == '否') {
passivitySmokingYears = ''; //被动吸烟年数
setValue('passivitySmokingYears', '');
}
}
"
v-model="whetherPassivitySmoking"
direction="horizontal"
>
<van-radio name="是"></van-radio>
<van-radio name="否"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
v-if="whetherPassivitySmoking == '是'"
colon
clearable
v-model="passivitySmokingYears"
name="passivitySmokingYears"
label="被动吸烟年数"
placeholder="被动吸烟年数"
type="digit"
@blur="setLocalStorge('passivitySmokingYears')"
>
<template #extra>
</template>
</van-field>
<van-field <van-field
colon colon
clearable clearable
...@@ -263,7 +432,7 @@ ...@@ -263,7 +432,7 @@
setLocalStorge('yesOrNoCt'); setLocalStorge('yesOrNoCt');
if (yesOrNoCt == '无') { if (yesOrNoCt == '无') {
ChestCT = '无'; ChestCT = '无';
ChestCTDate=''; ChestCTDate = '';
setValue('ChestCT', ''); setValue('ChestCT', '');
setValue('ChestCTDate', ''); setValue('ChestCTDate', '');
} }
...@@ -360,6 +529,15 @@ export default { ...@@ -360,6 +529,15 @@ export default {
yesOrNoCt: "无", yesOrNoCt: "无",
ChestCT: "无", //有无CT ChestCT: "无", //有无CT
ChestCTDate: "", //CT拍照时间 ChestCTDate: "", //CT拍照时间
whetherSmoking: "", //是否吸烟
smokingTypes: [], //烟草类型
smokingYears: "", //吸烟年数
smokingCount: "", //每天吸烟支数
whetherNoSmoking: "", //是否戒烟
noSmokingYears: "", //戒烟年数
whetherPassivitySmoking: "", //是否被动吸烟
passivitySmokingYears: "", //是否被动吸烟年数
smokingTypesList: [],
previousHistoryList: [], previousHistoryList: [],
showPicker: false, showPicker: false,
...@@ -394,6 +572,14 @@ export default { ...@@ -394,6 +572,14 @@ export default {
"yesOrNoCt", "yesOrNoCt",
"ChestCT", //有无CT "ChestCT", //有无CT
"ChestCTDate", //CT拍照时间 "ChestCTDate", //CT拍照时间
"whetherSmoking", //是否吸烟
"smokingTypes", //烟草类型
"smokingYears", //吸烟年数
"smokingCount", //每天吸烟支数
"whetherNoSmoking", //是否戒烟
"noSmokingYears", //戒烟年数
"whetherPassivitySmoking", //是否被动吸烟
"passivitySmokingYears", //是否被动吸烟年数
]; ];
arr.map((item) => { arr.map((item) => {
...@@ -405,16 +591,19 @@ export default { ...@@ -405,16 +591,19 @@ export default {
// } // }
} }
}); });
this.tuberculosisDate = this.getLocalStorge('tuberculosisDate') this.tuberculosisDate = this.getLocalStorge("tuberculosisDate");
this.otherPastHistory = this.getLocalStorge('otherPastHistory') this.otherPastHistory = this.getLocalStorge("otherPastHistory");
this.foodAllergy = this.getLocalStorge('foodAllergy') this.foodAllergy = this.getLocalStorge("foodAllergy");
this.drugAllergy = this.getLocalStorge('drugAllergy') this.drugAllergy = this.getLocalStorge("drugAllergy");
this.otherAllergy = this.getLocalStorge('otherAllergy') this.otherAllergy = this.getLocalStorge("otherAllergy");
if (this.getLocalStorge("previousHistory")) { 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) { getLocalStorge(key) {
...@@ -438,6 +627,9 @@ export default { ...@@ -438,6 +627,9 @@ export default {
this.previousHistoryList = data.filter((item) => { this.previousHistoryList = data.filter((item) => {
return item.category == "既往史"; return item.category == "既往史";
}); });
this.smokingTypesList = data.filter((item) => {
return item.category == "烟草类型";
});
this.setLoading(false); this.setLoading(false);
}); });
}, },
......
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