1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<template>
<div class='h-full disease-visit' ref='list'>
<van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh'
:disabled='isRefreshDisable' style='min-height: 100%'>
<van-list
v-model:loading='loading'
:finished='finished'
:finished-text="list.length ? '没有更多了' : ''"
:immediate-check='false'
@load='onMore'
>
<div class='flex flex-col'>
<div class='flex flex-col gap-y-2.5 py-3 px-4 mb-3 doc-list-card'
v-for='item in list' :key='item.id' @click='toDetail(item)'>
<div>
<span class='label'>服务类型</span>
<span>{{ item.serveTypeName || '-' }}</span>
</div>
<div>
<span class='label'>随访日期</span>
<span>{{ item.serveDate }}</span>
</div>
<div>
<span class='label'>随访分类</span>
<span>{{ item.visitTypeName || '-' }}</span>
</div>
<div v-if='item.patientNo'>
<span class='label'>就诊号</span>
<span>{{ item.patientNo || '-' }}</span>
</div>
<div class='text-ellipsis' v-if='item.diagnose'>
<span class='label'>诊断</span>
<span>{{ item.diagnose || '-' }}</span>
</div>
<div v-if='item.bloodPressure'>
<span class='label'>血压</span>
<span>{{ item.bloodPressure || '-' }}</span>
</div>
<div>
<span class='label'>数据来源</span>
<span>{{ item.sourceName || '-' }}</span>
</div>
<div>
<span class='label'>随访医生</span>
<span>{{ item.serveDoctorName || '-' }}</span>
</div>
<div class='text-ellipsis'>
<span class='label'>随访机构</span>
<span>{{ item.serveUnitName || '-' }}</span>
</div>
<div class='divider'></div>
<div class='bt-group'>
<van-button round size='small' class='doc-btn-primary' @click='toDetail(item)'>详情
</van-button>
<!-- <van-button round size="small" class="doc-btn-primary" v-if="item.allowUpdate == 1">转诊</van-button>-->
<van-button round size='small' class='doc-btn-primary' @click='editBtn(item)'
v-if='!(item.allowUpdate !==1 || item.serveType == 5)'>修改
</van-button>
<van-button round size='small' class='doc-btn-red' @click='delBtn(item)'
v-if='!(item.allowUpdate !==1 || item.serveType == 5)'>删除
</van-button>
</div>
</div>
</div>
</van-list>
<div class='text-center shrink-0 empty' v-if='!list.length'>
<img src='@/assets/image/doctor/empty.png' alt='' style='width: 1.2rem;'>
<p>暂无数据</p>
</div>
</van-pull-refresh>
</div>
</template>
<script>
import { delDiagnose, getVisitManageList } from '@/api/doctor/disease.js'
import { useStore } from '@/doctor/store'
import { showConfirmDialog } from 'vant'
export default {
inject: ['residentInfo'],
props: {
diseaseType: Number
},
data() {
return {
store: useStore(),
list: [],
pagination: {
total: 0,
pageIndex: 1,
pageSize: 8
},
loading: false,
finished: false,
loadingRefresh: false,
isRefreshDisable: false
}
},
computed: {
residentInfoId() {
return this.residentInfo().residentInfoId
}
},
created() {
this.load()
},
mounted() {
const list = this.$refs.list
list.addEventListener('scroll', () => {
if (list.scrollTop > 0) {
this.isRefreshDisable = true
} else {
this.isRefreshDisable = false
}
})
},
methods: {
load(loading = true) {
const query = {
// pageIndex: this.pagination.pageIndex,
// pageSize: this.pagination.pageSize,
residentInfoId: this.residentInfoId,
diseaseType: this.diseaseType
}
getVisitManageList(query, loading).then(res => {
if (this.pagination.pageIndex === 1) {
this.list = []
}
this.list = this.list.concat(res.data || [])
this.pagination.total = res.data.total || 0
this.finished = this.list.length >= this.pagination.total
}).finally(() => {
this.loading = false
this.loadingRefresh = false
})
},
onMore() {
this.pagination.pageIndex++
this.load(false)
},
onRefresh() {
this.pagination.pageIndex = 1
this.load(false)
},
toDetail(record) {
if (!record) return
if (record.id == null) {
this.$message.info('暂时无法查看 详情信息')
return
} else if (record.source == 7) {
//数据来源为his时展示 `请在医生PC端查看详情`
showConfirmDialog({
message: '请在医生PC端查看详情'
}).then(() => {
}).catch((err) => {
})
} else if (record.source == 4) {
// 判断是否显示公卫随访
this.$router.push({
path: `/systemIframe/doctorGWDetail`,
query: {
src: `https://www.baidu.com/`,
pageTitle: `公卫详情`
}
})
} else {
//随访详情
this.$router.push({
path: '/doctor/followUp/detail',
query: {
relationUuid: record.relationUuid,
residentInfoId: this.residentInfoId,
diseaseType: this.diseaseType
}
})
}
},
editBtn() {
},
delBtn() {
}
},
watch: {
diseaseType() {
this.list = []
this.load()
},
'store.refreshMark'() {
this.onRefresh()
}
}
}
</script>
<style lang='less' scoped>
</style>