Bladeren bron

Merge branch 'new_pad_branch' of http://git.shengws.com/zhangbj/xt_pad into new_pad_branch

See999 4 jaren geleden
bovenliggende
commit
68415581f1

+ 1 - 1
build/cdn.json Bestand weergeven

@@ -1,3 +1,3 @@
1 1
 {
2
-  "version": "1.0.318"
2
+  "version": "1.1.2"
3 3
 }

+ 10 - 0
src/api/dialysis.js Bestand weergeven

@@ -255,3 +255,13 @@ export function GetSolution(params){
255 255
 
256 256
 
257 257
 
258
+
259
+
260
+export function GetSchedualNumber(params){
261
+  return request({
262
+    url:"/m/api/schedule/get",
263
+    method:'get',
264
+    params:params,
265
+  })
266
+
267
+}

+ 10 - 10
src/pages/home/login.vue Bestand weergeven

@@ -45,17 +45,17 @@
45 45
           <a href="">免密码登录</a>
46 46
           <a href="">忘记密码?</a>
47 47
           </div>-->
48
-          <div class="agree">
49
-            <el-checkbox v-model="agreement">
50
-              我已阅读并同意
51
-              <!-- <router-link to="/privacyPolicy"> -->
48
+          <!--<div class="agree">-->
49
+            <!--<el-checkbox v-model="agreement">-->
50
+              <!--我已阅读并同意-->
51
+              <!--&lt;!&ndash; <router-link to="/privacyPolicy"> &ndash;&gt;-->
52 52
 
53
-              <!-- </router-link> -->
54
-            </el-checkbox>
55
-            <!-- <router-link to="/privacyPolicy"> -->
56
-            <span class="agreeText" @click="agree">《隐私服务协议》</span>
57
-            <!-- </router-link> -->
58
-          </div>
53
+              <!--&lt;!&ndash; </router-link> &ndash;&gt;-->
54
+            <!--</el-checkbox>-->
55
+            <!--&lt;!&ndash; <router-link to="/privacyPolicy"> &ndash;&gt;-->
56
+            <!--<span class="agreeText" @click="agree">《隐私服务协议》</span>-->
57
+            <!--&lt;!&ndash; </router-link> &ndash;&gt;-->
58
+          <!--</div>-->
59 59
         </div>
60 60
       </div>
61 61
     </div>

+ 299 - 303
src/pages/main/add_urgent_schedule.vue Bestand weergeven

@@ -77,24 +77,26 @@
77 77
           </van-col>
78 78
 
79 79
           <van-col :span="24">
80
-            <span class="title">治疗模式:</span>
80
+            <span class="title">床位:</span>
81 81
             <div class="field_panel">
82 82
               <van-field
83
-                ref="mode_field"
84
-                @focus="selectModeAction"
85
-                :value="mode_name"
83
+                ref="bed_field"
84
+                @focus="selectBedAction"
85
+                :value="bed_name"
86 86
                 class="field"
87 87
                 left-icon="arrow-down"
88 88
               ></van-field>
89 89
             </div>
90 90
           </van-col>
91
+
92
+
91 93
           <van-col :span="24">
92
-            <span class="title">床位:</span>
94
+            <span class="title">治疗模式:</span>
93 95
             <div class="field_panel">
94 96
               <van-field
95
-                ref="bed_field"
96
-                @focus="selectBedAction"
97
-                :value="bed_name"
97
+                ref="mode_field"
98
+                @focus="selectModeAction"
99
+                :value="mode_name"
98 100
                 class="field"
99 101
                 left-icon="arrow-down"
100 102
               ></van-field>
@@ -129,6 +131,7 @@
129 131
     </van-popup>
130 132
     <van-popup v-model="show_bed_picker" position="bottom" class="popup">
131 133
       <van-picker
134
+        ref="picker"
132 135
         :columns="zone_device_options"
133 136
         value-key="number"
134 137
         @change="didChangeBed"
@@ -136,6 +139,7 @@
136 139
     </van-popup>
137 140
     <van-popup v-model="show_sch_type_picker" position="bottom" class="popup">
138 141
       <van-picker
142
+        ref="schedule"
139 143
         :columns="schedule_types"
140 144
         value-key="text"
141 145
         @change="didChangeSchType"
@@ -145,238 +149,116 @@
145 149
 </template>
146 150
 
147 151
 <script>
148
-import SideBar from "@/pages/layout/SideBar";
149
-import { parseTime } from "@/utils";
150
-import {
151
-  getUrgentScheduleInitData,
152
-  PostSearch,
153
-  postUrgentSchedule
154
-} from "@/api/dialysis";
155
-import { Dialog, Toast } from "vant";
156
-
157
-export default {
158
-  name: "AddUrgentSchedule",
159
-  components: {
160
-    SideBar
161
-  },
162
-  data() {
163
-    return {
164
-      loading: false,
165
-      value: "",
166
-      date: "2019-09-09",
167
-      patient_id: 0,
168
-      mode_id: 0,
169
-      device_id: 0,
170
-      schedule_type: 1,
171
-      zone_name: "",
172
-
173
-      show_patient_picker: false,
174
-      show_mode_picker: false,
175
-      show_bed_picker: false,
176
-      show_sch_type_picker: false,
177
-
178
-      patients: [],
179
-      modes: [],
180
-      schedule_types: [
181
-        { value: 1, text: "上午" },
182
-        { value: 2, text: "下午" },
183
-        { value: 3, text: "晚上" }
184
-      ],
185
-
186
-      origin_device_numbers: [],
187
-      zone_device_map: {},
188
-      zone_names: [],
189
-      current_devices: [],
190
-      zone_device_options: [],
191
-
192
-      origin_schedules: []
193
-    };
194
-  },
195
-  computed: {
196
-    patient_name: function() {
197
-      for (let index = 0; index < this.patients.length; index++) {
198
-        const patient = this.patients[index];
199
-        if (patient.id == this.patient_id) {
200
-          return patient.name;
201
-        }
202
-      }
203
-      return "";
204
-    },
205
-    mode_name: function() {
206
-      for (let index = 0; index < this.modes.length; index++) {
207
-        const mode = this.modes[index];
208
-        if (mode.id == this.mode_id) {
209
-          return mode.name;
210
-        }
211
-      }
212
-      return "";
213
-    },
214
-    bed_name: function() {
215
-      if (this.zone_name.length > 0 && this.device_id != 0) {
216
-        for (let index = 0; index < this.current_devices.length; index++) {
217
-          const device_number = this.current_devices[index];
218
-          if (device_number.id == this.device_id) {
219
-            return device_number.zone.name + " - " + device_number.number;
220
-          }
221
-        }
222
-      }
223
-      return "";
152
+  import SideBar from "@/pages/layout/SideBar";
153
+  import { parseTime } from "@/utils";
154
+  import {
155
+    getUrgentScheduleInitData,
156
+    PostSearch,
157
+    postUrgentSchedule
158
+  } from "@/api/dialysis";
159
+  import { Dialog, Toast } from "vant";
160
+
161
+  export default {
162
+    name: "AddUrgentSchedule",
163
+    components: {
164
+      SideBar
224 165
     },
225
-    schedule_type_title: function() {
226
-      for (let index = 0; index < this.schedule_types.length; index++) {
227
-        const type = this.schedule_types[index];
228
-        if (type.value == this.schedule_type) {
229
-          return type.text;
230
-        }
231
-      }
232
-      return "";
233
-    }
234
-  },
235
-  mounted() {
236
-    var today = new Date();
237
-    this.date = parseTime(today, "{y}-{m}-{d}");
238
-
239
-    var hour = today.getHours();
240
-    if (hour > 3 && hour < 11) {
241
-      this.schedule_type = 1;
242
-    } else if (hour >= 11 && hour < 18) {
243
-      this.schedule_type = 2;
244
-    } else {
245
-      this.schedule_type = 3;
246
-    }
166
+    data() {
167
+      return {
168
+        loading: false,
169
+        value: "",
170
+        date: "2019-09-09",
171
+        patient_id: 0,
172
+        mode_id: 0,
173
+        device_id: 0,
174
+        schedule_type: 2,
175
+        zone_name: "",
247 176
 
248
-    this.loading = true;
249
-    let params = {
250
-      type: this.schedule_type
251
-    };
252
-    console.log(params);
253
-    getUrgentScheduleInitData(params)
254
-      .then(rs => {
255
-        this.loading = false;
256
-        // console.log(rs.data.data)
257
-        if (rs.data.state == 1) {
258
-          this.origin_schedules = rs.data.data.schedules;
259
-          this.patients = rs.data.data.patients;
260
-          this.modes = rs.data.data.modes;
261
-          this.origin_device_numbers = rs.data.data.device_numbers;
262
-
263
-          for (let i = this.origin_schedules.length - 1; i >= 0; i--) {
264
-            for (let y = this.origin_device_numbers.length - 1; y >= 0; y--) {
265
-              if (
266
-                this.origin_device_numbers[y].id ==
267
-                this.origin_schedules[i].bed_id
268
-              ) {
269
-                this.origin_device_numbers.splice(y, 1);
270
-              }
271
-            }
272
-          }
177
+        show_patient_picker: false,
178
+        show_mode_picker: false,
179
+        show_bed_picker: false,
180
+        show_sch_type_picker: false,
181
+
182
+        patients: [],
183
+        modes: [],
184
+        schedule_types: [
185
+          { value: 1, text: "上午" },
186
+          { value: 2, text: "下午" },
187
+          { value: 3, text: "晚上" }
188
+        ],
189
+
190
+        origin_device_numbers: [],
191
+        zone_device_map: {},
192
+        zone_names: [],
193
+        current_devices: [],
194
+        zone_device_options: [],
273 195
 
274
-          if (this.patients.length > 0) {
275
-            this.patient_id = this.patients[0].id;
196
+        origin_schedules: []
197
+      };
198
+    },
199
+    computed: {
200
+      patient_name: function() {
201
+        for (let index = 0; index < this.patients.length; index++) {
202
+          const patient = this.patients[index];
203
+          if (patient.id == this.patient_id) {
204
+            return patient.name;
276 205
           }
277
-          if (this.modes.length > 0) {
278
-            this.mode_id = this.modes[0].id;
206
+        }
207
+        return "";
208
+      },
209
+      mode_name: function() {
210
+        for (let index = 0; index < this.modes.length; index++) {
211
+          const mode = this.modes[index];
212
+          if (mode.id == this.mode_id) {
213
+            return mode.name;
279 214
           }
280
-
281
-          var zone_device_map = {};
282
-          for (
283
-            let index = 0;
284
-            index < this.origin_device_numbers.length;
285
-            index++
286
-          ) {
287
-            const device_number = this.origin_device_numbers[index];
288
-            if (
289
-              zone_device_map[device_number.zone.name] == null ||
290
-              zone_device_map[device_number.zone.name] == undefined
291
-            ) {
292
-              zone_device_map[device_number.zone.name] = [];
215
+        }
216
+        return "";
217
+      },
218
+      bed_name: function() {
219
+        if (this.zone_name.length > 0 && this.device_id != 0) {
220
+          for (let index = 0; index < this.current_devices.length; index++) {
221
+            const device_number = this.current_devices[index];
222
+            if (device_number.id == this.device_id) {
223
+              return device_number.zone_name + " - " + device_number.number;
293 224
             }
294
-            zone_device_map[device_number.zone.name].push(device_number);
295 225
           }
296
-          this.zone_device_map = zone_device_map;
297
-
298
-          this.zone_names = Object.keys(this.zone_device_map);
299
-          if (this.zone_names.length > 0) {
300
-            this.zone_name = this.zone_names[0];
301
-            this.current_devices = this.zone_device_map[this.zone_name];
302
-            this.device_id = this.current_devices[0].id;
226
+        }
227
+        return "";
228
+      },
229
+      schedule_type_title: function() {
230
+        for (let index = 0; index < this.schedule_types.length; index++) {
231
+          const type = this.schedule_types[index];
232
+          if (type.value == this.schedule_type) {
233
+            return type.text;
303 234
           }
304
-          this.zone_device_options = [
305
-            { values: this.zone_names },
306
-            // { values: this.getDeviceNumberNames(this.current_devices) },
307
-            { values: this.current_devices }
308
-          ];
309
-        } else {
310
-          Toast.fail(rs.data.msg);
311 235
         }
312
-      })
313
-      .catch(err => {
314
-        this.loading = false;
315
-        Toast.fail(err);
316
-      });
317
-  },
318
-  methods: {
319
-    handleSelect(val) {
320
-      this.patient_name = val.name;
321
-      this.patient_id = val.id;
322
-    },
323
-    querySearchAsync(keyword, cb) {
324
-      let key = "";
325
-      if (keyword != undefined) {
326
-        key = keyword;
236
+        return "";
327 237
       }
328
-      let searchArray = [];
329
-      PostSearch(key).then(response => {
330
-        if (response.data.state == 1) {
331
-          searchArray = response.data.data.patient;
332
-          cb(searchArray);
333
-        } else {
334
-          cb([]);
335
-        }
336
-      });
337
-    },
238
+    },created(){
338 239
 
339
-    selectPatientAction: function() {
340
-      this.$refs.patient_field.blur();
341
-      this.show_patient_picker = true;
342
-    },
343
-    selectModeAction: function() {
344
-      this.$refs.mode_field.blur();
345
-      this.show_mode_picker = true;
346
-    },
347
-    selectBedAction: function() {
348
-      this.$refs.bed_field.blur();
349
-      this.show_bed_picker = true;
350
-    },
351
-    selectSchTypeAction: function() {
352
-      this.$refs.sch_type_field.blur();
353
-      this.show_sch_type_picker = true;
354
-    },
240
+      var today = new Date();
241
+      this.date = parseTime(today, "{y}-{m}-{d}");
355 242
 
356
-    didChangePatient: function(picker, patient, index) {
357
-      this.patient_id = patient.id;
358
-    },
359
-    didChangeMode: function(picker, mode, index) {
360
-      this.mode_id = mode.id;
361
-    },
362
-    didChangeBed: function(picker, values, col_index) {
363
-      if (col_index == 0) {
364
-        this.zone_name = values[0];
365
-        this.current_devices = this.zone_device_map[this.zone_name];
366
-        this.device_id = this.current_devices[0].id;
367
-
368
-        picker.setColumnValues(1, this.current_devices);
369
-      } else if (col_index == 1) {
370
-        this.device_id = values[1].id;
243
+      var hour = today.getHours();
244
+      if (hour > 3 && hour < 11) {
245
+        this.schedule_type = 1;
246
+      } else if (hour >= 11 && hour < 18) {
247
+        this.schedule_type = 2;
248
+      } else {
249
+        this.schedule_type = 3;
371 250
       }
251
+
252
+
253
+
372 254
     },
373
-    didChangeSchType: function(picker, sch_type, index) {
374
-      this.schedule_type = sch_type.value;
255
+    mounted() {
375 256
 
376 257
       this.loading = true;
377 258
       let params = {
378 259
         type: this.schedule_type
379 260
       };
261
+      console.log(params);
380 262
       getUrgentScheduleInitData(params)
381 263
         .then(rs => {
382 264
           this.loading = false;
@@ -384,26 +266,17 @@ export default {
384 266
           if (rs.data.state == 1) {
385 267
             this.origin_schedules = rs.data.data.schedules;
386 268
             this.patients = rs.data.data.patients;
269
+            console.log(this.patients)
387 270
             this.modes = rs.data.data.modes;
388 271
             this.origin_device_numbers = rs.data.data.device_numbers;
389 272
 
390
-            for (let i = this.origin_schedules.length - 1; i >= 0; i--) {
391
-              for (let y = this.origin_device_numbers.length - 1; y >= 0; y--) {
392
-                if (
393
-                  this.origin_device_numbers[y].id ==
394
-                  this.origin_schedules[i].bed_id
395
-                ) {
396
-                  this.origin_device_numbers.splice(y, 1);
397
-                }
398
-              }
399
-            }
400 273
 
401
-            // if (this.patients.length > 0) {
402
-            //   this.patient_id = this.patients[0].id
403
-            // }
404
-            // if (this.modes.length > 0) {
405
-            //   this.mode_id = this.modes[0].id
406
-            // }
274
+            if (this.patients.length > 0) {
275
+              this.patient_id = this.patients[0].id;
276
+            }
277
+            if (this.modes.length > 0) {
278
+              this.mode_id = this.modes[0].id;
279
+            }
407 280
 
408 281
             var zone_device_map = {};
409 282
             for (
@@ -413,12 +286,12 @@ export default {
413 286
             ) {
414 287
               const device_number = this.origin_device_numbers[index];
415 288
               if (
416
-                zone_device_map[device_number.zone.name] == null ||
417
-                zone_device_map[device_number.zone.name] == undefined
289
+                zone_device_map[device_number.zone_name] == null ||
290
+                zone_device_map[device_number.zone_name] == undefined
418 291
               ) {
419
-                zone_device_map[device_number.zone.name] = [];
292
+                zone_device_map[device_number.zone_name] = [];
420 293
               }
421
-              zone_device_map[device_number.zone.name].push(device_number);
294
+              zone_device_map[device_number.zone_name].push(device_number);
422 295
             }
423 296
             this.zone_device_map = zone_device_map;
424 297
 
@@ -433,6 +306,8 @@ export default {
433 306
               // { values: this.getDeviceNumberNames(this.current_devices) },
434 307
               { values: this.current_devices }
435 308
             ];
309
+            console.log(this.zone_device_options )
310
+
436 311
           } else {
437 312
             Toast.fail(rs.data.msg);
438 313
           }
@@ -442,77 +317,198 @@ export default {
442 317
           Toast.fail(err);
443 318
         });
444 319
     },
320
+    methods: {
321
+      handleSelect(val) {
322
+        this.patient_name = val.name;
323
+        this.patient_id = val.id;
324
+      },
325
+      querySearchAsync(keyword, cb) {
326
+        let key = "";
327
+        if (keyword != undefined) {
328
+          key = keyword;
329
+        }
330
+        let searchArray = [];
331
+        PostSearch(key).then(response => {
332
+          if (response.data.state == 1) {
333
+            searchArray = response.data.data.patient;
334
+            cb(searchArray);
335
+          } else {
336
+            cb([]);
337
+          }
338
+        });
339
+      },
445 340
 
446
-    submitAction: function() {
447
-      if (this.patient_id == 0 || this.mode_id == 0 || this.device_id == 0) {
448
-        Toast.fail("请选择班次、床位等");
449
-        return;
450
-      }
341
+      selectPatientAction: function() {
342
+        this.$refs.patient_field.blur();
343
+        this.show_patient_picker = true;
344
+      },
345
+      selectModeAction: function() {
346
+        this.$refs.mode_field.blur();
347
+        this.show_mode_picker = true;
348
+      },
349
+      selectBedAction: function() {
350
+        this.$refs.bed_field.blur();
351
+        this.show_bed_picker = true;
352
+      },
353
+      selectSchTypeAction: function() {
354
+        this.$refs.sch_type_field.blur();
355
+        this.show_sch_type_picker = true;
356
+
357
+      },
358
+
359
+      didChangePatient: function(picker, patient, index) {
360
+        this.patient_id = patient.id;
361
+      },
362
+      didChangeMode: function(picker, mode, index) {
363
+        this.mode_id = mode.id;
364
+      },
365
+      didChangeBed: function(picker, values, col_index) {
366
+        if (col_index == 0) {
367
+          this.zone_name = values[0];
368
+          this.current_devices = this.zone_device_map[this.zone_name];
369
+          this.device_id = this.current_devices[0].id;
451 370
 
452
-      var repeated = false;
453
-      for (let index = 0; index < this.origin_schedules.length; index++) {
454
-        const schedule = this.origin_schedules[index];
455
-        if (
456
-          schedule.bed_id == this.device_id &&
457
-          this.schedule_type == schedule.schedule_type
458
-        ) {
459
-          repeated = true;
460
-          break;
371
+          picker.setColumnValues(1, this.current_devices);
372
+        } else if (col_index == 1) {
373
+          this.device_id = values[1].id;
461 374
         }
462
-      }
463
-      if (repeated) {
464
-        Dialog.confirm({
465
-          title: "提醒",
466
-          message: "你选择的床位已经被排班,确认要替换吗?"
467
-        })
468
-          .then(() => {
469
-            // on confirm
470
-            this.submit();
375
+      },
376
+      didChangeSchType: function(picker, sch_type, index) {
377
+        this.schedule_type = sch_type.value;
378
+        this.loading = true;
379
+        let params = {
380
+          type: this.schedule_type
381
+        };
382
+        getUrgentScheduleInitData(params)
383
+          .then(rs => {
384
+            this.loading = false;
385
+            // console.log(rs.data.data)
386
+            if (rs.data.state == 1) {
387
+              this.zone_device_options = []
388
+              this.origin_schedules = rs.data.data.schedules;
389
+              this.patients = rs.data.data.patients;
390
+              console.log(this.patients)
391
+              this.modes = rs.data.data.modes;
392
+              this.origin_device_numbers = rs.data.data.device_numbers;
393
+
394
+
395
+              if (this.patients.length > 0) {
396
+                this.patient_id = this.patients[0].id;
397
+              }
398
+              if (this.modes.length > 0) {
399
+                this.mode_id = this.modes[0].id;
400
+              }
401
+
402
+              var zone_device_map = {};
403
+              for (
404
+                let index = 0;
405
+                index < this.origin_device_numbers.length;
406
+                index++
407
+              ) {
408
+                const device_number = this.origin_device_numbers[index];
409
+                if (
410
+                  zone_device_map[device_number.zone_name] == null ||
411
+                  zone_device_map[device_number.zone_name] == undefined
412
+                ) {
413
+                  zone_device_map[device_number.zone_name] = [];
414
+                }
415
+                zone_device_map[device_number.zone_name].push(device_number);
416
+              }
417
+              this.zone_device_map = zone_device_map;
418
+
419
+              this.zone_names = Object.keys(this.zone_device_map);
420
+              if (this.zone_names.length > 0) {
421
+                this.zone_name = this.zone_names[0];
422
+                this.current_devices = this.zone_device_map[this.zone_name];
423
+                this.device_id = this.current_devices[0].id;
424
+              }
425
+              this.zone_device_options = [
426
+                { values: this.zone_names },
427
+                // { values: this.getDeviceNumberNames(this.current_devices) },
428
+                { values: this.current_devices }
429
+              ];
430
+              console.log( this.zone_device_options)
431
+            } else {
432
+              Toast.fail(rs.data.msg);
433
+            }
471 434
           })
472
-          .catch(() => {
473
-            // on cancel
435
+          .catch(err => {
436
+            this.loading = false;
437
+            Toast.fail(err);
474 438
           });
475
-      } else {
476
-        this.submit();
477
-      }
478
-    },
479
-    submit: function() {
480
-      var params = {
481
-        patient_id: this.patient_id,
482
-        mode: this.mode_id,
483
-        schedule_type: this.schedule_type,
484
-        bed: this.device_id
485
-      };
486
-      this.loading = true;
487
-      postUrgentSchedule(params)
488
-        .then(rs => {
489
-          this.loading = false;
490
-          var resp = rs.data;
491
-          if (resp.state == 1) {
492
-            console.log(resp.data);
493
-            var patient = resp.data.patient;
494
-            var schedule = resp.data.schedule;
495
-            this.$router.push({
496
-              path: "/details",
497
-              query: {
498
-                patient_id: patient.id,
499
-                date: schedule.schedule_date,
500
-                patient_name: patient.name
501
-              }
502
-            });
503
-          } else {
504
-            Toast.fail(resp.msg);
439
+      },
440
+
441
+      submitAction: function() {
442
+
443
+        if (this.patient_id == 0 || this.mode_id == 0 || this.device_id == 0) {
444
+          Toast.fail("请选择班次、床位等");
445
+          return;
446
+        }
447
+
448
+        var repeated = false;
449
+        for (let index = 0; index < this.origin_schedules.length; index++) {
450
+          const schedule = this.origin_schedules[index];
451
+          if (
452
+            schedule.bed_id == this.device_id &&
453
+            this.schedule_type == schedule.schedule_type
454
+          ) {
455
+            repeated = true;
456
+            break;
505 457
           }
506
-        })
507
-        .catch(err => {
508
-          this.loading = false;
509
-          Toast.fail("err");
510
-        });
458
+        }
459
+        if (repeated) {
460
+          Dialog.confirm({
461
+            title: "提醒",
462
+            message: "你选择的床位已经被排班,确认要替换吗?"
463
+          })
464
+            .then(() => {
465
+              // on confirm
466
+              this.submit();
467
+            })
468
+            .catch(() => {
469
+              // on cancel
470
+            });
471
+        } else {
472
+          this.submit();
473
+        }
474
+      },
475
+      submit: function() {
476
+        var params = {
477
+          patient_id: this.patient_id,
478
+          mode: this.mode_id,
479
+          schedule_type: this.schedule_type,
480
+          bed: this.device_id
481
+        };
482
+        this.loading = true;
483
+        postUrgentSchedule(params)
484
+          .then(rs => {
485
+            this.loading = false;
486
+            var resp = rs.data;
487
+            if (resp.state == 1) {
488
+              var patient = resp.data.patient;
489
+              var schedule = resp.data.schedule;
490
+              this.$router.push({
491
+                path: "/details",
492
+                query: {
493
+                  patient_id: patient.id,
494
+                  date: schedule.schedule_date,
495
+                  patient_name: patient.name
496
+                }
497
+              });
498
+            } else {
499
+              Toast.fail(resp.msg);
500
+            }
501
+          })
502
+          .catch(err => {
503
+            this.loading = false;
504
+            Toast.fail("err");
505
+          });
506
+      }
511 507
     }
512
-  }
513
-};
508
+  };
514 509
 </script>
515 510
 
511
+
516 512
 <style style="stylesheet/scss" lang="scss" scoped>
517 513
 .mainContent {
518 514
   position: relative;

+ 427 - 395
src/pages/main/dialog/ComputerDialog.vue Bestand weergeven

@@ -1,42 +1,33 @@
1 1
 <template>
2 2
   <div>
3
+
3 4
     <div class="Dialog" v-show="!selecting">
4 5
       <div class="DialogTit">
5 6
         <span @click="close()" class="iconfont">&#xe6e9;</span>
6 7
         <h1 class="name">透析上机</h1>
7
-        <span
8
-          class="success"
9
-          v-if="
10
-            this.record.id == 0 ||
11
-              this.$store.getters.user.user.id != this.creator
12
-          "
13
-        ></span>
14
-        <span
15
-          class="success"
16
-          @click="modify()"
17
-          v-if="
18
-            isPremission || this.$store.getters.user.user.id == this.creator
19
-          "
20
-          >修改</span
21
-        >
8
+        <span class="success" v-if="this.record.id == 0 || this.$store.getters.user.user.id != this.creator"></span>
9
+        <span class="success" @click="modify()" v-if="isPremission|| this.$store.getters.user.user.id == this.creator">修改</span>
22 10
       </div>
23 11
 
24
-      <div class="DialogContent">
12
+      <div class="DialogContent ">
13
+        <div class="item" @click="select_type">
14
+          <h2 class="name">班次</h2>
15
+          <div class="content">
16
+            <span class="text" style="width: 100px">{{getSchedualType(this.schedual_type)}}</span>
17
+            <span class="iconfont">&#xe6f9;</span>
18
+          </div>
19
+        </div>
25 20
         <div class="item" @click="select_bed">
26 21
           <h2 class="name">上机床位</h2>
27 22
           <div class="content">
28
-            <span class="text" style="width: 100px">{{
29
-              device_number_map[bed_id].number + "床"
30
-            }}</span>
23
+            <span class="text" style="width: 100px">{{ device_number_map[bed_id].number }}</span>
31 24
             <span class="iconfont">&#xe6f9;</span>
32 25
           </div>
33 26
         </div>
34 27
         <div class="item" @click="select_nurse">
35 28
           <h2 class="name">上机护士</h2>
36 29
           <div class="content">
37
-            <span class="text" style="width: 100px">{{
38
-              admin_map[nurse_id].name
39
-            }}</span>
30
+            <span class="text" style="width: 100px">{{ admin_map[nurse_id].name }}</span>
40 31
             <span class="iconfont">&#xe6f9;</span>
41 32
           </div>
42 33
         </div>
@@ -44,12 +35,7 @@
44 35
         <div class="item" @click="select_puncture_nurse">
45 36
           <h2 class="name">穿刺者</h2>
46 37
           <div class="content">
47
-            <span
48
-              class="text"
49
-              style="width: 100px"
50
-              v-if="admin_map[puncture_nurse_id]"
51
-              >{{ admin_map[puncture_nurse_id].name }}</span
52
-            >
38
+            <span class="text" style="width: 100px" v-if="admin_map[puncture_nurse_id]">{{ admin_map[puncture_nurse_id].name}}</span>
53 39
             <span class="iconfont">&#xe6f9;</span>
54 40
           </div>
55 41
         </div>
@@ -57,34 +43,24 @@
57 43
         <div class="item" v-if="template_id == 6">
58 44
           <label class="name" for="xll">引血(ml/min)</label>
59 45
           <div class="content">
60
-            <input
61
-              type="tel"
62
-              @focus="inputFocus"
63
-              id="xll"
64
-              v-model="blood_drawing"
65
-            />
46
+            <input type="tel" @focus="inputFocus"  id="xll" v-model="blood_drawing"/>
66 47
           </div>
67 48
         </div>
68 49
 
69 50
         <div class="item">
70 51
           <h2 class="name">上机时间</h2>
71 52
           <div class="content">
72
-            <span
73
-              class="text"
74
-              style="width: 100px"
75
-              @click="selectStartTimeAction"
76
-              >{{ start_time_str }}</span
77
-            >
53
+            <span class="text" style="width: 100px" @click="selectStartTimeAction">{{ start_time_str }}</span>
78 54
             <span class="iconfont">&#xe6f9;</span>
79 55
           </div>
80 56
         </div>
57
+
58
+
59
+
60
+
81 61
         <div class="perform">
82
-          <button @click="commitInfo" v-if="record == null || record.id == ''">
83
-            执行上机
84
-          </button>
85
-          <button :disabled="true" style="background-color:lightgray;" v-else>
86
-            已上机
87
-          </button>
62
+          <button @click="commitInfo" v-if="(record == null || record.id == '')">执行上机</button>
63
+          <button :disabled="true" style="background-color:lightgray;" v-else>已上机</button>
88 64
         </div>
89 65
       </div>
90 66
     </div>
@@ -99,390 +75,446 @@
99 75
   </div>
100 76
 </template>
101 77
 
78
+
102 79
 <script>
103
-import { startDialysis, PostModifyStartDialysis } from "@/api/dialysis";
104
-import { Toast } from "vant";
105
-import { parseTime } from "@/utils";
106
-
107
-import TwoMenu from "./TwoMenu";
108
-
109
-export default {
110
-  name: "ComputerDialog",
111
-  components: {
112
-    TwoMenu
113
-  },
114
-  data() {
115
-    return {
116
-      start_time: new Date(),
117
-      selecting: false,
118
-      start_time_str: "",
119
-      bed_id: 0,
120
-      nurse_id: 0,
121
-      puncture_nurse_id: 0,
122
-      isPremission: false,
123
-      zone_beds: [], // 该排班的区里的床位
124
-      creator: 0,
125
-      template_id: 0,
126
-      blood_drawing: 100
127
-    };
128
-  },
129
-  props: {
130
-    schedule: {
131
-      type: Object
132
-    },
133
-    patient_prop: {
134
-      type: Object
135
-    },
136
-    record: {
137
-      type: Object
138
-    },
139
-    admins: {
140
-      type: Array
141
-    },
142
-    device_numbers: {
143
-      type: Array
144
-    },
145
-    admin_map: {
146
-      type: Object
80
+  import {startDialysis,PostModifyStartDialysis,GetSchedualNumber} from '@/api/dialysis'
81
+  import {Toast} from 'vant'
82
+  import {parseTime} from '@/utils'
83
+
84
+  import TwoMenu from './TwoMenu'
85
+
86
+  export default {
87
+    name: 'ComputerDialog',
88
+    components: {
89
+      TwoMenu
147 90
     },
148
-    device_number_map: {
149
-      type: Object
91
+    data () {
92
+      return {
93
+        start_time: new Date(),
94
+        selecting: false,
95
+        start_time_str: '',
96
+        bed_id: 0,
97
+        nurse_id: 0,
98
+        puncture_nurse_id: 0,
99
+        isPremission: false,
100
+        zone_beds: [], // 该排班的区里的床位
101
+        creator: 0,
102
+        template_id: 0,
103
+        blood_drawing:100,
104
+        schedual_type:0,
105
+        schedules_type: [
106
+          {id: 1, name:"上午"},
107
+          {id: 2, name:"下午"},
108
+          {id: 3, name:"晚上"},
109
+        ], // 该排班的区里的床位
110
+      }
150 111
     },
151
-    special_premission: {
152
-      type: Array
153
-    }
154
-  },
155
-  mounted() {
156
-    if (this.record.id == 0) {
157
-      this.start_time_str =
158
-        parseTime(this.start_time, "{y}-{m}-{d} {h}:{i}") + ":00";
159
-    } else {
160
-      if (this.record.start_time == 0) {
161
-        this.start_time_str =
162
-          parseTime(this.start_time, "{y}-{m}-{d} {h}:{i}") + ":00";
112
+    props: {
113
+      schedule: {
114
+        type: Object,
115
+      },
116
+      patient_prop: {
117
+        type: Object,
118
+      },
119
+      record: {
120
+        type: Object,
121
+      },
122
+      admins: {
123
+        type: Array,
124
+      },
125
+      device_numbers: {
126
+        type: Array,
127
+      },
128
+      admin_map: {
129
+        type: Object,
130
+      },
131
+      device_number_map: {
132
+        type: Object,
133
+      },
134
+      special_premission: {
135
+        type: Array,
136
+      },
137
+    }, mounted () {
138
+
139
+      if (this.record.id == 0) {
140
+        this.start_time_str = parseTime(this.start_time, '{y}-{m}-{d} {h}:{i}') + ':00'
163 141
       } else {
164
-        this.start_time_str =
165
-          parseTime(this.record.start_time, "{y}-{m}-{d} {h}:{i}") + ":00";
166
-      }
167
-    }
168
-  },
169
-  created() {
170
-    this.template_id = this.$store.getters.user.template_info.template_id;
171
-    var date = this.$route.query && this.$route.query.date;
172
-    date *= 1000;
173
-    var newDate = new Date(date);
174
-    var y = newDate.getFullYear();
175
-    var m = newDate.getMonth() + 1;
176
-    var d = newDate.getDate();
177
-    if (isNaN(y) || isNaN(m) || isNaN(d)) {
178
-      newDate = new Date();
179
-      y = newDate.getFullYear();
180
-      m = newDate.getMonth() + 1;
181
-      d = newDate.getDate();
182
-    }
183
-    this.record_date =
184
-      y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
185
-
186
-    this.bed_id =
187
-      this.record == null || this.record.id == ""
188
-        ? this.schedule.bed_id
189
-        : this.record.bed_id;
190
-    this.nurse_id =
191
-      this.record == null || this.record.id == ""
192
-        ? this.$store.getters.user.user.id
193
-        : this.record.start_nurse;
194
-    this.puncture_nurse_id =
195
-      this.record == null || this.record.id == ""
196
-        ? this.$store.getters.user.user.id
197
-        : this.record.puncture_nurse;
198
-
199
-    if (this.puncture_nurse_id == 0) {
200
-      this.puncture_nurse_id = this.$store.getters.user.user.id;
201
-    }
142
+        if (this.record.start_time == 0) {
143
+          this.start_time_str = parseTime(this.start_time, '{y}-{m}-{d} {h}:{i}') + ':00'
202 144
 
203
-    // var beds = []
204
-    // for (let index = 0; index < this.device_numbers.length; index++) {
205
-    //   const device_number = this.device_numbers[index]
206
-    //   if (device_number.zone_id == this.schedule.partition_id) {
207
-    //     beds.push(device_number)
208
-    //   }
209
-    // }
210
-    // this.zone_beds = beds
211
-
212
-    for (let index = 0; index < this.device_numbers.length; index++) {
213
-      const device_number = this.device_numbers[index];
214
-      this.device_numbers[index]["number"] =
215
-        device_number["zone_name"] + "-" + device_number["number"];
216
-    }
217
-    this.zone_beds = this.device_numbers;
218
-
219
-    if (this.record.id > 0) {
220
-      for (let i = 0; i < this.special_premission.length; i++) {
221
-        if (
222
-          this.$store.getters.user.user.id ==
223
-          this.special_premission[i].admin_user_id
224
-        ) {
225
-          this.isPremission = true;
145
+        } else {
146
+          this.start_time_str = parseTime(this.record.start_time, '{y}-{m}-{d} {h}:{i}') + ':00'
226 147
         }
227 148
       }
228
-    }
149
+    },
150
+    created () {
151
+      let now = new Date()
152
+      let hour = now.getHours()
229 153
 
230
-    if (this.record.id > 0) {
231
-      if (this.record.creator == 0) {
232
-        this.creator = this.record.start_nurse;
233
-      } else {
234
-        this.creator = this.record.creator;
154
+      if (hour >= 6 && hour < 12){
155
+        this.schedual_type = 1
156
+
157
+      }else if(hour >= 12 && hour < 18){
158
+
159
+        this.schedual_type = 2
160
+
161
+
162
+      }else if(hour >= 18){
163
+        this.schedual_type = 3
235 164
       }
236
-    }
237
-  },
238
-  methods: {
239
-    inputFocus: function(event) {
240
-      var input = event.target;
241
-      setTimeout(function() {
242
-        input.scrollIntoView();
243
-      }, 0);
244
-
245
-      if (input.setSelectionRange) {
246
-        setTimeout(function() {
247
-          input.setSelectionRange(0, input.value.length);
248
-        }, 0);
249
-      } else if (input.createTextRange) {
250
-        var rng = input.createTextRange();
251
-        rng.move("character", input.value.length);
252
-        rng.select();
165
+
166
+
167
+      this.GetSchedualNumber()
168
+
169
+      this.template_id = this.$store.getters.user.template_info.template_id;
170
+      var date = this.$route.query && this.$route.query.date
171
+      date *= 1000
172
+      var newDate = new Date(date)
173
+      var y = newDate.getFullYear()
174
+      var m = newDate.getMonth() + 1
175
+      var d = newDate.getDate()
176
+      if (isNaN(y) || isNaN(m) || isNaN(d)) {
177
+        newDate = new Date()
178
+        y = newDate.getFullYear()
179
+        m = newDate.getMonth() + 1
180
+        d = newDate.getDate()
253 181
       }
254
-    },
255
-    modify() {
256
-      let ParamsQuery = {};
257
-      ParamsQuery["id"] = this.record.id;
258
-      ParamsQuery["nurse"] = this.nurse_id;
259
-      ParamsQuery["bed"] = this.bed_id;
260
-      ParamsQuery["start_time"] = this.start_time_str;
261
-      ParamsQuery["puncture_nurse"] = this.puncture_nurse_id;
262
-      PostModifyStartDialysis(ParamsQuery).then(response => {
263
-        if (response.data.state == 0) {
264
-          Toast.fail(response.data.msg);
265
-          return false;
266
-        } else {
267
-          Toast.success("修改成功");
268
-          this.$emit("did_start", response.data.data.dialysis_order);
269
-          var record = this.record;
270
-          for (const key in response.data.data.dialysis_order) {
271
-            this.$set(record, key, response.data.data.dialysis_order[key]);
182
+      this.record_date = y + '-' + (m < 10 ? '0' + m : m) + '-' + (d < 10 ? '0' + d : d)
183
+
184
+      this.bed_id = (this.record == null || this.record.id == '') ? this.schedule.bed_id : this.record.bed_id
185
+      this.nurse_id = (this.record == null || this.record.id == '') ? this.$store.getters.user.user.id : this.record.start_nurse
186
+      this.puncture_nurse_id = (this.record == null || this.record.id == '') ? this.$store.getters.user.user.id : this.record.puncture_nurse
187
+
188
+      if (this.puncture_nurse_id == 0) {
189
+        this.puncture_nurse_id = this.$store.getters.user.user.id
190
+      }
191
+
192
+      // var beds = []
193
+      // for (let index = 0; index < this.device_numbers.length; index++) {
194
+      //   const device_number = this.device_numbers[index]
195
+      //   if (device_number.zone_id == this.schedule.partition_id) {
196
+      //     beds.push(device_number)
197
+      //   }
198
+      // }
199
+      // this.zone_beds = beds
200
+
201
+      for (let index = 0; index < this.device_numbers.length; index++) {
202
+        const device_number = this.device_numbers[index]
203
+        this.device_numbers[index]['number'] = device_number['zone_name']+'-'+device_number['number']
204
+      }
205
+      this.zone_beds = this.device_numbers
206
+
207
+      if (this.record.id > 0) {
208
+        for (let i = 0; i < this.special_premission.length; i++) {
209
+          if (this.$store.getters.user.user.id == this.special_premission[i].admin_user_id) {
210
+            this.isPremission = true
272 211
           }
273 212
         }
274
-      });
275
-    },
276
-    didSelectStartTime: function(time) {
277
-      this.start_time_str = parseTime(time, "{y}-{m}-{d} {h}:{i}") + ":00";
278
-    },
279
-    selectStartTimeAction: function() {
280
-      if (this.record.id != 0) {
281
-        var creator = 0;
282
-        if (this.record.creator == 0) {
283
-          creator = this.record.start_nurse;
284
-        } else {
285
-          creator = this.record.creator;
286
-        }
213
+      }
287 214
 
288
-        if (this.$store.getters.user.user.id == creator || this.isPremission) {
289
-          this.$refs.start_time_picker.open();
215
+      if (this.record.id > 0) {
216
+        if (this.record.creator == 0) {
217
+          this.creator = this.record.start_nurse
290 218
         } else {
291
-          return;
219
+          this.creator = this.record.creator
292 220
         }
293 221
       }
294
-      this.$refs.start_time_picker.open();
222
+
223
+
224
+
295 225
     },
296
-    commitInfo: function() {
297
-      Toast.loading({ forbidClick: true, duration: 0 });
298
-      let ParamsQuery = {};
299
-      ParamsQuery["patient_id"] = this.patient_prop.id;
300
-      ParamsQuery["record_date"] = this.record_date;
301
-      ParamsQuery["nurse"] = this.nurse_id;
302
-      ParamsQuery["bed"] = this.bed_id;
303
-      ParamsQuery["start_time"] = this.start_time_str;
304
-      ParamsQuery["puncture_nurse"] = this.puncture_nurse_id;
305
-      ParamsQuery["blood_drawing"] = this.blood_drawing;
306
-
307
-      startDialysis(ParamsQuery).then(response => {
308
-        if (response.data.state == 0) {
309
-          Toast.fail(response.data.msg);
310
-          return false;
311
-        } else {
312
-          Toast.success("上机成功");
313
-          var monitor = response.data.data.monitor;
314
-          this.$emit("did_add_monitor", monitor);
315
-          this.$emit("did_start", response.data.data.dialysis_order);
316
-          var record = this.record;
317
-          for (const key in response.data.data.dialysis_order) {
318
-            this.$set(record, key, response.data.data.dialysis_order[key]);
319
-            // this.record[key] = response.data.data.dialysis_order[key]
226
+    methods: {
227
+      getSchedualType:function(type){
228
+        for (let i = 0; i < this.schedules_type.length; i++){
229
+          if(this.schedules_type[i].id == type){
230
+            return  this.schedules_type[i].name
320 231
           }
321 232
         }
322
-      });
323
-    },
324
-    close: function() {
325
-      this.$emit("close");
326
-    },
327
-    select_bed: function() {
328
-      if (this.record.id != 0) {
329
-        var creator = 0;
330
-        if (this.record.creator == 0) {
331
-          creator = this.record.start_nurse;
332
-        } else {
333
-          creator = this.record.creator;
233
+      },
234
+      select_type:function(){
235
+        if (this.record.id != 0) {
236
+          var creator = 0
237
+          if (this.record.creator == 0) {
238
+            creator = this.record.start_nurse
239
+          } else {
240
+            creator = this.record.creator
241
+          }
242
+
243
+          if (this.$store.getters.user.user.id == creator || this.isPremission) {
244
+            this.selecting = true
245
+            var t = this
246
+            this.$refs.selector.showSingleSelect(this.schedules_type, this.schedual_type, '选择班次', 'name', 'id', function (select_id) {
247
+              t.schedual_type = select_id
248
+
249
+              let ParamsQuery = {}
250
+              ParamsQuery['schedual_type'] = select_id
251
+              GetSchedualNumber(ParamsQuery).then(response => {
252
+                if (response.data.state == 0) {
253
+                  Toast.fail(response.data.msg)
254
+                  return false
255
+                } else {
256
+                  t.device_numbers = response.data.data.number
257
+                  for (let index = 0; index < t.device_numbers.length; index++) {
258
+                    const device_number = t.device_numbers[index]
259
+                    t.device_numbers[index]['number'] = device_number['zone_name']+'-'+device_number['number']
260
+                  }
261
+                  t.zone_beds = t.device_numbers
262
+                  t.bed_id = t.zone_beds[0].id
263
+                }
264
+              })
265
+            }, function () {
266
+              t.selecting = false
267
+            })
268
+          } else {
269
+            return
270
+          }
334 271
         }
272
+        this.selecting = true
273
+        var t = this
274
+        this.$refs.selector.showSingleSelect(this.schedules_type, this.schedual_type, '选择班次', 'name', 'id', function (select_id) {
275
+          t.schedual_type = select_id
276
+          let ParamsQuery = {}
277
+          ParamsQuery['schedual_type'] = select_id
278
+          GetSchedualNumber(ParamsQuery).then(response => {
279
+            if (response.data.state == 0) {
280
+              Toast.fail(response.data.msg)
281
+              return false
282
+            } else {
283
+              t.zone_beds = []
284
+              t.device_numbers = response.data.data.number
285
+              for (let index = 0; index < t.device_numbers.length; index++) {
286
+                const device_number = t.device_numbers[index]
287
+                t.device_numbers[index]['number'] = device_number['zone_name']+'-'+device_number['number']
288
+              }
289
+              t.zone_beds = t.device_numbers
290
+              t.bed_id = t.zone_beds[0].id
291
+
335 292
 
336
-        if (this.$store.getters.user.user.id == creator || this.isPremission) {
337
-          this.selecting = true;
338
-          var t = this;
339
-          this.$refs.selector.showSingleSelect(
340
-            this.zone_beds,
341
-            this.bed_id,
342
-            "选择床位号",
343
-            "number",
344
-            "id",
345
-            function(select_id) {
346
-              t.bed_id = select_id;
347
-            },
348
-            function() {
349
-              t.selecting = false;
350 293
             }
351
-          );
352
-        } else {
353
-          return;
354
-        }
355
-      }
294
+          })
295
+        }, function () {
296
+          t.selecting = false
297
+        })
356 298
 
357
-      this.selecting = true;
358
-      var t = this;
359
-      this.$refs.selector.showSingleSelect(
360
-        this.zone_beds,
361
-        this.bed_id,
362
-        "选择床位号",
363
-        "number",
364
-        "id",
365
-        function(select_id) {
366
-          t.bed_id = select_id;
367
-        },
368
-        function() {
369
-          t.selecting = false;
370
-        }
371
-      );
372
-    },
373
-    select_nurse: function() {
374
-      if (this.record.id != 0) {
375
-        var creator = 0;
376
-        if (this.record.creator == 0) {
377
-          creator = this.record.start_nurse;
378
-        } else {
379
-          creator = this.record.creator;
380
-        }
381
-        if (this.$store.getters.user.user.id == creator || this.isPremission) {
382
-          this.selecting = true;
383
-          var t = this;
384
-          this.$refs.selector.showSingleSelect(
385
-            this.admins,
386
-            this.nurse_id,
387
-            "选择上机护士",
388
-            "name",
389
-            "id",
390
-            function(select_id) {
391
-              t.nurse_id = select_id;
392
-            },
393
-            function() {
394
-              t.selecting = false;
299
+      },
300
+      GetSchedualNumber:function(){
301
+        let ParamsQuery = {}
302
+        ParamsQuery['schedual_type'] = this.schedual_type
303
+        GetSchedualNumber(ParamsQuery).then(response => {
304
+          if (response.data.state == 0) {
305
+            Toast.fail(response.data.msg)
306
+            return false
307
+          } else {
308
+            this.device_numbers = response.data.data.number
309
+            for (let index = 0; index < this.device_numbers.length; index++) {
310
+              const device_number = this.device_numbers[index]
311
+              this.device_numbers[index]['number'] = device_number['zone_name']+'-'+device_number['number']
395 312
             }
396
-          );
397
-        } else {
398
-          return;
399
-        }
400
-      }
401
-      this.selecting = true;
402
-      var t = this;
403
-      this.$refs.selector.showSingleSelect(
404
-        this.admins,
405
-        this.nurse_id,
406
-        "选择上机护士",
407
-        "name",
408
-        "id",
409
-        function(select_id) {
410
-          t.nurse_id = select_id;
411
-        },
412
-        function() {
413
-          t.selecting = false;
313
+            this.zone_beds = this.device_numbers
314
+          }
315
+        })
316
+      },
317
+
318
+      inputFocus: function (event) {
319
+        var input = event.target
320
+        setTimeout(function () {
321
+          input.scrollIntoView()
322
+        }, 0)
323
+
324
+        if (input.setSelectionRange) {
325
+          setTimeout(function () {
326
+            input.setSelectionRange(0, input.value.length)
327
+          }, 0)
328
+        } else if (input.createTextRange) {
329
+          var rng = input.createTextRange()
330
+          rng.move('character', input.value.length)
331
+          rng.select()
414 332
         }
415
-      );
416
-    },
417
-    select_puncture_nurse: function() {
418
-      if (this.record.id != 0) {
419
-        var creator = 0;
420
-        if (this.record.creator == 0) {
421
-          creator = this.record.start_nurse;
422
-        } else {
423
-          creator = this.record.creator;
333
+      },
334
+      modify(){
335
+        let ParamsQuery = {}
336
+        ParamsQuery['schedual_type'] = this.schedual_type
337
+        ParamsQuery['id'] = this.record.id
338
+        ParamsQuery['nurse'] = this.nurse_id
339
+        ParamsQuery['bed'] = this.bed_id
340
+        ParamsQuery['start_time'] = this.start_time_str
341
+        ParamsQuery['puncture_nurse'] = this.puncture_nurse_id
342
+        PostModifyStartDialysis(ParamsQuery).then(response => {
343
+          if (response.data.state == 0) {
344
+            Toast.fail(response.data.msg)
345
+            return false
346
+          } else {
347
+            Toast.success('修改成功')
348
+            this.$emit('did_start', response.data.data.dialysis_order)
349
+            var record = this.record
350
+            for (const key in response.data.data.dialysis_order) {
351
+              this.$set(record, key, response.data.data.dialysis_order[key])
352
+            }
353
+          }
354
+        })
355
+      },
356
+      didSelectStartTime: function (time) {
357
+        this.start_time_str = parseTime(time, '{y}-{m}-{d} {h}:{i}') + ':00'
358
+      },
359
+      selectStartTimeAction: function () {
360
+        if (this.record.id != 0) {
361
+          var creator = 0
362
+          if (this.record.creator == 0) {
363
+            creator = this.record.start_nurse
364
+          } else {
365
+            creator = this.record.creator
366
+          }
367
+
368
+          if (this.$store.getters.user.user.id == creator || this.isPremission) {
369
+            this.$refs.start_time_picker.open()
370
+          } else {
371
+            return
372
+          }
424 373
         }
425
-        if (this.$store.getters.user.user.id == creator || this.isPremission) {
426
-          this.selecting = true;
427
-          var t = this;
428
-          this.$refs.selector.showSingleSelect(
429
-            this.admins,
430
-            this.puncture_nurse_id,
431
-            "选择穿刺护士",
432
-            "name",
433
-            "id",
434
-            function(select_id) {
435
-              t.puncture_nurse_id = select_id;
436
-            },
437
-            function() {
438
-              t.selecting = false;
374
+        this.$refs.start_time_picker.open()
375
+      },
376
+      commitInfo: function () {
377
+        Toast.loading({forbidClick: true, duration: 0})
378
+        let ParamsQuery = {}
379
+        ParamsQuery['schedual_type'] = this.schedual_type
380
+        ParamsQuery['patient_id'] = this.patient_prop.id
381
+        ParamsQuery['record_date'] = this.record_date
382
+        ParamsQuery['nurse'] = this.nurse_id
383
+        ParamsQuery['bed'] = this.bed_id
384
+        ParamsQuery['start_time'] = this.start_time_str
385
+        ParamsQuery['puncture_nurse'] = this.puncture_nurse_id
386
+        ParamsQuery['blood_drawing'] = this.blood_drawing
387
+
388
+        startDialysis(ParamsQuery).then(response => {
389
+          if (response.data.state == 0) {
390
+            Toast.fail(response.data.msg)
391
+            return false
392
+          } else {
393
+            Toast.success('上机成功')
394
+            var monitor = response.data.data.monitor
395
+            this.$emit('did_add_monitor', monitor)
396
+            this.$emit('did_start', response.data.data.dialysis_order)
397
+            var record = this.record
398
+            for (const key in response.data.data.dialysis_order) {
399
+              this.$set(record, key, response.data.data.dialysis_order[key])
400
+              // this.record[key] = response.data.data.dialysis_order[key]
439 401
             }
440
-          );
441
-        } else {
442
-          return;
402
+          }
403
+        })
404
+      },
405
+      close: function () {
406
+        this.$emit('close')
407
+      },
408
+      select_bed: function () {
409
+        if (this.record.id != 0) {
410
+          var creator = 0
411
+          if (this.record.creator == 0) {
412
+            creator = this.record.start_nurse
413
+          } else {
414
+            creator = this.record.creator
415
+          }
416
+
417
+          if (this.$store.getters.user.user.id == creator || this.isPremission) {
418
+            this.selecting = true
419
+            var t = this
420
+            this.$refs.selector.showSingleSelect(this.zone_beds, this.bed_id, '选择床位号', 'number', 'id', function (select_id) {
421
+              t.bed_id = select_id
422
+            }, function () {
423
+              t.selecting = false
424
+            })
425
+          } else {
426
+            return
427
+          }
443 428
         }
444
-      }
445
-      this.selecting = true;
446
-      var t = this;
447
-      this.$refs.selector.showSingleSelect(
448
-        this.admins,
449
-        this.puncture_nurse_id,
450
-        "选择穿刺护士",
451
-        "name",
452
-        "id",
453
-        function(select_id) {
454
-          t.puncture_nurse_id = select_id;
455
-        },
456
-        function() {
457
-          t.selecting = false;
429
+
430
+        this.selecting = true
431
+        var t = this
432
+        this.$refs.selector.showSingleSelect(this.zone_beds, this.bed_id, '选择床位号', 'number', 'id', function (select_id) {
433
+          t.bed_id = select_id
434
+        }, function () {
435
+          t.selecting = false
436
+        })
437
+      },
438
+      select_nurse: function () {
439
+        if (this.record.id != 0) {
440
+          var creator = 0
441
+          if (this.record.creator == 0) {
442
+            creator = this.record.start_nurse
443
+          } else {
444
+            creator = this.record.creator
445
+          }
446
+          if (this.$store.getters.user.user.id == creator || this.isPremission) {
447
+            this.selecting = true
448
+            var t = this
449
+            this.$refs.selector.showSingleSelect(this.admins, this.nurse_id, '选择上机护士', 'name', 'id', function (select_id) {
450
+              t.nurse_id = select_id
451
+            }, function () {
452
+              t.selecting = false
453
+            })
454
+          } else {
455
+            return
456
+          }
458 457
         }
459
-      );
460
-    },
461
-    open: function() {
462
-      this.selecting = false;
463
-      this.$refs.selector.hide();
464
-    }
465
-  },
466
-  watch: {
467
-    "record.id": function(val) {
468
-      if (val > 0) {
469
-        for (let i = 0; i < this.special_premission.length; i++) {
470
-          if (
471
-            this.$store.getters.user.user.id ==
472
-            this.special_premission[i].admin_user_id
473
-          ) {
474
-            this.isPremission = true;
458
+        this.selecting = true
459
+        var t = this
460
+        this.$refs.selector.showSingleSelect(this.admins, this.nurse_id, '选择上机护士', 'name', 'id', function (select_id) {
461
+          t.nurse_id = select_id
462
+        }, function () {
463
+          t.selecting = false
464
+        })
465
+      }, select_puncture_nurse: function () {
466
+        if (this.record.id != 0) {
467
+          var creator = 0
468
+          if (this.record.creator == 0) {
469
+            creator = this.record.start_nurse
470
+          } else {
471
+            creator = this.record.creator
472
+          }
473
+          if (this.$store.getters.user.user.id == creator || this.isPremission) {
474
+            this.selecting = true
475
+            var t = this
476
+            this.$refs.selector.showSingleSelect(this.admins, this.puncture_nurse_id, '选择穿刺护士', 'name', 'id', function (select_id) {
477
+              t.puncture_nurse_id = select_id
478
+            }, function () {
479
+              t.selecting = false
480
+            })
481
+          } else {
482
+            return
475 483
           }
476 484
         }
477
-        if (this.record.creator == 0) {
478
-          this.creator = this.record.start_nurse;
479
-        } else {
480
-          this.creator = this.record.creator;
485
+        this.selecting = true
486
+        var t = this
487
+        this.$refs.selector.showSingleSelect(this.admins, this.puncture_nurse_id, '选择穿刺护士', 'name', 'id', function (select_id) {
488
+          t.puncture_nurse_id = select_id
489
+        }, function () {
490
+          t.selecting = false
491
+        })
492
+      },
493
+      open: function () {
494
+        this.selecting = false
495
+        this.$refs.selector.hide()
496
+      }
497
+    }, watch: {
498
+      'record.id': function (val) {
499
+        if (val > 0) {
500
+          for (let i = 0; i < this.special_premission.length; i++) {
501
+            if (this.$store.getters.user.user.id == this.special_premission[i].admin_user_id) {
502
+              this.isPremission = true
503
+            }
504
+          }
505
+          if (this.record.creator == 0) {
506
+            this.creator = this.record.start_nurse
507
+          } else {
508
+            this.creator = this.record.creator
509
+          }
510
+
511
+
481 512
         }
482 513
       }
514
+
483 515
     }
516
+
484 517
   }
485
-};
486 518
 </script>
487 519
 
488 520
 <style style="stylesheet/scss" lang="scss" scoped>

+ 1 - 0
src/pages/main/dialog/PrescriptionDialog.vue Bestand weergeven

@@ -1289,6 +1289,7 @@
1289 1289
               this.zhiShow = true
1290 1290
               this.totalShow = true
1291 1291
               this.huShow  = true 
1292
+              console.log("aa")
1292 1293
             }
1293 1294
           }
1294 1295
         }

+ 21 - 34
src/pages/main/dialog/TreatmentDialog.vue Bestand weergeven

@@ -244,25 +244,11 @@ export default {
244 244
       if (this.dialysisSummary.summaryContent == null) {
245 245
         this.dialysisSummary.summaryContent == "";
246 246
       }
247
-
248 247
       if (this.dialysisSummary.summaryContent == "") {
249 248
         this.dialysisSummary.summaryContent = values;
250 249
       } else {
251
-        if (this.dialysisSummary.summaryContent.indexOf(values) == -1) {
252
-          if (
253
-            this.dialysisSummary.summaryContent
254
-              .charAt(this.dialysisSummary.summaryContent.length - 1)
255
-              .indexOf("。") == -1
256
-          ) {
257
-            this.dialysisSummary.summaryContent =
258
-              this.dialysisSummary.summaryContent + "," + values;
259
-          } else {
260
-            this.dialysisSummary.summaryContent =
261
-              this.dialysisSummary.summaryContent + "," + values;
262
-            this.dialysisSummary.summaryContent =
263
-              this.dialysisSummary.summaryContent + values;
264
-          }
265
-        }
250
+        this.dialysisSummary.summaryContent =
251
+          this.dialysisSummary.summaryContent + values;
266 252
       }
267 253
     },
268 254
     dialysisAfterTeachSelectChange: function(values) {
@@ -272,24 +258,25 @@ export default {
272 258
       if (this.dialysisSummary.propagandaAndEducationContent == "") {
273 259
         this.dialysisSummary.propagandaAndEducationContent = values;
274 260
       } else {
275
-        if (
276
-          this.dialysisSummary.propagandaAndEducationContent.indexOf(values) ==
277
-          -1
278
-        ) {
279
-          if (
280
-            this.dialysisSummary.propagandaAndEducationContent
281
-              .charAt(
282
-                this.dialysisSummary.propagandaAndEducationContent.length - 1
283
-              )
284
-              .indexOf("。") == -1
285
-          ) {
286
-            this.dialysisSummary.propagandaAndEducationContent =
287
-              this.dialysisSummary.propagandaAndEducationContent + "," + values;
288
-          } else {
289
-            this.dialysisSummary.propagandaAndEducationContent =
290
-              this.dialysisSummary.propagandaAndEducationContent + values;
291
-          }
292
-        }
261
+        this.dialysisSummary.propagandaAndEducationContent =
262
+          this.dialysisSummary.propagandaAndEducationContent + values;
263
+        // if (
264
+        //   this.dialysisSummary.propagandaAndEducationContent.indexOf(values) ==
265
+        //   -1
266
+        // ) {
267
+        //   if (
268
+        //     this.dialysisSummary.propagandaAndEducationContent
269
+        //       .charAt(
270
+        //         this.dialysisSummary.propagandaAndEducationContent.length - 1
271
+        //       )
272
+        //       .indexOf("。") == -1
273
+        //   ) {
274
+        //     this.dialysisSummary.propagandaAndEducationContent =
275
+        //       this.dialysisSummary.propagandaAndEducationContent + "," + values;
276
+        //   } else {
277
+        //
278
+        //   }
279
+        // }
293 280
       }
294 281
     },
295 282
     commitInfo: function() {

+ 7 - 1
src/pages/main/dialog/TwoMenu.vue Bestand weergeven

@@ -86,6 +86,11 @@ export default {
86 86
     };
87 87
   },
88 88
   methods: {
89
+    initSignleSelect(){
90
+
91
+
92
+    },
93
+
89 94
     showSingleSelect(
90 95
       list_options,
91 96
       current_select_id,
@@ -95,6 +100,8 @@ export default {
95 100
       handle_select,
96 101
       handle_hide
97 102
     ) {
103
+      console.log(this.single.cur_id);
104
+
98 105
       this.show = true;
99 106
       this.type = 1;
100 107
       this.title = title;
@@ -104,7 +111,6 @@ export default {
104 111
       this.single.id_key = id_key;
105 112
       this.handle_select = handle_select;
106 113
       this.handle_hide = handle_hide;
107
-      console.log(this.single.cur_id);
108 114
     },
109 115
     // showMutableSelect(list_options, selected_values, title, show_key, id_key, handle_select) {
110 116
     //   this.show = true

+ 1 - 2
src/pages/main/dialog/subMenu/MsgTip.vue Bestand weergeven

@@ -8,8 +8,7 @@
8 8
         {{ patient_prop.name }} [透析号 {{ patient_prop.dialysis_no }} ]
9 9
       </h1>
10 10
       <span @click="comfirm" class="success" style="visibility: hidden;"
11
-        >确定</span
12
-      >
11
+        >确定</span>
13 12
     </div>
14 13
 
15 14
     <div class="DialogContent">

+ 4 - 1
src/pages/main/template/DialysisPrintOrderSix.vue Bestand weergeven

@@ -350,7 +350,7 @@
350 350
               <td style="padding: 0; position: relative;" colspan="2">
351 351
                 <table class="inside_table">
352 352
                   <tbody>
353
-                    <tr><td colspan="11" style="letter-spacing:5px;text-align:center;font-weight:520;font-size:16px;padding: 6px 8px;line-height: 30px;">治疗纪录</td></tr>
353
+                    <tr><td :colspan="(prescription.mode_id==2 || prescription.mode_id==5) ? 12 :11" style="letter-spacing:5px;text-align:center;font-weight:520;font-size:16px;padding: 6px 8px;line-height: 30px;">治疗纪录</td></tr>
354 354
                     <tr>
355 355
                       <td width="60">时间</td>
356 356
                       <td width="60">血压<br/>(mmHg)</td>
@@ -362,6 +362,7 @@
362 362
                       <td width="60">透析液温度(°C)</td>
363 363
                       <td width="50">电导度<br/>(ms/cm)</td>
364 364
                       <td width="50">超滤量<br/>(ml)</td>
365
+                      <td v-if="prescription.mode_id==2 || prescription.mode_id==5" width="50">置换量<br/>(ml)</td>
365 366
                       <td width="200">病情变化及处理</td>
366 367
 
367 368
                       <!-- <td width="100">时间</td>
@@ -388,6 +389,7 @@
388 389
                       <td>{{monitor.dialysate_temperature?monitor.dialysate_temperature:''}}</td>
389 390
                       <td>{{monitor.sodium_concentration?monitor.sodium_concentration:''}}</td>
390 391
                       <td>{{monitor.ultrafiltration_volume?monitor.ultrafiltration_volume:0}}</td>
392
+                      <td v-if="prescription.mode_id==2 || prescription.mode_id==5" width="50">{{monitor.displacement_quantity?monitor.displacement_quantity:0}}</td>
391 393
                       <td style="line-height:16px;padding:0px;">
392 394
                         <div style="min-height:40px;line-height:40px; overflow:hidden;">
393 395
                           <span style="word-break: break-all;margin:0;line-height:16px;-webkit-line-clamp:3;overflow:visible;display:inline-block;vertical-align:middle;height:auto;">
@@ -409,6 +411,7 @@
409 411
                       <td> </td>
410 412
                       <td> </td>
411 413
                       <td> </td>
414
+                      <td v-if="prescription.mode_id==2 || prescription.mode_id==5" width="50"></td>
412 415
                       <td style="line-height:16px;padding:0px;"><div style="height:40px;line-height:20px; overflow:hidden;"><span style="word-break: break-all;margin:0;line-height:16px;-webkit-line-clamp:3;overflow:visible;display:inline-block;vertical-align:middle;height:auto;"> </span> </div></td>
413 416
                     </tr>
414 417
                   </tbody>

+ 223 - 11
src/pages/main/today/TodayTab.vue Bestand weergeven

@@ -73,7 +73,7 @@
73 73
 
74 74
 
75 75
     <accepts-assessment id="accepts_assessment" :record="receiver_treatment_access" title="接诊评估"></accepts-assessment>
76
-    
76
+
77 77
 
78 78
 
79 79
     <div class="blueBorder"></div>
@@ -125,7 +125,7 @@
125 125
     <treatment-of id="treatment_of" ref="treatment_of" title="治疗小结" :record="treatment_summary"></treatment-of>
126 126
 </div>
127 127
     <van-popup title="透析处方" v-model="menuList[1].showPopup" :overlay="true" :close-on-click-overlay="false">
128
-      <prescription-dialog :patient_prop="patient" :solution_prop="solution" :machines_prop="devices" :config="config"
128
+      <prescription-dialog v-if="prescription_dialog_reset == true" :patient_prop="patient" :solution_prop="solution" :machines_prop="devices" :config="config"
129 129
                            :prescription_prop="prescription" @finish="closePrescriptionDialog" :operators="operators"
130 130
                            :types="goodTypes" :info="goodInfos" :status="status" :targetAdvices="longAdvices"
131 131
                            :waitUploadAdvices="waitUploadAdvices" :is_open="is_open"
@@ -254,6 +254,7 @@
254 254
       :close-on-click-overlay="false"
255 255
     >
256 256
       <thoroug-dialog
257
+        v-if="thoroug_dialog_reset == true"
257 258
         :patient_prop="patient"
258 259
         :record="assessment_after_dislysis"
259 260
         :last_record="last_assessment_after_dislysis"
@@ -368,6 +369,8 @@ import {parseTime} from '@/utils'
368 369
         prescription: {}, // 透析处方
369 370
         solution: {}, // 透析方案
370 371
         last_prescription:{},
372
+        thoroug_dialog_reset: true,
373
+        prescription_dialog_reset: true,
371 374
         receiver_treatment_access: {}, // 接诊评估
372 375
         predialysis_evaluation: {}, // 透前评估
373 376
         last_predialysis_evaluation: {}, // 上次透前评估
@@ -761,6 +764,7 @@ import {parseTime} from '@/utils'
761 764
 
762 765
           this.double_check = double_check == null ? {id: ''} : double_check
763 766
           this.assessment_after_dislysis = assessment_after_dislysis == null ? {id: ''} : assessment_after_dislysis
767
+          
764 768
           this.last_assessment_after_dislysis =
765 769
               last_assessment_after_dislysis == null
766 770
                 ? {id: ''}
@@ -918,6 +922,10 @@ import {parseTime} from '@/utils'
918 922
           this.patient = patient
919 923
           this.schedual = schedual == null ? {} : schedual
920 924
           this.prescription = prescription == null ? {id: ''} : prescription
925
+          this.prescription_dialog_reset = false
926
+          this.$nextTick(() => {
927
+            this.prescription_dialog_reset = true
928
+          })
921 929
           this.solution = solution == null ? {id: ''} : solution
922 930
           this.last_prescription = last_prescription == null ? {id: ''} : last_prescription
923 931
 
@@ -1000,10 +1008,11 @@ import {parseTime} from '@/utils'
1000 1008
           }
1001 1009
 
1002 1010
           this.double_check = double_check == null ? {id: ''} : double_check
1003
-          this.assessment_after_dislysis =
1004
-              assessment_after_dislysis == null
1005
-                ? {id: ''}
1006
-                : assessment_after_dislysis
1011
+          this.assessment_after_dislysis = assessment_after_dislysis == null ? {id: ''} : assessment_after_dislysis
1012
+          this.thoroug_dialog_reset = false
1013
+          this.$nextTick(() => {
1014
+            this.thoroug_dialog_reset = true
1015
+          })
1007 1016
           this.last_assessment_after_dislysis =
1008 1017
               last_assessment_after_dislysis == null
1009 1018
                 ? {id: ''}
@@ -1143,7 +1152,7 @@ import {parseTime} from '@/utils'
1143 1152
     },
1144 1153
     prescriptionFunc: function (val, advices) {
1145 1154
       this.prescription = val
1146
-      this.requestDialysisRecord()
1155
+      this.newRequestDialysisRecord()
1147 1156
       // if (advices.length > 0){
1148 1157
       //
1149 1158
       //   // if (advices.length > 0) {
@@ -1294,7 +1303,7 @@ import {parseTime} from '@/utils'
1294 1303
     update_evaluation: function (evaluation) {
1295 1304
       this.predialysis_evaluation = evaluation
1296 1305
       this.closeAssessmentBefore()
1297
-      this.requestDialysisRecord()
1306
+      this.newRequestDialysisRecord()
1298 1307
     },
1299 1308
 
1300 1309
     closeStatOrder: function () {
@@ -1305,7 +1314,7 @@ import {parseTime} from '@/utils'
1305 1314
     closeDialysisComputer: function (dialysis_order) {
1306 1315
       this.closeDialog(0)
1307 1316
       this.dialysis_order = dialysis_order
1308
-      this.requestDialysisRecord()
1317
+      this.newRequestDialysisRecord()
1309 1318
       // this.scrollToView('dialysis_computer')
1310 1319
     },
1311 1320
     closeDialysisComputerclose: function (dialysis_order) {
@@ -1324,11 +1333,12 @@ import {parseTime} from '@/utils'
1324 1333
       // this.scrollToView('monitoring')
1325 1334
     },
1326 1335
 
1327
-    closeDialysisOff: function (assessment_after_dislysis) {debugger
1336
+    closeDialysisOff: function (assessment_after_dislysis) {
1328 1337
       this.closeDialog(7)
1329 1338
       if (assessment_after_dislysis != undefined) {
1330 1339
         this.assessment_after_dislysis = assessment_after_dislysis
1331 1340
       }
1341
+      this.requestDialysisRecord()
1332 1342
     },
1333 1343
     closeDialysisOffclose: function () {
1334 1344
       this.closeDialog(7)
@@ -1434,7 +1444,209 @@ import {parseTime} from '@/utils'
1434 1444
       var diff = Math.abs(firstDate.getTime() - secondDate.getTime())
1435 1445
       var result = parseInt(diff / (1000 * 60 * 60 * 24))
1436 1446
       return result
1437
-    }
1447
+    }, newRequestDialysisRecord () {
1448
+      var dateStr = parseTime(this.date, '{y}-{m}-{d}')
1449
+      var params = {
1450
+        patient_id: this.patient_id,
1451
+        date: dateStr
1452
+      }
1453
+      this.advice_groups = []
1454
+      this.doctor_advices = []
1455
+
1456
+      getDialysisRecord(params).then(rs => {
1457
+        var resp = rs.data
1458
+        console.log(resp)
1459
+
1460
+        if (resp.state == 1) {
1461
+          var waitstoredata = this.$store.getters.waitscheduals
1462
+          var waitscheduals = waitstoredata.waitscheduals
1463
+          var storedata = this.$store.getters.scheduals
1464
+          var scheduals = storedata.scheduals
1465
+
1466
+
1467
+          var patient = resp.data.patient // 患者信息
1468
+          var schedual = resp.data.schedual // 患者排班信息
1469
+          var prescription = resp.data.prescription // 透析处方
1470
+          var solution = resp.data.solution // 透析方案
1471
+          var receiver_treatment_access = resp.data.receiver_treatment_access // 接诊评估
1472
+          var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
1473
+          var doctor_advices = resp.data.doctor_advices // 临时医嘱
1474
+          var last_prescription = resp.data.last_prescription
1475
+
1476
+          this.dryWeight = resp.data.dry_weight
1477
+
1478
+          if (prescription == null || prescription.creater == 0) {
1479
+            this.isPullData = 1
1480
+          } else {
1481
+            this.isPullData = 2
1482
+          }
1483
+
1484
+          this.goodInfos = resp.data.goodInfos
1485
+
1486
+          for (let i = 0; i < doctor_advices.length; i++) {
1487
+            doctor_advices[i]['is_selected'] = 0
1488
+          }
1489
+          console.log(doctor_advices)
1490
+
1491
+          var double_check = resp.data.double_check // 双人核对
1492
+          var assessment_after_dislysis = resp.data.assessment_after_dislysis // 透后评估
1493
+          var treatment_summary = resp.data.treatment_summary // 治疗小结
1494
+          var monitor_records = resp.data.monitor_records // 透析监测
1495
+          var dialysis_order = resp.data.dialysis_order // 透析记录
1496
+          var operators = resp.data.operators // 操作人
1497
+
1498
+          var special_premission = resp.data.special_premission // 特殊权限
1499
+
1500
+          var config = resp.data.config // 库存自动扣减配置
1501
+
1502
+          var types = resp.data.types // 所有系统库存商品类型
1503
+
1504
+          var last_predialysis_evaluation = resp.data.last_predialysis_evaluation // 上一次透前评估
1505
+          var last_assessment_after_dislysis = resp.data.last_assessment_after_dislysis // 上一次透前评估
1506
+          var last_monitor_record = resp.data.last_monitor_record
1507
+
1508
+          if (Object.keys(waitstoredata).length > 0) {
1509
+            for (let index = 0; index < waitscheduals.length; index++) {
1510
+              if (waitscheduals[index].patient_id == patient.id) {
1511
+                waitscheduals[index].patient = patient
1512
+                waitscheduals[index].assessment_before_dislysis = predialysis_evaluation
1513
+                waitscheduals[index].prescription = prescription
1514
+                waitscheduals[index].doctor_advice = doctor_advices
1515
+                waitscheduals[index].dialysis_order = dialysis_order
1516
+              }
1517
+            }
1518
+            this.$store.dispatch('SetWaitScheduals', {waitscheduals: waitscheduals})
1519
+          }
1520
+
1521
+          if (Object.keys(storedata).length > 0) {
1522
+            for (let index = 0; index < scheduals.length; index++) {
1523
+              if (scheduals[index].patient_id == patient.id) {
1524
+                scheduals[index].patient = patient
1525
+                scheduals[index].assessment_before_dislysis = predialysis_evaluation
1526
+                scheduals[index].prescription = prescription
1527
+                scheduals[index].doctor_advice = doctor_advices
1528
+                scheduals[index].dialysis_order = dialysis_order
1529
+              }
1530
+            }
1531
+            this.$store.dispatch('SetScheduals', {scheduals: scheduals})
1532
+          }
1533
+
1534
+          this.patient = patient
1535
+          this.schedual = schedual == null ? {} : schedual
1536
+          this.prescription = prescription == null ? {id: ''} : prescription
1537
+          this.solution = solution == null ? {id: ''} : solution
1538
+          this.last_prescription = last_prescription == null ? {id: ''} : last_prescription
1539
+
1540
+
1541
+
1542
+          this.receiver_treatment_access =
1543
+            receiver_treatment_access == null
1544
+              ? {id: ''}
1545
+              : receiver_treatment_access
1546
+          this.predialysis_evaluation =
1547
+            predialysis_evaluation == null ? {} : predialysis_evaluation
1548
+          this.last_predialysis_evaluation =
1549
+            last_predialysis_evaluation == null
1550
+              ? {}
1551
+              : last_predialysis_evaluation
1552
+
1553
+          this.doctor_advices = doctor_advices == null ? [] : doctor_advices
1554
+          this.special_premission = special_premission
1555
+          this.config = config
1556
+          this.goodTypes = types
1557
+
1558
+
1559
+          if (this.doctor_advices.length > 0) {
1560
+            var group = this.newAdviceGroupObject()
1561
+            var initGroupBlock = function (group, advice) {
1562
+              group.group_no = advice.groupno
1563
+              // group.start_time = advice.start_time
1564
+              // group.advice_doctor = advice.advice_doctor
1565
+              // group.exec_staff = advice.execution_staff
1566
+              // group.exec_time = advice.execution_time
1567
+              // group.checker = advice.checker
1568
+            }
1569
+            for (let index = 0; index < this.doctor_advices.length; index++) {
1570
+              const advice = this.doctor_advices[index]
1571
+              if (advice.groupno == 0) {
1572
+                // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
1573
+                if (advice.parent_id > 0) {
1574
+                  if (this.advice_groups.length > 0) {
1575
+                    var parent_group = this.advice_groups[
1576
+                    this.advice_groups.length - 1
1577
+                      ]
1578
+                    if (parent_group.advices.length > 0) {
1579
+                      if (parent_group.advices[0].id == advice.parent_id) {
1580
+                        parent_group.advices.push(advice)
1581
+                      }
1582
+                    }
1583
+                  }
1584
+                  continue
1585
+                } else {
1586
+                  if (group.group_no > 0) {
1587
+                    this.advice_groups.push(group)
1588
+                    group = this.newAdviceGroupObject()
1589
+                  }
1590
+
1591
+                  initGroupBlock(group, advice)
1592
+                  group.advices.push(advice)
1593
+                  this.advice_groups.push(group)
1594
+                  group = this.newAdviceGroupObject()
1595
+                  continue
1596
+                }
1597
+              }
1598
+
1599
+              if (group.group_no > 0 && group.group_no != advice.groupno) {
1600
+                this.advice_groups.push(group)
1601
+                group = this.newAdviceGroupObject()
1602
+              }
1603
+              if (group.group_no == 0) {
1604
+                initGroupBlock(group, advice)
1605
+              }
1606
+              if (group.group_no == advice.groupno) {
1607
+                group.advices.push(advice)
1608
+              }
1609
+            }
1610
+            if (group.group_no > 0) {
1611
+              // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
1612
+              this.advice_groups.push(group)
1613
+            }
1614
+
1615
+            // console.log(this.advice_groups)
1616
+          }
1617
+
1618
+          this.double_check = double_check == null ? {id: ''} : double_check
1619
+          this.assessment_after_dislysis =
1620
+            assessment_after_dislysis == null
1621
+              ? {id: ''}
1622
+              : assessment_after_dislysis
1623
+          this.last_assessment_after_dislysis =
1624
+            last_assessment_after_dislysis == null
1625
+              ? {id: ''}
1626
+              : last_assessment_after_dislysis
1627
+          this.treatment_summary =
1628
+            treatment_summary == null ? {id: ''} : treatment_summary
1629
+          this.monitor_records = monitor_records == null ? [] : monitor_records
1630
+          this.last_monitor_record =
1631
+            last_monitor_record == null
1632
+              ? this.last_monitor_record
1633
+              : last_monitor_record
1634
+          this.dialysis_order =
1635
+            dialysis_order == null ? {id: ''} : dialysis_order
1636
+          this.operators = operators
1637
+          this.$refs.stat_order.setAdvices(this.doctor_advices)
1638
+          this.$refs.monitoring.setRecords(this.monitor_records)
1639
+
1640
+          this.title = patient.name
1641
+        } else {
1642
+          this.$toast({
1643
+            message: resp.msg
1644
+          })
1645
+          this.loading = false
1646
+        }
1647
+      })
1648
+    },
1649
+
1438 1650
   }
1439 1651
 }
1440 1652
 </script>

+ 2 - 3
src/pages/main/today/dialysisComputer.vue Bestand weergeven

@@ -64,9 +64,8 @@ export default {
64 64
       if (this.record == null || this.record.id == "") {
65 65
         return "-";
66 66
       }
67
-      return this.device_number_map[this.record.bed_id] == null
68
-        ? ""
69
-        : this.device_number_map[this.record.bed_id].number;
67
+      return this.device_number_map[this.record.bed_id] == null ? '' : this.device_number_map[this.record.bed_id].zone_name + "-"+this.device_number_map[this.record.bed_id].number
68
+
70 69
     },
71 70
     nurse: function() {
72 71
       if (this.record == null || this.record.id == "") {

src/pages/home/privacyPolicy.vue → src/pages/privacy/index.vue Bestand weergeven

@@ -34,14 +34,21 @@
34 34
 </template>
35 35
 
36 36
 
37
+<script>
38
+    export default {
39
+        name: "privacyPolicy"
40
+
41
+    }
42
+</script>
43
+
37 44
 <style lang="scss" scoped>
38
-.page_privacy {
39
-  width: 100%;
40
-  margin: 0 auto;
41
-  height: 100%;
42
-  overflow-y: auto;
43
-  display: flex;
44
-  flex-direction: column;
45
+  .page_privacy {
46
+    width: 100%;
47
+    margin: 0 auto;
48
+    height: 100%;
49
+    overflow-y: auto;
50
+    display: flex;
51
+    flex-direction: column;
45 52
   > div:last-child {
46 53
     flex: 1;
47 54
     overflow-y: auto;
@@ -50,24 +57,24 @@
50 57
     font-size: 0.45rem;
51 58
     padding: 0.3rem 0.37rem;
52 59
     color: $title-color;
53
-    @include align-items-center;
54
-    @include display-flex;
55
-    @include justify-content-between;
56
-    @include text-align;
60
+  @include align-items-center;
61
+  @include display-flex;
62
+  @include justify-content-between;
63
+  @include text-align;
57 64
     background: #fff;
58
-    .GoBack {
59
-      color: $main-color;
60
-      font-size: 0.45rem;
61
-      @include display-flex;
62
-      .iconfont {
63
-        color: $main-color;
64
-        font-size: 0.5rem;
65
-        margin-top: 1px;
66
-        @media only screen and (min-width: 768px) {
67
-          margin-top: 3px;
68
-        }
69
-      }
70
-    }
65
+  .GoBack {
66
+    color: $main-color;
67
+    font-size: 0.45rem;
68
+  @include display-flex;
69
+  .iconfont {
70
+    color: $main-color;
71
+    font-size: 0.5rem;
72
+    margin-top: 1px;
73
+  @media only screen and (min-width: 768px) {
74
+    margin-top: 3px;
75
+  }
76
+  }
77
+  }
71 78
   }
72 79
   .name {
73 80
     margin-right: 1.3rem;
@@ -83,5 +90,5 @@
83 90
     width: 90%;
84 91
     margin: 0 auto;
85 92
   }
86
-}
93
+  }
87 94
 </style>

+ 2 - 2
src/router/index.js Bestand weergeven

@@ -76,9 +76,9 @@ export default new Router({
76 76
       component: () => import("@/pages/personal/ChangePassword")
77 77
     },
78 78
     {
79
-      path: "/privacyPolicy",
79
+      path: "/privacy",
80 80
       name: "privacyPolicy",
81
-      component: () => import("@/pages/home/privacyPolicy")
81
+      component: () => import("@/pages/privacy/index")
82 82
     }
83 83
   ]
84 84
 });