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
47777823
Commit
47777823
authored
Sep 06, 2024
by
songrui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
随访列表
parent
4c1ff71f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
95 additions
and
14 deletions
+95
-14
Doctor.vue
src/doctor/Doctor.vue
+1
-1
Index.vue
src/doctor/resident/Index.vue
+14
-2
Visit.vue
src/doctor/resident/Visit.vue
+79
-11
register.js
src/register.js
+1
-0
No files found.
src/doctor/Doctor.vue
View file @
47777823
...
...
@@ -51,7 +51,7 @@ export default {
let
token
=
getQueryVariable
(
'token'
)
if
(
!
token
)
{
// token = sessionStorage.getItem('token')
token
=
'8
42c7b77-9f98-43b7-bfe4-909d22472904
'
token
=
'8
3cc8934-c543-45cd-a3fd-364cf6f9739d
'
}
if
(
token
)
{
sessionStorage
.
setItem
(
'token'
,
token
)
...
...
src/doctor/resident/Index.vue
View file @
47777823
<
template
>
<div
class=
"h-full flex flex-col"
>
<van-nav-bar
title=
'居民详情'
left-text=
''
left-arrow
class=
"shrink-0"
></van-nav-bar>
<van-nav-bar
title=
'居民详情'
left-text=
''
left-arrow
class=
"shrink-0"
@
click-left=
"toBack"
></van-nav-bar>
<div
class=
"flex shrink-0 justify-center pb-1"
>
<van-tabs
v-model:active=
'activeTab'
class=
"w-1/2 top-tabs"
@
change=
"tabChange"
>
...
...
@@ -8,7 +9,7 @@
:title=
'item.title'
:name=
'item.name'
></van-tab>
</van-tabs>
</div>
<div
class=
"grow"
style=
"background-color: #f5f5f5;"
>
<div
class=
"grow"
style=
"background-color: #f5f5f5;
min-height: 0;
"
>
<router-view
v-slot=
'
{ Component }'>
<Transition
name=
'route'
mode=
'out-in'
>
<component
:is=
'Component'
/>
...
...
@@ -47,6 +48,7 @@ export default {
},
created
()
{
this
.
residentId
=
this
.
routeQuery
.
residentId
this
.
init
()
if
(
!
this
.
residentId
)
{
showNotify
({
type
:
'warning'
,
message
:
'未获取到医生信息'
,
duration
:
0
})
return
...
...
@@ -54,6 +56,13 @@ export default {
this
.
load
()
},
methods
:
{
init
()
{
if
(
this
.
$route
.
name
===
'doctor-resident-visit'
)
{
this
.
activeTab
=
'visit'
}
else
if
(
this
.
$route
.
name
===
'doctor-resident-base'
)
{
this
.
activeTab
=
'base'
}
},
tabChange
()
{
console
.
log
(
this
.
activeTab
)
const
item
=
this
.
tabList
.
find
(
e
=>
e
.
name
===
this
.
activeTab
)
...
...
@@ -71,6 +80,9 @@ export default {
this
.
baseInfo
=
res
.
data
||
{}
})
},
toBack
()
{
this
.
$router
.
go
(
-
1
)
}
}
}
</
script
>
...
...
src/doctor/resident/Visit.vue
View file @
47777823
<
template
>
<div
class=
"visit"
>
<van-tabs
v-model:active=
'activeTab'
<div
class=
"
h-full flex flex-col
visit"
>
<van-tabs
v-model:active=
'activeTab'
class=
"shrink-0"
v-if=
"tabList.length"
@
change=
"tabChange"
>
<van-tab
v-for=
'item in tabList'
:key=
"item.name"
:title=
'item.title'
:name=
'item.name'
></van-tab>
</van-tabs>
<div
class=
"card-list"
v-if=
"list.length"
>
<div
class=
"grow overflow-y-auto card-list"
v-if=
"baseInfo.id && list.length"
>
<van-list
v-model:loading=
"loading"
:finished=
"finished"
finished-text=
"没有更多了"
@
load=
"onMore"
>
<div
v-for=
'item in list'
:key=
"item.id"
class=
"p-4 mt-3 card"
>
<div
class=
'flex items-center'
>
<div
class=
'detail-left'
>
...
...
@@ -51,20 +58,31 @@
<van-divider
class=
'mt-3'
/>
<div
class=
"flex justify-end"
>
<van-button
round
type=
"primary"
class=
"card-bt"
@
click=
"toEdit(item)"
>
修改
</van-button>
<van-button
round
type=
"primary"
class=
"ml-3 card-bt"
@
click=
"toDel(item)"
>
删除
</van-button>
<van-button
round
type=
"primary"
class=
"card-bt"
style=
"margin-right: .12rem"
@
click=
"editBtn(item)"
>
修改
</van-button>
<van-button
round
type=
"primary"
class=
"card-bt"
@
click=
"delBtn(item)"
>
删除
</van-button>
</div>
<span
class=
"px-3 float-bt"
>
通用随访
</span>
</div>
</van-list>
</div>
<div
class=
"text-center empty"
v-else
>
<div
class=
"text-center
shrink-0
empty"
v-else
>
<img
src=
"@/assets/image/doctor/empty.png"
alt=
""
style=
"width: 1.2rem;"
>
<p>
暂无数据
</p>
</div>
<div
class=
"p-3 floor"
>
<van-button
round
block
type=
"primary"
class=
"card-bt"
@
click=
"addBtn"
>
新增通用随访
</van-button>
</div>
</div>
</
template
>
<
script
>
import
{
queryVisitByPage
}
from
'@/api/doctor/resident.js'
import
{
showConfirmDialog
}
from
'vant'
export
default
{
data
()
{
...
...
@@ -76,6 +94,8 @@ export default {
pageIndex
:
1
,
pageSize
:
10
},
loading
:
false
,
finished
:
false
}
},
inject
:
[
'getBaseInfo'
],
...
...
@@ -100,7 +120,7 @@ export default {
return
list
.
filter
(
e
=>
this
.
chronicTagsArray
.
includes
(
e
.
code
))
}
},
crea
ted
()
{
moun
ted
()
{
this
.
init
()
},
methods
:
{
...
...
@@ -112,9 +132,25 @@ export default {
pageIndex
:
this
.
pagination
.
pageIndex
,
pageSize
:
this
.
pagination
.
pageSize
,
}
queryVisitByPage
(
query
).
then
(
res
=>
{
queryVisitByPage
(
query
,
true
).
then
(
res
=>
{
this
.
list
=
res
.
data
.
dataList
||
[]
this
.
pagination
.
total
=
res
.
data
.
total
||
0
this
.
finished
=
this
.
list
.
length
>=
this
.
pagination
.
total
})
},
onMore
()
{
this
.
pagination
.
pageIndex
++
const
query
=
{
residentInfoId
:
this
.
baseInfo
.
residentInfoId
,
serveTypeList
:
[
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
14
],
diseaseType
:
this
.
activeTab
,
pageIndex
:
this
.
pagination
.
pageIndex
,
pageSize
:
this
.
pagination
.
pageSize
,
}
queryVisitByPage
(
query
,
false
).
then
(
res
=>
{
this
.
pagination
.
total
=
res
.
data
.
total
||
0
this
.
list
=
this
.
list
.
concat
(
res
.
data
.
dataList
||
[])
this
.
finished
=
this
.
list
.
length
>=
this
.
pagination
.
total
})
},
init
()
{
...
...
@@ -125,20 +161,35 @@ export default {
}
},
tabChange
()
{
this
.
load
()
},
toEdit
(
item
)
{
addBtn
(
)
{
},
toDel
(
item
)
{
editBtn
(
item
)
{
},
delBtn
(
item
)
{
showConfirmDialog
({
title
:
'提示'
,
message
:
'确认删除该随访记录吗?确认后将无法查看该随访信息'
}).
then
(()
=>
{
// on confirm
})
.
catch
(()
=>
{
// on cancel
})
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.card-list {
padding-bottom: 76px;
}
.card {
position: relative;
background-color: #fff;
.detail-left {
width: 8em;
...
...
@@ -151,5 +202,22 @@ export default {
border: 0;
height: 26px;
}
.float-bt {
position: absolute;
top: 10px;
right: 0;
background-color: var(--van-primary-color);
color: #fff;
border-top-left-radius: 40px;
border-bottom-left-radius: 40px;
height: 26px;
line-height: 26px;
}
}
.floor {
position: fixed;
bottom: 0;
left: 0;
right: 0;
}
</
style
>
src/register.js
View file @
47777823
import
'vant/es/toast/style/index'
import
'vant/es/notify/style/index'
import
'vant/es/dialog/style/index'
// 自定义svg 图标组件
import
DocIcon
from
'@/components/docIcon/index'
...
...
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