Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
frontend-h5
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songrui
frontend-h5
Commits
c53f2faf
Commit
c53f2faf
authored
Dec 05, 2024
by
gengchunlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
居民端小程序 v1.2 通用随访字段 逻辑处理调整
parent
196ee02e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
101 additions
and
63 deletions
+101
-63
BaseInfo.vue
src/doctor/followUp/generalFU/form/BaseInfo.vue
+4
-1
CommonBottom.vue
src/doctor/followUp/generalFU/form/CommonBottom.vue
+18
-1
GeneralFUForm.vue
src/doctor/followUp/generalFU/form/GeneralFUForm.vue
+0
-0
GuideTextVideo.vue
src/doctor/followUp/generalFU/form/GuideTextVideo.vue
+62
-37
Index.vue
src/doctor/followUp/generalFU/form/Index.vue
+2
-24
common.js
src/utils/common.js
+15
-0
No files found.
src/doctor/followUp/generalFU/form/BaseInfo.vue
View file @
c53f2faf
...
@@ -532,17 +532,20 @@ export default {
...
@@ -532,17 +532,20 @@ export default {
const
{
const
{
personId
,
personId
,
visitWay
,
visitWay
,
visitWayRules
,
visitWayRules
,
groupsArrays
,
sendNumber
,
sendNumber
,
...
others
...
others
}
=
this
.
form
}
=
this
.
form
let
par
=
{
let
par
=
{
visitWay
,
visitWay
,
visitWayRules
,
visitWayRules
,
groupsArrays
,
sendNumber
,
sendNumber
,
residentInfoId
:
this
.
form
.
residentInfoId
,
residentInfoId
:
this
.
form
.
residentInfoId
,
residentsRecord
:
{
residentsRecord
:
{
...
others
,
...
others
,
groupsArrays
:
this
.
info
.
groupsArrays
,
id
:
this
.
form
.
personId
id
:
this
.
form
.
personId
}
}
}
}
...
...
src/doctor/followUp/generalFU/form/CommonBottom.vue
View file @
c53f2faf
...
@@ -251,8 +251,25 @@ export default {
...
@@ -251,8 +251,25 @@ export default {
onSubmit
()
{
onSubmit
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
.
form
.
validate
().
then
(()
=>
{
this
.
$refs
.
form
.
validate
().
then
(()
=>
{
const
{
isSmsIsWx
=
[],
...
others
}
=
this
.
form
let
isSms
=
2
let
isWx
=
2
let
wxTel
=
''
if
(
isSmsIsWx
.
length
&&
this
.
showPush
)
{
if
(
isSmsIsWx
.
includes
(
1
))
{
isWx
=
1
wxTel
=
this
.
modeEnumList
.
weixinTel
}
if
(
isSmsIsWx
.
includes
(
2
))
{
isSms
=
1
}
}
let
par
=
{
let
par
=
{
...
this
.
form
...
others
,
isSms
,
isWx
,
isSmsIsWx
,
sendNumber
:
wxTel
,
}
}
resolve
(
par
)
resolve
(
par
)
}).
catch
((
e
)
=>
{
}).
catch
((
e
)
=>
{
...
...
src/doctor/followUp/generalFU/form/GeneralFUForm.vue
View file @
c53f2faf
This diff is collapsed.
Click to expand it.
src/doctor/followUp/generalFU/form/GuideTextVideo.vue
View file @
c53f2faf
...
@@ -2,8 +2,7 @@
...
@@ -2,8 +2,7 @@
<van-form
ref=
'form'
<van-form
ref=
'form'
class=
'grow flex flex-col'
style=
'min-height: 1px;flex-wrap: nowrap;'
>
class=
'grow flex flex-col'
style=
'min-height: 1px;flex-wrap: nowrap;'
>
<div
class=
'flex flex-col'
v-if=
'fileType?.includes(1)'
>
<div
class=
'flex flex-col'
v-if=
'fileType?.includes(1)'
>
<div>
<div
class=
'health mt-2'
>
<!-- 无选项-->
<!-- 无选项-->
<div
class=
'health-cell mt-2'
v-for=
"item in form.contentList.filter(e => e.templateModeTrans == '无')"
>
<div
class=
'health-cell mt-2'
v-for=
"item in form.contentList.filter(e => e.templateModeTrans == '无')"
>
<div
class=
'no-req-label'
>
{{
contentTitle
}}
</div>
<div
class=
'no-req-label'
>
{{
contentTitle
}}
</div>
...
@@ -18,36 +17,37 @@
...
@@ -18,36 +17,37 @@
</div>
</div>
<!-- 更多选项-->
<!-- 更多选项-->
<div
class=
'health-cell mt-2'
>
<div
class=
'health-cell mt-2'
>
<div
class=
'no-req-label'
>
更多
{{
contentTitle
}}
</div>
<div
class=
'no-req-label'
>
更多
{{
contentTitle
}}
</div>
<van-field
<van-field
v-model=
'form.contentSelectName'
v-model=
'form.contentSelectName'
readonly
readonly
is-link
is-link
placeholder=
'请选择'
placeholder=
'请选择'
class=
'input-back mt-2 form-input'
class=
'input-back mt-2 form-input'
:rules=
'rules.contentSelectName'
:rules=
'rules.contentSelectName'
@
click=
'showContentSelect= true'
@
click=
'showContentSelect= true'
>
>
<template
#
input
>
<template
#
input
>
<span
class=
'text-end'
>
{{
form
.
contentSelectName
}}
</span>
<span
class=
'text-end'
>
{{
form
.
contentSelectName
}}
</span>
</
template
>
</
template
>
</van-field>
</van-field>
<van-popup
v-model:show=
'showContentSelect'
position=
'bottom'
>
<van-popup
v-model:show=
'showContentSelect'
position=
'bottom'
>
<div
class=
'p-4'
>
<div
class=
'p-4'
>
<div
class=
'flex justify-between mb-4'
>
<div
class=
'flex justify-between mb-4'
>
<div
class=
'greyColor'
@
click=
'showContentSelect = false'
>
取消
</div>
<div
class=
'greyColor'
@
click=
'showContentSelect = false'
>
取消
</div>
<div
class=
'blueColor'
@
click=
'contentSelectConfirm'
>
确认
</div>
<div
class=
'blueColor'
@
click=
'contentSelectConfirm'
>
确认
</div>
</div>
<CheckBtn
multiple
column-2
:options=
'contentArray'
v-model:value=
'checkContentSelect'
:fieldNames=
"{text: 'name', value: 'value'}"
/>
</div>
</div>
<CheckBtn
multiple
column-2
:options=
'contentArray'
v-model:value=
'checkContentSelect'
</van-popup>
:fieldNames=
"{text: 'name', value: 'value'}"
/>
</div>
</van-popup>
</div>
</div>
<div
class=
'health-cell mt-2'
v-for=
"item in form.contentList.filter(e => e.templateModeTrans != '无')"
>
<div
class=
'health-cell mt-2'
v-for=
"item in form.contentList.filter(e => e.templateModeTrans != '无')"
>
<
template
v-if=
'item.templateMode === 5'
>
<
template
v-if=
'item.templateMode === 5'
>
<div
class=
'no-req-label'
>
药物指导
</div>
<div
class=
'no-req-label'
>
药物指导
</div>
<div
v-for=
'(item, index) in form.drugsList'
:key=
'item._id'
:style=
"
{marginTop: index == 0 ? '0': '.16rem'}">
<div
v-for=
'(item, index) in form.drugsList'
:key=
'item._id'
:style=
"
{marginTop: index == 0 ? '0': '.16rem'}">
<div
class=
'text-driver'
v-if=
'index'
></div>
<div
class=
'text-driver'
v-if=
'index'
></div>
<DocDrug
v-model:value=
'item.drugsCode'
placeholder=
'拼音码查询药品'
<DocDrug
v-model:value=
'item.drugsCode'
placeholder=
'拼音码查询药品'
:valueName=
"selectData.drugsList ? selectData.drugsList[index]?.helpCode : ''"
:valueName=
"selectData.drugsList ? selectData.drugsList[index]?.helpCode : ''"
...
@@ -152,15 +152,20 @@
...
@@ -152,15 +152,20 @@
@
play=
'e => activeMediaUrl = e.annexUrl'
@
play=
'e => activeMediaUrl = e.annexUrl'
remove
remove
@
onRemove=
'getMP3RemoveInfo'
@
onRemove=
'getMP3RemoveInfo'
class=
'mt-2'
/>
/>
</div>
</div>
</div>
</div>
<div
v-if=
'fileType.includes(3)'
class=
'w-full'
>
<div
v-if=
'fileType.includes(3)'
class=
'w-full'
>
<Mp4
:files=
'_video'
:activeMediaUrl=
'activeMediaUrl'
<div
class=
'health-cell mt-2'
>
@
play=
'e => activeMediaUrl = e.annexUrl'
<div
class=
'no-req-label'
>
视频
</div>
remove
<Mp4
:files=
'_video'
:activeMediaUrl=
'activeMediaUrl'
@
onRemove=
'getMP4RemoveInfo'
@
play=
'e => activeMediaUrl = e.annexUrl'
/>
remove
@
onRemove=
'getMP4RemoveInfo'
class=
'mt-2'
/>
</div>
</div>
</div>
</van-form>
</van-form>
...
@@ -286,18 +291,37 @@ export default {
...
@@ -286,18 +291,37 @@ export default {
]
]
let
infoC
=
info
.
contentList
||
[]
let
infoC
=
info
.
contentList
||
[]
//判断父组件的数据里是否存在 无 的选项
//判断父组件的数据里是否存在 无 的选项
let
resList
=
infoC
.
filter
(
item
=>
item
.
templateMode
!=
1
)
let
resList
=
infoC
.
filter
(
item
=>
item
.
templateMode
!=
1
)
if
(
!
resList
.
length
)
{
if
(
!
resList
.
length
)
{
contentList
=
[...
initC
,
...
infoC
]
contentList
=
[...
initC
,
...
infoC
]
}
else
{
}
else
{
contentList
=
[...
infoC
]
contentList
=
[...
infoC
]
}
}
const
drugsList
=
info
?.
drugsList
?.
length
?
info
.
drugsList
.
map
(
e
=>
{
const
drugsList
=
info
?.
drugsList
?.
length
?
info
.
drugsList
.
map
(
e
=>
{
if
(
e
.
id
)
{
if
(
e
.
id
)
{
e
.
_id
=
e
.
id
e
.
_id
=
e
.
id
e
.
doseUnitName
=
this
.
store
.
getDictValue
(
this
.
store
.
getDict
(
'CP00081'
),
e
.
doseUnit
)
e
.
frequencyName
=
this
.
store
.
getDictValue
(
this
.
store
.
getDict
(
'CP00084'
),
e
.
frequency
)
e
.
usageMethodName
=
this
.
store
.
getDictValue
(
this
.
store
.
getDict
(
'CP00083'
),
e
.
usageMethod
)
}
}
return
e
return
e
})
:
[]
})
:
[]
//给更多内容赋值
let
contentSelectName
=
''
let
contentSelectNameList
=
[]
this
.
checkContentSelect
=
[]
contentList
.
forEach
(
item
=>
{
if
(
item
.
templateMode
!=
1
)
{
this
.
checkContentSelect
.
push
(
item
.
templateMode
)
contentSelectNameList
.
push
(
item
.
templateModeTrans
)
}
if
(
contentSelectNameList
&&
contentSelectNameList
.
length
)
{
contentSelectName
=
contentSelectNameList
.
join
()
}
})
const
form
=
{
const
form
=
{
id
:
info
.
id
,
id
:
info
.
id
,
templateType
:
info
.
templateType
,
templateType
:
info
.
templateType
,
...
@@ -313,7 +337,8 @@ export default {
...
@@ -313,7 +337,8 @@ export default {
// 存放上传后返回的id
// 存放上传后返回的id
_video
:
JSON
.
parse
(
JSON
.
stringify
(
info
.
_video
||
[])),
_video
:
JSON
.
parse
(
JSON
.
stringify
(
info
.
_video
||
[])),
_audio
:
JSON
.
parse
(
JSON
.
stringify
(
info
.
_audio
||
[])),
_audio
:
JSON
.
parse
(
JSON
.
stringify
(
info
.
_audio
||
[])),
drugSelect
:
1
drugSelect
:
1
,
contentSelectName
:
contentSelectName
,
}
}
return
form
return
form
},
},
...
@@ -457,7 +482,7 @@ export default {
...
@@ -457,7 +482,7 @@ export default {
const
drugsList
=
query
.
drugsList
const
drugsList
=
query
.
drugsList
let
str
=
''
let
str
=
''
drugsList
.
forEach
(
e
=>
{
drugsList
.
forEach
(
e
=>
{
str
=
`药品名:
${
e
.
drugsName
}
剂量:
${
e
.
dose
}
${
this
.
$dictValue
(
'CP00081'
,
e
.
doseUnit
)}
频次:
${
this
.
$dictValue
(
'CP00084'
,
e
.
frequency
)}
用法:
${
this
.
$d
ictValue
(
'CP00083'
,
e
.
usageMethod
)}
\n`
+
str
str
=
`药品名:
${
e
.
drugsName
}
剂量:
${
e
.
dose
}
${
this
.
store
.
getDictValue
(
'CP00081'
,
e
.
doseUnit
)}
频次:
${
this
.
store
.
getDictValue
(
'CP00084'
,
e
.
frequency
)}
用法:
${
this
.
store
.
getD
ictValue
(
'CP00083'
,
e
.
usageMethod
)}
\n`
+
str
})
})
item
.
templateContent
=
str
item
.
templateContent
=
str
}
}
...
@@ -499,7 +524,7 @@ export default {
...
@@ -499,7 +524,7 @@ export default {
const
drugsList
=
query
.
drugsList
const
drugsList
=
query
.
drugsList
let
str
=
''
let
str
=
''
drugsList
.
forEach
(
e
=>
{
drugsList
.
forEach
(
e
=>
{
str
=
`药品名:
${
e
.
drugsName
}
剂量:
${
e
.
dose
}
${
this
.
$dictValue
(
'CP00081'
,
e
.
doseUnit
)}
频次:
${
this
.
$dictValue
(
'CP00084'
,
e
.
frequency
)}
用法:
${
this
.
$d
ictValue
(
'CP00083'
,
e
.
usageMethod
)}
\n`
+
str
str
=
`药品名:
${
e
.
drugsName
}
剂量:
${
e
.
dose
}
${
this
.
store
.
getDictValue
(
'CP00081'
,
e
.
doseUnit
)}
频次:
${
this
.
store
.
getDictValue
(
'CP00084'
,
e
.
frequency
)}
用法:
${
this
.
store
.
getD
ictValue
(
'CP00083'
,
e
.
usageMethod
)}
\n`
+
str
})
})
item
.
templateContent
=
str
item
.
templateContent
=
str
}
}
...
...
src/doctor/followUp/generalFU/form/Index.vue
View file @
c53f2faf
...
@@ -186,6 +186,7 @@ export default {
...
@@ -186,6 +186,7 @@ export default {
this
.
modeEnumList
=
getModeEnum
(
this
.
info
)
this
.
modeEnumList
=
getModeEnum
(
this
.
info
)
},
},
async
toNext
(
val
)
{
async
toNext
(
val
)
{
window
.
scrollTo
(
0
,
0
)
if
(
val
==
2
)
{
if
(
val
==
2
)
{
this
.
firstForm
=
await
this
.
$refs
.
baseInfo
.
onSubmit
()
this
.
firstForm
=
await
this
.
$refs
.
baseInfo
.
onSubmit
()
}
}
...
@@ -224,33 +225,10 @@ export default {
...
@@ -224,33 +225,10 @@ export default {
let
baseInfo
=
await
this
.
$refs
.
baseInfo
.
onSubmit
()
let
baseInfo
=
await
this
.
$refs
.
baseInfo
.
onSubmit
()
let
generalFUForm
=
await
this
.
$refs
.
generalFUForm
.
onSubmit
()
let
generalFUForm
=
await
this
.
$refs
.
generalFUForm
.
onSubmit
()
let
commonBottom
=
await
this
.
$refs
.
commonBottom
.
onSubmit
()
let
commonBottom
=
await
this
.
$refs
.
commonBottom
.
onSubmit
()
let
imgInput1List
=
[]
let
imgInput2List
=
[]
let
uploadVisitRecord
=
''
let
sceneVisitImage
=
''
//图片上传
if
(
generalFUForm
.
imgInput1
.
length
)
{
imgInput1List
=
await
this
.
upload
(
generalFUForm
.
imgInput1
)
}
if
(
generalFUForm
.
imgInput2
.
length
)
{
imgInput2List
=
await
this
.
upload
(
generalFUForm
.
imgInput2
)
}
if
(
generalFUForm
.
img1
.
length
)
{
let
img1List
=
this
.
baseImgHandle
(
generalFUForm
.
img1
)
let
lsit1
=
[...
imgInput1List
,
...
img1List
]
uploadVisitRecord
=
Array
.
from
(
new
Set
(
lsit1
)).
join
()
}
if
(
generalFUForm
.
img2
.
length
)
{
let
img2List
=
this
.
baseImgHandle
(
generalFUForm
.
img2
)
let
lsit2
=
[...
imgInput2List
,
...
img2List
]
sceneVisitImage
=
Array
.
from
(
new
Set
(
lsit2
)).
join
()
}
let
params
=
{
let
params
=
{
...
baseInfo
,
...
generalFUForm
,
...
generalFUForm
,
...
commonBottom
,
...
commonBottom
,
uploadVisitRecord
,
...
baseInfo
,
sceneVisitImage
,
source
:
2
source
:
2
}
}
if
(
this
.
info
.
id
)
{
if
(
this
.
info
.
id
)
{
...
...
src/utils/common.js
View file @
c53f2faf
...
@@ -286,4 +286,18 @@ export function isResidentInfo() {
...
@@ -286,4 +286,18 @@ export function isResidentInfo() {
res
=
true
res
=
true
}
}
return
res
return
res
}
//一维数组去重
export
function
uniqueArr
(
arr
=
[],
key
=
''
)
{
let
res
=
[]
if
(
key
)
{
arr
.
forEach
(
item
=>
{
let
tmp
=
res
.
filter
(
i
=>
i
[
key
]
==
item
[
key
])
if
(
!
tmp
.
length
)
{
res
.
push
(
item
)
}
})
}
return
res
}
}
\ No newline at end of file
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