Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
ShanghaiGongwei
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
宁路鹏
ShanghaiGongwei
Commits
e524f116
Commit
e524f116
authored
May 05, 2022
by
wangshuangqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添吸烟有关的字段
parent
04d82291
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
222 additions
and
21 deletions
+222
-21
src/components/index.vue
+14
-5
src/components/page6.vue
+208
-16
No files found.
src/components/index.vue
View file @
e524f116
...
...
@@ -2,7 +2,7 @@
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: wsq
* @LastEditTime: 2022-0
4-20 16:42:20
* @LastEditTime: 2022-0
5-05 21:16:16
* @Description:
-->
<
template
>
...
...
@@ -22,7 +22,7 @@
<!--
<leaveHospital
v-show=
"page === 7"
></leaveHospital>
-->
<page7
v-show=
"page === 7"
></page7>
<!--
{{
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
class=
"index_form_footer_next"
round
...
...
@@ -152,7 +152,7 @@ export default {
"typeOfMedicalInsurance"
,
//医保类型
"HasSymptom"
,
//是否有症状
"otherSymptom"
,
//其他症状
"otherOccupation"
,
//其他职业
"otherOccupation"
,
//其他职业
])
.
then
(()
=>
{
this
.
$store
.
dispatch
(
"user/setpage"
,
5
);
...
...
@@ -214,18 +214,27 @@ export default {
this
.
$refs
.
vantform
.
validate
([
"hasHistoryAllergies"
,
//过敏史
"historyAllergies"
,
//过敏原
"foodAllergy"
,
//食物过敏
"drugAllergy"
,
//药物过敏
"otherAllergy"
,
//其他过敏
// "historyAllergies", //过敏原
"hasHistorySurgery"
,
//手术史
"historySurgery"
,
//具体内容
"HasPreviousHistory"
,
//有无既往史
"previousHistory"
,
//既往史
"otherPastHistory"
,
//其他既往史
"tuberculosisDate"
,
//既往史发生时间
"yesOrNoCt"
,
"ChestCT"
,
//有无CT
"otherPastHistory"
,
//其他既往史
"ChestCTDate"
,
//CT拍照时间
"whetherSmoking"
,
//是否吸烟
"smokingTypes"
,
//烟草类型
"smokingYears"
,
//吸烟年数
"smokingCount"
,
//每天吸烟支数
"whetherNoSmoking"
,
//是否戒烟
"noSmokingYears"
,
//戒烟年数
"whetherPassivitySmoking"
,
//是否被动吸烟
"passivitySmokingYears"
,
//是否被动吸烟年数
])
.
then
(()
=>
{
this
.
$store
.
dispatch
(
"user/setpage"
,
7
);
...
...
src/components/page6.vue
View file @
e524f116
...
...
@@ -2,7 +2,7 @@
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: wsq
* @LastEditTime: 2022-0
4-20 15:51:42
* @LastEditTime: 2022-0
5-05 21:15:56
* @Description:
-->
<
template
>
...
...
@@ -150,10 +150,10 @@
if (HasPreviousHistory == '无') {
previousHistory = [];
otherPastHistory = '';
tuberculosisDate
=
'';
setValue('previousHistory','');
tuberculosisDate
=
'';
setValue('previousHistory',
'');
setValue('otherPastHistory', '');
setValue('tuberculosisDate', '');
setValue('tuberculosisDate', '');
}
}
"
...
...
@@ -225,7 +225,7 @@
:rules=
"[
{
required:
HasPreviousHistory == '有' && previousHistory.includes('肺结核')
HasPreviousHistory == '有' && previousHistory.includes('肺结核')
? true
: false,
message: '请选择既往史发生时间',
...
...
@@ -249,6 +249,175 @@
/>
</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
colon
clearable
...
...
@@ -263,9 +432,9 @@
setLocalStorge('yesOrNoCt');
if (yesOrNoCt == '无') {
ChestCT = '无';
ChestCTDate
=
'';
ChestCTDate
=
'';
setValue('ChestCT', '');
setValue('ChestCTDate', '');
setValue('ChestCTDate', '');
}
}
"
...
...
@@ -360,6 +529,15 @@ export default {
yesOrNoCt
:
"无"
,
ChestCT
:
"无"
,
//有无CT
ChestCTDate
:
""
,
//CT拍照时间
whetherSmoking
:
""
,
//是否吸烟
smokingTypes
:
[],
//烟草类型
smokingYears
:
""
,
//吸烟年数
smokingCount
:
""
,
//每天吸烟支数
whetherNoSmoking
:
""
,
//是否戒烟
noSmokingYears
:
""
,
//戒烟年数
whetherPassivitySmoking
:
""
,
//是否被动吸烟
passivitySmokingYears
:
""
,
//是否被动吸烟年数
smokingTypesList
:
[],
previousHistoryList
:
[],
showPicker
:
false
,
...
...
@@ -394,6 +572,14 @@ export default {
"yesOrNoCt"
,
"ChestCT"
,
//有无CT
"ChestCTDate"
,
//CT拍照时间
"whetherSmoking"
,
//是否吸烟
"smokingTypes"
,
//烟草类型
"smokingYears"
,
//吸烟年数
"smokingCount"
,
//每天吸烟支数
"whetherNoSmoking"
,
//是否戒烟
"noSmokingYears"
,
//戒烟年数
"whetherPassivitySmoking"
,
//是否被动吸烟
"passivitySmokingYears"
,
//是否被动吸烟年数
];
arr
.
map
((
item
)
=>
{
...
...
@@ -405,16 +591,19 @@ 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'
)
if
(
this
.
getLocalStorge
(
"previousHistory"
))
{
this
.
previousHistory
=
this
.
getLocalStorge
(
"previousHistory"
).
split
(
","
);
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
(
","
);
}
},
getLocalStorge
(
key
)
{
...
...
@@ -438,6 +627,9 @@ export default {
this
.
previousHistoryList
=
data
.
filter
((
item
)
=>
{
return
item
.
category
==
"既往史"
;
});
this
.
smokingTypesList
=
data
.
filter
((
item
)
=>
{
return
item
.
category
==
"烟草类型"
;
});
this
.
setLoading
(
false
);
});
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment