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
196ee02e
Commit
196ee02e
authored
Dec 04, 2024
by
gengchunlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
居民端小程序 v1.2 药物组件、模板组件、通用随访表单
parent
bfdf7a15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
94 additions
and
55 deletions
+94
-55
generalFU.js
src/api/doctor/generalFU.js
+6
-0
Doctor.vue
src/doctor/Doctor.vue
+1
-1
DocDrug.vue
src/doctor/components/docDrug/DocDrug.vue
+53
-26
temList.vue
src/doctor/components/template/temList.vue
+1
-1
Detail.vue
src/doctor/followUp/generalFU/detail/Detail.vue
+1
-1
BaseInfo.vue
src/doctor/followUp/generalFU/form/BaseInfo.vue
+5
-1
GeneralFUForm.vue
src/doctor/followUp/generalFU/form/GeneralFUForm.vue
+27
-25
GuideTextVideo.vue
src/doctor/followUp/generalFU/form/GuideTextVideo.vue
+0
-0
No files found.
src/api/doctor/generalFU.js
View file @
196ee02e
...
...
@@ -28,6 +28,12 @@ export function getUnitByName(orgName) {
return
fetchBase
({
url
:
`/tumour-admin/v1/sys-user/org-by-name/
${
orgName
}
`
})
}
// 拼音码查询药品信息
export
function
getDrug
(
code
)
{
return
fetchBase
({
url
:
`/tumour-admin/v1/remote-system/drugs/
${
code
}
`
})
}
// 根据单位id查询科室
export
function
getOfficeList
(
unitId
)
{
return
fetchBase
({
url
:
`/tumour-admin/v1/sys-user/org-office/
${
unitId
}
`
})
...
...
src/doctor/Doctor.vue
View file @
196ee02e
...
...
@@ -52,7 +52,7 @@ export default {
if
(
!
token
)
{
token
=
sessionStorage
.
getItem
(
'token'
)
if
(
process
.
env
.
NODE_ENV
!==
'production'
)
{
token
=
'
3e478192-7f9d-4d77-b36a-cb8bac2896d3
'
token
=
'
d3414706-4696-4e77-bfd4-212cdb38c4fc
'
}
}
if
(
token
)
{
...
...
src/doctor/components/docDrug/DocDrug.vue
View file @
196ee02e
<
template
>
<div>
<van-field
v-model=
'innerValue'
v-model=
'innerValue
Name
'
readonly
is-link
label=
"药品名称:"
label=
'药品名称:'
placeholder=
'请选择'
class=
'input-back mt-2 form-input'
class=
'input-back mt-2 form-input
w-full
'
@
click=
'showDrug= true'
/>
<van-popup
v-model:show=
'showDrug'
position=
'bottom'
>
<div
class=
'p-4'
>
<van-search
v-model=
"value"
:placeholder=
"placeholder"
@
search=
"onSearch"
/>
<div
class=
'pb-4 pr-4 pl-4'
>
<van-picker
class=
'mt-4'
:columns=
"array"
:columns-field-names=
"fieldNames"
@
confirm=
"drugConfirm"
@
cancel=
"showDrug = false"
/>
:columns=
'array'
:columns-field-names=
'fieldNames'
@
confirm=
'drugConfirm'
@
cancel=
'showDrug = false'
>
<template
#
columns-top
>
<van-search
v-model=
"searchStr"
:placeholder=
'placeholder'
@
search=
'onSearch'
clearable
/>
</
template
>
</van-picker>
</div>
</van-popup>
</div>
</template>
<
script
>
import
{
getDrug
}
from
'@/api/base.js'
import
{
Form
}
from
'ant-design-vue'
import
{
getDrug
}
from
'@/api/doctor/generalFU'
import
{
debounce
}
from
'@/utils/common'
export
default
{
name
:
'DocDrug'
,
...
...
@@ -35,7 +41,7 @@ export default {
fieldNames
:
{
type
:
Object
,
default
:
()
=>
{
return
{
text
:
'chemicalName'
,
values
:
'id'
}
return
{
text
:
'chemicalName'
,
value
:
'id'
}
}
}
},
...
...
@@ -43,12 +49,15 @@ export default {
data
()
{
return
{
innerValue
:
null
,
innerValueName
:
undefined
,
array
:
[],
loading
:
false
,
showDrug
:
false
,
searchStr
:
''
}
},
created
()
{
this
.
onSearch
=
debounce
(
this
.
onSearch
,
500
)
this
.
onSearch
(
''
)
},
methods
:
{
...
...
@@ -60,22 +69,24 @@ export default {
}
if
(
!
value
.
trim
())
return
this
.
loading
=
true
this
.
getData
(
value
).
then
(
res
=>
{
getDrug
(
value
).
then
(
res
=>
{
this
.
array
=
res
.
data
||
[]
if
(
this
.
array
.
length
&&
this
.
innerValue
)
{
let
list
=
this
.
array
.
filter
(
item
=>
item
.
id
==
this
.
innerValue
)
if
(
list
&&
list
.
length
)
{
this
.
innerValueName
=
list
[
0
].
chemicalName
}
}
}).
finally
(()
=>
{
this
.
loading
=
false
})
},
getData
(
query
)
{
return
getDrug
(
query
)
},
drugConfirm
(
value
)
{
this
.
$emit
(
'update:value'
,
value
)
let
option
=
this
.
array
.
find
(
e
=>
e
[
this
.
fieldNames
.
values
]
===
value
)
||
{}
this
.
$emit
(
'change'
,
option
)
if
(
!
value
)
{
this
.
onSearch
(
''
)
}
drugConfirm
({
selectedOptions
})
{
this
.
innerValueName
=
selectedOptions
[
0
].
chemicalName
this
.
$emit
(
'update:value'
,
selectedOptions
[
0
].
id
)
this
.
$emit
(
'change'
,
selectedOptions
[
0
])
this
.
searchStr
=
''
this
.
showDrug
=
false
}
},
watch
:
{
...
...
@@ -94,11 +105,17 @@ export default {
},
immediate
:
true
},
searchStr
:
{
handler
(
val
)
{
if
(
!
val
)
return
this
.
onSearch
(
val
)
}
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
'less'
scoped
>
.form-input {
padding: 8px 12px;
border-radius: 8px;
...
...
@@ -107,4 +124,14 @@ export default {
.input-back {
background: #FAFAFA;
}
//灰色
.greyColor {
color: var(--van-text-color-2);
}
//确认按钮颜色
.blueColor {
color: var(--van-primary-color)
}
</
style
>
src/doctor/components/template/temList.vue
View file @
196ee02e
<
template
>
<van-popup
v-model:show=
'innerShow'
position=
'right'
:style=
"
{ height: '100%', width: '100%' }" :overlay='false'>
<van-popup
v-model:show=
'innerShow'
position=
'right'
:style=
"
{ height: '100%', width: '100%' }" :overlay='false'
>
<div
class=
'bg flex flex-col'
>
<div
class=
'p-3 flex items-center shrink-0 justify-between title bg-white'
>
<div
@
click=
'onBack'
class=
'text-12 back-bt'
>
...
...
src/doctor/followUp/generalFU/detail/Detail.vue
View file @
196ee02e
...
...
@@ -372,7 +372,7 @@ export default {
let
par
=
{
id
:
this
.
routerDetail
.
relationId
}
getTemplateDetail
(
par
).
then
(
res
=>
{
fetchCurrencyById
(
par
).
then
(
res
=>
{
let
result
=
res
.
data
||
{}
this
.
info
=
result
this
.
dataHandle
()
...
...
src/doctor/followUp/generalFU/form/BaseInfo.vue
View file @
196ee02e
...
...
@@ -191,7 +191,11 @@
class=
'input-back mt-2 form-input'
:rules=
'rules.groupsArraysName'
@
click=
'showGroupsArrays= true'
/>
>
<
template
#
input
>
<span
class=
'text-end'
>
{{
form
.
groupsArraysName
}}
</span>
</
template
>
</van-field>
<van-popup
v-model:show=
'showGroupsArrays'
position=
'bottom'
>
<div
class=
'p-4'
>
<div
class=
'flex justify-between mb-4'
>
...
...
src/doctor/followUp/generalFU/form/GeneralFUForm.vue
View file @
196ee02e
...
...
@@ -25,27 +25,29 @@
class=
'input-back mt-2 form-input'
/>
</div>
<!-- 健康指导-->
<div
v-if=
'showTwo'
>
<div
class=
'flex justify-between items-center mt-5'
>
<div
class=
'label-title '
>
健康指导
</div>
<van-button
class=
'doc-btn-p'
@
click=
'toShowTem'
>
选择内容
</van-button>
<van-button
class=
'doc-btn-p'
@
click=
'toShowTem
(1)
'
>
选择内容
</van-button>
</div>
<div
class=
'
health
mt-2'
>
<
div
class=
'health-cell mt-2'
v-for=
'item in form.visitHealthGuideList'
>
<div
class=
'no-req-label'
v-if=
"item.name != '无'"
>
{{
item
.
name
}}
</div>
<van-field
v-model=
'item.templateContent'
rows=
'1'
autosize
type=
'textarea'
placeholder=
'请输入'
class=
'input-back mt-2 form-input'
/
>
</div>
<div
class=
'mt-2'
>
<
GuideTextVideo
:file-type=
"[1]"
:info=
"form.guide"
:content-title=
"'指导内容'"
:classify=
"1"
ref=
"guideRef"
></GuideTextVideo>
</div>
</div>
<!-- 宣教内容-->
<div
v-if=
'showThree'
>
<div
class=
'flex justify-between items-center mt-5'
>
<
div
class=
'label-title '
>
宣教内容
<
/div>
<van-button
class=
'doc-btn-p'
@
click=
'toShowTem(2)'
>
选择内容
</van-button>
</div>
</div>
<!-- 催检-->
<div
v-if=
'showFour'
>
<div
class=
'no-req-label mt-5'
>
催检内容
</div>
...
...
@@ -132,10 +134,11 @@ import { fetchDataHandle } from '@/utils/common'
import
DocImageUpload
from
'@/doctor/components/docImageUpload/DocImageUpload'
import
TemList
from
'@/doctor/components/template/temList'
import
{
getTemplateDetail
}
from
'@/api/doctor/workbench'
import
GuideTextVideo
from
'@/doctor/followUp/generalFU/form/GuideTextVideo'
export
default
{
name
:
'GeneralFUForm'
,
components
:
{
TemList
,
DocImageUpload
,
DocIcon
},
components
:
{
GuideTextVideo
,
TemList
,
DocImageUpload
,
DocIcon
},
props
:
{
info
:
{
default
:
()
=>
{
...
...
@@ -157,18 +160,11 @@ export default {
return
{
store
:
useStore
(),
form
:
{},
//展示用
imgList
:
[],
imgList2
:
[],
//input图片值
imgInputList1
:
[],
imgInputList2
:
[],
showDate
:
false
,
showTime1
:
false
,
showTem
:
false
,
currentTime1
:
null
,
showImgList
:
[],
initSwipe
:
0
,
citeInfo
:
1
,
rules
:
{
visitContent
:
[{
required
:
true
,
message
:
'请输入'
}],
nextVisitDate
:
[{
required
:
true
,
message
:
'请选择'
}]
...
...
@@ -283,7 +279,8 @@ export default {
this
.
form
.
screenTime
=
selectedValues
.
join
(
'-'
)
this
.
showTime1
=
false
},
toShowTem
()
{
toShowTem
(
val
)
{
this
.
citeInfo
=
val
this
.
showTem
=
true
},
closedTem
(
val
)
{
...
...
@@ -294,7 +291,12 @@ export default {
if
(
val
)
{
let
par
=
{
id
:
val
}
let
result
=
await
getTemplateDetail
(
par
)
console
.
log
(
result
)
//健康指导
if
(
this
.
citeInfo
==
1
)
{
}
else
{
//宣教内容
}
}
},
onSubmit
()
{
...
...
src/doctor/followUp/generalFU/form/GuideTextVideo.vue
View file @
196ee02e
This diff is collapsed.
Click to expand it.
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