Browse Source

打印单

XMLWAN 4 years ago
parent
commit
756be7a5f6

+ 10 - 1
src/api/advice.js View File

@@ -498,7 +498,7 @@ export function GetLastOrNextDoctorAdvice(params) {
498 498
 }
499 499
 
500 500
 export function getSchedualDoctors (params) {
501
-  console.log("params-----",params)
501
+  
502 502
   return request({
503 503
     url: '/api/schedule/advices',
504 504
     method: 'get',
@@ -506,6 +506,15 @@ export function getSchedualDoctors (params) {
506 506
   })
507 507
 }
508 508
 
509
+export function getDoctorAdviceCount(params){
510
+  
511
+  return request({
512
+    url:"/api/schedule/getdoctoradvicecount",
513
+    method:"get",
514
+    params:params
515
+  })
516
+}
517
+
509 518
 
510 519
 
511 520
 

+ 0 - 2
src/api/dialysis.js View File

@@ -290,5 +290,3 @@ export function GetDialysisGoodStatistics(params) {
290 290
 
291 291
   })
292 292
 }
293
-
294
-

+ 7 - 5
src/api/schedule.js View File

@@ -1,16 +1,18 @@
1 1
 import request from '@/utils/request'
2 2
 
3
-export function getWeekPanels(t) {
3
+export function getWeekPanels(t,patitionId) {
4
+  console.log("params33333",t,patitionId)
4 5
   return request({
5
-    url: '/api/schedule/weekpanel?data=' + t,
6
+    url: '/api/schedule/weekpanel?data=' + t+"&patitionid="+patitionId,
6 7
     method: 'get'
7 8
   })
8 9
 }
9 10
 
10
-export function getSchedules(week) {
11
+export function getSchedules(params) {
11 12
   return request({
12
-    url: '/api/schedule/schedules?weekTime=' + week,
13
-    method: 'get'
13
+    url: '/api/schedule/schedules',
14
+    method: 'get',
15
+    params:params,
14 16
   })
15 17
 }
16 18
 

+ 1 - 5
src/utils/tools.js View File

@@ -153,11 +153,7 @@ export function uParseTime(time, cFormat) {
153 153
 }
154 154
 
155 155
 export function calculateAnticoagulantZL(type, shouji, shichang, weichi) {
156
-  console.log('类型',type)
157
-  console.log('首剂', shouji)
158
-  console.log('时长', shichang)
159
-  console.log('维持', weichi)
160
-
156
+ 
161 157
   var t = 0.5
162 158
   if (type == 1) {
163 159
     t = 0.5

+ 1 - 1
src/xt_pages/dialysis/components/allSummary.vue View File

@@ -438,7 +438,7 @@ export default {
438 438
 
439 439
               }
440 440
               }
441
-              console.log("list22222",this.list)
441
+              // console.log("list22222",this.list)
442 442
              }
443 443
           })
444 444
         },

+ 568 - 27
src/xt_pages/dialysis/components/dialysisDrugs.vue View File

@@ -36,34 +36,273 @@
36 36
           </ul>
37 37
           </div>
38 38
         </div>
39
+
40
+        
39 41
         <div>
40 42
             <!-- <el-button size="small" icon="el-icon-printer" type="primary">打印</el-button> -->
41 43
             <el-button size="small" type="primary" @click="statistics">统计表</el-button>
42 44
         </div>
45
+      </div>
46
+        <div class="cell clearfix" style="justify-content: space-between;">
47
+        <div class="cell clearfix">
48
+          <label class="title"> <span class="name">给药途径</span> : </label>
49
+          <div class="time">
50
+            <ul class>
51
+              <li
52
+                :class="item.id == delivery_way ? 'active' : ''"
53
+                @click="selectDeliveryWay(item.id)"
54
+                v-for="item in deliveryWay"
55
+                :key="item.id"
56
+              >
57
+                {{ item.name }}
58
+              </li>
59
+            </ul>
60
+          </div>
61
+        </div>
43 62
       </div>
44 63
       <div>
45
-          <el-table
46
-            :data="tableData"
47
-            height="350"
48
-            border
49
-            style="width: 100%">
50
-            <el-table-column
51
-            align="center"
52
-            type="selection"
53
-            width="55">
54
-            </el-table-column>
55
-            <el-table-column
56
-            align="center"
57
-            prop="name"
58
-            label="姓名"
59
-            width="180">
60
-            </el-table-column>
61
-            <el-table-column
62
-            align="center"
63
-            prop="address"
64
-            label="地址">
65
-            </el-table-column>
66
-        </el-table>
64
+        <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" 
65
+        @selection-change="handleSelectionChange"
66
+        :row-class-name="tableRowClassName"
67
+        :span-method="objectSpanMethod"
68
+        :cell-class-name="adviceNameShow"
69
+        :modal-append-to-body="false"
70
+        v-show="show">
71
+        <el-table-column type="selection" width="55" align="center"></el-table-column>
72
+        <el-table-column prop="date" label="姓名" align="center" min-width="26px">
73
+          <template slot-scope="scope">
74
+            <span>{{ scope.row.name }}</span>
75
+            <br>
76
+            ({{ scope.row.parent_id == 0 ? scope.row.dialysis_no : ""}})
77
+            <br>
78
+            <span v-if="scope.row.mode_id == 1">(HD)</span>
79
+            <span v-if="scope.row.mode_id == 2">(HDF)</span>
80
+            <span v-if="scope.row.mode_id == 3">(HD+HP)</span>
81
+            <span v-if="scope.row.mode_id == 4">(HP)</span>
82
+            <span v-if="scope.row.mode_id == 5">(HF)</span>
83
+            <span v-if="scope.row.mode_id == 6">(SCUF)</span>
84
+            <span v-if="scope.row.mode_id == 7">(IUF)</span>
85
+            <span v-if="scope.row.mode_id == 8">(HFHD)</span>
86
+            <span v-if="scope.row.mode_id == 9">(HFHD+HP)</span>
87
+            <span v-if="scope.row.mode_id == 10">(PHF)</span>
88
+            <span v-if="scope.row.mode_id == 11">(HFR)</span>
89
+            <span v-if="scope.row.mode_id == 12">(HDF+HP)</span>
90
+            <span v-if="scope.row.mode_id == 13">(CRRT)</span>
91
+            <span v-if="scope.row.mode_id == 14">(腹水回输)</span>
92
+          </template>
93
+        </el-table-column>
94
+        <el-table-column prop="date" label="透析器" align="center" min-width="26px">
95
+          <template slot-scope="scope">
96
+            <span>{{ scope.row.dialyzer_perfusion_apparatus }}</span>
97
+          </template>
98
+        </el-table-column>
99
+        <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
100
+          <template slot-scope="scope">
101
+            <span>
102
+              {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
103
+            </span>
104
+          </template>
105
+        </el-table-column>
106
+        <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">
107
+          <template slot-scope="scope">
108
+            <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
109
+              <span class="el-dropdown-link" v-if="scope.row.parent_id == 0">
110
+                {{ getAdviceContent(scope.row, 1)}}
111
+              </span>
112
+            </el-dropdown>
113
+
114
+            <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
115
+              <span class="el-dropdown-link">
116
+                &emsp;{{ getAdviceContent(scope.row, 2)}}
117
+              </span>
118
+            </el-dropdown>
119
+          </template>
120
+        </el-table-column>
121
+        <el-table-column
122
+          prop="start_time"
123
+          align="center"
124
+          min-width="30px"
125
+          label="执行时间"
126
+          sortable
127
+        >
128
+          <template slot-scope="scope">
129
+            <span v-if="scope.row.execution_time != 0">
130
+              {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
131
+            </span>
132
+            <span v-else></span>
133
+          </template>
134
+        </el-table-column>
135
+        <el-table-column prop="execution_staff" align="center" min-width="30px" label="执行护士">
136
+          <template slot-scope="scope">
137
+            <span v-if="scope.row.parent_id == 0">
138
+              {{getXuserName(scope.row.execution_staff)}}
139
+            </span>
140
+            <span v-else></span>
141
+          </template>
142
+        </el-table-column>
143
+        <el-table-column prop="checker" align="center" min-width="30px" label="校对护士">
144
+          <template slot-scope="scope">
145
+            <span v-if="scope.row.parent_id == 0">
146
+              {{getXuserName(scope.row.checker)}}
147
+            </span>
148
+            <span v-else></span>
149
+          </template>
150
+        </el-table-column>
151
+        <el-table-column
152
+          prop="check_time"
153
+          align="center"
154
+          min-width="30px"
155
+          label="校对时间"
156
+          sortable
157
+        >
158
+          <template slot-scope="scope">
159
+            <span v-if="scope.row.check_time != 0">
160
+              {{scope.row.check_time | parseTime('{m}-{d} {h}:{i}')}}
161
+            </span>
162
+            <span v-else></span>
163
+          </template>
164
+        </el-table-column>
165
+        <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
166
+          <template slot-scope="scope">
167
+            <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
168
+          </template>
169
+        </el-table-column>
170
+        <el-table-column
171
+          prop="created_time"
172
+          align="center"
173
+          min-width="30px"
174
+          label="校对时间"
175
+          sortable
176
+        >
177
+          <template slot-scope="scope">
178
+            <span v-if="scope.row.created_time != 0">
179
+              {{scope.row.created_time | parseTime('{m}-{d} {h}:{i}')}}
180
+            </span>
181
+            <span v-else></span>
182
+          </template>
183
+        </el-table-column>
184
+      </el-table>
185
+         <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" 
186
+        @selection-change="handleSelectionChange"
187
+        :row-class-name="tableRowClassName"
188
+        :span-method="objectSpanMethod"
189
+        :cell-class-name="adviceNameShow"
190
+        :modal-append-to-body="false"
191
+        v-show="showOne">
192
+        <el-table-column type="selection" width="55" align="center"></el-table-column>
193
+        <el-table-column prop="date" label="姓名" align="center" min-width="26px">
194
+          <template slot-scope="scope">
195
+            <span>{{ scope.row.name }}</span>
196
+            <br>
197
+            ({{ scope.row.parent_id == 0 ? scope.row.dialysis_no : ""}})
198
+            <br>
199
+            <span v-if="scope.row.mode_id == 1">(HD)</span>
200
+            <span v-if="scope.row.mode_id == 2">(HDF)</span>
201
+            <span v-if="scope.row.mode_id == 3">(HD+HP)</span>
202
+            <span v-if="scope.row.mode_id == 4">(HP)</span>
203
+            <span v-if="scope.row.mode_id == 5">(HF)</span>
204
+            <span v-if="scope.row.mode_id == 6">(SCUF)</span>
205
+            <span v-if="scope.row.mode_id == 7">(IUF)</span>
206
+            <span v-if="scope.row.mode_id == 8">(HFHD)</span>
207
+            <span v-if="scope.row.mode_id == 9">(HFHD+HP)</span>
208
+            <span v-if="scope.row.mode_id == 10">(PHF)</span>
209
+            <span v-if="scope.row.mode_id == 11">(HFR)</span>
210
+            <span v-if="scope.row.mode_id == 12">(HDF+HP)</span>
211
+            <span v-if="scope.row.mode_id == 13">(CRRT)</span>
212
+            <span v-if="scope.row.mode_id == 14">(腹水回输)</span>
213
+          </template>
214
+        </el-table-column>
215
+        <el-table-column prop="date" label="透析器" align="center" min-width="26px">
216
+          <template slot-scope="scope">
217
+            <span>{{ scope.row.dialyzer_perfusion_apparatus }}</span>
218
+          </template>
219
+        </el-table-column>
220
+        <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
221
+          <template slot-scope="scope">
222
+            <span>
223
+              {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
224
+            </span>
225
+          </template>
226
+        </el-table-column>
227
+        <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">
228
+          <template slot-scope="scope">
229
+            <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
230
+              <span class="el-dropdown-link" v-if="scope.row.parent_id == 0">
231
+                {{ getAdviceContent(scope.row, 1)}}
232
+              </span>
233
+            </el-dropdown>
234
+
235
+            <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
236
+              <span class="el-dropdown-link">
237
+                &emsp;{{ getAdviceContent(scope.row, 2)}}
238
+              </span>
239
+            </el-dropdown>
240
+          </template>
241
+        </el-table-column>
242
+        <el-table-column
243
+          prop="start_time"
244
+          align="center"
245
+          min-width="30px"
246
+          label="执行时间"
247
+          sortable
248
+        >
249
+          <template slot-scope="scope">
250
+            <span v-if="scope.row.execution_time != 0">
251
+              {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
252
+            </span>
253
+            <span v-else></span>
254
+          </template>
255
+        </el-table-column>
256
+        <el-table-column prop="execution_staff" align="center" min-width="30px" label="执行护士">
257
+          <template slot-scope="scope">
258
+            <span v-if="scope.row.parent_id == 0">
259
+              {{getXuserName(scope.row.execution_staff)}}
260
+            </span>
261
+            <span v-else></span>
262
+          </template>
263
+        </el-table-column>
264
+        <el-table-column prop="checker" align="center" min-width="30px" label="校对护士">
265
+          <template slot-scope="scope">
266
+            <span v-if="scope.row.parent_id == 0">
267
+              {{getXuserName(scope.row.checker)}}
268
+            </span>
269
+            <span v-else></span>
270
+          </template>
271
+        </el-table-column>
272
+        <el-table-column
273
+          prop="check_time"
274
+          align="center"
275
+          min-width="30px"
276
+          label="校对时间"
277
+          sortable
278
+        >
279
+          <template slot-scope="scope">
280
+            <span v-if="scope.row.check_time != 0">
281
+              {{scope.row.check_time | parseTime('{m}-{d} {h}:{i}')}}
282
+            </span>
283
+            <span v-else></span>
284
+          </template>
285
+        </el-table-column>
286
+        <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
287
+          <template slot-scope="scope">
288
+            <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
289
+          </template>
290
+        </el-table-column>
291
+        <el-table-column
292
+          prop="created_time"
293
+          align="center"
294
+          min-width="30px"
295
+          label="校对时间"
296
+          sortable
297
+        >
298
+          <template slot-scope="scope">
299
+            <span v-if="scope.row.created_time != 0">
300
+              {{scope.row.created_time | parseTime('{m}-{d} {h}:{i}')}}
301
+            </span>
302
+            <span v-else></span>
303
+          </template>
304
+        </el-table-column>
305
+      </el-table>
67 306
       </div>
68 307
 
69 308
       <dialysis-drugs-dialog ref="dialysisDrugs"></dialysis-drugs-dialog>
@@ -72,7 +311,9 @@
72 311
 
73 312
 
74 313
 <script>
314
+const moment = require('moment')
75 315
 import { GetAllZone } from "@/api/dialysis";
316
+import { getSchedualDoctors } from '@/api/advice'
76 317
 import dialysisDrugsDialog from './dialysisDrugsDialog'
77 318
 export default {
78 319
     components:{
@@ -90,19 +331,34 @@ export default {
90 331
             selected_date:new Date(),
91 332
             partitionArr:[],
92 333
             partitionType: 0,
93
-            tableData: []
334
+            tableData: [],
335
+            deliveryWay:[],
336
+            deliver_way:0,
337
+            search_input:"",
338
+            show:true,
339
+            showOne:false,
340
+            deliveryWay:[],
341
+            delivery_way:0,
342
+            scheduleMap:[],
343
+            selecting_schs: [],
94 344
         }
95 345
     },
96 346
     created(){
97 347
         this.getAllZone()
98
-        
348
+        this.getlist()
99 349
     },
100 350
     methods:{
101 351
         selectSchedulType(scheduleType) {
102
-            this.schedulType = scheduleType;
352
+           this.schedulType = scheduleType;
353
+           this.getlist()
103 354
         },
104 355
         selectPartitionType(partitionType) {
105
-            this.partitionType = partitionType;
356
+          this.partitionType = partitionType;
357
+          this.getlist()
358
+        },
359
+        selectDeliveryWay(val){
360
+         this.delivery_way = val
361
+         this.getlist()
106 362
         },
107 363
         getAllZone: function() {
108 364
             GetAllZone().then(response => {
@@ -112,13 +368,298 @@ export default {
112 368
                 } else {
113 369
                 this.partitionArr = response.data.data.zone;
114 370
                 this.partitionArr.unshift({ id: 0, name: "全部" });
371
+                var dics  =  response.data.data.dics
372
+                var obj = {id:0,name:"全部"}
373
+                this.deliveryWay.push(obj)
374
+                this.deliveryWay.push(...dics)
115 375
                 }
116 376
             });
117 377
         },
118 378
         statistics(){
119 379
             this.$refs.dialysisDrugs.show();
380
+        },
381
+        getlist(){
382
+          var name = ""
383
+         for(let i=0;i<this.deliveryWay.length;i++){
384
+              if(this.delivery_way == this.deliveryWay[i].id){
385
+                name = this.deliveryWay[i].name
386
+              }
120 387
         }
121
-    }
388
+        if(name == '全部'){
389
+          name = ""
390
+        }
391
+
392
+        let newTime =  moment(this.selected_date).format('YYYY-MM-DD')
393
+        getSchedualDoctors({ date: newTime,patient_type: 0,advice_type: 2,delivery_way:name}).then(rs => {
394
+        var resp = rs.data
395
+        if (resp.state == 1) {
396
+            this.admin_users = resp.data.adminUser
397
+            var schedules = resp.data.scheduals
398
+            console.log("数据多少2223333333",schedules)
399
+            var config = resp.data.config
400
+           if(config.is_open == 0){
401
+            this.show = true
402
+            this.showOne = false
403
+            let arr = []
404
+            let newArr = []
405
+            let newSchedules = []
406
+            schedules.map(item => {
407
+             item.doctor_advice.map(it =>{
408
+                it.name = item.patient.name
409
+                    if(item.prescription != null){
410
+                       it.dialyzer_perfusion_apparatus = item.prescription.dialyzer_perfusion_apparatus
411
+                    }
412
+                    it.schedule_type = item.schedule_type
413
+                    it.zoneId = item.device_number.zone.id
414
+                    it.dialysis_no = item.patient.dialysis_no
415
+                    it.mode_id = item.mode_id
416
+                    arr.push(it)
417
+                })
418
+            })
419
+            if(this.schedulType == 0){
420
+                newSchedules = arr
421
+            }else{
422
+                arr.map(item => {
423
+                    if (item.schedule_type == this.schedulType) {
424
+                        newSchedules.push(item)
425
+                    }
426
+                })
427
+            }
428
+            
429
+            
430
+            if(this.partitionType == 0){
431
+                this.scheduleMap = newSchedules
432
+            }else {
433
+                let a = []
434
+                arr.map(item => {
435
+                    if(this.partitionType == item.zoneId){
436
+                        a.push(item)
437
+                    }
438
+                })
439
+                this.scheduleMap = a
440
+            }
441
+            this.scheduleMap.map(ele => {
442
+                let firstIndex = this.scheduleMap.findIndex(item => {
443
+                  return item.patient_id === ele.patient_id   // 当category相同的时候,返回第一个相同的Index 赋值给 firstIndex
444
+                })
445
+                if (this.scheduleMap.findIndex(item => { return item.patient_id === firstIndex}) === -1) {
446
+                    newArr.push({
447
+                    length: this.scheduleMap.filter(item => {
448
+                        return item.patient_id === ele.patient_id    //利用数组的filter方法,过滤出相同category的数组的长度。数组长度-即为跨多少行
449
+                    }).length,
450
+                    firstIndex: firstIndex    // firstIndex 返回的是第一个catergory就满足的第一个Index,即为rowIndex开始于第几行。
451
+                    })
452
+                }
453
+            })
454
+            this.indexInfoList = newArr
455
+           }
456
+           if(config.is_open == 1 || config.is_open == 2){
457
+             this.show = false
458
+             this.showOne  = true
459
+            var schedules =  resp.data.hisAdvices
460
+          
461
+            let arr = []
462
+            let newArr = []
463
+            let newSchedules = []
464
+            schedules.map(item => {
465
+             item.doctor_advice.map(it =>{
466
+                it.name = item.patient.name
467
+                    if(item.prescription != null){
468
+                       it.dialyzer_perfusion_apparatus = item.prescription.dialyzer_perfusion_apparatus
469
+                    }
470
+                    it.schedule_type = item.schedule_type
471
+                    it.zoneId = item.device_number.zone.id
472
+                    it.dialysis_no = item.patient.dialysis_no
473
+                    it.mode_id = item.mode_id
474
+                    arr.push(it)
475
+                })
476
+            })
477
+            if(this.schedulType == 0){
478
+                newSchedules = arr
479
+            }else{
480
+                arr.map(item => {
481
+                    if (item.schedule_type == this.schedulType) {
482
+                        newSchedules.push(item)
483
+                    }
484
+                })
485
+            }
486
+            
487
+            
488
+            if(this.partitionType == 0){
489
+                this.scheduleMap = newSchedules
490
+            }else {
491
+                let a = []
492
+                arr.map(item => {
493
+                    if(this.partitionType == item.zoneId){
494
+                        a.push(item)
495
+                    }
496
+                })
497
+                this.scheduleMap = a
498
+            }
499
+            this.scheduleMap.map(ele => {
500
+                let firstIndex = this.scheduleMap.findIndex(item => {
501
+                  return item.patient_id === ele.patient_id   // 当category相同的时候,返回第一个相同的Index 赋值给 firstIndex
502
+                })
503
+                if (this.scheduleMap.findIndex(item => { return item.patient_id === firstIndex}) === -1) {
504
+                    newArr.push({
505
+                    length: this.scheduleMap.filter(item => {
506
+                        return item.patient_id === ele.patient_id    //利用数组的filter方法,过滤出相同category的数组的长度。数组长度-即为跨多少行
507
+                    }).length,
508
+                    firstIndex: firstIndex    // firstIndex 返回的是第一个catergory就满足的第一个Index,即为rowIndex开始于第几行。
509
+                    })
510
+                }
511
+            })
512
+            this.indexInfoList = newArr
513
+            console.log("过年9999999999",this.scheduleMap)
514
+           }
515
+         
516
+  
517
+         }
518
+         })
519
+      },
520
+      searchAction(){
521
+
522
+      },
523
+      handleScheduleDateChange(){
524
+        
525
+      },
526
+     handleSelectionChange(val) {
527
+      this.selecting_schs = val;
528
+     },
529
+      adviceNameShow({ row, column, rowIndex, columnIndex }) {
530
+          if (columnIndex == 2) {
531
+            return 'dialysisadvicenamedisplay'
532
+          } else {
533
+            return ''
534
+          }
535
+      },
536
+      tableRowClassName({ row, rowIndex }) {
537
+     
538
+     },
539
+     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
540
+        if (columnIndex === 0) {
541
+            let index = this.indexInfoList.findIndex(item => {  //遍历数组
542
+                return item.firstIndex === rowIndex
543
+            })
544
+            if (index > -1) {
545
+                return {
546
+                    rowspan: this.indexInfoList[index].length,
547
+                    colspan: 1
548
+                }
549
+            } else {
550
+                return {
551
+                    rowspan: 0,
552
+                    colspan: 0
553
+                }
554
+            }
555
+        }
556
+        
557
+        if (columnIndex === 1) {
558
+            let index = this.indexInfoList.findIndex(item => {  //遍历数组
559
+                return item.firstIndex === rowIndex
560
+            })
561
+            if (index > -1) {
562
+                return {
563
+                    rowspan: this.indexInfoList[index].length,
564
+                    colspan: 1
565
+                }
566
+            } else {
567
+                return {
568
+                    rowspan: 0,
569
+                    colspan: 0
570
+                }
571
+            }
572
+        }
573
+        if (columnIndex === 2) {
574
+            let index = this.indexInfoList.findIndex(item => {  //遍历数组
575
+                return item.firstIndex === rowIndex
576
+            })
577
+            if (index > -1) {
578
+                return {
579
+                    rowspan: this.indexInfoList[index].length,
580
+                    colspan: 1
581
+                }
582
+            } else {
583
+                return {
584
+                    rowspan: 0,
585
+                    colspan: 0
586
+                }
587
+            }
588
+        }
589
+     },
590
+     getAdviceContent(row, isChild) {
591
+        let tempSingleDoseDesc = ''
592
+        let tempDrugSpecDesc = ''
593
+        let tempPrescribingNumberDesc = ''
594
+
595
+        if (row.prescribing_number) {
596
+          tempPrescribingNumberDesc =
597
+            row.prescribing_number + '' + row.prescribing_number_unit
598
+        }
599
+
600
+        if (row.single_dose) {
601
+          if (this.template_id != 6) {
602
+            tempSingleDoseDesc =
603
+              ' 单次用量 ' + '  ' + row.single_dose + '' + row.single_dose_unit
604
+          } else {
605
+            tempSingleDoseDesc = row.single_dose + '' + row.single_dose_unit
606
+          }
607
+        }
608
+
609
+        if (row.advice_desc) {
610
+          tempDrugSpecDesc = '(' + row.advice_desc + row.drug_spec_unit + ')'
611
+        }
612
+
613
+        if (isChild == 1) {
614
+          // 不是子药
615
+
616
+          return (
617
+            row.advice_name +
618
+            tempDrugSpecDesc +
619
+            ' ' +
620
+            tempPrescribingNumberDesc +
621
+            tempSingleDoseDesc +
622
+            ' ' +
623
+            row.delivery_way +
624
+            ' ' +
625
+            row.execution_frequency
626
+          )
627
+        } else {
628
+          // 是子药
629
+          return (
630
+            row.advice_name +
631
+            tempDrugSpecDesc +
632
+            ' ' +
633
+            tempPrescribingNumberDesc +
634
+            tempSingleDoseDesc
635
+          )
636
+        }
637
+      },
638
+      getXuserName(id) {
639
+        if (id <= 0) {
640
+          return ''
641
+        }
642
+        var name = ''
643
+        if (
644
+          this.admin_users == null ||
645
+          typeof this.admin_users.length === 'undefined'
646
+        ) {
647
+          return name
648
+        }
649
+        var leng = this.admin_users.length
650
+        if (leng == 0) {
651
+          return name
652
+        }
653
+        for (let index = 0; index < leng; index++) {
654
+          if (this.admin_users[index].id == id) {
655
+            name = this.admin_users[index].name
656
+            break
657
+          }
658
+        }
659
+        return name
660
+      },
661
+    },
662
+   
122 663
 }
123 664
 </script>
124 665
 

+ 61 - 46
src/xt_pages/dialysis/components/dialysisDrugsDialog.vue View File

@@ -10,65 +10,61 @@
10 10
         style="width:140px;margin-right:10px"
11 11
         v-model="startTime"
12 12
         type="date"
13
-        placeholder="选择日期">
13
+        placeholder="选择日期"
14
+        @change="changeStartTime">
14 15
         </el-date-picker>
15 16
         <el-date-picker
16 17
         style="width:140px;margin-right:10px"
17 18
         v-model="endTime"
18 19
         type="date"
19
-        placeholder="选择日期">
20
+        placeholder="选择日期"
21
+        @change="changeEndTime">
20 22
         </el-date-picker>
21
-        <el-select style="width:140px;margin-right:10px" v-model="schedulType" placeholder="请选择">
23
+        <el-select style="width:140px;margin-right:10px" v-model="delive_way" placeholder="请选择">
22 24
             <el-option
23
-            v-for="item in schedulArr"
24
-            :key="item.value"
25
-            :label="item.label"
26
-            :value="item.value">
27
-            </el-option>
28
-        </el-select>
29
-        <el-select style="width:140px;margin-right:10px" v-model="partitionType" placeholder="请选择">
30
-            <el-option
31
-            v-for="item in partitionArr"
25
+            v-for="item in deliveryWay"
32 26
             :key="item.id"
33 27
             :label="item.name"
34 28
             :value="item.id">
35 29
             </el-option>
36 30
         </el-select>
37
-        <el-button icon="el-icon-printer" type="primary" @click="toPrint">打印</el-button>
31
+        <!-- <el-button icon="el-icon-printer" type="primary" @click="toPrint">打印</el-button> -->
38 32
         
39 33
     </div>
40 34
     <div style="margin-top:10px;">
41 35
         <el-table :data="tableData" border style="width: 100%" height="300">
42
-            <el-table-column
43
-            align="center"
44
-            prop="address"
45
-            label="地址">
36
+            <el-table-column align="center" prop="address" label="药品名称">
37
+              <template slot-scope="scope">
38
+                 {{scope.row.advice_name}}
39
+              </template>
40
+            </el-table-column>
41
+             <el-table-column align="center" prop="address" label="药品规格">
42
+               <template slot-scope="scope">
43
+                  {{scope.row.advice_desc}}
44
+               </template>
46 45
             </el-table-column>
47
-            <el-table-column
48
-            align="center"
49
-            prop="name"
50
-            label="姓名"
51
-            width="100">
46
+            <el-table-column align="center" prop="name" label="数量" width="100">
47
+                <template slot-scope="scope">
48
+                   {{scope.row.Total}}
49
+                </template>
52 50
             </el-table-column>
53 51
         </el-table>
54 52
     </div>
55
-    <!-- <div slot="footer" class="dialog-footer">
56
-      <el-button @click="hide">取 消</el-button>
57
-      <el-button type="primary" @click="submitAction()">保 存</el-button>
58
-    </div> -->
59 53
   </el-dialog>
60 54
 </template>
61 55
 
62 56
 
63 57
 
64 58
 <script>
59
+const moment = require('moment')
65 60
 import { GetAllZone } from "@/api/dialysis";
61
+import { getDoctorAdviceCount } from "@/api/advice"
66 62
 export default {
67 63
     data(){
68 64
         return{
69 65
             visible: false,
70
-            startTime:'',
71
-            endTime:'',
66
+            startTime:new Date(),
67
+            endTime:new Date(),
72 68
             schedulArr: [
73 69
                 {value: 0, label: '全部班'},
74 70
                 {value: 1, label: '上午'},
@@ -78,27 +74,14 @@ export default {
78 74
             schedulType: 0,
79 75
             partitionArr:[],
80 76
             partitionType: 0,
81
-            tableData: [{
82
-                date: '2016-05-02',
83
-                name: '王小虎',
84
-                address: '上海市普陀区金沙江路 1518 弄'
85
-                }, {
86
-                date: '2016-05-04',
87
-                name: '王小虎',
88
-                address: '上海市普陀区金沙江路 1517 弄'
89
-                }, {
90
-                date: '2016-05-01',
91
-                name: '王小虎',
92
-                address: '上海市普陀区金沙江路 1519 弄'
93
-                }, {
94
-                date: '2016-05-03',
95
-                name: '王小虎',
96
-                address: '上海市普陀区金沙江路 1516 弄'
97
-            }]
77
+            deliveryWay:[],
78
+            tableData: [],
79
+            delive_way:""
98 80
         }
99 81
     },
100 82
     created(){
101 83
         this.getAllZone()
84
+        this.getlist()
102 85
     },
103 86
     methods:{
104 87
         _close: function(done) {
@@ -115,6 +98,10 @@ export default {
115 98
                 } else {
116 99
                 this.partitionArr = response.data.data.zone;
117 100
                 this.partitionArr.unshift({ id: 0, name: "全部分区" });
101
+                var dics  =  response.data.data.dics
102
+                var obj = {id:0,name:"全部"}
103
+                this.deliveryWay.push(obj)
104
+                this.deliveryWay.push(...dics)
118 105
                 }
119 106
             });
120 107
         },
@@ -123,7 +110,35 @@ export default {
123 110
                 path: '/dialysis/dialysisDrugs_print',
124 111
                 // query: { date: date }
125 112
             })
126
-        }
113
+        },
114
+       getlist(){
115
+
116
+           let newTimeStart =  moment(this.startTime).format('YYYY-MM-DD')
117
+           let newTimeEnd = moment(this.endTime).format('YYYY-MM-DD')
118
+           var params = {
119
+              start_time:newTimeStart,
120
+              end_time:newTimeEnd,
121
+              delive_way:this.delive_way,
122
+           }
123
+         
124
+         getDoctorAdviceCount(params).then(response=>{
125
+            if(response.data.state == 1){
126
+              var list =  response.data.data.list
127
+              console.log("list",list)
128
+              this.tableData = list
129
+            }
130
+         })  
131
+       },
132
+      changeStartTime(val){
133
+       var start =  moment(val).format('YYYY-MM-DD')
134
+       this.startTime = start
135
+       this.getlist()
136
+      },
137
+      changeEndTime(val){
138
+       var end = moment(val).format('YYYY-MM-DD')
139
+       this.endTime = end
140
+       this.getlist()
141
+      }
127 142
     }
128 143
 }
129 144
 </script>

+ 2 - 2
src/xt_pages/dialysis/consumableDrugs.vue View File

@@ -8,9 +8,9 @@
8 8
                 <el-tab-pane label="透析耗材" name="1">
9 9
                     <consumables></consumables>
10 10
                 </el-tab-pane>
11
-                <!-- <el-tab-pane label="透析药品" name="second">
11
+                <el-tab-pane label="透析药品" name="second">
12 12
                     <dialysis-drugs></dialysis-drugs>
13
-                </el-tab-pane> -->
13
+                </el-tab-pane>
14 14
                 <el-tab-pane label="透析参数" name="2">
15 15
                     <dialysis-parameters></dialysis-parameters>
16 16
                 </el-tab-pane>

+ 9 - 9
src/xt_pages/dialysis/details/DialysisPrescription.vue View File

@@ -161,15 +161,15 @@
161 161
           }}</span>
162 162
         </li>
163 163
 
164
-        <li v-if="isShow('血流量')">
165
-          <label>血流量 : </label>
166
-          <span class="content">{{
167
-            blood_flow_volume != "0" ? blood_flow_volume : ""
168
-          }}</span>
169
-          <span class="unit">{{
170
-            blood_flow_volume != "0" ? "ml/min" : ""
171
-          }}</span>
172
-        </li>
164
+<!--        <li v-if="isShow('血流量')">-->
165
+<!--          <label>血流量 : </label>-->
166
+<!--          <span class="content">{{-->
167
+<!--            blood_flow_volume != "0" ? blood_flow_volume : ""-->
168
+<!--          }}</span>-->
169
+<!--          <span class="unit">{{-->
170
+<!--            blood_flow_volume != "0" ? "ml/min" : ""-->
171
+<!--          }}</span>-->
172
+<!--        </li>-->
173 173
       </ul>
174 174
 
175 175
       <ul>

+ 22 - 19
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue View File

@@ -1307,27 +1307,30 @@
1307 1307
         this.InnerDialogProps.visibility = true
1308 1308
         switch (val) {
1309 1309
           case '5': // 透析器/灌流器
1310
-             var arr = this.dialysisPrescription.dialyzer_perfusion_apparatus
1311
-             var newArr =  arr.split(",")
1312
-            console.log("透析器/灌流器",newArr)
1313
-            var Arr = []
1314
-            for(let i=0;i<newArr.length;i++){
1315
-              for(let j=0;j<this.dialyzerPerfusionApparatus.length;j++){
1316
-                 var newarr = newArr[i].toUpperCase()
1317
-
1318
-                 var dialy = this.dialyzerPerfusionApparatus[j].name.toUpperCase()
1319
-
1320
-                 if(newarr == dialy){
1321
-                    Arr.push(this.dialyzerPerfusionApparatus[j].name)
1322
-                 }
1323
-              }
1324
-            }
1325
-            var arrtwo = Arr.join(",")
1326
-            console.log("Arr",arrtwo)
1310
+            // var arr = this.dialysisPrescription.dialyzer_perfusion_apparatus
1311
+            // console.log("arr333333",arr)
1312
+            // var newArr =  arr.split(",")
1313
+            // console.log("透析器/灌流器",newArr)
1314
+            // var Arr = []
1315
+            // for(let i=0;i<newArr.length;i++){
1316
+            //   for(let j=0;j<this.dialyzerPerfusionApparatus.length;j++){
1317
+            //      var newarr = newArr[i].toUpperCase()
1318
+
1319
+            //      var dialy = this.dialyzerPerfusionApparatus[j].name.toUpperCase()
1320
+
1321
+            //      if(newarr == dialy){
1322
+            //         Arr.push(this.dialyzerPerfusionApparatus[j].name)
1323
+            //      }
1324
+            //   }
1325
+            // }
1326
+            // var arrtwo = Arr.join(",")
1327
+            // console.log("Arr",arrtwo)
1327 1328
             this.InnerDialogProps.values = this.dialyzerPerfusionApparatus
1328 1329
             this.InnerDialogProps.titles = '透析器/灌流器'
1329 1330
             this.InnerDialogProps.type = 'dialyzer_perfusion_apparatus'
1330
-            this.InnerDialogProps.selected = arrtwo
1331
+
1332
+            
1333
+            this.InnerDialogProps.selected = this.dialysisPrescription.dialyzer_perfusion_apparatus
1331 1334
             this.InnerDialogProps.isShowTextArea = false
1332 1335
             break
1333 1336
 
@@ -3312,7 +3315,7 @@
3312 3315
         if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
3313 3316
           this.dialysisPrescription.anticoagulant_zongliang = ''
3314 3317
         }
3315
-
3318
+        console.log("首季",this.dialysisPrescription.anticoagulant_zongliang)
3316 3319
       
3317 3320
       },
3318 3321
       'prescription.id': {

+ 16 - 2
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue View File

@@ -964,7 +964,10 @@ export default {
964 964
       }
965 965
 
966 966
       getTodayMonitor(params).then(rs => {
967
+        console.log("机构ID",this.org_id)
968
+        
967 969
         var resp = rs.data.data
970
+       
968 971
         this.form.operate_time = resp.monitor.operate_time ? (resp.monitor.operate_time + 3600) * 1000 : Date.parse(new Date())
969 972
         this.form.temperature = '' // this.last_monitor_record.pulse_frequency;
970 973
 
@@ -973,11 +976,21 @@ export default {
973 976
         this.form.systolic_bp = '' // this.last_monitor_record.systolic_blood_pressure;
974 977
         this.form.diastolic_bp = '' // this.last_monitor_record.diastolic_blood_pressure;
975 978
         this.form.blood_flow_volume = resp.monitor.blood_flow_volume ? resp.monitor.blood_flow_volume : ''
976
-        this.form.venous_pressure = '' // this.last_monitor_record.venous_pressure;
979
+        // 静脉压
980
+        if(this.org_id == 10060){
981
+          this.form.venous_pressure = resp.monitor.venous_pressure
982
+        }else{
983
+          this.form.venous_pressure = '' // this.last_monitor_record.venous_pressure;
984
+        }
985
+        
977 986
         this.form.venous_pressure_type = resp.monitor.venous_pressure_type ? resp.monitor.venous_pressure_type : 1
978 987
         this.form.arterial_pressure = resp.monitor.arterial_pressure ? resp.monitor.arterial_pressure : '' // this.last_monitor_record.arterial_pressure;
979 988
         this.form.arterial_pressure_type = resp.monitor.arterial_pressure_type ? resp.monitor.arterial_pressure_type : 1
980
-        this.form.transmembrane_pressure = '' // this.last_monitor_record.transmembrane_pressure;
989
+        if(this.org_id == 10060){
990
+          this.form.transmembrane_pressure = resp.monitor.transmembrane_pressure;
991
+        }else{
992
+          this.form.transmembrane_pressure = '' // this.last_monitor_record.transmembrane_pressure;
993
+        }
981 994
         this.form.transmembrane_pressure_type = resp.monitor.transmembrane_pressure_type ? resp.monitor.transmembrane_pressure_type : 1
982 995
         this.form.ultrafiltration_rate = resp.monitor.ultrafiltration_rate ? resp.monitor.ultrafiltration_rate : ''
983 996
         this.form.ultrafiltration_volume = resp.monitor.ultrafiltration_volume ? resp.monitor.ultrafiltration_volume : ''
@@ -1103,6 +1116,7 @@ export default {
1103 1116
     },
1104 1117
 
1105 1118
     submitAction: function() {
1119
+      
1106 1120
       // TODO loading
1107 1121
       var is_new = this.form.id
1108 1122
       this.form.operate_time = parseInt(this.form.operate_time / 1000)

+ 1 - 1
src/xt_pages/dialysis/dialysisDoctorAdvice.vue View File

@@ -425,7 +425,7 @@ export default {
425 425
     },
426 426
 
427 427
     selectSchedulType(scheduleType) {
428
-      // alert(scheduleType);/
428
+     
429 429
       this.schedulType = scheduleType;
430 430
       this.listQuery.schedul_type = scheduleType;
431 431
       this.requestSchedualDoctors(this.time);

+ 62 - 12
src/xt_pages/medicalScheduling/index.vue View File

@@ -7,7 +7,7 @@
7 7
                 <el-button type="primary" @click="DeleteStaffSchedule">清除</el-button>
8 8
                 <el-button type="primary" @click="copyStaffSchedule">复制</el-button>
9 9
                 <el-button type="primary" icon="el-icon-printer" @click="toPrint">打印</el-button>
10
-                <!-- <el-button type="primary" icon="el-icon-printer" @click="toPrint">导出</el-button> -->
10
+                <el-button type="primary" icon="el-icon-printer" @click="exportList">导出</el-button>
11 11
             </div>
12 12
         </div>
13 13
         <div class="app-container">
@@ -319,19 +319,26 @@
319 319
         </div>
320 320
 
321 321
 
322
-        <el-dialog
322
+        <!-- <el-dialog
323 323
             title="导出排班"
324 324
             :visible.sync="exportDialogVisible"
325
-            width="30%"
326
-            :before-close="handleClose">
325
+            width="30%">
327 326
             <span>
328
-
327
+             <div class="block">
328
+               <span class="demonstration">月份:</span>
329
+               <el-date-picker
330
+                v-model="value1"
331
+                type="week"
332
+                format="yyyy 第 WW 周"
333
+                placeholder="选择周">
334
+             </el-date-picker>
335
+             </div>
329 336
             </span>
330 337
             <span slot="footer" class="dialog-footer">
331 338
                 <el-button @click="dialogVisible = false">取 消</el-button>
332
-                <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
339
+                <el-button type="primary" @click="exportList">确 定</el-button>
333 340
             </span>
334
-        </el-dialog>    
341
+        </el-dialog>     -->
335 342
     </div>
336 343
 </template>
337 344
 
@@ -402,7 +409,8 @@ export default {
402 409
            radio:'1',
403 410
            nurseTableData:[],
404 411
            doctorTableData:[],
405
-           exportDialogVisible:false
412
+           exportDialogVisible:false,
413
+           month_time:""
406 414
         }
407 415
     },
408 416
     methods:{
@@ -944,9 +952,10 @@ export default {
944 952
                     data.push(...newNurse)
945 953
                     data.push(...newDoctor)
946 954
                     data.push(obj)
955
+                    
947 956
                     this.tableData = data
948 957
 
949
-
958
+                   console.log("表哥3333333333",this.tableData)
950 959
                 }
951 960
             })
952 961
         },
@@ -1911,7 +1920,48 @@ export default {
1911 1920
               this.getDoctorList()
1912 1921
             }
1913 1922
          })
1914
-       }
1923
+       },
1924
+
1925
+       toExport(){
1926
+         this.exportDialogVisible = true
1927
+
1928
+       },
1929
+
1930
+     getTimestamp(time) { //把时间日期转成时间戳
1931
+          return (new Date(time)).getTime() / 1000
1932
+       },
1933
+       exportList(){
1934
+         import('@/vendor/Export2Excel').then(excel => {
1935
+         for(let i=0;i<this.tableData.length;i++){
1936
+           this.tableData[i].monday  = this.getClass(this.tableData[i].user_name,1)
1937
+           this.tableData[i].tuesday  = this.getClass(this.tableData[i].user_name,2)
1938
+           this.tableData[i].wednesday = this.getClass(this.tableData[i].user_name,3)
1939
+           this.tableData[i].thursday = this.getClass(this.tableData[i].user_name,4)
1940
+           this.tableData[i].friday = this.getClass(this.tableData[i].user_name,5)
1941
+           this.tableData[i].saturday = this.getClass(this.tableData[i].user_name,6)
1942
+           this.tableData[i].weekday = this.getClass(this.tableData[i].user_name,0)
1943
+         }
1944
+         console.log("this.table",this.tableData)
1945
+         const tHeader = ['医护姓名', '周一'+"("+this.weekDayArr[0]+")" ,  '周二'+"("+this.weekDayArr[1]+")", '周三'+"("+this.weekDayArr[2]+")" , '周四'+"("+this.weekDayArr[3]+")" ,  '周五'+"("+this.weekDayArr[4]+")" ,  '周六'+"("+this.weekDayArr[5]+")",'周日'+"("+this.weekDayArr[6]+")"]
1946
+         const filterVal = ['user_name', 'monday', 'tuesday','wednesday','thursday','friday','saturday','weekday'] 
1947
+         
1948
+         const data = this.formatJson(filterVal,this.tableData)
1949
+         console.log("data",data)
1950
+       
1951
+         excel.export_json_to_excel({
1952
+           header: tHeader,
1953
+           data,
1954
+           filename: '医护排班'
1955
+         })
1956
+          this.downloadLoading = false
1957
+    
1958
+        })
1959
+       },
1960
+       formatJson(filterVal, jsonData) {
1961
+        return jsonData.map(v => filterVal.map(j => v[j]))
1962
+       },
1963
+    
1964
+    
1915 1965
     },
1916 1966
     created(){
1917 1967
         //获取医护人员
@@ -1949,8 +1999,8 @@ export default {
1949 1999
         }
1950 2000
       var now = moment().locale('zh-cn').format('YYYY-MM-DD 00:00:00')
1951 2001
       this.timeNow = this.getTimestamp(now)
1952
-
1953
-
2002
+     
2003
+   
1954 2004
     }
1955 2005
 }
1956 2006
 </script>

+ 2 - 2
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

@@ -81,7 +81,7 @@
81 81
           <el-button v-if="this.info.prescription_status >= 2" size="small" @click="open(9)" type="primary"
82 82
           >结算单
83 83
           </el-button>
84
-
84
+<!-- 
85 85
           <el-button v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919" size="small" @click="open(10)" type="primary">
86 86
           &gt;退号
87 87
           </el-button>
@@ -89,7 +89,7 @@
89 89
           <el-button v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919"
90 90
                      size="small" @click="open(11)" type="primary"
91 91
           &gt;撤销明细>
92
-          </el-button>
92
+          </el-button> -->
93 93
 
94 94
 
95 95
           <!--<el-button v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919" size="small" @click="open(12)" type="primary"-->

+ 3 - 0
src/xt_pages/stock/stockInOrder.vue View File

@@ -586,6 +586,7 @@ export default {
586 586
       "-" +
587 587
       (nowDay < 10 ? "0" + nowDay : nowDay);
588 588
     nowDate.setMonth(nowDate.getMonth() - 1);
589
+    nowYear = nowDate.getFullYear();
589 590
     nowMonth = nowDate.getMonth() + 1;
590 591
     nowDay = nowDate.getDate();
591 592
     this.start_time =
@@ -595,6 +596,8 @@ export default {
595 596
       "-" +
596 597
       (nowDay < 10 ? "0" + nowDay : nowDay);
597 598
      
599
+
600
+
598 601
      
599 602
 
600 603
       // this.warehousing_time =

+ 1 - 0
src/xt_pages/user/dialysisSolution.vue View File

@@ -1260,6 +1260,7 @@ export default {
1260 1260
       this.fetchPatientDialysisSolutions()
1261 1261
     },
1262 1262
     openEdit(index, row) {
1263
+     
1263 1264
       this.current_index = index
1264 1265
 
1265 1266
       this.addPlan.id = row.id

+ 2 - 2
src/xt_pages/user/patients.vue View File

@@ -679,7 +679,7 @@
679 679
         ],
680 680
         sourceType: 0,
681 681
         sourceID: 0,
682
-        lapsetoType: 0,
682
+        lapsetoType: 1,
683 683
         sourceArr: [
684 684
           { value: 0, label: '全部', source: 0, lapseto: 0 },
685 685
           // { value: 1, label: "转出", source: 0, lapseto: 2 },
@@ -728,7 +728,7 @@
728 728
           limit: 10,
729 729
           schedul_type: 0,
730 730
           binding_state: 0,
731
-          lapseto: 0,
731
+          lapseto: 1,
732 732
           source: 0,
733 733
           start_time: '',
734 734
           end_time: '',

+ 8 - 6
src/xt_pages/workforce/appointment.vue View File

@@ -234,11 +234,12 @@
234 234
       getWeekPanels() {
235 235
         // this.scheduleZoneRow = []
236 236
         // this.scheduleZone = []
237
-        getWeekPanels(1).then(response => {
237
+        getWeekPanels(1,this.partition_id).then(response => {
238 238
           if (response.data.state == 0) {
239 239
             return false
240 240
           }
241 241
           var partitions = response.data.data.partitions
242
+          console.log("分区",partitions)
242 243
           this.theWeek.lastWeek = this.theWeek.thisWeek - 1
243 244
           this.theWeek.thisWeek = response.data.data.theWeek
244 245
           this.theWeek.nextWeek = this.theWeek.thisWeek + 1
@@ -414,6 +415,7 @@
414 415
                   total: 0
415 416
                 }
416 417
                 that.scheduleZone.push(thisPa)
418
+                
417 419
               })
418 420
             })
419 421
           }
@@ -2052,10 +2054,8 @@
2052 2054
                 }
2053 2055
                 i++
2054 2056
               }
2055
-              console.log("list2021444444x",list)  
2056
-              for(let i=0;i<list.length;i++){
2057
-                console.log("list9999999999",list[i])
2058
-              }
2057
+             
2058
+             
2059 2059
                const start_time = moment().weekday(1).format('YYYY-MM-DD'); //本周一
2060 2060
                var start = this.getTimestamp(start_time)
2061 2061
                console.log("start",start)
@@ -2100,7 +2100,7 @@
2100 2100
             if(this.export_type == 1){
2101 2101
                 week = scheduleList
2102 2102
              }
2103
-             console.log("week88888888888",week)
2103
+           
2104 2104
              if(week.length > 0){
2105 2105
               for(let i=0;i<list.length;i++){
2106 2106
                for(let j=0;j<week.length;j++){
@@ -2414,11 +2414,13 @@
2414 2414
        changePartition(val){
2415 2415
          this.partition_id = val
2416 2416
          this.getThreeWeekList()
2417
+         this.getWeekPanels()
2417 2418
        },
2418 2419
 
2419 2420
        changeSchedule(val){
2420 2421
          this.schedule_type = val
2421 2422
          this.getThreeWeekList()
2423
+         this.getWeekPanels()
2422 2424
        },
2423 2425
 
2424 2426
        changeWeek(val){

+ 23 - 7
src/xt_pages/workforce/components/tableData.vue View File

@@ -760,7 +760,8 @@ export default {
760 760
       ],
761 761
       partition_id:"",
762 762
       schedule_type:"",
763
-      zones:[{id:0,name:"全部"}]
763
+      zones:[{id:0,name:"全部"}],
764
+      theType:""
764 765
     };
765 766
   },
766 767
 
@@ -768,11 +769,13 @@ export default {
768 769
     weekTime: function() {
769 770
       var theType = this.weekType(this.weekTime);
770 771
       console.log("999999999",theType)
771
-      this.getSchedules(theType);
772
+      this.theType = theType
773
+      this.getSchedules();
772 774
     },
773 775
     scheduleZoneRow: function() {
774 776
       var theType = this.weekType(this.weekTime);
775
-      this.getSchedules(theType);
777
+      this.theType = theType
778
+      this.getSchedules();
776 779
     },
777 780
     tableHeight(val) {
778 781
       if (!this.timer) {
@@ -901,16 +904,24 @@ export default {
901 904
       this.$refs.singleTable.setCurrentRow(row);
902 905
       this.currentData.patient_id = 0;
903 906
     },
904
-    getSchedules(weekType) {
905
-      
906
-      getSchedules(weekType).then(response => {
907
+    getSchedules() {
908
+        const params = {
909
+          weekTime:this.theType,
910
+          partition_id:this.partition_id,
911
+          schedule_type:this.schedule_type,
912
+        }
913
+      getSchedules(params).then(response => {
907 914
         if (response.data.state == 1) {
908 915
           this.weekTitle = response.data.data.weekTitle;
909 916
           this.weekDays = response.data.data.days;
910 917
           this.toDay = response.data.data.today;
911 918
           var theSchedules = response.data.data.schdules;
919
+          
920
+          console.log("中国4444444444444",this.scheduleZone)
921
+        
912 922
           var that = this;
913 923
           this.scheduleZone.forEach(function(zone, index) {
924
+           
914 925
             that.scheduleZone[index].Mon_M = {
915 926
               mode_id: 0,
916 927
               mode_name: "",
@@ -1041,6 +1052,7 @@ export default {
1041 1052
 
1042 1053
             if (response.data.data.schdules.length > 0) {
1043 1054
               theSchedules.forEach(function(schedule, sindex) {
1055
+
1044 1056
                 if (zone.jihao_id == schedule.bed_id) {
1045 1057
                   // if(zone.zone_id == schedule.partition_id && zone.jihao_id == schedule.bed_id) {
1046 1058
                   var weekPath = that.weekPath(
@@ -1272,6 +1284,7 @@ export default {
1272 1284
 
1273 1285
       this.currentData.type_name = this.dayType(week[1]);
1274 1286
       this.currentData.zone_name = row.area;
1287
+      
1275 1288
       this.currentData.bed_name = row.cut;
1276 1289
       this.currentData.partition_type = row.zone_type;
1277 1290
 
@@ -1993,10 +2006,12 @@ export default {
1993 2006
     changePartiton(val){
1994 2007
      this.$emit('event1', val)
1995 2008
       this.partition_id = val
2009
+      this.getSchedules()
1996 2010
     },
1997 2011
     changeSchedule_type(val){
1998 2012
      this.$emit('event2', val)
1999 2013
      this.schedule_type = val
2014
+     this.getSchedules()
2000 2015
     }
2001 2016
   },
2002 2017
   components: {
@@ -2041,6 +2056,7 @@ export default {
2041 2056
         }
2042 2057
       });
2043 2058
     }
2059
+  
2044 2060
     this.scheduleZoneRow = this.scheduleZoneRowProp;
2045 2061
     
2046 2062
 
@@ -2048,7 +2064,7 @@ export default {
2048 2064
     if (this.weekday == 0) {
2049 2065
       this.weekday = 7;
2050 2066
     }
2051
-  //  this.getAllZones()
2067
+    this.getAllZones()
2052 2068
   }
2053 2069
 };
2054 2070
 </script>