Ver código fonte

新功能开发

csx 4 anos atrás
pai
commit
651577bf62

+ 1 - 1
build/cdn.json Ver arquivo

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

+ 4 - 0
src/pages/main/dialog/AcceptsDialog.vue Ver arquivo

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

+ 5 - 3
src/pages/main/dialog/AssessmentDialog.vue Ver arquivo

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

+ 6 - 2
src/pages/main/dialog/ComputerDialog.vue Ver arquivo

@@ -360,7 +360,9 @@
360 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 367
       didSelectStartTime: function (time) {
366 368
         this.start_time_str = parseTime(time, '{y}-{m}-{d} {h}:{i}') + ':00'
@@ -409,7 +411,9 @@
409 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 418
       close: function () {
415 419
         this.$emit('close')

+ 2 - 0
src/pages/main/dialog/DoubleDialog.vue Ver arquivo

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

+ 2 - 0
src/pages/main/dialog/MonitDialog.vue Ver arquivo

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

+ 4 - 0
src/pages/main/dialog/PlaneDialog.vue Ver arquivo

@@ -234,6 +234,8 @@ export default {
234 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 241
     didSelectStartTime: function(time) {
@@ -285,6 +287,8 @@ export default {
285 287
           }
286 288
           // console.log(this.record)
287 289
         }
290
+      }).catch(err => {
291
+        Toast.fail(err)
288 292
       });
289 293
     },
290 294
     close: function() {

+ 87 - 23
src/pages/main/dialog/PrescriptionDialog.vue Ver arquivo

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

+ 5 - 3
src/pages/main/dialog/ThorougDialog.vue Ver arquivo

@@ -724,7 +724,7 @@ export default {
724 724
           this.body_weight_after = weight
725 725
         } else {
726 726
           this.body_weight_after = ''
727
-        }       
727
+        }
728 728
       },
729 729
       deep: true,
730 730
       immediate: true
@@ -739,7 +739,7 @@ export default {
739 739
           } else {
740 740
             this.body_weight_after = ''
741 741
           }
742
-        }       
742
+        }
743 743
       },
744 744
       deep: true,
745 745
       immediate: true
@@ -1413,7 +1413,9 @@ export default {
1413 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 1420
     close: function () {
1419 1421
       this.$emit('close')

+ 2 - 0
src/pages/main/dialog/TreatmentDialog.vue Ver arquivo

@@ -299,6 +299,8 @@ export default {
299 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 306
     close: function() {

+ 14 - 2
src/pages/main/today/TodayTab.vue Ver arquivo

@@ -138,7 +138,7 @@
138 138
                            :last_record="last_assessment_after_dislysis"
139 139
                            :last_prescription="last_prescription"
140 140
                            :dry_weight="dryWeight"
141
-
141
+                           :system_prescription ="system_prescription"
142 142
                            :schedual="schedual"
143 143
                            @longSolution="longSolutionFunc" ref="prescription_dialog"></prescription-dialog>
144 144
 
@@ -371,6 +371,7 @@ import {parseTime} from '@/utils'
371 371
         prescription: {}, // 透析处方
372 372
         solution: {}, // 透析方案
373 373
         last_prescription:{},
374
+        system_prescription:{},//系统透析模版
374 375
         thoroug_dialog_reset: true,
375 376
         prescription_dialog_reset: true,
376 377
         monit_dialog_reset: true,
@@ -858,6 +859,7 @@ import {parseTime} from '@/utils'
858 859
           var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
859 860
           var doctor_advices = resp.data.doctor_advices // 临时医嘱
860 861
           var last_prescription = resp.data.last_prescription
862
+          var system_prescription = resp.data.system_prescription
861 863
 
862 864
           this.dryWeight = resp.data.dry_weight
863 865
 
@@ -912,6 +914,7 @@ import {parseTime} from '@/utils'
912 914
             }
913 915
             this.$store.dispatch('SetScheduals', {scheduals: scheduals})
914 916
           }
917
+          this.system_prescription = system_prescription == null ? {id: ''} : system_prescription
915 918
 
916 919
           this.patient = patient
917 920
           this.schedual = schedual == null ? {} : schedual
@@ -1447,6 +1450,8 @@ import {parseTime} from '@/utils'
1447 1450
           var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
1448 1451
           var doctor_advices = resp.data.doctor_advices // 临时医嘱
1449 1452
           var last_prescription = resp.data.last_prescription
1453
+          var system_prescription = resp.data.system_prescription
1454
+
1450 1455
 
1451 1456
           this.dryWeight = resp.data.dry_weight
1452 1457
 
@@ -1514,6 +1519,7 @@ import {parseTime} from '@/utils'
1514 1519
           this.solution = solution == null ? {id: ''} : solution
1515 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 1525
           this.receiver_treatment_access = receiver_treatment_access == null ? {id: ''} : receiver_treatment_access
@@ -1612,7 +1618,13 @@ import {parseTime} from '@/utils'
1612 1618
           })
1613 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 Ver arquivo

@@ -35,8 +35,10 @@ service.interceptors.response.use(
35 35
     }
36 36
   },
37 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 44
 export default service