Browse Source

新功能开发

csx 4 years ago
parent
commit
651577bf62

+ 1 - 1
build/cdn.json View File

1
 {
1
 {
2
-  "version": "1.1.335"
2
+  "version": "1.1.351"
3
 }
3
 }

+ 4 - 0
src/pages/main/dialog/AcceptsDialog.vue View File

300
             this.receiveTreatmentAsses.precaution_other = this.accepts.precaution_other;
300
             this.receiveTreatmentAsses.precaution_other = this.accepts.precaution_other;
301
           }
301
           }
302
         }
302
         }
303
+      }).catch(error => {
304
+        Toast.fail("请求失败")
303
       });
305
       });
304
     } else {
306
     } else {
305
       if (
307
       if (
432
           }
434
           }
433
           this.finish();
435
           this.finish();
434
         }
436
         }
437
+      }).catch(error => {
438
+        Toast.fail("请求失败")
435
       });
439
       });
436
     },
440
     },
437
     finish: function() {
441
     finish: function() {

+ 5 - 3
src/pages/main/dialog/AssessmentDialog.vue View File

640
           this.body_weight_before = weight
640
           this.body_weight_before = weight
641
         } else {
641
         } else {
642
           this.body_weight_before = ''
642
           this.body_weight_before = ''
643
-        }       
643
+        }
644
       },
644
       },
645
       deep: true,
645
       deep: true,
646
       immediate: true
646
       immediate: true
655
           } else {
655
           } else {
656
             this.body_weight_before = ''
656
             this.body_weight_before = ''
657
           }
657
           }
658
-        }       
658
+        }
659
       },
659
       },
660
       deep: true,
660
       deep: true,
661
       immediate: true
661
       immediate: true
1475
           Toast('提交完成')
1475
           Toast('提交完成')
1476
           this.$emit('evaluation', response.data.data.evaluation)
1476
           this.$emit('evaluation', response.data.data.evaluation)
1477
         }
1477
         }
1478
-      })
1478
+      }).catch(error => {
1479
+        Toast.fail("请求失败")
1480
+      });
1479
     },
1481
     },
1480
     showDryWeight: function () {
1482
     showDryWeight: function () {
1481
       if (this.$store.getters.user.user.user_type == 3) {
1483
       if (this.$store.getters.user.user.user_type == 3) {

+ 6 - 2
src/pages/main/dialog/ComputerDialog.vue View File

360
               this.$set(record, key, response.data.data.dialysis_order[key])
360
               this.$set(record, key, response.data.data.dialysis_order[key])
361
             }
361
             }
362
           }
362
           }
363
-        })
363
+        }).catch(error => {
364
+          Toast.fail("请求失败")
365
+        });
364
       },
366
       },
365
       didSelectStartTime: function (time) {
367
       didSelectStartTime: function (time) {
366
         this.start_time_str = parseTime(time, '{y}-{m}-{d} {h}:{i}') + ':00'
368
         this.start_time_str = parseTime(time, '{y}-{m}-{d} {h}:{i}') + ':00'
409
               // this.record[key] = response.data.data.dialysis_order[key]
411
               // this.record[key] = response.data.data.dialysis_order[key]
410
             }
412
             }
411
           }
413
           }
412
-        })
414
+        }).catch(error => {
415
+          Toast.fail("请求失败")
416
+        });
413
       },
417
       },
414
       close: function () {
418
       close: function () {
415
         this.$emit('close')
419
         this.$emit('close')

+ 2 - 0
src/pages/main/dialog/DoubleDialog.vue View File

299
           }
299
           }
300
           this.$emit("did_update", response.data.data.doubleCheck);
300
           this.$emit("did_update", response.data.data.doubleCheck);
301
         }
301
         }
302
+      }).catch(error => {
303
+        Toast.fail("请求失败")
302
       });
304
       });
303
     },
305
     },
304
     close: function() {
306
     close: function() {

+ 2 - 0
src/pages/main/dialog/MonitDialog.vue View File

1040
           this.loading = false
1040
           this.loading = false
1041
           Toast.fail(resp.msg)
1041
           Toast.fail(resp.msg)
1042
         }
1042
         }
1043
+      }).catch(error => {
1044
+        Toast.fail("请求失败")
1043
       })
1045
       })
1044
     },
1046
     },
1045
     submitAction: function () {
1047
     submitAction: function () {

+ 4 - 0
src/pages/main/dialog/PlaneDialog.vue View File

234
             this.$set(record, key, response.data.data.dialysis_order[key]);
234
             this.$set(record, key, response.data.data.dialysis_order[key]);
235
           }
235
           }
236
         }
236
         }
237
+      }).catch(err => {
238
+        Toast.fail(err)
237
       });
239
       });
238
     },
240
     },
239
     didSelectStartTime: function(time) {
241
     didSelectStartTime: function(time) {
285
           }
287
           }
286
           // console.log(this.record)
288
           // console.log(this.record)
287
         }
289
         }
290
+      }).catch(err => {
291
+        Toast.fail(err)
288
       });
292
       });
289
     },
293
     },
290
     close: function() {
294
     close: function() {

+ 87 - 23
src/pages/main/dialog/PrescriptionDialog.vue View File

562
           return new Array()
562
           return new Array()
563
         }
563
         }
564
       },
564
       },
565
+      system_prescription:{
566
+        type: Object
567
+      },
565
       predialysis: {
568
       predialysis: {
566
         type: Object
569
         type: Object
567
       },
570
       },
1074
 
1077
 
1075
                 this.finish()
1078
                 this.finish()
1076
               }
1079
               }
1077
-            })
1080
+            }).catch(error => {
1081
+              Toast.fail("请求失败")
1082
+
1083
+            });
1078
 
1084
 
1079
           } else if (this.is_pre == 2) {
1085
           } else if (this.is_pre == 2) {
1080
             Toast.loading({forbidClick: true, duration: 0})
1086
             Toast.loading({forbidClick: true, duration: 0})
1130
                 })
1136
                 })
1131
                 this.finish()
1137
                 this.finish()
1132
               }
1138
               }
1133
-            })
1139
+            }).catch(error => {
1140
+              Toast.fail("请求失败")
1141
+            });
1134
           }
1142
           }
1135
         } else {
1143
         } else {
1136
           if (this.is_pre == 1) {
1144
           if (this.is_pre == 1) {
1165
                 this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
1173
                 this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
1166
                 this.finish()
1174
                 this.finish()
1167
               }
1175
               }
1168
-            })
1176
+            }).catch(error => {
1177
+              Toast.fail("请求失败")
1178
+            });
1169
           }
1179
           }
1170
 
1180
 
1171
         }
1181
         }
1205
                         this.dialysisPrescription[key] = response.data.data.prescription[key]
1215
                         this.dialysisPrescription[key] = response.data.data.prescription[key]
1206
                       }
1216
                       }
1207
                     }
1217
                     }
1218
+                  } else if(response.data.data.system_prescription != null){
1219
+
1220
+                    for (const key in response.data.data.system_prescription) {
1221
+                      if (key != 'target_ultrafiltration') {
1222
+                        this.dialysisPrescription[key] = response.data.data.system_prescription[key]
1223
+                      }
1224
+                    }
1225
+
1208
                   } else {
1226
                   } else {
1209
                     for (const key in this.dialysisPrescription) { //临时处方为空
1227
                     for (const key in this.dialysisPrescription) { //临时处方为空
1210
                       if (key != 'target_ultrafiltration') {
1228
                       if (key != 'target_ultrafiltration') {
1228
                 this.timeValue = this.dialysisPrescription.dialysis_duration_hour + '小时' + this.dialysisPrescription.dialysis_duration_minute + '分钟'
1246
                 this.timeValue = this.dialysisPrescription.dialysis_duration_hour + '小时' + this.dialysisPrescription.dialysis_duration_minute + '分钟'
1229
                 this.time = (this.dialysisPrescription.dialysis_duration_hour > 10 ? this.dialysisPrescription.dialysis_duration_hour : '0' + this.dialysisPrescription.dialysis_duration_hour) + ':' + (this.dialysisPrescription.dialysis_duration_minute > 10 ? this.dialysisPrescription.dialysis_duration_minute : '0' + this.dialysisPrescription.dialysis_duration_minute)
1247
                 this.time = (this.dialysisPrescription.dialysis_duration_hour > 10 ? this.dialysisPrescription.dialysis_duration_hour : '0' + this.dialysisPrescription.dialysis_duration_hour) + ':' + (this.dialysisPrescription.dialysis_duration_minute > 10 ? this.dialysisPrescription.dialysis_duration_minute : '0' + this.dialysisPrescription.dialysis_duration_minute)
1230
               }
1248
               }
1231
-            })
1249
+            }).catch(error => {
1250
+              Toast.fail("请求失败")
1251
+            });
1232
             break
1252
             break
1233
           case 2:
1253
           case 2:
1234
             this.dialysisPrescription.dialyzer = val.selectId
1254
             this.dialysisPrescription.dialyzer = val.selectId
1384
                 this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
1404
                 this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
1385
                 this.finish()
1405
                 this.finish()
1386
               }
1406
               }
1387
-            })
1407
+            }).catch(error => {
1408
+              Toast.fail("请求失败")
1409
+            });
1388
           } else if (this.is_open == 1) {
1410
           } else if (this.is_open == 1) {
1389
 
1411
 
1390
             if (this.targetAdvices.length > 0) {
1412
             if (this.targetAdvices.length > 0) {
1413
                   this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
1435
                   this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
1414
                   this.finish()
1436
                   this.finish()
1415
                 }
1437
                 }
1416
-              })
1438
+              }).catch(error => {
1439
+                Toast.fail("请求失败")
1440
+              });
1417
             }
1441
             }
1418
 
1442
 
1419
           } else if (this.is_open == 2) {
1443
           } else if (this.is_open == 2) {
1471
 
1495
 
1472
                   this.finish()
1496
                   this.finish()
1473
                 }
1497
                 }
1474
-              })
1498
+              }).catch(error => {
1499
+                Toast.fail("请求失败")
1500
+              });
1475
             } else {
1501
             } else {
1476
               Toast.loading({forbidClick: true, duration: 0})
1502
               Toast.loading({forbidClick: true, duration: 0})
1477
               let ParamsQuery = this.dialysisPrescription
1503
               let ParamsQuery = this.dialysisPrescription
1488
                   this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
1514
                   this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
1489
                   this.finish()
1515
                   this.finish()
1490
                 }
1516
                 }
1491
-              })
1517
+              }).catch(error => {
1518
+                Toast.fail("请求失败")
1519
+              });
1492
             }
1520
             }
1493
 
1521
 
1494
           }
1522
           }
1512
                   this.finish()
1540
                   this.finish()
1513
 
1541
 
1514
                 }
1542
                 }
1515
-              })
1543
+              }).catch(error => {
1544
+                Toast.fail("请求失败")
1545
+              });
1516
 
1546
 
1517
             } else if (this.is_open == 1) {
1547
             } else if (this.is_open == 1) {
1518
               if (this.targetAdvices.length > 0) {
1548
               if (this.targetAdvices.length > 0) {
1544
                     this.finish()
1574
                     this.finish()
1545
 
1575
 
1546
                   }
1576
                   }
1547
-                })
1577
+                }).catch(error => {
1578
+                  Toast.fail("请求失败")
1579
+                });
1548
 
1580
 
1549
               }
1581
               }
1550
 
1582
 
1609
                     this.finish()
1641
                     this.finish()
1610
 
1642
 
1611
                   }
1643
                   }
1612
-                })
1644
+                }).catch(error => {
1645
+                  Toast.fail("请求失败")
1646
+                });
1613
               } else {
1647
               } else {
1614
                 Toast.loading({forbidClick: true, duration: 0})
1648
                 Toast.loading({forbidClick: true, duration: 0})
1615
                 let ParamsQuery = this.dialysisPrescription
1649
                 let ParamsQuery = this.dialysisPrescription
1626
                     this.finish()
1660
                     this.finish()
1627
 
1661
 
1628
                   }
1662
                   }
1629
-                })
1663
+                }).catch(error => {
1664
+                  Toast.fail("请求失败")
1665
+                });
1630
 
1666
 
1631
               }
1667
               }
1632
             }
1668
             }
1646
                 this.finish()
1682
                 this.finish()
1647
 
1683
 
1648
               }
1684
               }
1649
-            })
1685
+            }).catch(error => {
1686
+              Toast.fail("请求失败")
1687
+            });
1650
 
1688
 
1651
           }
1689
           }
1652
 
1690
 
1715
                   this.finish()
1753
                   this.finish()
1716
 
1754
 
1717
                 }
1755
                 }
1718
-              })
1756
+              }).catch(error => {
1757
+                Toast.fail("请求失败")
1758
+              });
1719
 
1759
 
1720
             }
1760
             }
1721
 
1761
 
1780
                   this.finish()
1820
                   this.finish()
1781
 
1821
 
1782
                 }
1822
                 }
1783
-              })
1823
+              }).catch(error => {
1824
+                Toast.fail("请求失败")
1825
+              });
1784
             } else {
1826
             } else {
1785
               Toast.loading({forbidClick: true, duration: 0})
1827
               Toast.loading({forbidClick: true, duration: 0})
1786
               let ParamsQuery = this.dialysisPrescription
1828
               let ParamsQuery = this.dialysisPrescription
1799
                   this.finish()
1841
                   this.finish()
1800
 
1842
 
1801
                 }
1843
                 }
1802
-              })
1844
+              }).catch(error => {
1845
+                Toast.fail("请求失败")
1846
+              });
1803
             }
1847
             }
1804
 
1848
 
1805
           }
1849
           }
1823
                   this.finish()
1867
                   this.finish()
1824
 
1868
 
1825
                 }
1869
                 }
1826
-              })
1870
+              }).catch(error => {
1871
+                Toast.fail("请求失败")
1872
+              });
1827
 
1873
 
1828
             } else if (this.is_open == 1) {
1874
             } else if (this.is_open == 1) {
1829
               if (this.targetAdvices.length > 0) {
1875
               if (this.targetAdvices.length > 0) {
1857
                     this.finish()
1903
                     this.finish()
1858
 
1904
 
1859
                   }
1905
                   }
1860
-                })
1906
+                }).catch(error => {
1907
+                  Toast.fail("请求失败")
1908
+                });
1861
 
1909
 
1862
               }
1910
               }
1863
 
1911
 
1921
                     this.finish()
1969
                     this.finish()
1922
 
1970
 
1923
                   }
1971
                   }
1924
-                })
1972
+                }).catch(error => {
1973
+                  Toast.fail("请求失败")
1974
+                });
1925
               } else {
1975
               } else {
1926
                 Toast.loading({forbidClick: true, duration: 0})
1976
                 Toast.loading({forbidClick: true, duration: 0})
1927
                 let ParamsQuery = this.dialysisPrescription
1977
                 let ParamsQuery = this.dialysisPrescription
1938
                     this.$emit('prescription', response.data.data.prescription)
1988
                     this.$emit('prescription', response.data.data.prescription)
1939
                     this.finish()
1989
                     this.finish()
1940
                   }
1990
                   }
1941
-                })
1991
+                }).catch(error => {
1992
+                  Toast.fail("请求失败")
1993
+                });
1942
               }
1994
               }
1943
             }
1995
             }
1944
           } else {
1996
           } else {
1958
                 this.finish()
2010
                 this.finish()
1959
 
2011
 
1960
               }
2012
               }
1961
-            })
2013
+            }).catch(error => {
2014
+              Toast.fail("请求失败")
2015
+            });
1962
 
2016
 
1963
           }
2017
           }
1964
 
2018
 
1999
             }
2053
             }
2000
             Toast.success('签名成功')
2054
             Toast.success('签名成功')
2001
           }
2055
           }
2002
-        })
2056
+        }).catch(error => {
2057
+          Toast.fail("请求失败")
2058
+        });
2003
       }, getBodyFluid: function (val) {
2059
       }, getBodyFluid: function (val) {
2004
         let body_fluid_name = ''
2060
         let body_fluid_name = ''
2005
         let body_fluid = this.bodyFluidOptions
2061
         let body_fluid = this.bodyFluidOptions
2154
             this.dialysisPrescription[key] = this.last_prescription[key]
2210
             this.dialysisPrescription[key] = this.last_prescription[key]
2155
           }
2211
           }
2156
         }
2212
         }
2157
-      } else {
2213
+      } else if(this.system_prescription != null && typeof this.system_prescription.id != 'undefined' && this.system_prescription.id){
2214
+        for (const key in this.system_prescription) {
2215
+          if (key != "target_ultrafiltration") {
2216
+            this.dialysisPrescription[key] = this.system_prescription[key]
2217
+          }
2218
+        }
2219
+      }else{
2220
+
2158
         this.dialysisPrescription.mode_id = this.schedual.mode_id
2221
         this.dialysisPrescription.mode_id = this.schedual.mode_id
2159
 
2222
 
2223
+
2160
       }
2224
       }
2161
 
2225
 
2162
       if (this.dialysisPrescription.dialysis_duration_hour.length == 0 || this.dialysisPrescription.dialysis_duration_minute.length == 0) {
2226
       if (this.dialysisPrescription.dialysis_duration_hour.length == 0 || this.dialysisPrescription.dialysis_duration_minute.length == 0) {

+ 5 - 3
src/pages/main/dialog/ThorougDialog.vue View File

724
           this.body_weight_after = weight
724
           this.body_weight_after = weight
725
         } else {
725
         } else {
726
           this.body_weight_after = ''
726
           this.body_weight_after = ''
727
-        }       
727
+        }
728
       },
728
       },
729
       deep: true,
729
       deep: true,
730
       immediate: true
730
       immediate: true
739
           } else {
739
           } else {
740
             this.body_weight_after = ''
740
             this.body_weight_after = ''
741
           }
741
           }
742
-        }       
742
+        }
743
       },
743
       },
744
       deep: true,
744
       deep: true,
745
       immediate: true
745
       immediate: true
1413
             this.record[key] = response.data.data.assessmentAfterDislysis[key]
1413
             this.record[key] = response.data.data.assessmentAfterDislysis[key]
1414
           }
1414
           }
1415
         }
1415
         }
1416
-      })
1416
+      }).catch(err => {
1417
+        Toast.fail(err)
1418
+      });
1417
     },
1419
     },
1418
     close: function () {
1420
     close: function () {
1419
       this.$emit('close')
1421
       this.$emit('close')

+ 2 - 0
src/pages/main/dialog/TreatmentDialog.vue View File

299
             this.record[key] = response.data.data.summary[key];
299
             this.record[key] = response.data.data.summary[key];
300
           }
300
           }
301
         }
301
         }
302
+      }).catch(err => {
303
+        Toast.fail(err)
302
       });
304
       });
303
     },
305
     },
304
     close: function() {
306
     close: function() {

+ 14 - 2
src/pages/main/today/TodayTab.vue View File

138
                            :last_record="last_assessment_after_dislysis"
138
                            :last_record="last_assessment_after_dislysis"
139
                            :last_prescription="last_prescription"
139
                            :last_prescription="last_prescription"
140
                            :dry_weight="dryWeight"
140
                            :dry_weight="dryWeight"
141
-
141
+                           :system_prescription ="system_prescription"
142
                            :schedual="schedual"
142
                            :schedual="schedual"
143
                            @longSolution="longSolutionFunc" ref="prescription_dialog"></prescription-dialog>
143
                            @longSolution="longSolutionFunc" ref="prescription_dialog"></prescription-dialog>
144
 
144
 
371
         prescription: {}, // 透析处方
371
         prescription: {}, // 透析处方
372
         solution: {}, // 透析方案
372
         solution: {}, // 透析方案
373
         last_prescription:{},
373
         last_prescription:{},
374
+        system_prescription:{},//系统透析模版
374
         thoroug_dialog_reset: true,
375
         thoroug_dialog_reset: true,
375
         prescription_dialog_reset: true,
376
         prescription_dialog_reset: true,
376
         monit_dialog_reset: true,
377
         monit_dialog_reset: true,
858
           var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
859
           var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
859
           var doctor_advices = resp.data.doctor_advices // 临时医嘱
860
           var doctor_advices = resp.data.doctor_advices // 临时医嘱
860
           var last_prescription = resp.data.last_prescription
861
           var last_prescription = resp.data.last_prescription
862
+          var system_prescription = resp.data.system_prescription
861
 
863
 
862
           this.dryWeight = resp.data.dry_weight
864
           this.dryWeight = resp.data.dry_weight
863
 
865
 
912
             }
914
             }
913
             this.$store.dispatch('SetScheduals', {scheduals: scheduals})
915
             this.$store.dispatch('SetScheduals', {scheduals: scheduals})
914
           }
916
           }
917
+          this.system_prescription = system_prescription == null ? {id: ''} : system_prescription
915
 
918
 
916
           this.patient = patient
919
           this.patient = patient
917
           this.schedual = schedual == null ? {} : schedual
920
           this.schedual = schedual == null ? {} : schedual
1447
           var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
1450
           var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
1448
           var doctor_advices = resp.data.doctor_advices // 临时医嘱
1451
           var doctor_advices = resp.data.doctor_advices // 临时医嘱
1449
           var last_prescription = resp.data.last_prescription
1452
           var last_prescription = resp.data.last_prescription
1453
+          var system_prescription = resp.data.system_prescription
1454
+
1450
 
1455
 
1451
           this.dryWeight = resp.data.dry_weight
1456
           this.dryWeight = resp.data.dry_weight
1452
 
1457
 
1514
           this.solution = solution == null ? {id: ''} : solution
1519
           this.solution = solution == null ? {id: ''} : solution
1515
           this.last_prescription = last_prescription == null ? {id: ''} : last_prescription
1520
           this.last_prescription = last_prescription == null ? {id: ''} : last_prescription
1516
 
1521
 
1522
+          this.system_prescription = system_prescription == null ? {id: ''} : system_prescription
1517
 
1523
 
1518
 
1524
 
1519
           this.receiver_treatment_access = receiver_treatment_access == null ? {id: ''} : receiver_treatment_access
1525
           this.receiver_treatment_access = receiver_treatment_access == null ? {id: ''} : receiver_treatment_access
1612
           })
1618
           })
1613
           this.loading = false
1619
           this.loading = false
1614
         }
1620
         }
1615
-      })
1621
+      }).catch(error => {
1622
+        this.loading = false
1623
+        this.$toast({
1624
+          message: "请求超时"
1625
+        })
1626
+
1627
+      });
1616
     },
1628
     },
1617
 
1629
 
1618
   }
1630
   }

+ 4 - 2
src/utils/request.js View File

35
     }
35
     }
36
   },
36
   },
37
   error => {
37
   error => {
38
-
39
-    return Promise.reject(error)
38
+    if(error.message.includes('timeout')){   // 判断请求异常信息中是否含有超时timeout字符串
39
+      return Promise.reject(error);          // reject这个错误信息
40
+    }
41
+    return Promise.reject(error);
40
   })
42
   })
41
 
43
 
42
 export default service
44
 export default service