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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
<template>
<div class='all-back'>
<van-pull-refresh v-model='isLoading'
success-text='刷新成功'
@refresh='onRefresh'
:disabled='isRefreshDisable'
>
<van-nav-bar title='慢病管理' left-text='' left-arrow>
<template #right>
<van-icon name='search' size='18' />
</template>
</van-nav-bar>
<div class='top-title'>
我的待随访(16)
</div>
<van-tabs v-model:active='active'>
<van-tab :title='item.title' :name='item.name' v-for='item in tabList'></van-tab>
</van-tabs>
<div
class='list-data'
v-infinite-scroll='loadMore'
:infinite-scroll-disabled='loading'
infinite-scroll-distance='10'
ref='list'
>
<div class='mt-10 white-back p-16' v-for='item in detailInfo'>
<div class='flex items-center'>
<div class='base-title'>张曼玉</div>
<div class='second-title plr-8'>24岁</div>
<div class='second-title plr-6'>男</div>
</div>
<div class='mt-3 flex items-center'>
<div class='detail-left'>
身份证号
</div>
<div class='detail-right'>
3604211901****3128
</div>
</div>
<div class='mt-3 flex items-center'>
<div class='detail-left'>
高危评估
</div>
<div class='detail-right'>
高危人群
</div>
</div>
<div class='mt-3 flex items-center'>
<div class='detail-left'>
专病高危评估
</div>
<div class='detail-right'>
高血压高危
</div>
</div>
<div class='flex' style='align-items: baseline'>
<div class='detail-left' :style="{marginTop: item.diseaseList.length ? '0px': '12px'}">
慢病标签
</div>
<div class='detail-right' style='flex: 1'>
<div class='flex items-center '
style='flex-wrap: wrap;'>
<div v-for='item1 in item.diseaseList' :class='`mt-3 ill-tabs ill-tabs-${item1.id}`'>
{{ item1.name }}
</div>
</div>
</div>
</div>
<van-divider class='mt-3' />
<div class='mt-3 flex word-right'>
<div></div>
<div>
<van-button round size='small' class='btn' @click='toGeneralDetail'>详情</van-button>
<van-button round size='small' class='btn' style='margin-left: 16px' @click='toAddGeneral'>通用随访
</van-button>
</div>
</div>
</div>
</div>
</van-pull-refresh>
</div>
</template>
<script>
import { showFailToast } from 'vant'
const tabList = [
{ title: '高血压', name: 1, num: 3 },
{ title: '糖尿病', name: 2, num: 3 },
{ title: '冠心病', name: 3, num: 3 },
{ title: '脑卒中', name: 4, num: 3 },
{ title: '慢阻肺', name: 5, num: 3 },
{ title: '慢性肾病', name: 6, num: 3 },
{ title: '血脂异常', name: 7, num: 3 }
]
export default {
name: 'List',
data() {
return {
active: 1,
tabList,
loading: false,
isLoading: false,
detailInfo: [
{
diseaseList: [
{ id: 1, name: '高血压' },
{ id: 2, name: '糖尿病' },
{ id: 3, name: '冠心病' },
{ id: 3, name: '脑卒中' },
{ id: 5, name: '慢阻肺' },
{ id: 6, name: '慢性肾病' },
{ id: 7, name: '血脂异常' }
]
},
{
diseaseList: [
{ id: 1, name: '高血压' },
{ id: 3, name: '冠心病' },
{ id: 5, name: '慢阻肺' }
]
},
{
diseaseList: [
{ id: 1, name: '高血压' },
{ id: 6, name: '慢性肾病' },
{ id: 7, name: '血脂异常' }
]
}
],
noDataShow: false,
param: {
pageIndex: 0,
pageSize: 10
},
isRefreshDisable: false,
scrollTop: 0
}
},
watch: {
scrollTop(newval) {
if (newval > 0) {
this.isRefreshDisable = true
} else {
this.isRefreshDisable = false
}
}
},
mounted() {
this.$nextTick(() => {
const list = this.$refs.list
list.addEventListener('scroll', () => {
this.scrollTop = list.scrollTop
})
})
},
methods: {
onRefresh() {
this.isLoading = true
this.loading = true
this.param.pageIndex = 1
this.getRecordInfo()
},
loadMore() {
this.loading = true
this.param.pageIndex += 1
this.getRecordInfo()
},
getRecordInfo(callBack) {
let par = {
...this.param
}
getNetworkInfoByPhone(par).then(({ data = [] }) => {
this.loading = false
if (this.isLoading) { //刷新时先赋空
this.detailInfo = []
}
this.detailInfo = this.detailInfo.concat(data.data.dataList)
if (this.detailInfo.length == 0) {
this.noDataShow = true
} else {
this.noDataShow = false
}
if (data.data && data.data.length < this.param.pageSize) {
this.loadText = '暂无更多数据'
} else {
this.loading = false
}
this.isLoading = false
callBack && callBack()
}).catch(res => {
showFailToast('系统异常,请联系客服!')
this.loading = false
this.isLoading = false
})
},
toGeneralDetail() {
this.$router.push({
path: `/doctor/followUp/generalFU/detail`
})
},
toAddGeneral() {
this.$router.push({
path: `/doctor/followUp/generalFU/add`
})
}
}
}
</script>
<style scoped lang='less'>
.all-back {
background: #F5F5F5;
.top-title {
padding: 10px 12px;
}
.white-back {
background: #FFFFFF;
}
.mt-10 {
margin-top: 10px;
}
.p-16 {
padding: 16px;
}
.plr-8 {
padding: 0px 8px;
}
.plr-6 {
padding: 0px 6px;
}
.base-title {
font-weight: bold;
font-size: 16px;
}
.second-title {
background: #F0F3FF;
line-height: 24px;
margin-left: 10px;
}
.detail-left {
width: 104px;
font-size: 14px;
color: #8C8C8C;
}
.detail-right {
font-size: 14px;
}
.ill-tabs {
line-height: 20px;
border-radius: 20px;
padding: 3px 8px 3px 8px;
}
.ill-tabs-1 {
background: #FFF2E8;
color: #F83B00;
}
.ill-tabs-2 {
margin-left: 2px;
background: #FFF1F0;
color: #F5222D;
}
.ill-tabs-3 {
margin-left: 2px;
background: #FFF0F7;
color: #F61E54;
}
.ill-tabs-4 {
margin-left: 2px;
background: #FFF7E6;
color: #D46B08;
}
.ill-tabs-5 {
margin-left: 2px;
background: #F4FFE6;
color: #A0BA01;
}
.ill-tabs-6 {
margin-left: 2px;
background: #ECEBFF;
color: #AA63E2;
}
.ill-tabs-7 {
margin-left: 2px;
background: #E6F9FF;
color: #4D86DA;
}
.word-right {
justify-content: space-between;
align-items: center;
}
.btn {
background: #F0F3FF;
color: #607FF0;
border: 0px;
line-height: 26px;
padding: 4px 8px 4px 8px;
}
.list-data {
height: calc(100vh - 140px);
overflow-y: auto;
}
}
</style>