|
@@ -0,0 +1,497 @@
|
|
1
|
+<template>
|
|
2
|
+ <div class="inspection">
|
|
3
|
+ <div class="el_table">
|
|
4
|
+ <el-table
|
|
5
|
+ :data="tableData" border
|
|
6
|
+ style="width: 100%"
|
|
7
|
+ :header-cell-style="{'text-align':'center'}"
|
|
8
|
+ :cell-style="{'text-align':'center'}"
|
|
9
|
+ >
|
|
10
|
+ <el-table-column
|
|
11
|
+ prop="name"
|
|
12
|
+ label="检验项目"
|
|
13
|
+ width="">
|
|
14
|
+ <template slot-scope="scope">
|
|
15
|
+ <div @click="row_name(scope.row)">{{ scope.row.name }}</div>
|
|
16
|
+ </template>
|
|
17
|
+ </el-table-column>
|
|
18
|
+ <el-table-column
|
|
19
|
+ prop="count"
|
|
20
|
+ label="次数"
|
|
21
|
+ width="80">
|
|
22
|
+ </el-table-column>
|
|
23
|
+ <el-table-column
|
|
24
|
+ prop="date"
|
|
25
|
+ label="最近一次检验日期">
|
|
26
|
+ </el-table-column>
|
|
27
|
+ </el-table>
|
|
28
|
+ </div>
|
|
29
|
+ <div class="checkBox1" @click="goCheck" ref="moveBtn2" >
|
|
30
|
+ <img src="../../../assets/images/his5.png" @mousedown="down" @touchstart="down"
|
|
31
|
+ @mousemove="move"
|
|
32
|
+ @touchmove="move"
|
|
33
|
+ @mouseup="end"
|
|
34
|
+ @touchend="end"
|
|
35
|
+ @touchcancel="end"
|
|
36
|
+ alt="">
|
|
37
|
+ </div>
|
|
38
|
+ <!-- <div> -->
|
|
39
|
+ <!-- <div class="toolBox">
|
|
40
|
+ <div class="toolOne" @click="typeShow = true">
|
|
41
|
+ <div style="display: flex;align-items: center;">
|
|
42
|
+ {{ type }}
|
|
43
|
+ <van-icon name="arrow-down" />
|
|
44
|
+ </div>
|
|
45
|
+ </div>
|
|
46
|
+ <div class="toolOne" @click="startShow = true">
|
|
47
|
+ <div style="display: flex;align-items: center;">
|
|
48
|
+ {{ startTime }}
|
|
49
|
+ <van-icon name="arrow-down" />
|
|
50
|
+ </div>
|
|
51
|
+ </div>
|
|
52
|
+ <div class="toolOne" @click="endShow = true">
|
|
53
|
+ <div style="display: flex;align-items: center;">
|
|
54
|
+ {{ endTime }}
|
|
55
|
+ <van-icon name="arrow-down" />
|
|
56
|
+ </div>
|
|
57
|
+ </div>
|
|
58
|
+ </div> -->
|
|
59
|
+
|
|
60
|
+ <!-- <div class="adviceBox" v-if="Inspection.length > 0">
|
|
61
|
+ <van-list
|
|
62
|
+ v-model="loading"
|
|
63
|
+ :finished="finished"
|
|
64
|
+ finished-text="没有更多了"
|
|
65
|
+ style="width: 100%;height: 100%;overflow-y: auto;"
|
|
66
|
+ >
|
|
67
|
+ <div class="adviceMain">
|
|
68
|
+ <div class="adviceOne" v-for="(item, index) in Inspection" :key="index" >
|
|
69
|
+ <div class="adviceTitle">
|
|
70
|
+ <p>{{ getTime(item.inspect_date) }}</p>
|
|
71
|
+ <van-icon
|
|
72
|
+ class="ellipsis"
|
|
73
|
+ name="ellipsis"
|
|
74
|
+ @click="Delete(item.inspect_date, index)"
|
|
75
|
+ />
|
|
76
|
+ </div>
|
|
77
|
+ <div class="orderContent" @click="toInspection(item.inspect_date)">
|
|
78
|
+ <div class="flexBox" v-for="(it, i) in item.child" :key="i">
|
|
79
|
+ <p>{{ it }}</p>
|
|
80
|
+ <van-icon
|
|
81
|
+ class="ellipsis"
|
|
82
|
+ name="ellipsis"
|
|
83
|
+ @click="DeleteOne(it, item.inspect_date, i)"
|
|
84
|
+ />
|
|
85
|
+ </div>
|
|
86
|
+ </div>
|
|
87
|
+ <div class="all" @click="toInspection(item.inspect_date)">全部</div>
|
|
88
|
+ </div>
|
|
89
|
+ </div>
|
|
90
|
+ </van-list>
|
|
91
|
+ </div>
|
|
92
|
+
|
|
93
|
+ <div class="noimgBox" v-else>
|
|
94
|
+ <img src="../../../assets/images/none.png" alt />
|
|
95
|
+ </div>
|
|
96
|
+ </div> -->
|
|
97
|
+ <!-- <div class="add">
|
|
98
|
+ <div style="display: flex;align-items: center;">
|
|
99
|
+ <van-icon class="addIcon" name="add" />新增
|
|
100
|
+ </div>
|
|
101
|
+ </div>-->
|
|
102
|
+
|
|
103
|
+ <!-- 弹出层 -->
|
|
104
|
+ <!-- <div>
|
|
105
|
+ <van-popup
|
|
106
|
+ get-container="#app"
|
|
107
|
+ v-model="typeShow"
|
|
108
|
+ position="bottom"
|
|
109
|
+ :style="{ height: '40%' }"
|
|
110
|
+ >
|
|
111
|
+ <van-picker
|
|
112
|
+ show-toolbar
|
|
113
|
+ :columns="columns"
|
|
114
|
+ @cancel="onCancel"
|
|
115
|
+ @confirm="onConfirm"
|
|
116
|
+ />
|
|
117
|
+ </van-popup>
|
|
118
|
+ <van-popup
|
|
119
|
+ get-container="#app"
|
|
120
|
+ v-model="startShow"
|
|
121
|
+ position="bottom"
|
|
122
|
+ :style="{ height: '40%' }"
|
|
123
|
+ >
|
|
124
|
+ <van-datetime-picker
|
|
125
|
+ v-model="currentDate"
|
|
126
|
+ type="date"
|
|
127
|
+ :min-date="minDate"
|
|
128
|
+ :max-date="maxDate"
|
|
129
|
+ @confirm="getstartTime"
|
|
130
|
+ @cancel="startShow = false"
|
|
131
|
+ />
|
|
132
|
+ </van-popup>
|
|
133
|
+ <van-popup v-model="endShow" get-container="#app" position="bottom" :style="{ height: '40%' }">
|
|
134
|
+ <van-datetime-picker
|
|
135
|
+ v-model="currentDate"
|
|
136
|
+ type="date"
|
|
137
|
+ :min-date="minDate"
|
|
138
|
+ :max-date="maxDate"
|
|
139
|
+ @confirm="getstartTime2"
|
|
140
|
+ @cancel="endShow = false"
|
|
141
|
+ />
|
|
142
|
+ </van-popup>
|
|
143
|
+ <van-action-sheet
|
|
144
|
+ get-container="#app"
|
|
145
|
+ v-model="newShow"
|
|
146
|
+ :actions="actions"
|
|
147
|
+ cancel-text="取消"
|
|
148
|
+ @select="toDelete"
|
|
149
|
+ />
|
|
150
|
+ <van-action-sheet
|
|
151
|
+ get-container="#app"
|
|
152
|
+ v-model="newShowOne"
|
|
153
|
+ :actions="actions1"
|
|
154
|
+ cancel-text="取消"
|
|
155
|
+ @select="DeleteInspectionOne"
|
|
156
|
+ />
|
|
157
|
+ </div> -->
|
|
158
|
+ </div>
|
|
159
|
+</template>
|
|
160
|
+
|
|
161
|
+<script>
|
|
162
|
+import {getinspectiongroup} from '@/api/patient/patient'
|
|
163
|
+import { uParseTime } from '@/utils/tools'
|
|
164
|
+import { Dialog } from 'vant'
|
|
165
|
+const moment = require('moment')
|
|
166
|
+export default {
|
|
167
|
+ props: {
|
|
168
|
+ active: Number,
|
|
169
|
+ patientName:String
|
|
170
|
+ },
|
|
171
|
+ data () {
|
|
172
|
+ return {
|
|
173
|
+ loading: false,
|
|
174
|
+ finished: false,
|
|
175
|
+ newShow: false,
|
|
176
|
+ newShowOne: false,
|
|
177
|
+ typeShow: false,
|
|
178
|
+ startShow: false,
|
|
179
|
+ endShow: false,
|
|
180
|
+ type: '全部',
|
|
181
|
+ columns: [],
|
|
182
|
+ startTime: '请选择',
|
|
183
|
+ endTime: '请选择',
|
|
184
|
+ minDate: new Date(1970, 0, 1),
|
|
185
|
+ maxDate: new Date(2025, 10, 1),
|
|
186
|
+ currentDate: new Date(),
|
|
187
|
+ actions: [{ name: '查看全部' }, { name: '全部删除' }],
|
|
188
|
+ actions1: [{ name: '删除' }],
|
|
189
|
+ showOne: true,
|
|
190
|
+ showTwo: false,
|
|
191
|
+ list: [],
|
|
192
|
+ page: 1,
|
|
193
|
+ limit: 10,
|
|
194
|
+ total: 0,
|
|
195
|
+ Inspection: [],
|
|
196
|
+ project_id: 0,
|
|
197
|
+ patientid: 0,
|
|
198
|
+ checkdata: [],
|
|
199
|
+ date: 0,
|
|
200
|
+ index: 0,
|
|
201
|
+ name: '',
|
|
202
|
+ date: '',
|
|
203
|
+ index: '',
|
|
204
|
+ restatus: 0,
|
|
205
|
+
|
|
206
|
+ route_date:null,
|
|
207
|
+ route_name:'',
|
|
208
|
+ route_id:0,
|
|
209
|
+ tableData:[],
|
|
210
|
+ moveBtn: {},
|
|
211
|
+ position: {
|
|
212
|
+ x: 0,
|
|
213
|
+ y: 0
|
|
214
|
+ },
|
|
215
|
+ nx: '',
|
|
216
|
+ ny: '',
|
|
217
|
+ dx: '',
|
|
218
|
+ dy: '',
|
|
219
|
+ xPum: '',
|
|
220
|
+ yPum: '',
|
|
221
|
+ }
|
|
222
|
+ },
|
|
223
|
+ mounted(){
|
|
224
|
+ this.moveBtn = this.$refs.moveBtn2
|
|
225
|
+ if (sessionStorage.getItem('checkBtnTop1')) {
|
|
226
|
+ this.moveBtn.style.top = sessionStorage.getItem('checkBtnTop1')
|
|
227
|
+ this.moveBtn.style.bottom = 'initial'
|
|
228
|
+ }
|
|
229
|
+ if (sessionStorage.getItem('checkBtnLeft1')) {
|
|
230
|
+ this.moveBtn.style.left = sessionStorage.getItem('checkBtnLeft1')
|
|
231
|
+ }
|
|
232
|
+ window.addEventListener('scroll', this.handleScroll)
|
|
233
|
+ // this.appSource()
|
|
234
|
+ const originHeight = document.documentElement.clientHeight || document.body.clientHeight
|
|
235
|
+ window.addEventListener('resize', () => {
|
|
236
|
+ const resizeHeight = document.documentElement.clientHeight || document.body.clientHeight
|
|
237
|
+ if (resizeHeight < originHeight) {
|
|
238
|
+ this.keyBoardShow = false
|
|
239
|
+ } else {
|
|
240
|
+ this.keyBoardShow = true
|
|
241
|
+ }
|
|
242
|
+ }, false)
|
|
243
|
+ },
|
|
244
|
+ methods: {
|
|
245
|
+
|
|
246
|
+ // 数据源
|
|
247
|
+ getInspection(id){
|
|
248
|
+ getinspectiongroup(id).then(response =>{
|
|
249
|
+ console.log('response',response);
|
|
250
|
+ const table=[]
|
|
251
|
+ const list = response.data.data.inspection
|
|
252
|
+ list.forEach(item => {
|
|
253
|
+ const arr ={
|
|
254
|
+ id:item.id,
|
|
255
|
+ name:item.project_name,
|
|
256
|
+ count:item.Count,
|
|
257
|
+ date:this.getTime(item.inspect_date),
|
|
258
|
+ project_id:item.project_id,
|
|
259
|
+ patient_id:item.patient_id,
|
|
260
|
+ }
|
|
261
|
+ table.push(arr)
|
|
262
|
+ });
|
|
263
|
+ this.tableData = table
|
|
264
|
+ })
|
|
265
|
+ },
|
|
266
|
+ getTime (time) {
|
|
267
|
+ // return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
|
|
268
|
+ return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
|
|
269
|
+ },
|
|
270
|
+ //点击表格行
|
|
271
|
+ rowclick({row, column, event}){
|
|
272
|
+ console.log('row',row);
|
|
273
|
+ },
|
|
274
|
+ row_name(row){
|
|
275
|
+ console.log('rows',row)
|
|
276
|
+ this.$router.push({path: '/new_Inspectiondetails',
|
|
277
|
+ query:{name:this.patientName,date:this.route_date,row:row,patientid:this.patientid,options:this.tableData}})
|
|
278
|
+ },
|
|
279
|
+ goCheck(){
|
|
280
|
+ if (this.restatus == 1) {
|
|
281
|
+ this.$router.push(
|
|
282
|
+ '/details?patient_id=' +
|
|
283
|
+ this.route_id +
|
|
284
|
+ '&date=' +
|
|
285
|
+ this.route_date +
|
|
286
|
+ '&patient_name=' +
|
|
287
|
+ this.route_name
|
|
288
|
+ )
|
|
289
|
+ // console.log('vvvvvv11111',this.route_id,this.route_date,this.route_name);
|
|
290
|
+ }
|
|
291
|
+ // this.$router.push(
|
|
292
|
+ // '/details?patient_id=' +
|
|
293
|
+ // this.route_id +
|
|
294
|
+ // '&date=' +
|
|
295
|
+ // this.route_date +
|
|
296
|
+ // '&patient_name=' +
|
|
297
|
+ // this.route_name
|
|
298
|
+ // )
|
|
299
|
+ },
|
|
300
|
+ down (event) {
|
|
301
|
+ this.flags = true
|
|
302
|
+ var touch
|
|
303
|
+ if (event.touches) {
|
|
304
|
+ touch = event.touches[0]
|
|
305
|
+ } else {
|
|
306
|
+ touch = event
|
|
307
|
+ }
|
|
308
|
+ this.position.x = touch.clientX
|
|
309
|
+ this.position.y = touch.clientY
|
|
310
|
+ this.dx = this.moveBtn.offsetLeft
|
|
311
|
+ this.dy = this.moveBtn.offsetTop
|
|
312
|
+ },
|
|
313
|
+ move (event) {
|
|
314
|
+ if (this.flags) {
|
|
315
|
+ var touch
|
|
316
|
+ if (event.touches) {
|
|
317
|
+ touch = event.touches[0]
|
|
318
|
+ } else {
|
|
319
|
+ touch = event
|
|
320
|
+ }
|
|
321
|
+ this.nx = touch.clientX - this.position.x
|
|
322
|
+ this.ny = touch.clientY - this.position.y
|
|
323
|
+ this.xPum = this.dx + this.nx
|
|
324
|
+ this.yPum = this.dy + this.ny
|
|
325
|
+ var clientWidth = document.documentElement.clientWidth
|
|
326
|
+ var clientHeight = document.documentElement.clientHeight
|
|
327
|
+ if (
|
|
328
|
+ this.xPum > 0 &&
|
|
329
|
+ this.xPum < clientWidth - this.moveBtn.offsetWidth
|
|
330
|
+ ) {
|
|
331
|
+ this.moveBtn.style.left = this.xPum + 'px'
|
|
332
|
+ }
|
|
333
|
+ if (
|
|
334
|
+ this.yPum > 0 &&
|
|
335
|
+ this.yPum < clientHeight - this.moveBtn.offsetHeight
|
|
336
|
+ ) {
|
|
337
|
+ this.moveBtn.style.top = this.yPum + 'px'
|
|
338
|
+ }
|
|
339
|
+
|
|
340
|
+ // 阻止页面的滑动默认事件
|
|
341
|
+ document.addEventListener('touchmove1', this.handler, {
|
|
342
|
+ passive: false
|
|
343
|
+ })
|
|
344
|
+ }
|
|
345
|
+ },
|
|
346
|
+ // 鼠标释放时候的函数
|
|
347
|
+ end () {
|
|
348
|
+ this.flags = false
|
|
349
|
+ sessionStorage.setItem('checkBtnTop1', this.moveBtn.style.top)
|
|
350
|
+ sessionStorage.setItem('checkBtnLeft1', this.moveBtn.style.left)
|
|
351
|
+ document.addEventListener('touchmove1', this.handler, {
|
|
352
|
+ passive: false
|
|
353
|
+ })
|
|
354
|
+ },
|
|
355
|
+ },
|
|
356
|
+ created () {
|
|
357
|
+ var patientid = this.$route.query.patientid ? this.$route.query.patientid : this.$route.query.patient_id
|
|
358
|
+ const patient_id = this.$route.query.id
|
|
359
|
+ this.route_date = this.$route.query.date*1
|
|
360
|
+ this.route_name = this.$route.query.name
|
|
361
|
+ this.route_id = this.$route.query.id*1
|
|
362
|
+ console.log('bbbbbbb',this.$route.query, this.$route.query.restatus);
|
|
363
|
+ this.patientid = patientid
|
|
364
|
+ this.getInspection(patient_id)
|
|
365
|
+ // this.getPatientDetail(patientid)
|
|
366
|
+ // 获取所有检验检查项目
|
|
367
|
+ // this.getAllInspection()
|
|
368
|
+ // this.getInspection(patientid)
|
|
369
|
+ var restatus = this.$route.query.restatus
|
|
370
|
+ this.restatus = restatus
|
|
371
|
+ }
|
|
372
|
+}
|
|
373
|
+</script>
|
|
374
|
+
|
|
375
|
+<style lang="scss" scoped>
|
|
376
|
+.inspection {
|
|
377
|
+ height: 100%;
|
|
378
|
+ overflow-y: auto;
|
|
379
|
+ .el_table{
|
|
380
|
+ padding: 10px;
|
|
381
|
+ }
|
|
382
|
+ .toolBox {
|
|
383
|
+ display: flex;
|
|
384
|
+ height: 3.125rem;
|
|
385
|
+ justify-content: space-around;
|
|
386
|
+ align-items: center;
|
|
387
|
+ .toolOne {
|
|
388
|
+ width: 6.25rem;
|
|
389
|
+ height: 1.875rem;
|
|
390
|
+ background: rgba(246, 246, 246, 1);
|
|
391
|
+ border-radius: 5px;
|
|
392
|
+ text-align: center;
|
|
393
|
+ font-size: 0.8125rem;
|
|
394
|
+ color: #8d8d8d;
|
|
395
|
+ display: flex;
|
|
396
|
+ align-items: center;
|
|
397
|
+ justify-content: space-around;
|
|
398
|
+ }
|
|
399
|
+ }
|
|
400
|
+ .adviceBox {
|
|
401
|
+ padding: 0 1.125rem;
|
|
402
|
+ margin-bottom: 3.125rem;
|
|
403
|
+ }
|
|
404
|
+ .adviceMain {
|
|
405
|
+ > div:last-child {
|
|
406
|
+ border: none;
|
|
407
|
+ }
|
|
408
|
+ }
|
|
409
|
+ .adviceOne {
|
|
410
|
+ // box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.1);
|
|
411
|
+ border-bottom: 1px solid #e5e5e5;
|
|
412
|
+ padding-bottom: 0.625rem;
|
|
413
|
+ }
|
|
414
|
+ .adviceTitle {
|
|
415
|
+ padding-top: 0.625rem;
|
|
416
|
+ display: flex;
|
|
417
|
+ align-items: center;
|
|
418
|
+ justify-content: space-between;
|
|
419
|
+ p {
|
|
420
|
+ color: #000000;
|
|
421
|
+ font-weight: bold;
|
|
422
|
+ font-size: 0.9375rem;
|
|
423
|
+ }
|
|
424
|
+ }
|
|
425
|
+ .ellipsis {
|
|
426
|
+ font-size: 1.25rem;
|
|
427
|
+ color: #cccccc;
|
|
428
|
+ }
|
|
429
|
+ .orderContent {
|
|
430
|
+ font-size: 0.875rem;
|
|
431
|
+ color: rgba(49, 50, 52, 1);
|
|
432
|
+ margin-top: 0.625rem;
|
|
433
|
+ p {
|
|
434
|
+ line-height: 1.25rem;
|
|
435
|
+ }
|
|
436
|
+ }
|
|
437
|
+ .doctorBox {
|
|
438
|
+ font-size: 0.75rem;
|
|
439
|
+ color: rgba(152, 152, 152, 1);
|
|
440
|
+ line-height: 1.125rem;
|
|
441
|
+ display: flex;
|
|
442
|
+ align-items: center;
|
|
443
|
+ justify-content: space-between;
|
|
444
|
+ margin-top: 0.625rem;
|
|
445
|
+ }
|
|
446
|
+ .all {
|
|
447
|
+ font-size: 0.8125rem;
|
|
448
|
+ color: #5b98ff;
|
|
449
|
+ margin-top: 0.625rem;
|
|
450
|
+ }
|
|
451
|
+ .noimgBox {
|
|
452
|
+ margin-top: 40%;
|
|
453
|
+ img {
|
|
454
|
+ width: 9.375rem;
|
|
455
|
+ height: 9.375rem;
|
|
456
|
+ margin: 0 auto;
|
|
457
|
+ display: block;
|
|
458
|
+ }
|
|
459
|
+ }
|
|
460
|
+ .add {
|
|
461
|
+ position: fixed;
|
|
462
|
+ bottom: 0;
|
|
463
|
+ left: 0;
|
|
464
|
+ width: 100%;
|
|
465
|
+ height: 2.75rem;
|
|
466
|
+ background: rgba(255, 255, 255, 1);
|
|
467
|
+ box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.1);
|
|
468
|
+ display: flex;
|
|
469
|
+ align-items: center;
|
|
470
|
+ justify-content: space-around;
|
|
471
|
+ font-size: 0.9375rem;
|
|
472
|
+ color: #979798;
|
|
473
|
+ .addIcon {
|
|
474
|
+ color: #5b98ff;
|
|
475
|
+ font-size: 1.25rem;
|
|
476
|
+ margin-right: 0.25rem;
|
|
477
|
+ }
|
|
478
|
+ }
|
|
479
|
+ .flexBox {
|
|
480
|
+ display: flex;
|
|
481
|
+ justify-content: space-between;
|
|
482
|
+ }
|
|
483
|
+}
|
|
484
|
+::-webkit-scrollbar {
|
|
485
|
+ width: 0;
|
|
486
|
+}
|
|
487
|
+.checkBox1 {
|
|
488
|
+ position: fixed;
|
|
489
|
+ left: 0.6rem;
|
|
490
|
+ bottom: 3.25rem;
|
|
491
|
+ z-index:5000;
|
|
492
|
+ img {
|
|
493
|
+ width: 3.5rem;
|
|
494
|
+ height: 3.5rem;
|
|
495
|
+ }
|
|
496
|
+}
|
|
497
|
+</style>
|