Browse Source

长期医嘱提醒

csx 5 years ago
parent
commit
bd49ac3f66

+ 1 - 1
build/cdn.json View File

1
 {
1
 {
2
-  "version": "1.0.55"
2
+  "version": "1.0.58"
3
 }
3
 }

+ 1 - 1
src/pages/main/WaitingArea.vue View File

129
       menuList: [
129
       menuList: [
130
         { value: "1", label: "全部", count: 0 },
130
         { value: "1", label: "全部", count: 0 },
131
         { value: "3", label: "待开处方", count: 0 },
131
         { value: "3", label: "待开处方", count: 0 },
132
-        { value: "2", label: "透前称量", count: 0 }
132
+        { value: "2", label: "透前称量", count: 0 }
133
       ],
133
       ],
134
 
134
 
135
       select_index: 0,
135
       select_index: 0,

+ 292 - 127
src/pages/main/dialog/PrescriptionDialog.vue View File

390
     },
390
     },
391
     data () {
391
     data () {
392
       return {
392
       return {
393
-        is_pre:0,
393
+        is_pre: 0,
394
         loading: false,
394
         loading: false,
395
         signUrl: '',
395
         signUrl: '',
396
         isShowDesc: true,
396
         isShowDesc: true,
510
     },
510
     },
511
 
511
 
512
     methods: {
512
     methods: {
513
-      isPermission(){
514
-        if(this.$store.getters.user.user.user_type == 3 && (this.$store.getters.user.template_info.template_id == 2 || this.$store.getters.user.template_info.template_id == 6)){
513
+      isPermission () {
514
+        if (this.$store.getters.user.user.user_type == 3 && (this.$store.getters.user.template_info.template_id == 2 || this.$store.getters.user.template_info.template_id == 6)) {
515
           return false
515
           return false
516
-        }else{
516
+        } else {
517
           return true
517
           return true
518
         }
518
         }
519
       },
519
       },
715
 
715
 
716
       },
716
       },
717
       menuComfirmThree: function (targetAdvices) {
717
       menuComfirmThree: function (targetAdvices) {
718
-        let params = {
719
-          advices: targetAdvices,
720
-          advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
721
-          advice_doctor: targetAdvices[0].advice_doctor,
722
-          advice_type: targetAdvices[0].advice_type,
723
-          parent_id: this.patient_id,
724
-          start_time: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
725
-          remark: '',
726
-        }
727
-        CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
728
-          var resp = rs.data
729
-          if (resp.state == 1) {
718
+        if (targetAdvices.length > 0) {
719
+          let params = {
720
+            advices: targetAdvices,
721
+            advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
722
+            advice_doctor: targetAdvices[0].advice_doctor,
723
+            advice_type: targetAdvices[0].advice_type,
724
+            parent_id: this.patient_id,
725
+            start_time: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
726
+            remark: '',
727
+          }
728
+          CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
729
+            var resp = rs.data
730
+            if (resp.state == 1) {
730
 
731
 
731
-          } else {
732
+            } else {
732
 
733
 
733
-          }
734
-        })
734
+            }
735
+          })
736
+        }
735
 
737
 
736
-        if (this.is_pre == 1){
738
+        if (this.is_pre == 1) {
737
           Toast.loading({forbidClick: true, duration: 0})
739
           Toast.loading({forbidClick: true, duration: 0})
738
           let ParamsQuery = this.dialysisPrescription
740
           let ParamsQuery = this.dialysisPrescription
739
           ParamsQuery['patient'] = this.$route.query.patient_id
741
           ParamsQuery['patient'] = this.$route.query.patient_id
745
             } else {
747
             } else {
746
               Toast.success('提交成功')
748
               Toast.success('提交成功')
747
               this.$emit('prescription', response.data.data.prescription)
749
               this.$emit('prescription', response.data.data.prescription)
748
-              // for (const key in response.data.data.prescription) {
749
-              //   // this.prescription_prop[key] = response.data.data.prescription[key];
750
-              // }
751
               this.finish()
750
               this.finish()
752
             }
751
             }
753
           })
752
           })
754
 
753
 
755
-        }else if(this.is_pre == 2){
754
+        } else if (this.is_pre == 2) {
756
           Toast.loading({forbidClick: true, duration: 0})
755
           Toast.loading({forbidClick: true, duration: 0})
757
           let ParamsQuery = this.dialysisPrescription
756
           let ParamsQuery = this.dialysisPrescription
758
           ParamsQuery['patient'] = this.$route.query.patient_id
757
           ParamsQuery['patient'] = this.$route.query.patient_id
763
               return false
762
               return false
764
             } else {
763
             } else {
765
               Toast.success('提交成功')
764
               Toast.success('提交成功')
766
-
767
               this.$emit('advice')
765
               this.$emit('advice')
768
               this.$emit('longSolution', response.data.data.solution)
766
               this.$emit('longSolution', response.data.data.solution)
769
               this.$emit('prescription', response.data.data.prescription)
767
               this.$emit('prescription', response.data.data.prescription)
770
               this.finish()
768
               this.finish()
771
-
772
             }
769
             }
773
           })
770
           })
774
-
775
         }
771
         }
776
 
772
 
777
-
778
       },
773
       },
779
       menuComfirm: function (val) {
774
       menuComfirm: function (val) {
780
         this.visibility = false
775
         this.visibility = false
892
         return anticoagulan_name
887
         return anticoagulan_name
893
       },
888
       },
894
       commitInfo: function () {
889
       commitInfo: function () {
895
-
896
-
897
         this.is_pre = 1
890
         this.is_pre = 1
898
         if (this.prescription_prop.id == '') {
891
         if (this.prescription_prop.id == '') {
899
-          console.log(this.is_open)
900
-          if (this.is_open == 0){
892
+
893
+          if (this.is_open == 0) {
901
             Toast.loading({forbidClick: true, duration: 0})
894
             Toast.loading({forbidClick: true, duration: 0})
902
             let ParamsQuery = this.dialysisPrescription
895
             let ParamsQuery = this.dialysisPrescription
903
             ParamsQuery['patient'] = this.$route.query.patient_id
896
             ParamsQuery['patient'] = this.$route.query.patient_id
908
                 return false
901
                 return false
909
               } else {
902
               } else {
910
                 Toast.success('提交成功')
903
                 Toast.success('提交成功')
911
-
912
                 this.$emit('prescription', response.data.data.prescription)
904
                 this.$emit('prescription', response.data.data.prescription)
913
                 this.finish()
905
                 this.finish()
914
-
915
               }
906
               }
916
             })
907
             })
917
-
918
-          }else if (this.is_open == 1) {
919
-            //弹框推送提醒
920
-            this.advicePropForm.list = this.targetAdvices
921
-            this.advicePropForm.operators = this.admin_users_prop
922
-            this.advice_visibility = true
923
-            this.isShowDialog = false
924
-
925
-            for (let i = 0; i < this.advicePropForm.list.length; i++) {
926
-              if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
927
-                this.advicePropForm.result.push(this.advicePropForm.list[i].id)
908
+          } else if (this.is_open == 1) {
909
+            if (this.targetAdvices.length > 0) {
910
+              //弹框推送提醒
911
+              this.advicePropForm.list = this.targetAdvices
912
+              this.advicePropForm.operators = this.admin_users_prop
913
+              this.advice_visibility = true
914
+              this.isShowDialog = false
915
+              for (let i = 0; i < this.advicePropForm.list.length; i++) {
916
+                if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
917
+                  this.advicePropForm.result.push(this.advicePropForm.list[i].id)
918
+                }
928
               }
919
               }
920
+            } else {
921
+              Toast.loading({forbidClick: true, duration: 0})
922
+              let ParamsQuery = this.dialysisPrescription
923
+              ParamsQuery['patient'] = this.$route.query.patient_id
924
+              ParamsQuery['record_date'] = this.record_date
925
+              commitDialysisPrescription(ParamsQuery).then(response => {
926
+                if (response.data.state == 0) {
927
+                  Toast.fail(response.data.msg)
928
+                  return false
929
+                } else {
930
+                  Toast.success('提交成功')
931
+                  this.$emit('prescription', response.data.data.prescription)
932
+                  this.finish()
933
+                }
934
+              })
929
             }
935
             }
930
-
931
           } else if (this.is_open == 2) {
936
           } else if (this.is_open == 2) {
932
-
933
-            if(this.waitUploadAdvices.length > 0) {
937
+            if (this.waitUploadAdvices.length > 0) {
934
               this.advice_visibility = false
938
               this.advice_visibility = false
935
               let params = {
939
               let params = {
936
                 advices: this.waitUploadAdvices,
940
                 advices: this.waitUploadAdvices,
949
 
953
 
950
                 }
954
                 }
951
               })
955
               })
956
+              Toast.loading({forbidClick: true, duration: 0})
957
+              let ParamsQuery = this.dialysisPrescription
958
+              ParamsQuery['patient'] = this.$route.query.patient_id
959
+              ParamsQuery['record_date'] = this.record_date
960
+              commitDialysisPrescription(ParamsQuery).then(response => {
961
+                if (response.data.state == 0) {
962
+                  Toast.fail(response.data.msg)
963
+                  return false
964
+                } else {
965
+                  Toast.success('提交成功')
966
+                  this.$emit('prescription', response.data.data.prescription)
967
+                  this.finish()
968
+                }
969
+              })
970
+            } else {
971
+              Toast.loading({forbidClick: true, duration: 0})
972
+              let ParamsQuery = this.dialysisPrescription
973
+              ParamsQuery['patient'] = this.$route.query.patient_id
974
+              ParamsQuery['record_date'] = this.record_date
975
+              commitDialysisPrescription(ParamsQuery).then(response => {
976
+                if (response.data.state == 0) {
977
+                  Toast.fail(response.data.msg)
978
+                  return false
979
+                } else {
980
+                  Toast.success('提交成功')
981
+                  this.$emit('prescription', response.data.data.prescription)
982
+                  this.finish()
983
+                }
984
+              })
952
             }
985
             }
953
 
986
 
954
-            Toast.loading({forbidClick: true, duration: 0})
955
-            let ParamsQuery = this.dialysisPrescription
956
-            ParamsQuery['patient'] = this.$route.query.patient_id
957
-            ParamsQuery['record_date'] = this.record_date
958
-            commitDialysisPrescription(ParamsQuery).then(response => {
959
-              if (response.data.state == 0) {
960
-                Toast.fail(response.data.msg)
961
-                return false
962
-              } else {
963
-                Toast.success('提交成功')
964
-
965
-                this.$emit('prescription', response.data.data.prescription)
966
-                this.finish()
967
-
968
-              }
969
-            })
970
           }
987
           }
971
 
988
 
972
         } else {
989
         } else {
973
           if (this.dialysisPrescription.creater == 0) {
990
           if (this.dialysisPrescription.creater == 0) {
974
-            if (this.is_open == 0){
991
+            if (this.is_open == 0) {
975
               Toast.loading({forbidClick: true, duration: 0})
992
               Toast.loading({forbidClick: true, duration: 0})
976
               let ParamsQuery = this.dialysisPrescription
993
               let ParamsQuery = this.dialysisPrescription
977
               ParamsQuery['patient'] = this.$route.query.patient_id
994
               ParamsQuery['patient'] = this.$route.query.patient_id
989
                 }
1006
                 }
990
               })
1007
               })
991
 
1008
 
992
-            }else  if (this.is_open == 1) {
993
-              //弹框推送提醒
994
-              this.advicePropForm.list = this.targetAdvices
995
-              this.advicePropForm.operators = this.admin_users_prop
996
-              this.advice_visibility = true
997
-              this.isShowDialog = false
1009
+            } else if (this.is_open == 1) {
1010
+              if (this.targetAdvices.length > 0) {
998
 
1011
 
999
-              for (let i = 0; i < this.advicePropForm.list.length; i++) {
1000
-                if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
1001
-                  this.advicePropForm.result.push(this.advicePropForm.list[i].id)
1012
+                //弹框推送提醒
1013
+                this.advicePropForm.list = this.targetAdvices
1014
+                this.advicePropForm.operators = this.admin_users_prop
1015
+                this.advice_visibility = true
1016
+                this.isShowDialog = false
1017
+
1018
+                for (let i = 0; i < this.advicePropForm.list.length; i++) {
1019
+                  if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
1020
+                    this.advicePropForm.result.push(this.advicePropForm.list[i].id)
1021
+                  }
1002
                 }
1022
                 }
1023
+              } else {
1024
+                Toast.loading({forbidClick: true, duration: 0})
1025
+                let ParamsQuery = this.dialysisPrescription
1026
+                ParamsQuery['patient'] = this.$route.query.patient_id
1027
+                ParamsQuery['record_date'] = this.record_date
1028
+                commitDialysisPrescription(ParamsQuery).then(response => {
1029
+                  if (response.data.state == 0) {
1030
+                    Toast.fail(response.data.msg)
1031
+                    return false
1032
+                  } else {
1033
+                    Toast.success('提交成功')
1034
+
1035
+                    this.$emit('prescription', response.data.data.prescription)
1036
+                    this.finish()
1037
+
1038
+                  }
1039
+                })
1040
+
1003
               }
1041
               }
1004
 
1042
 
1005
             } else if (this.is_open == 2) {
1043
             } else if (this.is_open == 2) {
1006
-              if(this.waitUploadAdvices.length > 0) {
1044
+              if (this.waitUploadAdvices.length > 0) {
1007
 
1045
 
1008
                 this.advice_visibility = false
1046
                 this.advice_visibility = false
1009
                 let params = {
1047
                 let params = {
1023
 
1061
 
1024
                   }
1062
                   }
1025
                 })
1063
                 })
1026
-              }
1064
+                Toast.loading({forbidClick: true, duration: 0})
1065
+                let ParamsQuery = this.dialysisPrescription
1066
+                ParamsQuery['patient'] = this.$route.query.patient_id
1067
+                ParamsQuery['record_date'] = this.record_date
1068
+                commitDialysisPrescription(ParamsQuery).then(response => {
1069
+                  if (response.data.state == 0) {
1070
+                    Toast.fail(response.data.msg)
1071
+                    return false
1072
+                  } else {
1073
+                    Toast.success('提交成功')
1074
+
1075
+                    this.$emit('prescription', response.data.data.prescription)
1076
+                    this.finish()
1027
 
1077
 
1078
+                  }
1079
+                })
1080
+              } else {
1081
+                Toast.loading({forbidClick: true, duration: 0})
1082
+                let ParamsQuery = this.dialysisPrescription
1083
+                ParamsQuery['patient'] = this.$route.query.patient_id
1084
+                ParamsQuery['record_date'] = this.record_date
1085
+                commitDialysisPrescription(ParamsQuery).then(response => {
1086
+                  if (response.data.state == 0) {
1087
+                    Toast.fail(response.data.msg)
1088
+                    return false
1089
+                  } else {
1090
+                    Toast.success('提交成功')
1091
+
1092
+                    this.$emit('prescription', response.data.data.prescription)
1093
+                    this.finish()
1094
+
1095
+                  }
1096
+                })
1097
+
1098
+              }
1028
             }
1099
             }
1029
           }
1100
           }
1030
-
1031
           Toast.loading({forbidClick: true, duration: 0})
1101
           Toast.loading({forbidClick: true, duration: 0})
1032
           let ParamsQuery = this.dialysisPrescription
1102
           let ParamsQuery = this.dialysisPrescription
1033
           ParamsQuery['patient'] = this.$route.query.patient_id
1103
           ParamsQuery['patient'] = this.$route.query.patient_id
1044
 
1114
 
1045
             }
1115
             }
1046
           })
1116
           })
1117
+
1047
         }
1118
         }
1048
       }, commitSolutionInfo: function () {
1119
       }, commitSolutionInfo: function () {
1049
         this.is_pre = 2
1120
         this.is_pre = 2
1050
 
1121
 
1051
         if (this.prescription_prop.id == '') {
1122
         if (this.prescription_prop.id == '') {
1052
-          if (this.is_open == 0){
1123
+          if (this.is_open == 0) {
1053
             Toast.loading({forbidClick: true, duration: 0})
1124
             Toast.loading({forbidClick: true, duration: 0})
1054
             let ParamsQuery = this.dialysisPrescription
1125
             let ParamsQuery = this.dialysisPrescription
1055
             ParamsQuery['patient'] = this.$route.query.patient_id
1126
             ParamsQuery['patient'] = this.$route.query.patient_id
1056
             ParamsQuery['record_date'] = this.record_date
1127
             ParamsQuery['record_date'] = this.record_date
1057
-            commitDialysisPrescription(ParamsQuery).then(response => {
1128
+            postSolution(ParamsQuery).then(response => {
1058
               if (response.data.state == 0) {
1129
               if (response.data.state == 0) {
1059
                 Toast.fail(response.data.msg)
1130
                 Toast.fail(response.data.msg)
1060
                 return false
1131
                 return false
1061
               } else {
1132
               } else {
1062
                 Toast.success('提交成功')
1133
                 Toast.success('提交成功')
1063
 
1134
 
1135
+                this.$emit('advice')
1136
+                this.$emit('longSolution', response.data.data.solution)
1064
                 this.$emit('prescription', response.data.data.prescription)
1137
                 this.$emit('prescription', response.data.data.prescription)
1065
                 this.finish()
1138
                 this.finish()
1066
 
1139
 
1068
             })
1141
             })
1069
 
1142
 
1070
           } else if (this.is_open == 1) {
1143
           } else if (this.is_open == 1) {
1071
-            //弹框推送提醒
1072
-            this.advicePropForm.list = this.targetAdvices
1073
-            this.advicePropForm.operators = this.admin_users_prop
1074
-            this.advice_visibility = true
1075
-            this.isShowDialog = false
1144
+            if (this.targetAdvices.length > 0) {
1145
+              //弹框推送提醒
1146
+              this.advicePropForm.list = this.targetAdvices
1147
+              this.advicePropForm.operators = this.admin_users_prop
1148
+              this.advice_visibility = true
1149
+              this.isShowDialog = false
1076
 
1150
 
1077
-            for (let i = 0; i < this.advicePropForm.list.length; i++) {
1078
-              if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
1079
-                this.advicePropForm.result.push(this.advicePropForm.list[i].id)
1151
+              for (let i = 0; i < this.advicePropForm.list.length; i++) {
1152
+                if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
1153
+                  this.advicePropForm.result.push(this.advicePropForm.list[i].id)
1154
+                }
1080
               }
1155
               }
1156
+            } else {
1157
+
1158
+              Toast.loading({forbidClick: true, duration: 0})
1159
+              let ParamsQuery = this.dialysisPrescription
1160
+              ParamsQuery['patient'] = this.$route.query.patient_id
1161
+              ParamsQuery['record_date'] = this.record_date
1162
+              postSolution(ParamsQuery).then(response => {
1163
+                if (response.data.state == 0) {
1164
+                  Toast.fail(response.data.msg)
1165
+                  return false
1166
+                } else {
1167
+                  Toast.success('提交成功')
1168
+
1169
+                  this.$emit('advice')
1170
+                  this.$emit('longSolution', response.data.data.solution)
1171
+                  this.$emit('prescription', response.data.data.prescription)
1172
+                  this.finish()
1173
+
1174
+                }
1175
+              })
1176
+
1081
             }
1177
             }
1082
 
1178
 
1083
           } else if (this.is_open == 2) {
1179
           } else if (this.is_open == 2) {
1084
-            if(this.waitUploadAdvices.length > 0) {
1180
+            if (this.waitUploadAdvices.length > 0) {
1085
               this.advice_visibility = false
1181
               this.advice_visibility = false
1086
               let params = {
1182
               let params = {
1087
                 advices: this.waitUploadAdvices,
1183
                 advices: this.waitUploadAdvices,
1100
 
1196
 
1101
                 }
1197
                 }
1102
               })
1198
               })
1103
-            }
1199
+              Toast.loading({forbidClick: true, duration: 0})
1200
+              let ParamsQuery = this.dialysisPrescription
1201
+              ParamsQuery['patient'] = this.$route.query.patient_id
1202
+              ParamsQuery['record_date'] = this.record_date
1203
+              postSolution(ParamsQuery).then(response => {
1204
+                if (response.data.state == 0) {
1205
+                  Toast.fail(response.data.msg)
1206
+                  return false
1207
+                } else {
1208
+                  Toast.success('提交成功')
1104
 
1209
 
1105
-            Toast.loading({forbidClick: true, duration: 0})
1106
-            let ParamsQuery = this.dialysisPrescription
1107
-            ParamsQuery['patient'] = this.$route.query.patient_id
1108
-            ParamsQuery['record_date'] = this.record_date
1109
-            postSolution(ParamsQuery).then(response => {
1110
-              if (response.data.state == 0) {
1111
-                Toast.fail(response.data.msg)
1112
-                return false
1113
-              } else {
1114
-                Toast.success('提交成功')
1210
+                  this.$emit('advice')
1211
+                  this.$emit('longSolution', response.data.data.solution)
1212
+                  this.$emit('prescription', response.data.data.prescription)
1213
+                  this.finish()
1115
 
1214
 
1116
-                this.$emit('advice')
1117
-                this.$emit('longSolution', response.data.data.solution)
1118
-                this.$emit('prescription', response.data.data.prescription)
1119
-                this.finish()
1215
+                }
1216
+              })
1217
+            } else {
1218
+              Toast.loading({forbidClick: true, duration: 0})
1219
+              let ParamsQuery = this.dialysisPrescription
1220
+              ParamsQuery['patient'] = this.$route.query.patient_id
1221
+              ParamsQuery['record_date'] = this.record_date
1222
+              postSolution(ParamsQuery).then(response => {
1223
+                if (response.data.state == 0) {
1224
+                  Toast.fail(response.data.msg)
1225
+                  return false
1226
+                } else {
1227
+                  Toast.success('提交成功')
1120
 
1228
 
1121
-              }
1122
-            })
1229
+                  this.$emit('advice')
1230
+                  this.$emit('longSolution', response.data.data.solution)
1231
+                  this.$emit('prescription', response.data.data.prescription)
1232
+                  this.finish()
1233
+
1234
+                }
1235
+              })
1236
+            }
1123
 
1237
 
1124
           }
1238
           }
1125
 
1239
 
1126
         } else {
1240
         } else {
1127
           if (this.dialysisPrescription.creater == 0) {
1241
           if (this.dialysisPrescription.creater == 0) {
1128
-            if (this.is_open == 0){
1242
+            if (this.is_open == 0) {
1129
               Toast.loading({forbidClick: true, duration: 0})
1243
               Toast.loading({forbidClick: true, duration: 0})
1130
               let ParamsQuery = this.dialysisPrescription
1244
               let ParamsQuery = this.dialysisPrescription
1131
               ParamsQuery['patient'] = this.$route.query.patient_id
1245
               ParamsQuery['patient'] = this.$route.query.patient_id
1132
               ParamsQuery['record_date'] = this.record_date
1246
               ParamsQuery['record_date'] = this.record_date
1133
-              commitDialysisPrescription(ParamsQuery).then(response => {
1247
+              postSolution(ParamsQuery).then(response => {
1134
                 if (response.data.state == 0) {
1248
                 if (response.data.state == 0) {
1135
                   Toast.fail(response.data.msg)
1249
                   Toast.fail(response.data.msg)
1136
                   return false
1250
                   return false
1137
                 } else {
1251
                 } else {
1138
                   Toast.success('提交成功')
1252
                   Toast.success('提交成功')
1139
 
1253
 
1254
+                  this.$emit('advice')
1255
+                  this.$emit('longSolution', response.data.data.solution)
1140
                   this.$emit('prescription', response.data.data.prescription)
1256
                   this.$emit('prescription', response.data.data.prescription)
1141
                   this.finish()
1257
                   this.finish()
1142
 
1258
 
1143
                 }
1259
                 }
1144
               })
1260
               })
1145
 
1261
 
1146
-            }else  if (this.is_open == 1) {
1147
-              //弹框推送提醒
1148
-              this.advicePropForm.list = this.targetAdvices
1149
-              this.advicePropForm.operators = this.admin_users_prop
1150
-              this.advice_visibility = true
1151
-              this.isShowDialog = false
1262
+            } else if (this.is_open == 1) {
1263
+              if (this.targetAdvices.length > 0) {
1152
 
1264
 
1153
-              for (let i = 0; i < this.advicePropForm.list.length; i++) {
1154
-                if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
1155
-                  this.advicePropForm.result.push(this.advicePropForm.list[i].id)
1265
+                //弹框推送提醒
1266
+                this.advicePropForm.list = this.targetAdvices
1267
+                this.advicePropForm.operators = this.admin_users_prop
1268
+                this.advice_visibility = true
1269
+                this.isShowDialog = false
1270
+
1271
+                for (let i = 0; i < this.advicePropForm.list.length; i++) {
1272
+                  if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
1273
+                    this.advicePropForm.result.push(this.advicePropForm.list[i].id)
1274
+                  }
1156
                 }
1275
                 }
1276
+              } else {
1277
+
1278
+                Toast.loading({forbidClick: true, duration: 0})
1279
+                let ParamsQuery = this.dialysisPrescription
1280
+                ParamsQuery['patient'] = this.$route.query.patient_id
1281
+                ParamsQuery['record_date'] = this.record_date
1282
+                postSolution(ParamsQuery).then(response => {
1283
+                  if (response.data.state == 0) {
1284
+                    Toast.fail(response.data.msg)
1285
+                    return false
1286
+                  } else {
1287
+                    Toast.success('提交成功')
1288
+
1289
+                    this.$emit('advice')
1290
+                    this.$emit('longSolution', response.data.data.solution)
1291
+                    this.$emit('prescription', response.data.data.prescription)
1292
+                    this.finish()
1293
+
1294
+                  }
1295
+                })
1296
+
1157
               }
1297
               }
1158
 
1298
 
1159
             } else if (this.is_open == 2) {
1299
             } else if (this.is_open == 2) {
1160
-              if(this.waitUploadAdvices.length > 0) {
1300
+              if (this.waitUploadAdvices.length > 0) {
1161
                 this.advice_visibility = false
1301
                 this.advice_visibility = false
1162
                 let params = {
1302
                 let params = {
1163
                   advices: this.waitUploadAdvices,
1303
                   advices: this.waitUploadAdvices,
1176
 
1316
 
1177
                   }
1317
                   }
1178
                 })
1318
                 })
1179
-              }
1319
+                Toast.loading({forbidClick: true, duration: 0})
1320
+                let ParamsQuery = this.dialysisPrescription
1321
+                ParamsQuery['patient'] = this.$route.query.patient_id
1322
+                ParamsQuery['record_date'] = this.record_date
1323
+                postSolution(ParamsQuery).then(response => {
1324
+                  if (response.data.state == 0) {
1325
+                    Toast.fail(response.data.msg)
1326
+                    return false
1327
+                  } else {
1328
+                    Toast.success('提交成功')
1180
 
1329
 
1330
+                    this.$emit('advice')
1331
+                    this.$emit('longSolution', response.data.data.solution)
1332
+                    this.$emit('prescription', response.data.data.prescription)
1333
+                    this.finish()
1334
+
1335
+                  }
1336
+                })
1337
+              } else {
1338
+                Toast.loading({forbidClick: true, duration: 0})
1339
+                let ParamsQuery = this.dialysisPrescription
1340
+                ParamsQuery['patient'] = this.$route.query.patient_id
1341
+                ParamsQuery['record_date'] = this.record_date
1342
+                postSolution(ParamsQuery).then(response => {
1343
+                  if (response.data.state == 0) {
1344
+                    Toast.fail(response.data.msg)
1345
+                    return false
1346
+                  } else {
1347
+                    Toast.success('提交成功')
1348
+                    this.$emit('advice')
1349
+                    this.$emit('longSolution', response.data.data.solution)
1350
+                    this.$emit('prescription', response.data.data.prescription)
1351
+                    this.finish()
1352
+                  }
1353
+                })
1354
+              }
1181
             }
1355
             }
1182
           }
1356
           }
1183
-
1184
           Toast.loading({forbidClick: true, duration: 0})
1357
           Toast.loading({forbidClick: true, duration: 0})
1185
           let ParamsQuery = this.dialysisPrescription
1358
           let ParamsQuery = this.dialysisPrescription
1186
           ParamsQuery['patient'] = this.$route.query.patient_id
1359
           ParamsQuery['patient'] = this.$route.query.patient_id
1191
               return false
1364
               return false
1192
             } else {
1365
             } else {
1193
               Toast.success('提交成功')
1366
               Toast.success('提交成功')
1194
-              // for (const key in response.data.data.solution) {
1195
-              //   this.solution_prop[key] = response.data.data.solution[key];
1196
-              // }
1197
-              // for (const key in response.data.data.prescription) {
1198
-              //   this.prescription_prop[key] = response.data.data.prescription[key];
1199
-              // }
1200
-              // console.log(response.data.data.prescription)
1201
-
1202
               this.$emit('longSolution', response.data.data.solution)
1367
               this.$emit('longSolution', response.data.data.solution)
1203
               this.$emit('prescription', response.data.data.prescription)
1368
               this.$emit('prescription', response.data.data.prescription)
1204
               this.finish()
1369
               this.finish()

+ 3 - 6
src/pages/main/dialog/subMenu/LongAdviceSubMenu.vue View File

23
              <div style="padding-top: 15px;padding-left: 10px">开嘱医生&nbsp;{{ getDoctorName(advice.advice_doctor) }}</div><br/>
23
              <div style="padding-top: 15px;padding-left: 10px">开嘱医生&nbsp;{{ getDoctorName(advice.advice_doctor) }}</div><br/>
24
               <div style="padding-left: 10px">开嘱时间&nbsp;{{ getTime(advice.created_time) }}</div><br/>
24
               <div style="padding-left: 10px">开嘱时间&nbsp;{{ getTime(advice.created_time) }}</div><br/>
25
               <div style="padding-bottom: 15px;padding-left: 10px"> 医嘱内容&nbsp;{{getContent(advice)}}</div>
25
               <div style="padding-bottom: 15px;padding-left: 10px"> 医嘱内容&nbsp;{{getContent(advice)}}</div>
26
+              <div style="padding-bottom: 15px;padding-left: 10px" v-if="advice.frequency_type == 1"> 推送频率 每日必推</div>
27
+              <div style="padding-bottom: 15px;padding-left: 10px" v-if="advice.frequency_type == 2"> 推送频率&nbsp;{{advice.day_count}}天/次</div>
28
+              <div style="padding-bottom: 15px;padding-left: 10px" v-if="advice.frequency_type == 3"> 推送频率&nbsp;每周{{advice.week_day}}</div>
26
 
29
 
27
             </van-checkbox>
30
             </van-checkbox>
28
           </van-checkbox-group>
31
           </van-checkbox-group>
123
       },
126
       },
124
       getValue: function () {
127
       getValue: function () {
125
         let form = {}
128
         let form = {}
126
-
127
         let results = []
129
         let results = []
128
-
129
         for (let i = 0; i < this.propsForm.list.length; i++){
130
         for (let i = 0; i < this.propsForm.list.length; i++){
130
           for (let a = 0; a < this.propsForm.result.length; a++){
131
           for (let a = 0; a < this.propsForm.result.length; a++){
131
             if( this.propsForm.list[i].id == this.propsForm.result[a]){
132
             if( this.propsForm.list[i].id == this.propsForm.result[a]){
133
             }
134
             }
134
           }
135
           }
135
         }
136
         }
136
-
137
         var obj5={}
137
         var obj5={}
138
         results = results.reduce((cur, next) => {
138
         results = results.reduce((cur, next) => {
139
           obj5[next.id] ? '' : obj5[next.id] = true && cur.push(next)
139
           obj5[next.id] ? '' : obj5[next.id] = true && cur.push(next)
140
           return cur
140
           return cur
141
         }, [])
141
         }, [])
142
-
143
-        results
144
-
145
         return results
142
         return results
146
       },
143
       },
147
 
144
 

+ 5 - 3
src/pages/main/today/TodayTab.vue View File

156
 
156
 
157
     <van-popup title="透析下机" v-model="menuList[7].showPopup" :overlay="true" :close-on-click-overlay="false">
157
     <van-popup title="透析下机" v-model="menuList[7].showPopup" :overlay="true" :close-on-click-overlay="false">
158
       <plane-dialog :patient_prop="patient" :record="dialysis_order" :last_monitor_record="last_monitor_record" :admins="admin_users" :admin_map="admin_user_map"
158
       <plane-dialog :patient_prop="patient" :record="dialysis_order" :last_monitor_record="last_monitor_record" :admins="admin_users" :admin_map="admin_user_map"
159
-                    :special_premission="special_premission" 
159
+                    :special_premission="special_premission"
160
                     @did_off="closeDialysisOff" @close="closeDialysisOff" ref="plane_dialog"></plane-dialog>
160
                     @did_off="closeDialysisOff" @close="closeDialysisOff" ref="plane_dialog"></plane-dialog>
161
     </van-popup>
161
     </van-popup>
162
 
162
 
343
         ) {
343
         ) {
344
           steps[2].value = 1
344
           steps[2].value = 1
345
         }
345
         }
346
-        if (this.doctor_advices.length > 0) {
346
+        if (this.advice_groups.length > 0) {
347
           steps[3].value = 1
347
           steps[3].value = 1
348
         }
348
         }
349
 
349
 
749
           patient_id: this.patient_id,
749
           patient_id: this.patient_id,
750
           date: dateStr
750
           date: dateStr
751
         }
751
         }
752
+        this.advice_groups = []
753
+
752
         getDialysisRecord(params).then(rs => {
754
         getDialysisRecord(params).then(rs => {
753
           var resp = rs.data
755
           var resp = rs.data
754
           console.log(resp)
756
           console.log(resp)
1068
       }
1070
       }
1069
       ,
1071
       ,
1070
       closeStatOrder: function () {
1072
       closeStatOrder: function () {
1073
+
1071
         this.closeDialog(4)
1074
         this.closeDialog(4)
1072
-        this.doctor_advices.push([])
1073
         this.scrollToView('stat_order')
1075
         this.scrollToView('stat_order')
1074
       }
1076
       }
1075
       ,
1077
       ,