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
412b204e
Commit
412b204e
authored
Sep 05, 2024
by
songrui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
机构、医生、科室选择组件
parent
2cb0af21
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
352 additions
and
6 deletions
+352
-6
generalFU.js
src/api/doctor/generalFU.js
+16
-0
Doctor.vue
src/doctor/Doctor.vue
+1
-0
DocOffice.vue
src/doctor/components/docOffice/DocOffice.vue
+89
-0
DocOfficeDoctor.vue
src/doctor/components/docOfficeDoctor/DocOfficeDoctor.vue
+97
-0
DocUnit.vue
src/doctor/components/docUnit/DocUnit.vue
+111
-0
List.vue
src/doctor/followUp/List.vue
+4
-4
Search.vue
src/doctor/followUp/search/Search.vue
+16
-2
common.js
src/utils/common.js
+18
-0
No files found.
src/api/doctor/generalFU.js
View file @
412b204e
...
@@ -19,3 +19,18 @@ export function getResidentByPage(params) {
...
@@ -19,3 +19,18 @@ export function getResidentByPage(params) {
export
function
getVisitAll
(
params
,
loading
=
true
)
{
export
function
getVisitAll
(
params
,
loading
=
true
)
{
return
fetchBase
({
url
:
`/chronic-admin/v1/chronic-visit-task/query-all-list`
,
body
:
params
,
loading
})
return
fetchBase
({
url
:
`/chronic-admin/v1/chronic-visit-task/query-all-list`
,
body
:
params
,
loading
})
}
}
// 根据单位名称模糊查询单位信息
export
function
getUnitByName
(
orgName
)
{
return
fetchBase
({
url
:
`/tumour-admin/v1/sys-user/org-by-name/
${
orgName
}
`
})
}
// 根据单位id查询科室
export
function
getOfficeList
(
unitId
)
{
return
fetchBase
({
url
:
`/tumour-admin/v1/sys-user/org-office/
${
unitId
}
`
})
}
// 根据科室id查询医生
export
function
getOfficeDoctor
(
unitId
,
officeId
)
{
return
fetchBase
({
url
:
`/tumour-admin/v1/sys-user/org-office-doctors/
${
unitId
}
/
${
officeId
}
`
})
}
\ No newline at end of file
src/doctor/Doctor.vue
View file @
412b204e
...
@@ -25,6 +25,7 @@ export default {
...
@@ -25,6 +25,7 @@ export default {
buttonPrimaryBorderColor
:
'#607FF0'
,
buttonPrimaryBorderColor
:
'#607FF0'
,
buttonDefaultBorderColor
:
'#BFBFBF'
,
buttonDefaultBorderColor
:
'#BFBFBF'
,
buttonNormalFontSize
:
'.16rem'
,
buttonNormalFontSize
:
'.16rem'
,
loadingSpinnerColor
:
'#607FF0'
,
// 表单相关
// 表单相关
cellVerticalPadding
:
'.15rem'
,
cellVerticalPadding
:
'.15rem'
,
cellTextColor
:
'#262626'
,
cellTextColor
:
'#262626'
,
...
...
src/doctor/components/docOffice/DocOffice.vue
0 → 100644
View file @
412b204e
<
template
>
<van-popup
:show=
"innerShow"
position=
"bottom"
class=
"doc-unit"
>
<van-picker
:loading=
"loading"
title=
"科室选择"
:columns=
"array"
:columns-field-names=
"fieldNames"
v-model=
"innerValue"
@
confirm=
"onConfirm"
@
cancel=
"onCancel"
>
</van-picker>
</van-popup>
</
template
>
<
script
>
import
{
getOfficeList
}
from
'@/api/doctor/generalFU.js'
export
default
{
name
:
'DocUnit'
,
props
:
{
show
:
Boolean
,
value
:
[
String
,
Number
],
unitId
:
[
String
,
Number
],
fieldNames
:
{
type
:
Object
,
default
:
()
=>
{
return
{
text
:
'officeName'
,
value
:
'id'
}
}
}
},
emits
:
[
'update:show'
,
'update:value'
,
'change'
],
data
()
{
return
{
innerValue
:
undefined
,
array
:
[],
loading
:
false
,
}
},
computed
:
{
innerShow
()
{
return
this
.
show
},
innerUnitId
()
{
return
this
.
unitId
}
},
created
()
{
this
.
getData
()
},
methods
:
{
getData
()
{
this
.
array
=
[]
this
.
loading
=
true
getOfficeList
(
this
.
innerUnitId
).
then
(
res
=>
{
this
.
array
=
res
.
data
||
[]
}).
finally
(()
=>
{
this
.
loading
=
false
})
},
onConfirm
({
selectedValues
,
selectedOptions
})
{
this
.
$emit
(
'update:value'
,
selectedValues
[
0
])
this
.
$emit
(
'change'
,
selectedOptions
[
0
])
this
.
$emit
(
'update:show'
,
false
)
},
onCancel
()
{
this
.
$emit
(
'update:show'
,
false
)
}
},
watch
:
{
value
:
{
handler
(
value
)
{
if
(
value
==
null
)
return
this
.
innerValue
=
[
value
]
},
immediate
:
true
},
unitId
:
{
handler
()
{
this
.
getData
()
}
},
}
}
</
script
>
<
style
lang=
"less"
scoped
>
</
style
>
src/doctor/components/docOfficeDoctor/DocOfficeDoctor.vue
0 → 100644
View file @
412b204e
<
template
>
<van-popup
:show=
"innerShow"
position=
"bottom"
class=
"doc-unit"
>
<van-picker
:loading=
"loading"
title=
"医生选择"
:columns=
"array"
:columns-field-names=
"fieldNames"
v-model=
"innerValue"
@
confirm=
"onConfirm"
@
cancel=
"onCancel"
>
</van-picker>
</van-popup>
</
template
>
<
script
>
import
{
getOfficeDoctor
}
from
'@/api/doctor/generalFU.js'
export
default
{
name
:
'DocUnit'
,
props
:
{
show
:
Boolean
,
value
:
[
String
,
Number
],
unitId
:
[
String
,
Number
],
officeId
:
[
String
,
Number
],
fieldNames
:
{
type
:
Object
,
default
:
()
=>
{
return
{
text
:
'staffName'
,
value
:
'id'
}
}
}
},
emits
:
[
'update:show'
,
'update:value'
,
'change'
],
data
()
{
return
{
innerValue
:
undefined
,
array
:
[],
loading
:
false
,
}
},
computed
:
{
params
()
{
return
{
unitId
:
this
.
unitId
,
officeId
:
this
.
officeId
}
},
innerShow
()
{
return
this
.
show
},
innerUnitId
()
{
return
this
.
unitId
}
},
created
()
{
this
.
getData
()
},
methods
:
{
getData
()
{
this
.
array
=
[]
if
(
!
this
.
officeId
)
return
this
.
loading
=
true
getOfficeDoctor
(
this
.
innerUnitId
,
this
.
officeId
).
then
(
res
=>
{
this
.
array
=
res
.
data
||
[]
}).
finally
(()
=>
{
this
.
loading
=
false
})
},
onConfirm
({
selectedValues
,
selectedOptions
})
{
this
.
$emit
(
'update:value'
,
selectedValues
[
0
])
this
.
$emit
(
'change'
,
selectedOptions
[
0
])
this
.
$emit
(
'update:show'
,
false
)
},
onCancel
()
{
this
.
$emit
(
'update:show'
,
false
)
}
},
watch
:
{
value
:
{
handler
(
value
)
{
if
(
value
==
null
)
return
this
.
innerValue
=
[
value
]
},
immediate
:
true
},
params
:
{
handler
()
{
this
.
getData
()
}
},
}
}
</
script
>
<
style
lang=
"less"
scoped
>
</
style
>
src/doctor/components/docUnit/DocUnit.vue
0 → 100644
View file @
412b204e
<
template
>
<van-popup
:show=
"innerShow"
position=
"bottom"
class=
"doc-unit"
>
<van-picker
:loading=
"loading"
title=
"机构选择"
:columns=
"array"
:columns-field-names=
"fieldNames"
v-model=
"innerValue"
@
confirm=
"onConfirm"
@
cancel=
"onCancel"
>
<template
#
columns-top
>
<van-search
v-model=
"searchStr"
placeholder=
"请输入搜索关键词"
clearable
@
search=
"onSearch"
/>
</
template
>
</van-picker>
</van-popup>
</template>
<
script
>
import
{
getUnitByName
}
from
'@/api/doctor/generalFU.js'
import
{
debounce
}
from
'@/utils/common.js'
export
default
{
name
:
'DocUnit'
,
props
:
{
show
:
Boolean
,
value
:
[
String
,
Number
],
valueName
:
String
,
fieldNames
:
{
type
:
Object
,
default
:
()
=>
{
return
{
text
:
'unitName'
,
value
:
'id'
}
}
}
},
emits
:
[
'update:show'
,
'update:value'
,
'change'
],
data
()
{
return
{
innerValue
:
undefined
,
array
:
[],
loading
:
false
,
searchStr
:
''
}
},
computed
:
{
innerShow
()
{
return
this
.
show
}
},
created
()
{
this
.
onSearch
=
debounce
(
this
.
onSearch
,
500
)
this
.
onSearch
(
''
)
},
methods
:
{
onSearch
(
value
)
{
if
(
this
.
loading
)
return
this
.
array
=
[]
if
(
!
value
)
{
return
}
if
(
!
value
.
trim
())
return
this
.
loading
=
true
this
.
getData
(
value
).
then
(
res
=>
{
// console.log(res.data)
this
.
array
=
res
.
data
||
[]
}).
finally
(()
=>
{
this
.
loading
=
false
})
},
getData
(
query
)
{
return
getUnitByName
(
query
)
},
onConfirm
({
selectedValues
,
selectedOptions
})
{
this
.
$emit
(
'update:value'
,
selectedValues
[
0
])
this
.
$emit
(
'change'
,
selectedOptions
[
0
])
this
.
$emit
(
'update:show'
,
false
)
this
.
searchStr
=
''
},
onCancel
()
{
this
.
$emit
(
'update:show'
,
false
)
}
},
watch
:
{
value
:
{
handler
(
value
)
{
if
(
value
==
null
)
return
this
.
innerValue
=
[
value
]
},
immediate
:
true
},
valueName
:
{
handler
(
value
)
{
if
(
!
value
)
{
return
}
this
.
onSearch
(
value
)
},
immediate
:
true
},
searchStr
(
val
)
{
if
(
!
val
)
return
this
.
onSearch
(
val
)
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
</
style
>
src/doctor/followUp/List.vue
View file @
412b204e
...
@@ -31,18 +31,18 @@
...
@@ -31,18 +31,18 @@
</div>
</div>
<div
class=
'mt-3 flex items-center'
>
<div
class=
'mt-3 flex items-center'
>
<div
class=
'detail-left'
>
<div
class=
'detail-left'
>
高危评估
是否逾期
</div>
</div>
<div
class=
'detail-right'
>
<div
class=
'detail-right'
>
高危人群
{{ item.isOverdueName }}
</div>
</div>
</div>
</div>
<div
class=
'mt-3 flex items-center'
>
<div
class=
'mt-3 flex items-center'
>
<div
class=
'detail-left'
>
<div
class=
'detail-left'
>
专病高危评估
逾期天数
</div>
</div>
<div
class=
'detail-right'
>
<div
class=
'detail-right'
>
高血压高危
{{ item.overdueDay }} 天
</div>
</div>
</div>
</div>
<div
class=
'flex mt-3'
style=
'align-items: baseline'
>
<div
class=
'flex mt-3'
style=
'align-items: baseline'
>
...
...
src/doctor/followUp/search/Search.vue
View file @
412b204e
...
@@ -93,6 +93,11 @@
...
@@ -93,6 +93,11 @@
</div>
</div>
</div>
</div>
</div>
</div>
<van-button
round
type=
"primary"
@
click=
"() => show = true"
>
open
</van-button>
<!--
<DocUnit
v-model:show=
"show"
v-model:value=
"value1"
@
change=
"(option) => value2 = option"
/>
-->
<!--
<DocOffice
v-model:show=
"show"
v-model:value=
"value1"
@
change=
"(option) => value2 = option"
unitId=
"21649"
/>
-->
<DocOfficeDoctor
v-model:show=
"show"
v-model:value=
"value1"
@
change=
"(option) => value2 = option"
unitId=
"21649"
officeId=
"36234"
/>
{{
value1
}}
</div>
</div>
</
template
>
</
template
>
...
@@ -102,10 +107,16 @@ import { validateIdCard } from '@/utils/commonReg.js'
...
@@ -102,10 +107,16 @@ import { validateIdCard } from '@/utils/commonReg.js'
import
{
setLocalStorage
,
getLocalStorage
}
from
'@/utils/common.js'
import
{
setLocalStorage
,
getLocalStorage
}
from
'@/utils/common.js'
import
{
showFailToast
}
from
'vant'
import
{
showFailToast
}
from
'vant'
import
ChronicTag
from
'@/doctor/components/chronicTag/ChronicTag.vue'
import
ChronicTag
from
'@/doctor/components/chronicTag/ChronicTag.vue'
import
DocUnit
from
'@/doctor/components/docUnit/DocUnit.vue'
import
DocOffice
from
'@/doctor/components/docOffice/DocOffice.vue'
import
DocOfficeDoctor
from
'@/doctor/components/docOfficeDoctor/DocOfficeDoctor.vue'
export
default
{
export
default
{
components
:
{
components
:
{
ChronicTag
ChronicTag
,
DocUnit
,
DocOffice
,
DocOfficeDoctor
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -114,7 +125,10 @@ export default {
...
@@ -114,7 +125,10 @@ export default {
// 历史记录
// 历史记录
history
:
[],
history
:
[],
result
:
{},
result
:
{},
state
:
1
state
:
1
,
show
:
false
,
value1
:
undefined
,
value2
:
undefined
}
}
},
},
computed
:
{
computed
:
{
...
...
src/utils/common.js
View file @
412b204e
...
@@ -48,6 +48,24 @@ export function getLocalStorage(key) {
...
@@ -48,6 +48,24 @@ export function getLocalStorage(key) {
return
JSON
.
parse
(
result
)
return
JSON
.
parse
(
result
)
}
}
/**
* 防抖
* @param {Function} fu
* @param {Number} wait
* @returns
*/
export
function
debounce
(
fu
,
wait
=
300
)
{
let
timer
return
function
()
{
const
context
=
this
const
args
=
[...
arguments
]
if
(
timer
)
clearTimeout
(
timer
)
timer
=
setTimeout
(()
=>
{
fu
.
apply
(
context
,
args
)
},
wait
)
}
}
/**
/**
* 请求参数处理
* 请求参数处理
* @param {Object} source 原数据
* @param {Object} source 原数据
...
...
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