Explorar el Código

Merge branch 'superman' of http://git.shengws.com/zhangbj/xt_vue into superman

csx hace 6 años
padre
commit
933e6821ad
Se han modificado 3 ficheros con 113 adiciones y 102 borrados
  1. 1 1
      config/dev.env.js
  2. 1 1
      src/api/signandweigh.js
  3. 111 100
      src/xt_pages/sign/index.vue

+ 1 - 1
config/dev.env.js Ver fichero

@@ -6,5 +6,5 @@
6 6
 module.exports = {
7 7
   NODE_ENV: '"development"',
8 8
   ENV_CONFIG: '"dev"',
9
-  BASE_API: '"http://localhost:9529"', // '"http://localhost:9529"'//http://api.xt.test.sgjyun.com http://112.74.16.180:9527
9
+  BASE_API: '"http://localhost:9529"',//'"http://112.74.16.180:9527"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527
10 10
 }

+ 1 - 1
src/api/signandweigh.js Ver fichero

@@ -71,4 +71,4 @@ export function sighdata(params){
71 71
      params: params,   
72 72
      method: 'Post'
73 73
    })
74
-}
74
+}

+ 111 - 100
src/xt_pages/sign/index.vue Ver fichero

@@ -9,11 +9,13 @@
9 9
             <el-col :span="8">
10 10
                 <div class="dataTitle">患者列表</div>
11 11
                 <div style="margin-bottom: 10px;">
12
-                    <el-input v-model="queryParams.keywords" placeholder="姓名/透析号" style="width: 180px;" @change="changeSearch"></el-input>
12
+                    <el-input v-model="queryParams.keywords" placeholder="姓名/透析号" style="width: 180px;" @change="changeSearch"></el-input>&nbsp;
13
+                    <el-button type="primary" @change="changeSearch">搜索</el-button>
13 14
                     <el-select v-model="queryParams.schedule_type" style="width: 100px;" @change="changeSearch">
14 15
                     <el-option v-for="item in shiftOptions" :label="item.label" :value="item.value" :key="item.value"></el-option>
15 16
                     </el-select>
16 17
                 </div>
18
+
17 19
                 <el-table  :data="patients" :class="signAndWeighBoxPatients" style="width: 100%" border highlight-current-row :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" max-height="300" @current-change="handleCurrentChange">
18 20
                     <el-table-column type="index" label="序号" width="50px" align="center"></el-table-column>
19 21
                     <el-table-column prop="name" label="姓名" min-width="20" align="center">
@@ -24,7 +26,7 @@
24 26
 
25 27
                     <el-table-column prop="state" label="状态" min-width="30" align="center">
26 28
                         <template slot-scope="scope">
27
-                            <span v-if="scope.row.id==0">未签到</span>
29
+                            <span v-if="scope.row.signin.id ==0">未签到</span>
28 30
                             <span v-else-if="scope.row.dialysis_order.stage==2">已经下机</span>
29 31
                             <span v-else>已签到</span>
30 32
                         </template>
@@ -78,7 +80,7 @@
78 80
                     <el-row :gutter="20">
79 81
                         <el-col :span="23" align="right" class="button">
80 82
                             <el-button  @click="hide()">取消</el-button>
81
-                            <el-button @click="savedata();updatedata();sighdata()" type="primary">保存</el-button>
83
+                            <el-button @click="savedata();updatedata();sighdata();" type="primary">保存</el-button>
82 84
                         </el-col>
83 85
                     </el-row>
84 86
                    </div>
@@ -136,6 +138,7 @@ export default {
136 138
         DBP_after: '', // 舒张压
137 139
         SBP_after: '', // 收缩压
138 140
         dialysis_no: ''
141
+       
139 142
       },
140 143
       weigh_list: {
141 144
         weight_before: '', // 透前体重
@@ -192,11 +195,19 @@ export default {
192 195
   methods: {
193 196
     fetchSignPatients() {
194 197
       fetchSignPatients(this.queryParams).then(response => {
195
-        this.patients = []
198
+        this.patients = []      
196 199
         if (response.data.state === 1) {
197 200
           this.patients = response.data.data.patients
198
-          console.log("排班数据是什么呢?")
199
-          console.log(this.patients)
201
+          console.log("病人信息",this.patients[0].schedule)           
202
+            //将没有排班的信息排除
203
+            for(let i = this.patients.length-1;i >= 0;i--){
204
+      
205
+             if(this.patients[i].schedule.id == 0){
206
+                 this.patients.splice(i,1)
207
+             }
208
+              
209
+          }
210
+
200 211
           for (let i = this.patients.length - 1; ; i--) {
201 212
             if(this.patients[i].schedule.id == 0){
202 213
               this.patients.splice(i, 1)
@@ -208,8 +219,12 @@ export default {
208 219
 
209 220
           if (this.queryParams.need_schedule_type === 1) {
210 221
             var sl = this.schedules.length
222
+            console.log("s1是什么东西")
223
+            console.log(sl)
211 224
             for (let index = 0; index < sl; index++) {
212 225
               if (this.schedules[index].type in response.data.data.panel) {
226
+                console.log(this.schedules[index].type)
227
+                console.log(response.data.data.panel[this.schedules[index].type].schedule)
213 228
                 this.schedules[index].arrange = response.data.data.panel[this.schedules[index].type].schedule
214 229
                 this.schedules[index].sign = response.data.data.panel[this.schedules[index].type].sign
215 230
                 this.schedules[index].before = response.data.data.panel[this.schedules[index].type].before
@@ -257,6 +272,36 @@ export default {
257 272
     },
258 273
     handleCurrentChange(row, old) {
259 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
+
260 305
       //     this.weigh_form = {
261 306
       //     id:0,
262 307
       //     choose:false,
@@ -285,98 +330,61 @@ export default {
285 330
       //     patient_id: 0,
286 331
       //     dialysis_no:'',
287 332
       // };
333
+>>>>>>> .theirs
288 334
       this.disa = true
289 335
       this.show=false
290 336
       this.weigh_form.choose = true
291 337
       this.weigh_form.name = row.name
292 338
       this.weigh_form.dialysis_no = row.dialysis_no
293
-      //   if (row.alias.length>0) {
294
-      //       this.weigh_form.name += "("+row.alias+")";
295
-      //   }
296 339
       this.weigh_form.patient_id = row.id
297 340
       this.querySignParams.patient_id = row.id
298 341
       this.dialysis_stege = row.dialysis_order.stage
299 342
       this.getDialysisInforInfomation(row.id)
300
-      this.getDialysisAfterInfomation(row.id)
301
-        if (row.signin != null) {
302
-             this.weigh_form.dry_weight = '' + row.signin.dry_weight;
303
-             this.weigh_form.clothes_weight = '' + row.signin.clothing_weight;
304
-              // 透前
305
-              this.weigh_form.weigh_before = '' + row.signin.weighing_before;
306
-              this.weigh_form.dehydrated_weight = '' + row.signin.target_dewatering;
307
-
308
-              if (this.weigh_form.dry_weight == 0) {
309
-                  this.weigh_form.dehydrated_percent  = '';
310
-              }else {
311
-                  var dehydrated_percent = ((this.weigh_form.dehydrated_weight/this.weigh_form.dry_weight) * 100).toFixed(2);
312
-                  if (isNaN(dehydrated_percent)) {
313
-                      this.weigh_form.dehydrated_percent  = '';
314
-                  }else {
315
-                      this.weigh_form.dehydrated_percent  = dehydrated_percent + "%";
316
-                  }
317
-              }
343
+      this.getDialysisAfterInfomation(row.id) 
318 344
 
319
-              this.weigh_form.weight_before = '' + row.signin.weight_before;
320
-              this.weigh_form.temperature_before = '' + row.signin.temperature_before;
321
-              this.weigh_form.pulse_rate_before = '' + row.signin.pulse_frequency_before;
322
-              this.weigh_form.respiratory_rate_before = '' + row.signin.breathing_rate_before;
323
-              this.weigh_form.DBP_before = '' + row.signin.diastolic_blood_pressure_before;
324
-              this.weigh_form.SBP_before = '' + row.signin.systolic_blood_pressure_before;
325
-
326
-              this.weigh_form.weigh_after = '' + row.signin.weighing_after;
327
-              this.weigh_form.weight_reduce_after = '' + row.signin.weight_loss;
328
-              this.weigh_form.weight_after = '' + row.signin.weight_after;
329
-              this.weigh_form.temperature_after = '' + row.signin.temperature_after;
330
-              this.weigh_form.pulse_rate_after = '' + row.signin.pulse_frequency_after;
331
-              this.weigh_form.respiratory_rate_after = '' + row.signin.breathing_rate_after;
332
-              this.weigh_form.DBP_after = '' + row.signin.diastolic_blood_pressure_after;
333
-              this.weigh_form.SBP_after = '' + row.signin.systolic_blood_pressure_after;
334
-              this.weigh_form.id = row.id;
335
-              console.log("好难哦")
336
-              console.log(this.weigh_form.id)
337
-        }
338
-    },
339
-    submitSign() {
340
-      SignWeigh(this.querySignParams, this.weigh_form).then(response => {
341
-        if (response.data.state === 1) {
342
-          this.$message({
343
-            type: 'success',
344
-            message: '成功!'
345
-          })
346
-
347
-          var tlen = this.patients.length
348
-          for (let index = 0; index < tlen; index++) {
349
-            if (this.patients[index].id === this.querySignParams.patient_id) {
350
-              var signin = this.patients[index].signin
351
-              this.patients[index].signin = response.data.data.sign
352
-
353
-              if (this.patients[index].schedule.id > 0 && (this.patients[index].schedule.schedule_type >= 1 || this.patients[index].schedule.schedule_type <= 3)) {
354
-                var sl = this.schedules.length
355
-                for (let j = 0; j < sl; j++) {
356
-                  if (this.schedules[j].type === this.patients[index].schedule.schedule_type) {
357
-                    if (this.weigh_form.id <= 0) {
358
-                      this.schedules[j].sign++
359
-                    }
360
-                    if (signin.weigh_before_time === 0 && response.data.data.sign.weigh_before_time > 0) {
361
-                      this.schedules[j].before++
362
-                    }
363
-
364
-                    if (signin.weigh_time === 0 && response.data.data.sign.weigh_time > 0) {
365
-                      this.schedules[j].after++
366
-                    }
367
-                  }
368
-                }
369
-              }
370
-              break
371
-            }
372
-          }
373
-          this.weigh_form.id = response.data.data.sign.id
374
-        } else {
375
-          this.$message.error(response.data.msg)
376
-          return false
377
-        }
378
-      })
345
+      //this.getsignweigh(row.id)    
379 346
     },
347
+    // submitSign() {
348
+    //   SignWeigh(this.querySignParams, this.weigh_form).then(response => {
349
+    //     if (response.data.state === 1) {
350
+    //       this.$message({
351
+    //         type: 'success',
352
+    //         message: '成功!'
353
+    //       })
354
+
355
+    //       var tlen = this.patients.length
356
+    //       for (let index = 0; index < tlen; index++) {
357
+    //         if (this.patients[index].id === this.querySignParams.patient_id) {
358
+    //           var signin = this.patients[index].signin
359
+    //           this.patients[index].signin = response.data.data.sign
360
+
361
+    //           if (this.patients[index].schedule.id > 0 && (this.patients[index].schedule.schedule_type >= 1 || this.patients[index].schedule.schedule_type <= 3)) {
362
+    //             var sl = this.schedules.length
363
+    //             for (let j = 0; j < sl; j++) {
364
+    //               if (this.schedules[j].type === this.patients[index].schedule.schedule_type) {
365
+    //                 if (this.weigh_form.id <= 0) {
366
+    //                   this.schedules[j].sign++
367
+    //                 }
368
+    //                 if (signin.weigh_before_time === 0 && response.data.data.sign.weigh_before_time > 0) {
369
+    //                   this.schedules[j].before++
370
+    //                 }
371
+
372
+    //                 if (signin.weigh_time === 0 && response.data.data.sign.weigh_time > 0) {
373
+    //                   this.schedules[j].after++
374
+    //                 }
375
+    //               }
376
+    //             }
377
+    //           }
378
+    //           break
379
+    //         }
380
+    //       }
381
+    //       this.weigh_form.id = response.data.data.sign.id
382
+    //     } else {
383
+    //       this.$message.error(response.data.msg)
384
+    //       return false
385
+    //     }
386
+    //   })
387
+    // },
380 388
 
381 389
     getDialysisInforInfomation(id) {
382 390
       getDialysisInforInfomation(id).then(response => {
@@ -523,36 +531,39 @@ export default {
523 531
       params.breathing_rateafter = this.weigh_infor.breathing_rate
524 532
       params.systolic_blood_pressureafter = this.weigh_infor.systolic_blood_pressure
525 533
       params.diastolic_blood_pressureafter = this.weigh_infor.diastolic_blood_pressure
526
-      console.log("params数据",params)
534
+       console.log("params是什么?",params)
527 535
       sighdata(params).then(response => {
528
-         var signs = response.data.data.signs
529
-           console.log(signs)
536
+        var signs = response.data.data.signs
537
+       // this.patients[this.table_current_index].signin.id = 1
530 538
         if (response.data.state === 1) {
531 539
           this.$message({
532 540
             type: 'success',
533 541
             message: '成功!'
534 542
           })
535 543
         var tlen = this.patients.length
544
+        
536 545
         for(let index=0;index<tlen;index++ ){
537
-           if(this.patients[index].id ==params.patient_id){
546
+           if(this.patients[index].id == params.patient_id){
538 547
               var signin = this.patients[index].signin
539
-              this.patients[index].signin = response.data.data.signs
540
-
548
+              this.patients[index].signin = response.data.data.signs  
549
+             
541 550
               if(this.patients[index].schedule.id > 0 && (this.patients[index].schedule.schedule_type >= 1 || this.patients[index].schedule.schedule_type <= 3)){
542 551
                     var sl = this.schedules.length
543 552
                     for(let j = 0; j < sl; j++){
544
-                         if(this.schedules[j].type === this.patients[index].schedule.schedule_type){
545
-                              // if(this.weigh_form.id>= 0){
546
-                              //     this.schedules[j].sign++
547
-                              // }
548
-                              if((signin.weigh_before_time === 0 && response.data.data.signs.weigh_before_time > 0)||(signin.weigh_time === 0 && response.data.data.signs.weigh_time > 0)){
553
+                         if(this.schedules[j].type == this.patients[index].schedule.schedule_type){
554
+                              if((signin.weigh_before_time == 0 && response.data.data.signs.weigh_before_time > 0)||(signin.weigh_time === 0 && response.data.data.signs.weigh_time > 0)){
549 555
                                     this.schedules[j].sign++
550 556
                               }
557
+<<<<<<< .mine
558
+                              if(signin.weigh_before_time == 0 && response.data.data.signs.weigh_before_time > 0){
559
+                              
560
+=======
551 561
                               if(signin.weigh_before_time === 0 && response.data.data.signs.weigh_before_time > 0){
552 562
 
563
+>>>>>>> .theirs
553 564
                                    this.schedules[j].before++
554 565
                               }
555
-                              if(signin.weigh_time === 0 && response.data.data.signs.weigh_time > 0){
566
+                              if(signin.weigh_time == 0 && response.data.data.signs.weigh_time > 0){
556 567
                                   this.schedules[j].after++
557 568
                               }
558 569
                          }
@@ -567,7 +578,7 @@ export default {
567 578
            return false
568 579
         }
569 580
       })
570
- }
581
+     }
571 582
   },
572 583
   watch: {
573 584
     'weigh_form.weigh_before': function() {