Browse Source

Merge branch 'master' of http://git.shengws.com/csx/Pad_New

See999 4 years ago
parent
commit
295004150c

+ 9 - 0
src/api/patient/patient.js View File

@@ -947,3 +947,12 @@ export function getOrgs (params) {
947 947
     params: params
948 948
   })
949 949
 }
950
+
951
+export function getNewPatientId (id, params) {
952
+  console.log('id------', id)
953
+  return request({
954
+    url: '/m/api/patient/getnewpatientid?id=' + id,
955
+    method: 'get',
956
+    params: params
957
+  })
958
+}

+ 98 - 98
src/pages/doctorAdvice/components/RescueRecord.vue View File

@@ -102,27 +102,27 @@ import {
102 102
   getPatientDetail,
103 103
   getRescueRecord,
104 104
   DeleteRescueRecord
105
-} from "@/api/patient/patient";
106
-import { uParseTime } from "@/utils/tools";
107
-import Vue from "vue";
108
-import { Dialog } from "vant";
109
-const moment = require("moment");
105
+} from '@/api/patient/patient'
106
+import { uParseTime } from '@/utils/tools'
107
+import Vue from 'vue'
108
+import { Dialog } from 'vant'
109
+const moment = require('moment')
110 110
 export default {
111 111
   props: {
112 112
     active: Number
113 113
   },
114
-  data() {
114
+  data () {
115 115
     return {
116 116
       newShow: false,
117 117
       startShow: false,
118 118
       endShow: false,
119
-      startTime: "请选择",
120
-      endTime: "请选择",
121
-      endTimes: "",
119
+      startTime: '请选择',
120
+      endTime: '请选择',
121
+      endTimes: '',
122 122
       minDate: new Date(1970, 0, 1),
123 123
       maxDate: new Date(2025, 10, 1),
124 124
       currentDate: new Date(),
125
-      actions: [{ name: "查看全部" }, { name: "全部删除" }],
125
+      actions: [{ name: '查看全部' }, { name: '全部删除' }],
126 126
       showOne: true,
127 127
       showTwo: false,
128 128
       limit: 10,
@@ -135,81 +135,81 @@ export default {
135 135
       list: [],
136 136
       id: 0,
137 137
       index: 0
138
-    };
138
+    }
139 139
   },
140 140
   methods: {
141
-    onCancel() {
142
-      this.typeShow = false;
141
+    onCancel () {
142
+      this.typeShow = false
143 143
     },
144
-    onConfirm(value) {
145
-      this.type = value;
146
-      this.typeShow = false;
144
+    onConfirm (value) {
145
+      this.type = value
146
+      this.typeShow = false
147 147
     },
148
-    getstartTime(value) {
149
-      this.page = 1;
150
-      let year = value.getFullYear();
151
-      let month = value.getMonth() + 1;
152
-      let day = value.getDate();
148
+    getstartTime (value) {
149
+      this.page = 1
150
+      let year = value.getFullYear()
151
+      let month = value.getMonth() + 1
152
+      let day = value.getDate()
153 153
       if (month >= 1 && month <= 9) {
154
-        month = `0${month}`;
154
+        month = `0${month}`
155 155
       }
156 156
       if (day >= 1 && day <= 9) {
157
-        day = `0${day}`;
157
+        day = `0${day}`
158 158
       }
159 159
 
160
-      this.startTime = `${year}-${month}-${day}`;
161
-      this.rescueRecords = [];
160
+      this.startTime = `${year}-${month}-${day}`
161
+      this.rescueRecords = []
162 162
       this.getRescueRecord(
163 163
         this.patient_id,
164 164
         this.limit,
165 165
         this.page,
166 166
         this.startTime,
167 167
         this.endTime
168
-      );
169
-      this.startShow = false;
168
+      )
169
+      this.startShow = false
170 170
     },
171
-    getstartTime2(value) {
172
-      this.page = 1;
173
-      let year = value.getFullYear();
174
-      let month = value.getMonth() + 1;
175
-      let day = value.getDate();
171
+    getstartTime2 (value) {
172
+      this.page = 1
173
+      let year = value.getFullYear()
174
+      let month = value.getMonth() + 1
175
+      let day = value.getDate()
176 176
       if (month >= 1 && month <= 9) {
177
-        month = `0${month}`;
177
+        month = `0${month}`
178 178
       }
179 179
       if (day >= 1 && day <= 9) {
180
-        day = `0${day}`;
180
+        day = `0${day}`
181 181
       }
182 182
 
183
-      this.endTime = `${year}-${month}-${day}`;
184
-      this.rescueRecords = [];
183
+      this.endTime = `${year}-${month}-${day}`
184
+      this.rescueRecords = []
185 185
       this.getRescueRecord(
186 186
         this.patient_id,
187 187
         this.limit,
188 188
         this.page,
189 189
         this.startTime,
190 190
         this.endTime
191
-      );
192
-      this.endShow = false;
191
+      )
192
+      this.endShow = false
193 193
     },
194
-    getPatientDetail(patientid) {
194
+    getPatientDetail (patientid) {
195 195
       getPatientDetail(patientid).then(response => {
196 196
         if (response.data.state === 1) {
197
-          var patientDetail = response.data.data.patientDetail;
197
+          var patientDetail = response.data.data.patientDetail
198 198
           if (patientDetail.blood_patients == 0) {
199
-            this.rescueRecords = [];
200
-            this.showOne = false;
201
-            this.showTwo = true;
199
+            this.rescueRecords = []
200
+            this.showOne = false
201
+            this.showTwo = true
202 202
           }
203 203
           if (patientDetail.blood_patients == 1) {
204
-            this.showOne = true;
205
-            this.showTwo = false;
204
+            this.showOne = true
205
+            this.showTwo = false
206 206
           }
207 207
           // console.log("病人详情", patientDetail);
208
-          this.patientName = patientDetail.name;
208
+          this.patientName = patientDetail.name
209 209
         }
210
-      });
210
+      })
211 211
     },
212
-    getRescueRecord(id) {
212
+    getRescueRecord (id) {
213 213
       getRescueRecord(
214 214
         id,
215 215
         this.limit,
@@ -218,20 +218,20 @@ export default {
218 218
         this.endTime
219 219
       ).then(response => {
220 220
         if (response.data.state === 1) {
221
-          var rescuerecord = response.data.data.rescuerecord;
221
+          var rescuerecord = response.data.data.rescuerecord
222 222
           // console.log("抢救记录", rescuerecord);
223
-          let arr = this.rescueRecords;
224
-          arr.push(...rescuerecord);
225
-          this.rescueRecords = arr;
226
-          var total = response.data.data.total;
223
+          let arr = this.rescueRecords
224
+          arr.push(...rescuerecord)
225
+          this.rescueRecords = arr
226
+          var total = response.data.data.total
227 227
           // console.log("总计", total);
228
-          this.loading = false;
228
+          this.loading = false
229 229
         }
230
-      });
230
+      })
231 231
     },
232
-    onLoad() {
232
+    onLoad () {
233 233
       setTimeout(() => {
234
-        this.page++;
234
+        this.page++
235 235
         // console.log(this.page)
236 236
         if (this.page <= Math.ceil(this.total / 10)) {
237 237
           this.getRescueRecord(
@@ -240,73 +240,73 @@ export default {
240 240
             this.endTimes,
241 241
             this.limit,
242 242
             this.page
243
-          );
243
+          )
244 244
         } else {
245
-          this.loading = false;
246
-          this.finished = true;
245
+          this.loading = false
246
+          this.finished = true
247 247
         }
248
-      }, 1000);
248
+      }, 1000)
249 249
     },
250
-    getTime(time) {
250
+    getTime (time) {
251 251
       // return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
252
-      return uParseTime(time, "{y}-{m}-{d}");
252
+      return uParseTime(time, '{y}-{m}-{d}')
253 253
     },
254
-    toRescueRecord(id) {
255
-      var patientid = this.$route.query.patientid;
254
+    toRescueRecord (id) {
255
+      var patientid = this.$route.query.patientid
256 256
       this.$router.push(
257
-        "/rescuerecord?id=" +
257
+        '/rescuerecord?id=' +
258 258
           id +
259
-          "&patientid=" +
259
+          '&patientid=' +
260 260
           patientid +
261
-          "&active=" +
261
+          '&active=' +
262 262
           this.active
263
-      );
263
+      )
264 264
     },
265
-    toDeleteRescueRecord(id, index) {
266
-      this.id = id;
267
-      this.index = index;
268
-      this.newShow = true;
265
+    toDeleteRescueRecord (id, index) {
266
+      this.id = id
267
+      this.index = index
268
+      this.newShow = true
269 269
     },
270
-    Delete(value) {
271
-      if (value.name == "查看全部") {
272
-        var patientid = this.$route.query.patientid;
270
+    Delete (value) {
271
+      if (value.name == '查看全部') {
272
+        var patientid = this.$route.query.patientid
273 273
         this.$router.push(
274
-          "/rescuerecord?id=" +
274
+          '/rescuerecord?id=' +
275 275
             this.id +
276
-            "&patientid=" +
276
+            '&patientid=' +
277 277
             patientid +
278
-            "&active=" +
278
+            '&active=' +
279 279
             this.active
280
-        );
280
+        )
281 281
       }
282
-      if (value.name == "全部删除") {
283
-        this.DeleteRescueRecord(this.id, this.index);
282
+      if (value.name == '全部删除') {
283
+        this.DeleteRescueRecord(this.id, this.index)
284 284
       }
285 285
     },
286
-    DeleteRescueRecord(id, index) {
286
+    DeleteRescueRecord (id, index) {
287 287
       Dialog.confirm({
288
-        title: "删除提示!",
289
-        message: "确认删除该条信息吗?,删除后将无法恢复!"
288
+        title: '删除提示!',
289
+        message: '确认删除该条信息吗?,删除后将无法恢复!'
290 290
       }).then(() => {
291 291
         DeleteRescueRecord(id).then(response => {
292 292
           if (response.data.state === 1) {
293
-            var msg = response.data.data.msg;
294
-            console.log("msg", msg);
295
-            this.rescueRecords.splice(index, 1);
296
-            this.newShow = false;
293
+            var msg = response.data.data.msg
294
+            console.log('msg', msg)
295
+            this.rescueRecords.splice(index, 1)
296
+            this.newShow = false
297 297
           }
298
-        });
299
-      });
298
+        })
299
+      })
300 300
     }
301 301
   },
302
-  created() {
303
-    var patientid = this.$route.query.patientid;
304
-    console.log("病人id能否获取", patientid);
305
-    this.patient_id = patientid;
306
-    this.getPatientDetail(patientid);
307
-    this.getRescueRecord(patientid);
302
+  created () {
303
+    var patientid = this.$route.query.patientid
304
+    // console.log("病人id能否获取", patientid);
305
+    this.patient_id = patientid
306
+    this.getPatientDetail(patientid)
307
+    this.getRescueRecord(patientid)
308 308
   }
309
-};
309
+}
310 310
 </script>
311 311
 
312 312
 <style lang="scss" scoped>

+ 89 - 88
src/pages/main/PatientBox.vue View File

@@ -69,174 +69,174 @@
69 69
 </template>
70 70
 
71 71
 <script>
72
-import { parseTime } from "@/utils";
73
-import { jsGetAge } from "@/utils/tools";
74
-import { setDialysisOrWaitSelectedConfig } from "@/utils/data_config";
72
+import { parseTime } from '@/utils'
73
+import { jsGetAge } from '@/utils/tools'
74
+import { setDialysisOrWaitSelectedConfig } from '@/utils/data_config'
75 75
 export default {
76
-  name: "PatientBox",
76
+  name: 'PatientBox',
77 77
   props: {
78 78
     patients: Array
79 79
   },
80
-  data() {
81
-    return {};
80
+  data () {
81
+    return {}
82 82
   },
83 83
   methods: {
84
-    getUnReadNum: function(schedual) {
84
+    getUnReadNum: function (schedual) {
85 85
       if (schedual.doctor_advice != null) {
86
-        let doctorAdvice = [];
86
+        let doctorAdvice = []
87 87
         for (let i = 0; i < schedual.doctor_advice.length; i++) {
88 88
           if (schedual.doctor_advice[i].execution_state == 2) {
89
-            doctorAdvice.push(schedual.doctor_advice[i]);
89
+            doctorAdvice.push(schedual.doctor_advice[i])
90 90
           }
91 91
         }
92
-        const sorted = this.groupBy(doctorAdvice, function(item) {
93
-          return [item.groupno];
94
-        });
95
-        return sorted.length;
92
+        const sorted = this.groupBy(doctorAdvice, function (item) {
93
+          return [item.groupno]
94
+        })
95
+        return sorted.length
96 96
       }
97 97
     },
98
-    getStatus: function(schedual) {
99
-      var isShowDot = false;
98
+    getStatus: function (schedual) {
99
+      var isShowDot = false
100 100
       if (schedual.doctor_advice != null) {
101 101
         for (let i = 0; i < schedual.doctor_advice.length; i++) {
102 102
           if (schedual.doctor_advice[i].execution_state == 2) {
103
-            isShowDot = true;
103
+            isShowDot = true
104 104
           }
105 105
         }
106
-        return isShowDot;
106
+        return isShowDot
107 107
       } else {
108
-        return false;
108
+        return false
109 109
       }
110 110
     },
111
-    stateColor: function(schedual) {
112
-      var state = this.computeState(schedual);
111
+    stateColor: function (schedual) {
112
+      var state = this.computeState(schedual)
113 113
       if (state == 1) {
114
-        return "blue";
114
+        return 'blue'
115 115
       } else if (state == 2) {
116
-        return "gray";
116
+        return 'gray'
117 117
       } else if (state == 3) {
118
-        return "red";
118
+        return 'red'
119 119
       } else if (state == 5) {
120
-        return "green1";
120
+        return 'green1'
121 121
       } else if (state == 6) {
122
-        return "green2";
122
+        return 'green2'
123 123
       } else {
124
-        return "blue";
124
+        return 'blue'
125 125
       }
126 126
     },
127
-    functionColor: function(schedual) {
128
-      var state = this.computeState(schedual);
127
+    functionColor: function (schedual) {
128
+      var state = this.computeState(schedual)
129 129
       if (state == 1 || state == 3) {
130
-        return "blue";
130
+        return 'blue'
131 131
       } else if (state == 2) {
132
-        return "gray";
132
+        return 'gray'
133 133
       } else {
134
-        return "blue";
134
+        return 'blue'
135 135
       }
136 136
     },
137
-    borderColor: function(schedual) {
138
-      var yc = this.isAbnormal(schedual);
137
+    borderColor: function (schedual) {
138
+      var yc = this.isAbnormal(schedual)
139 139
       if (yc == true) {
140
-        return "red";
140
+        return 'red'
141 141
       } else {
142
-        return "gray";
142
+        return 'gray'
143 143
       }
144 144
     },
145
-    stateText: function(schedual) {
146
-      var state = this.computeState(schedual);
145
+    stateText: function (schedual) {
146
+      var state = this.computeState(schedual)
147 147
       if (state == 1) {
148
-        return "已上机";
148
+        return '已上机'
149 149
       } else if (state == 2) {
150
-        return "已下机";
150
+        return '已下机'
151 151
       } else if (state == 3) {
152
-        return "监测中";
152
+        return '监测中'
153 153
       } else if (state == 5) {
154
-        return "待称重";
154
+        return '待称重'
155 155
       } else if (state == 6) {
156
-        return "待开处方";
156
+        return '待开处方'
157 157
       } else {
158 158
         // return schedual.patient.gender == 1 ? "男" : "女"
159
-        return "未上机";
159
+        return '未上机'
160 160
       }
161 161
     },
162
-    computeState: function(schedual) {
162
+    computeState: function (schedual) {
163 163
       if (
164 164
         schedual.assessment_before_dislysis == null ||
165 165
         schedual.assessment_before_dislysis.weight_before == 0
166 166
       ) {
167 167
         // 未签到称重
168
-        return 5;
168
+        return 5
169 169
       }
170 170
       if (schedual.prescription == null || schedual.prescription.creater == 0) {
171 171
         // 未确认处方
172
-        return 6;
172
+        return 6
173 173
       }
174 174
 
175 175
       if (schedual.dialysis_order == null) {
176 176
         // 未上机
177
-        return 4;
177
+        return 4
178 178
       } else if (schedual.dialysis_order.stage == 2) {
179 179
         // 已下机
180
-        return 2;
180
+        return 2
181 181
       } else if (
182 182
         schedual.dialysis_order.stage == 1 &&
183 183
         schedual.monitoring_records != null &&
184 184
         schedual.monitoring_records.length > 1
185 185
       ) {
186 186
         // 监测中
187
-        return 3;
187
+        return 3
188 188
       } else {
189
-        return 1;
189
+        return 1
190 190
       }
191 191
     },
192 192
 
193
-    orderState: function(schedual) {
193
+    orderState: function (schedual) {
194 194
       if (schedual.dialysis_order == null) {
195 195
         // 未上机
196
-        return 4;
196
+        return 4
197 197
       } else if (schedual.dialysis_order.stage == 2) {
198 198
         // 已下机
199
-        return 2;
199
+        return 2
200 200
       } else if (
201 201
         schedual.dialysis_order.stage == 1 &&
202 202
         schedual.monitoring_records != null &&
203 203
         schedual.monitoring_records.length > 1
204 204
       ) {
205 205
         // 监测中
206
-        return 3;
206
+        return 3
207 207
       } else {
208
-        return 1;
208
+        return 1
209 209
       }
210 210
     },
211
-    isAbnormal: function(schedual) {
212
-      return false; // schedual.yc;
211
+    isAbnormal: function (schedual) {
212
+      return false // schedual.yc;
213 213
     },
214
-    timeTypeText: function(schedual) {
214
+    timeTypeText: function (schedual) {
215 215
       if (schedual.schedule_type == 1) {
216
-        return "上午";
216
+        return '上午'
217 217
       } else if (schedual.schedule_type == 2) {
218
-        return "下午";
218
+        return '下午'
219 219
       } else {
220
-        return "晚上";
220
+        return '晚上'
221 221
       }
222 222
     },
223
-    genderText: function(schedual) {
223
+    genderText: function (schedual) {
224 224
       if (schedual.patient.gender == 0) {
225
-        return "未知";
225
+        return '未知'
226 226
       } else if (schedual.patient.gender == 1) {
227
-        return "男";
227
+        return '男'
228 228
       } else {
229
-        return "女";
229
+        return '女'
230 230
       }
231 231
     },
232
-    age: function(schedual) {
232
+    age: function (schedual) {
233 233
       if (schedual.patient.birthday != 0) {
234 234
         return jsGetAge(
235
-          parseTime(schedual.patient.birthday, "{y}-{m}-{d}"),
236
-          "-"
237
-        );
235
+          parseTime(schedual.patient.birthday, '{y}-{m}-{d}'),
236
+          '-'
237
+        )
238 238
       } else {
239
-        return "";
239
+        return ''
240 240
       }
241 241
 
242 242
       // var now = new Date();
@@ -246,37 +246,38 @@ export default {
246 246
       // // console.log(birthdayYear)
247 247
       // return nowYear - birthdayYear;
248 248
     },
249
-    groupBy(array, f) {
250
-      const groups = {};
251
-      array.forEach(function(o) {
252
-        const group = JSON.stringify(f(o));
253
-        groups[group] = groups[group] || [];
254
-        groups[group].push(o);
255
-      });
256
-      return Object.keys(groups).map(function(group) {
257
-        return groups[group];
258
-      });
249
+    groupBy (array, f) {
250
+      const groups = {}
251
+      array.forEach(function (o) {
252
+        const group = JSON.stringify(f(o))
253
+        groups[group] = groups[group] || []
254
+        groups[group].push(o)
255
+      })
256
+      return Object.keys(groups).map(function (group) {
257
+        return groups[group]
258
+      })
259 259
     },
260
-    detailAction: function(schedual) {
260
+    detailAction: function (schedual) {
261 261
       if (schedual.dialysis_order != null) {
262
-        setDialysisOrWaitSelectedConfig(1);
262
+        setDialysisOrWaitSelectedConfig(1)
263 263
       } else {
264
-        setDialysisOrWaitSelectedConfig(0);
264
+        setDialysisOrWaitSelectedConfig(0)
265 265
       }
266 266
 
267
-      var patient_id = schedual.patient_id;
268
-      var date = schedual.schedule_date;
267
+      var patient_id = schedual.patient_id
268
+      var date = schedual.schedule_date
269 269
       this.$router.push({
270
-        path: "/details",
270
+        path: '/details',
271 271
         query: {
272 272
           patient_id: patient_id,
273 273
           date: date,
274 274
           patient_name: schedual.patient.name
275 275
         }
276
-      });
276
+      })
277 277
     }
278 278
   }
279
-};
279
+
280
+}
280 281
 </script>
281 282
 
282 283
 <style style="stylesheet/scss" lang="scss" scoped>

+ 26 - 33
src/pages/main/dialysis/LongTable.vue View File

@@ -951,6 +951,7 @@
951 951
 
952 952
 <script>
953 953
 import {
954
+  getNewPatientId,
954 955
   GetLongDialysisRecord,
955 956
   getPatientDetail,
956 957
   DeleteLongDialysis
@@ -1010,7 +1011,8 @@ export default {
1010 1011
       showOne: true,
1011 1012
       showTwo: false,
1012 1013
       id: 0,
1013
-      index: 0
1014
+      index: 0,
1015
+      newpatientid:0,
1014 1016
     };
1015 1017
   },
1016 1018
   methods: {
@@ -1036,7 +1038,7 @@ export default {
1036 1038
       this.startTime = `${year}-${month}-${day}`;
1037 1039
       this.dialysisrecord = [];
1038 1040
       this.GetLongDialysisRecord(
1039
-        this.patient_id,
1041
+        this.newpatientid,
1040 1042
         this.limit,
1041 1043
         this.page,
1042 1044
         this.startTime,
@@ -1059,7 +1061,7 @@ export default {
1059 1061
       this.endTime = `${year}-${month}-${day}`;
1060 1062
       this.dialysisrecord = [];
1061 1063
       this.GetLongDialysisRecord(
1062
-        this.patient_id,
1064
+        this.newpatientid,
1063 1065
         this.limit,
1064 1066
         this.page,
1065 1067
         this.startTime,
@@ -1161,7 +1163,7 @@ export default {
1161 1163
           let arr = this.dialysisrecord;
1162 1164
           arr.push(...dialysis);
1163 1165
           this.dialysisrecord = arr;
1164
-          // console.log("长期透析处方", dialysis);
1166
+           console.log("长期透析处方", dialysis);
1165 1167
           var total = response.data.data.total;
1166 1168
           // console.log("total", total);
1167 1169
           this.loading = false;
@@ -1173,7 +1175,7 @@ export default {
1173 1175
         this.page++;
1174 1176
         if (this.page <= Math.ceil(this.total / 10)) {
1175 1177
           this.GetLongDialysisRecord(
1176
-            this.patient_id,
1178
+            this.newpatientid,
1177 1179
             this.limit,
1178 1180
             this.page,
1179 1181
             this.startTime,
@@ -1203,8 +1205,8 @@ export default {
1203 1205
         }
1204 1206
       }
1205 1207
     },
1206
-    getPatientDetail(patientid) {
1207
-      getPatientDetail(patientid).then(response => {
1208
+    getPatientDetail() {
1209
+      getPatientDetail(this.newpatientid).then(response => {
1208 1210
         if (response.data.state === 1) {
1209 1211
           var patientDetail = response.data.data.patientDetail;
1210 1212
           if (patientDetail.blood_patients == 0) {
@@ -1221,12 +1223,11 @@ export default {
1221 1223
       });
1222 1224
     },
1223 1225
     toLongDialysisDetail(id) {
1224
-      var patientid = this.$route.query.patientid;
1225 1226
       this.$router.push(
1226 1227
         "/alllongdialysis?id=" +
1227 1228
           id +
1228 1229
           "&patientid=" +
1229
-          patientid +
1230
+          this.newpatientid +
1230 1231
           "&active=" +
1231 1232
           this.active
1232 1233
       );
@@ -1238,12 +1239,11 @@ export default {
1238 1239
     },
1239 1240
     toDelete(value) {
1240 1241
       if (value.name == "查看全部") {
1241
-        var patientid = this.$route.query.patientid;
1242 1242
         this.$router.push(
1243 1243
           "/alllongdialysis?id=" +
1244 1244
             this.id +
1245 1245
             "&patientid=" +
1246
-            patientid +
1246
+            newpatientid +
1247 1247
             "&active=" +
1248 1248
             this.active
1249 1249
         );
@@ -1265,14 +1265,23 @@ export default {
1265 1265
           }
1266 1266
         });
1267 1267
       });
1268
+    },
1269
+    getNewPatientId(id){
1270
+      getNewPatientId(id).then(response=>{
1271
+         if(response.data.state == 1){
1272
+          var patient =  response.data.data.patient
1273
+          this.newpatientid = patient.id
1274
+           console.log("newpatientid",this.newpatientid)
1275
+           this.GetLongDialysisRecord(this.newpatientid);
1276
+           this.getPatientDetail(this.newpatientid);
1277
+         }
1278
+      })
1268 1279
     }
1269 1280
   },
1270 1281
   created() {
1271
-    var patientid = this.$route.query.patientid;
1272
-    this.patient_id = patientid;
1273
-
1274
-    this.GetLongDialysisRecord(patientid);
1275
-    this.getPatientDetail(patientid);
1282
+    var patient_id = this.$route.query.patient_id
1283
+    console.log("病人ID",patient_id)
1284
+    this.getNewPatientId(patient_id)
1276 1285
     this.blood_access_option = this.$store.getters.blood_access;
1277 1286
 
1278 1287
     this.anticoagulantsSet = this.$store.getters.anticoagulants_set;
@@ -1397,7 +1406,7 @@ export default {
1397 1406
     transform: translate3d(0, 0, 0);
1398 1407
     top: initial;
1399 1408
   }
1400
-  
1409
+
1401 1410
 }
1402 1411
 ::-webkit-scrollbar {
1403 1412
   width: 0;
@@ -1436,22 +1445,6 @@ export default {
1436 1445
 }
1437 1446
 </style>
1438 1447
 
1439
-
1440
-
1441
-
1442
-
1443
-
1444
-
1445
-
1446
-
1447
-
1448
-
1449
-
1450
-
1451
-
1452
-
1453
-
1454
-
1455 1448
 // <style style="stylesheet/scss" lang="scss" scoped>
1456 1449
 // .textarea {
1457 1450
 //   width: 100%;

+ 17 - 11
src/pages/main/dialysis/RecordTable.vue View File

@@ -20,7 +20,6 @@
20 20
             </div>
21 21
           </li>
22 22
 
23
-
24 23
           <el-popover placement="bottom" trigger="click">
25 24
             <li slot="reference">
26 25
               透析模式:{{ modeNameOther(mode_id) }}
@@ -652,7 +651,7 @@
652 651
 </script>
653 652
 
654 653
 <script>
655
-import { getPatientDetail, getDialysisRecord } from "@/api/patient/patient";
654
+import { getNewPatientId,getPatientDetail, getDialysisRecord } from "@/api/patient/patient";
656 655
 import { uParseTime } from "@/utils/tools";
657 656
 import Vue from "vue";
658 657
 import { Dialog } from "vant";
@@ -843,6 +842,7 @@ export default {
843 842
       ).then(response => {
844 843
         if (response.data.state === 1) {
845 844
           var dialysisrecord = response.data.data.dialysisrecord;
845
+          console.log("透析记录",dialysisrecord)
846 846
           let arr = this.dialysisRecord;
847 847
           arr.push(...dialysisrecord);
848 848
           this.dialysisRecord = arr;
@@ -910,20 +910,28 @@ export default {
910 910
           }
911 911
         });
912 912
       });
913
+    },
914
+    getNewPatientId(id){
915
+      getNewPatientId(id).then(response=>{
916
+         if(response.data.state === 1){
917
+          var patient =  response.data.data.patient
918
+          console.log("透析记录",patient)
919
+           this.patient_id = patient.id;
920
+           this.getDialysisRecord(patient.id);
921
+           this.getPatientDetail(patient.id);
922
+
923
+         }
924
+      })
913 925
     }
914 926
   },
915 927
   created() {
916
-    var patientid = this.$route.query.patientid;
917
-    this.getPatientDetail(patientid);
918
-    this.getDialysisRecord(patientid);
919
-    this.patient_id = patientid;
928
+    var patientid = this.$route.query.patient_id;
929
+    console.log("并嗯ID",patientid)
930
+    this.getNewPatientId(patientid)
920 931
   }
921 932
 };
922 933
 </script>
923 934
 
924
-
925
-
926
-
927 935
 <style lang="scss" scoped>
928 936
 .newDialysisRecord {
929 937
   height: 100%;
@@ -1072,8 +1080,6 @@ export default {
1072 1080
 }
1073 1081
 </style>
1074 1082
 
1075
-
1076
-
1077 1083
 <style style="stylesheet/scss" lang="scss" scoped>
1078 1084
 // .choice {
1079 1085
 //   border-bottom: 1px #e5e5e5 solid;

+ 99 - 99
src/pages/main/dialysis/RescueRecord.vue View File

@@ -102,27 +102,27 @@ import {
102 102
   getPatientDetail,
103 103
   getRescueRecord,
104 104
   DeleteRescueRecord
105
-} from "@/api/patient/patient";
106
-import { uParseTime } from "@/utils/tools";
107
-import Vue from "vue";
108
-import { Dialog } from "vant";
109
-const moment = require("moment");
105
+} from '@/api/patient/patient'
106
+import { uParseTime } from '@/utils/tools'
107
+import Vue from 'vue'
108
+import { Dialog } from 'vant'
109
+const moment = require('moment')
110 110
 export default {
111 111
   props: {
112 112
     active: Number
113 113
   },
114
-  data() {
114
+  data () {
115 115
     return {
116 116
       newShow: false,
117 117
       startShow: false,
118 118
       endShow: false,
119
-      startTime: "请选择",
120
-      endTime: "请选择",
121
-      endTimes: "",
119
+      startTime: '请选择',
120
+      endTime: '请选择',
121
+      endTimes: '',
122 122
       minDate: new Date(1970, 0, 1),
123 123
       maxDate: new Date(2025, 10, 1),
124 124
       currentDate: new Date(),
125
-      actions: [{ name: "查看全部" }, { name: "全部删除" }],
125
+      actions: [{ name: '查看全部' }, { name: '全部删除' }],
126 126
       showOne: true,
127 127
       showTwo: false,
128 128
       limit: 10,
@@ -135,81 +135,81 @@ export default {
135 135
       list: [],
136 136
       id: 0,
137 137
       index: 0
138
-    };
138
+    }
139 139
   },
140 140
   methods: {
141
-    onCancel() {
142
-      this.typeShow = false;
141
+    onCancel () {
142
+      this.typeShow = false
143 143
     },
144
-    onConfirm(value) {
145
-      this.type = value;
146
-      this.typeShow = false;
144
+    onConfirm (value) {
145
+      this.type = value
146
+      this.typeShow = false
147 147
     },
148
-    getstartTime(value) {
149
-      this.page = 1;
150
-      let year = value.getFullYear();
151
-      let month = value.getMonth() + 1;
152
-      let day = value.getDate();
148
+    getstartTime (value) {
149
+      this.page = 1
150
+      let year = value.getFullYear()
151
+      let month = value.getMonth() + 1
152
+      let day = value.getDate()
153 153
       if (month >= 1 && month <= 9) {
154
-        month = `0${month}`;
154
+        month = `0${month}`
155 155
       }
156 156
       if (day >= 1 && day <= 9) {
157
-        day = `0${day}`;
157
+        day = `0${day}`
158 158
       }
159 159
 
160
-      this.startTime = `${year}-${month}-${day}`;
161
-      this.rescueRecords = [];
160
+      this.startTime = `${year}-${month}-${day}`
161
+      this.rescueRecords = []
162 162
       this.getRescueRecord(
163 163
         this.patient_id,
164 164
         this.limit,
165 165
         this.page,
166 166
         this.startTime,
167 167
         this.endTime
168
-      );
169
-      this.startShow = false;
168
+      )
169
+      this.startShow = false
170 170
     },
171
-    getstartTime2(value) {
172
-      this.page = 1;
173
-      let year = value.getFullYear();
174
-      let month = value.getMonth() + 1;
175
-      let day = value.getDate();
171
+    getstartTime2 (value) {
172
+      this.page = 1
173
+      let year = value.getFullYear()
174
+      let month = value.getMonth() + 1
175
+      let day = value.getDate()
176 176
       if (month >= 1 && month <= 9) {
177
-        month = `0${month}`;
177
+        month = `0${month}`
178 178
       }
179 179
       if (day >= 1 && day <= 9) {
180
-        day = `0${day}`;
180
+        day = `0${day}`
181 181
       }
182 182
 
183
-      this.endTime = `${year}-${month}-${day}`;
184
-      this.rescueRecords = [];
183
+      this.endTime = `${year}-${month}-${day}`
184
+      this.rescueRecords = []
185 185
       this.getRescueRecord(
186 186
         this.patient_id,
187 187
         this.limit,
188 188
         this.page,
189 189
         this.startTime,
190 190
         this.endTime
191
-      );
192
-      this.endShow = false;
191
+      )
192
+      this.endShow = false
193 193
     },
194
-    getPatientDetail(patientid) {
194
+    getPatientDetail (patientid) {
195 195
       getPatientDetail(patientid).then(response => {
196 196
         if (response.data.state === 1) {
197
-          var patientDetail = response.data.data.patientDetail;
197
+          var patientDetail = response.data.data.patientDetail
198 198
           if (patientDetail.blood_patients == 0) {
199
-            this.rescueRecords = [];
200
-            this.showOne = false;
201
-            this.showTwo = true;
199
+            this.rescueRecords = []
200
+            this.showOne = false
201
+            this.showTwo = true
202 202
           }
203 203
           if (patientDetail.blood_patients == 1) {
204
-            this.showOne = true;
205
-            this.showTwo = false;
204
+            this.showOne = true
205
+            this.showTwo = false
206 206
           }
207 207
           // console.log("病人详情", patientDetail);
208
-          this.patientName = patientDetail.name;
208
+          this.patientName = patientDetail.name
209 209
         }
210
-      });
210
+      })
211 211
     },
212
-    getRescueRecord(id) {
212
+    getRescueRecord (id) {
213 213
       getRescueRecord(
214 214
         id,
215 215
         this.limit,
@@ -218,20 +218,20 @@ export default {
218 218
         this.endTime
219 219
       ).then(response => {
220 220
         if (response.data.state === 1) {
221
-          var rescuerecord = response.data.data.rescuerecord;
221
+          var rescuerecord = response.data.data.rescuerecord
222 222
           // console.log("抢救记录", rescuerecord);
223
-          let arr = this.rescueRecords;
224
-          arr.push(...rescuerecord);
225
-          this.rescueRecords = arr;
226
-          var total = response.data.data.total;
223
+          let arr = this.rescueRecords
224
+          arr.push(...rescuerecord)
225
+          this.rescueRecords = arr
226
+          var total = response.data.data.total
227 227
           // console.log("总计", total);
228
-          this.loading = false;
228
+          this.loading = false
229 229
         }
230
-      });
230
+      })
231 231
     },
232
-    onLoad() {
232
+    onLoad () {
233 233
       setTimeout(() => {
234
-        this.page++;
234
+        this.page++
235 235
         // console.log(this.page)
236 236
         if (this.page <= Math.ceil(this.total / 10)) {
237 237
           this.getRescueRecord(
@@ -240,73 +240,73 @@ export default {
240 240
             this.endTimes,
241 241
             this.limit,
242 242
             this.page
243
-          );
243
+          )
244 244
         } else {
245
-          this.loading = false;
246
-          this.finished = true;
245
+          this.loading = false
246
+          this.finished = true
247 247
         }
248
-      }, 1000);
248
+      }, 1000)
249 249
     },
250
-    getTime(time) {
250
+    getTime (time) {
251 251
       // return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
252
-      return uParseTime(time, "{y}-{m}-{d}");
252
+      return uParseTime(time, '{y}-{m}-{d}')
253 253
     },
254
-    toRescueRecord(id) {
255
-      var patientid = this.$route.query.patientid;
254
+    toRescueRecord (id) {
255
+      var patientid = this.$route.query.patientid
256 256
       this.$router.push(
257
-        "/rescuerecord?id=" +
257
+        '/rescuerecord?id=' +
258 258
           id +
259
-          "&patientid=" +
259
+          '&patientid=' +
260 260
           patientid +
261
-          "&active=" +
261
+          '&active=' +
262 262
           this.active
263
-      );
263
+      )
264 264
     },
265
-    toDeleteRescueRecord(id, index) {
266
-      this.id = id;
267
-      this.index = index;
268
-      this.newShow = true;
265
+    toDeleteRescueRecord (id, index) {
266
+      this.id = id
267
+      this.index = index
268
+      this.newShow = true
269 269
     },
270
-    Delete(value) {
271
-      if (value.name == "查看全部") {
272
-        var patientid = this.$route.query.patientid;
270
+    Delete (value) {
271
+      if (value.name == '查看全部') {
272
+        var patientid = this.$route.query.patientid
273 273
         this.$router.push(
274
-          "/rescuerecord?id=" +
274
+          '/rescuerecord?id=' +
275 275
             this.id +
276
-            "&patientid=" +
276
+            '&patientid=' +
277 277
             patientid +
278
-            "&active=" +
278
+            '&active=' +
279 279
             this.active
280
-        );
280
+        )
281 281
       }
282
-      if (value.name == "全部删除") {
283
-        this.DeleteRescueRecord(this.id, this.index);
282
+      if (value.name == '全部删除') {
283
+        this.DeleteRescueRecord(this.id, this.index)
284 284
       }
285 285
     },
286
-    DeleteRescueRecord(id, index) {
286
+    DeleteRescueRecord (id, index) {
287 287
       Dialog.confirm({
288
-        title: "删除提示!",
289
-        message: "确认删除该条信息吗?,删除后将无法恢复!"
288
+        title: '删除提示!',
289
+        message: '确认删除该条信息吗?,删除后将无法恢复!'
290 290
       }).then(() => {
291 291
         DeleteRescueRecord(id).then(response => {
292 292
           if (response.data.state === 1) {
293
-            var msg = response.data.data.msg;
294
-            console.log("msg", msg);
295
-            this.rescueRecords.splice(index, 1);
296
-            this.newShow = false;
293
+            var msg = response.data.data.msg
294
+            console.log('msg', msg)
295
+            this.rescueRecords.splice(index, 1)
296
+            this.newShow = false
297 297
           }
298
-        });
299
-      });
298
+        })
299
+      })
300 300
     }
301 301
   },
302
-  created() {
303
-    var patientid = this.$route.query.patientid;
304
-    console.log("病人id能否获取", patientid);
305
-    this.patient_id = patientid;
306
-    this.getPatientDetail(patientid);
307
-    this.getRescueRecord(patientid);
302
+  created () {
303
+    var patientid = this.$route.query.patientid
304
+    // console.log("病人id能否获取", patientid);
305
+    this.patient_id = patientid
306
+    this.getPatientDetail(patientid)
307
+    this.getRescueRecord(patientid)
308 308
   }
309
-};
309
+}
310 310
 </script>
311 311
 
312 312
 <style lang="scss" scoped>
@@ -417,7 +417,7 @@ export default {
417 417
     transform: translate3d(0, 0, 0);
418 418
     top: initial;
419 419
   }
420
-  
420
+
421 421
 }
422 422
 ::-webkit-scrollbar {
423 423
   width: 0;

File diff suppressed because it is too large
+ 641 - 641
src/pages/main/today/TodayTab.vue


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

@@ -232,13 +232,13 @@ export default {
232 232
         return ''
233 233
       } else {
234 234
         var obj = this.record.precaution
235
-        console.log('obj--', obj)
235
+        // console.log('obj--', obj)
236 236
         if (obj == null) {
237 237
           return ''
238 238
         }
239 239
         if (obj != null) {
240 240
           var arr = obj.split(',')
241
-          console.log('arr----', arr)
241
+          // console.log('arr----', arr)
242 242
           var arrtwo = []
243 243
           for (let i = 0; i < arr.length; i++) {
244 244
             for (let j = 0; j < this.precautions.length; j++) {