Pārlūkot izejas kodu

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

csx 6 gadus atpakaļ
vecāks
revīzija
933e6821ad
3 mainītis faili ar 113 papildinājumiem un 102 dzēšanām
  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 Parādīt failu

6
 module.exports = {
6
 module.exports = {
7
   NODE_ENV: '"development"',
7
   NODE_ENV: '"development"',
8
   ENV_CONFIG: '"dev"',
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 Parādīt failu

71
      params: params,   
71
      params: params,   
72
      method: 'Post'
72
      method: 'Post'
73
    })
73
    })
74
-}
74
+}

+ 111 - 100
src/xt_pages/sign/index.vue Parādīt failu

9
             <el-col :span="8">
9
             <el-col :span="8">
10
                 <div class="dataTitle">患者列表</div>
10
                 <div class="dataTitle">患者列表</div>
11
                 <div style="margin-bottom: 10px;">
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
                     <el-select v-model="queryParams.schedule_type" style="width: 100px;" @change="changeSearch">
14
                     <el-select v-model="queryParams.schedule_type" style="width: 100px;" @change="changeSearch">
14
                     <el-option v-for="item in shiftOptions" :label="item.label" :value="item.value" :key="item.value"></el-option>
15
                     <el-option v-for="item in shiftOptions" :label="item.label" :value="item.value" :key="item.value"></el-option>
15
                     </el-select>
16
                     </el-select>
16
                 </div>
17
                 </div>
18
+
17
                 <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">
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
                     <el-table-column type="index" label="序号" width="50px" align="center"></el-table-column>
20
                     <el-table-column type="index" label="序号" width="50px" align="center"></el-table-column>
19
                     <el-table-column prop="name" label="姓名" min-width="20" align="center">
21
                     <el-table-column prop="name" label="姓名" min-width="20" align="center">
24
 
26
 
25
                     <el-table-column prop="state" label="状态" min-width="30" align="center">
27
                     <el-table-column prop="state" label="状态" min-width="30" align="center">
26
                         <template slot-scope="scope">
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
                             <span v-else-if="scope.row.dialysis_order.stage==2">已经下机</span>
30
                             <span v-else-if="scope.row.dialysis_order.stage==2">已经下机</span>
29
                             <span v-else>已签到</span>
31
                             <span v-else>已签到</span>
30
                         </template>
32
                         </template>
78
                     <el-row :gutter="20">
80
                     <el-row :gutter="20">
79
                         <el-col :span="23" align="right" class="button">
81
                         <el-col :span="23" align="right" class="button">
80
                             <el-button  @click="hide()">取消</el-button>
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
                         </el-col>
84
                         </el-col>
83
                     </el-row>
85
                     </el-row>
84
                    </div>
86
                    </div>
136
         DBP_after: '', // 舒张压
138
         DBP_after: '', // 舒张压
137
         SBP_after: '', // 收缩压
139
         SBP_after: '', // 收缩压
138
         dialysis_no: ''
140
         dialysis_no: ''
141
+       
139
       },
142
       },
140
       weigh_list: {
143
       weigh_list: {
141
         weight_before: '', // 透前体重
144
         weight_before: '', // 透前体重
192
   methods: {
195
   methods: {
193
     fetchSignPatients() {
196
     fetchSignPatients() {
194
       fetchSignPatients(this.queryParams).then(response => {
197
       fetchSignPatients(this.queryParams).then(response => {
195
-        this.patients = []
198
+        this.patients = []      
196
         if (response.data.state === 1) {
199
         if (response.data.state === 1) {
197
           this.patients = response.data.data.patients
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
           for (let i = this.patients.length - 1; ; i--) {
211
           for (let i = this.patients.length - 1; ; i--) {
201
             if(this.patients[i].schedule.id == 0){
212
             if(this.patients[i].schedule.id == 0){
202
               this.patients.splice(i, 1)
213
               this.patients.splice(i, 1)
208
 
219
 
209
           if (this.queryParams.need_schedule_type === 1) {
220
           if (this.queryParams.need_schedule_type === 1) {
210
             var sl = this.schedules.length
221
             var sl = this.schedules.length
222
+            console.log("s1是什么东西")
223
+            console.log(sl)
211
             for (let index = 0; index < sl; index++) {
224
             for (let index = 0; index < sl; index++) {
212
               if (this.schedules[index].type in response.data.data.panel) {
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
                 this.schedules[index].arrange = response.data.data.panel[this.schedules[index].type].schedule
228
                 this.schedules[index].arrange = response.data.data.panel[this.schedules[index].type].schedule
214
                 this.schedules[index].sign = response.data.data.panel[this.schedules[index].type].sign
229
                 this.schedules[index].sign = response.data.data.panel[this.schedules[index].type].sign
215
                 this.schedules[index].before = response.data.data.panel[this.schedules[index].type].before
230
                 this.schedules[index].before = response.data.data.panel[this.schedules[index].type].before
257
     },
272
     },
258
     handleCurrentChange(row, old) {
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
       //     this.weigh_form = {
305
       //     this.weigh_form = {
261
       //     id:0,
306
       //     id:0,
262
       //     choose:false,
307
       //     choose:false,
285
       //     patient_id: 0,
330
       //     patient_id: 0,
286
       //     dialysis_no:'',
331
       //     dialysis_no:'',
287
       // };
332
       // };
333
+>>>>>>> .theirs
288
       this.disa = true
334
       this.disa = true
289
       this.show=false
335
       this.show=false
290
       this.weigh_form.choose = true
336
       this.weigh_form.choose = true
291
       this.weigh_form.name = row.name
337
       this.weigh_form.name = row.name
292
       this.weigh_form.dialysis_no = row.dialysis_no
338
       this.weigh_form.dialysis_no = row.dialysis_no
293
-      //   if (row.alias.length>0) {
294
-      //       this.weigh_form.name += "("+row.alias+")";
295
-      //   }
296
       this.weigh_form.patient_id = row.id
339
       this.weigh_form.patient_id = row.id
297
       this.querySignParams.patient_id = row.id
340
       this.querySignParams.patient_id = row.id
298
       this.dialysis_stege = row.dialysis_order.stage
341
       this.dialysis_stege = row.dialysis_order.stage
299
       this.getDialysisInforInfomation(row.id)
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
     getDialysisInforInfomation(id) {
389
     getDialysisInforInfomation(id) {
382
       getDialysisInforInfomation(id).then(response => {
390
       getDialysisInforInfomation(id).then(response => {
523
       params.breathing_rateafter = this.weigh_infor.breathing_rate
531
       params.breathing_rateafter = this.weigh_infor.breathing_rate
524
       params.systolic_blood_pressureafter = this.weigh_infor.systolic_blood_pressure
532
       params.systolic_blood_pressureafter = this.weigh_infor.systolic_blood_pressure
525
       params.diastolic_blood_pressureafter = this.weigh_infor.diastolic_blood_pressure
533
       params.diastolic_blood_pressureafter = this.weigh_infor.diastolic_blood_pressure
526
-      console.log("params数据",params)
534
+       console.log("params是什么?",params)
527
       sighdata(params).then(response => {
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
         if (response.data.state === 1) {
538
         if (response.data.state === 1) {
531
           this.$message({
539
           this.$message({
532
             type: 'success',
540
             type: 'success',
533
             message: '成功!'
541
             message: '成功!'
534
           })
542
           })
535
         var tlen = this.patients.length
543
         var tlen = this.patients.length
544
+        
536
         for(let index=0;index<tlen;index++ ){
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
               var signin = this.patients[index].signin
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
               if(this.patients[index].schedule.id > 0 && (this.patients[index].schedule.schedule_type >= 1 || this.patients[index].schedule.schedule_type <= 3)){
550
               if(this.patients[index].schedule.id > 0 && (this.patients[index].schedule.schedule_type >= 1 || this.patients[index].schedule.schedule_type <= 3)){
542
                     var sl = this.schedules.length
551
                     var sl = this.schedules.length
543
                     for(let j = 0; j < sl; j++){
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
                                     this.schedules[j].sign++
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
                               if(signin.weigh_before_time === 0 && response.data.data.signs.weigh_before_time > 0){
561
                               if(signin.weigh_before_time === 0 && response.data.data.signs.weigh_before_time > 0){
552
 
562
 
563
+>>>>>>> .theirs
553
                                    this.schedules[j].before++
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
                                   this.schedules[j].after++
567
                                   this.schedules[j].after++
557
                               }
568
                               }
558
                          }
569
                          }
567
            return false
578
            return false
568
         }
579
         }
569
       })
580
       })
570
- }
581
+     }
571
   },
582
   },
572
   watch: {
583
   watch: {
573
     'weigh_form.weigh_before': function() {
584
     'weigh_form.weigh_before': function() {