Browse Source

修改问题

张保健 3 years ago
parent
commit
03cd9e9700

+ 1 - 0
.gitignore View File

@@ -1 +1,2 @@
1 1
 node_modules/
2
+dist/

+ 2 - 2
config/dev.env.js View File

@@ -7,10 +7,10 @@ module.exports = {
7 7
   NODE_ENV: '"development"',
8 8
   ENV_CONFIG: '"dev"',
9 9
   // BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
-  BASE_API:'"http://localhost:9531"',
10
+  BASE_API: '"http://api.xt.test.sgjyun.com"',
11 11
   SSO_HOST: '"http://testsso.sgjyun.com"',
12 12
   SRCM_HOST: '"http://test1.sgjyun.com"',
13 13
   XT_HOST: '"http://xt.test.sgjyun.com"',
14 14
   MIRCO_MALL_HOST: '"http://mall.test.sgjyun.com"',
15 15
   CDM_HOST: '"http://cdm.test.sgjyun.com"'
16
-};
16
+}

+ 2 - 2
config/index.js View File

@@ -20,7 +20,7 @@ module.exports = {
20 20
     // host: 'xt.test.sgjyun.com',
21 21
     // host: 'xt.kuyicloud.com',
22 22
     // host: 'xt.test.sgjyun.com',
23
-    host:'localhost',
23
+    host: 'xt.test.sgjyun.com',
24 24
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
25 25
     autoOpenBrowser: true,
26 26
     errorOverlay: true,
@@ -53,7 +53,7 @@ module.exports = {
53 53
     // (https://github.com/webpack/css-loader#sourcemaps)
54 54
     // In our experience, they generally work as expected,
55 55
     // just be aware of this issue when enabling this option.
56
-    cssSourceMap: false,
56
+    cssSourceMap: false
57 57
   },
58 58
 
59 59
   build: {

+ 16 - 1
src/store/modules/globalConfig.js View File

@@ -528,6 +528,21 @@ const global_config = {
528 528
         gaimingcheng_unit: '',
529 529
         gaijiliang_unit: ''
530 530
       },
531
+      3: {
532
+        id: 3,
533
+        name: '低分子肝素',
534
+        type: 1,
535
+        shouji: 1,
536
+        weichi: 1,
537
+        zongliang: 1,
538
+        gaimingcheng: -1,
539
+        gaijiliang: -1,
540
+        shouji_unit: 'IU',
541
+        weichi_unit: 'IU',
542
+        zongliang_unit: 'IU',
543
+        gaimingcheng_unit: '',
544
+        gaijiliang_unit: ''
545
+      },
531 546
       4: {
532 547
         id: 4,
533 548
         name: '阿加曲班',
@@ -1757,7 +1772,7 @@ const global_config = {
1757 1772
     {
1758 1773
       id: 5,
1759 1774
       name: '降糖药'
1760
-    },
1775
+    }
1761 1776
     ],
1762 1777
     blood_access: [{
1763 1778
       id: 1,

File diff suppressed because it is too large
+ 1170 - 1173
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue


+ 1 - 1
src/xt_pages/dialysis/schedualPatient.vue View File

@@ -125,7 +125,7 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
125 125
               const schedule = originSchedules[s_i]
126 126
               if (schedule.patient.name.indexOf(search_keyword) != -1) {
127 127
                 filtedSchedules.push(schedule)
128
-                break
128
+                // break
129 129
               }
130 130
             }
131 131
             if (filtedSchedules.length > 0) {

+ 251 - 272
src/xt_pages/user/inspection.vue View File

@@ -178,11 +178,10 @@
178 178
               <el-date-picker
179 179
                 style="width:95%"
180 180
                 v-model="form.inspect_date"
181
-                type="date"
182
-                value-format="yyyy-MM-dd"
183
-                format="yyyy-MM-dd"
181
+                type="datetime"
182
+                value-format="yyyy-MM-dd HH:mm"
183
+                format="yyyy-MM-dd HH:mm"
184 184
                 placeholder="选择日期"
185
-                :readonly="form.method == 'add' ? false : true"
186 185
               >
187 186
               </el-date-picker>
188 187
             </el-form-item>
@@ -248,18 +247,18 @@
248 247
 </template>
249 248
 
250 249
 <script>
251
-import PatientSidebar from "./components/PatientSidebar";
250
+import PatientSidebar from './components/PatientSidebar'
252 251
 import {
253 252
   fetchInspectionReference,
254 253
   CreatePatientInspection,
255 254
   fetchPatientInspections,
256 255
   EditPatientInspection,
257 256
   DeletePatientInspection
258
-} from "@/api/inspection";
259
-import { uParseTime, isPositiveNumber } from "@/utils/tools";
257
+} from '@/api/inspection'
258
+import { uParseTime, isPositiveNumber } from '@/utils/tools'
260 259
 
261 260
 export default {
262
-  name: "Inspection",
261
+  name: 'Inspection',
263 262
   components: { PatientSidebar },
264 263
   data() {
265 264
     return {
@@ -267,22 +266,23 @@ export default {
267 266
       pageLoading: true,
268 267
       itemLoading: false,
269 268
       formLoading: false,
270
-      itemDate: "",
269
+      itemDate: '',
271 270
       patientID: 0,
272
-      panelClass: "patient-app-container",
271
+      panelClass: 'patient-app-container',
273 272
       patientInfo: {
274 273
         id: 0
275 274
       },
276
-      itemName: "请选择项目",
277
-      formTitle: "",
275
+      itemName: '请选择项目',
276
+      formTitle: '',
278 277
       dialogFormVisible: false,
279 278
       patient_info: null,
280 279
       form: {
281
-        remind_cycle: "",
282
-        method: "add",
280
+        remind_cycle: '',
281
+        method: 'add',
283 282
         project_id: 0,
284
-        inspect_date: "",
285
-        formItem: [{ id: 0, value: "" }]
283
+        inspect_date: '',
284
+        old_inspect_date: '',
285
+        formItem: [{ id: 0, value: '' }]
286 286
       },
287 287
       formItem: [],
288 288
       items: [],
@@ -295,112 +295,100 @@ export default {
295 295
         project_id: 0,
296 296
         page: 1
297 297
       }
298
-    };
298
+    }
299 299
   },
300 300
   methods: {
301 301
     deleteInspection() {
302
-      if (this.project == null || this.itemDate == "") {
303
-        this.$message.error("请先选择删除删除的记录");
304
-        return false;
302
+      if (this.project == null || this.itemDate == '') {
303
+        this.$message.error('请先选择删除删除的记录')
304
+        return false
305 305
       }
306 306
 
307
-      this.$confirm("确认删除此记录?", "删除", {
308
-        confirmButtonText: "确定",
309
-        cancelButtonText: "取消",
310
-        type: "warning"
307
+      this.$confirm('确认删除此记录?', '删除', {
308
+        confirmButtonText: '确定',
309
+        cancelButtonText: '取消',
310
+        type: 'warning'
311 311
       })
312 312
         .then(() => {
313 313
           var params = {
314 314
             patient: this.patientID,
315 315
             date: this.itemDate,
316 316
             project_id: this.project.project_id
317
-          };
317
+          }
318 318
           DeletePatientInspection(params).then(response => {
319 319
             if (response.data.state == 0) {
320
-              this.$message.error(response.data.msg);
321
-              return false;
320
+              this.$message.error(response.data.msg)
321
+              return false
322 322
             } else {
323 323
               this.$notify({
324
-                title: "成功",
325
-                message: "删除成功",
326
-                type: "success",
324
+                title: '成功',
325
+                message: '删除成功',
326
+                type: 'success',
327 327
                 duration: 2000
328
-              });
328
+              })
329 329
 
330 330
               for (var index in this.projects) {
331 331
                 if (this.projects[index].project_id == params.project_id) {
332
-                  this.projects[index].count--;
333
-                  break;
332
+                  this.projects[index].count--
333
+                  break
334 334
                 }
335 335
               }
336
-              this.total -= 1;
337
-              this.itemDate = "";
338
-              this.items = [];
336
+              this.total -= 1
337
+              this.itemDate = ''
338
+              this.items = []
339 339
               if (this.total > 0) {
340
-                this.queryParams.page = 1;
341
-                this.fetchPatientInspections(this.queryParams);
340
+                this.queryParams.page = 1
341
+                this.fetchPatientInspections(this.queryParams)
342 342
               }
343 343
             }
344
-          });
344
+          })
345 345
         })
346
-        .catch(() => {});
346
+        .catch(() => {})
347 347
     },
348 348
     openEdit() {
349 349
       if (this.project == null) {
350
-        this.$message.error("请先选择项目");
351
-        return false;
350
+        this.$message.error('请先选择项目')
351
+        return false
352 352
       }
353 353
 
354
-      this.form.method = "edit";
355
-      this.formTitle = "修改" + this.project.project_name;
356
-      this.form.project_id = this.project.project_id;
357
-      this.form.inspect_date = this.itemDate;
358
-      this.form.remind_cycle = this.patient_info.remind_cycle;
359
-      console.log(this.form.remind_cycle);
354
+      this.form.method = 'edit'
355
+      this.formTitle = '修改' + this.project.project_name
356
+      this.form.project_id = this.project.project_id
357
+      this.form.inspect_date = this.itemDate
358
+      this.form.old_inspect_date = this.itemDate
359
+      this.form.remind_cycle = this.patient_info.remind_cycle
360
+      console.log(this.form.remind_cycle)
360 361
 
361
-      this.form.formItem = [];
362
+      this.form.formItem = []
362 363
       for (var index in this.project.inspection_reference) {
363 364
         this.form.formItem.push({
364
-          id:
365
-            this.project.inspection_reference[index].id in this.inspectionsMap
366
-              ? this.inspectionsMap[this.project.inspection_reference[index].id]
367
-                  .id
368
-              : 0,
365
+          id: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].id : 0,
369 366
           project_id: this.project.inspection_reference[index].project_id,
370 367
           project_name: this.project.inspection_reference[index].project_name,
371 368
           item_id: this.project.inspection_reference[index].id,
372 369
           item: this.project.inspection_reference[index].item,
373 370
           item_name: this.project.inspection_reference[index].item_name,
374 371
           range_type: this.project.inspection_reference[index].range_type,
375
-          value:
376
-            this.project.inspection_reference[index].id in this.inspectionsMap
377
-              ? this.inspectionsMap[this.project.inspection_reference[index].id]
378
-                  .inspect_value
379
-              : "",
380
-          select_options: this.project.inspection_reference[
381
-            index
382
-          ].range_options.split(","),
372
+          value: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].inspect_value : '',
373
+          select_options: this.project.inspection_reference[index].range_options.split(','),
383 374
           unit: this.project.inspection_reference[index].unit
384
-        });
375
+        })
385 376
       }
386
-
387
-      console.log(this.form.formItem);
388
-
389
-      this.dialogFormVisible = true;
377
+      console.log(this.form.formItem)
378
+      this.dialogFormVisible = true
390 379
     },
391 380
     openNew() {
392 381
       if (this.project == null) {
393
-        this.$message.error("请先选择项目");
394
-        return false;
382
+        this.$message.error('请先选择项目')
383
+        return false
395 384
       }
396
-      this.form.method = "add";
397
-      this.formTitle = "新增" + this.project.project_name;
398
-      this.form.project_id = this.project.project_id;
399
-      this.form.remind_cycle = this.patient_info.remind_cycle;
400
-
401
-      var today = new Date();
402
-      this.form.inspect_date = uParseTime(today, "{y}-{m}-{d}");
403
-      this.form.formItem = [];
385
+      this.form.method = 'add'
386
+      this.formTitle = '新增' + this.project.project_name
387
+      this.form.project_id = this.project.project_id
388
+      this.form.remind_cycle = this.patient_info.remind_cycle
389
+      var today = new Date()
390
+      this.form.inspect_date = uParseTime(today, '{y}-{m}-{d} {h}:{i}')
391
+      this.form.formItem = []
404 392
       for (var index in this.project.inspection_reference) {
405 393
         // var formItem = this.project.inspection_reference[index];
406 394
         // formItem["value"] = '';
@@ -415,114 +403,106 @@ export default {
415 403
           item: this.project.inspection_reference[index].item,
416 404
           item_name: this.project.inspection_reference[index].item_name,
417 405
           range_type: this.project.inspection_reference[index].range_type,
418
-          value: "",
406
+          value: '',
419 407
           select_options: this.project.inspection_reference[
420 408
             index
421
-          ].range_options.split(","),
409
+          ].range_options.split(','),
422 410
           unit: this.project.inspection_reference[index].unit
423
-        });
411
+        })
424 412
       }
425 413
 
426
-      this.dialogFormVisible = true;
414
+      this.dialogFormVisible = true
427 415
     },
428 416
     submitEdit(formName) {
429 417
       this.$refs[formName].validate(valid => {
430 418
         if (valid) {
431
-          this.formLoading = true;
419
+          this.formLoading = true
432 420
           if (this.form.formItem.length == 0) {
433
-            this.$message.error("未填写项目");
434
-            return false;
421
+            this.$message.error('未填写项目')
422
+            return false
435 423
           }
436 424
           for (var index in this.form.formItem) {
437
-            this.form.formItem[index].value =
438
-              "" + this.form.formItem[index].value;
425
+            this.form.formItem[index].value = '' + this.form.formItem[index].value
439 426
           }
440 427
 
441
-          EditPatientInspection(
442
-            this.patientID,
443
-            this.form,
444
-            this.form.remind_cycle,
445
-            this.form.inspect_date,
446
-            this.form.project_id
447
-          )
448
-            .then(response => {
449
-              if (response.data.state == 1) {
450
-                this.$notify({
451
-                  title: "成功",
452
-                  message: "修改成功",
453
-                  type: "success",
454
-                  duration: 2000
455
-                });
456
-                this.patient_info.remind_cycle =
457
-                  response.data.data.remind_cycle;
458
-                this.itemDate = this.form.inspect_date;
459
-                this.items = [];
460
-                var inspections = response.data.data.inspections;
461
-                this.inspections = response.data.data.inspections;
462
-                if (inspections == null) {
463
-                  this.inspections = [];
464
-                  return false;
465
-                }
466
-                var inspectionsMap = {};
467
-                this.inspectionsMap = {};
468
-                for (var index in inspections) {
469
-                  inspectionsMap[inspections[index].item_id] =
470
-                    inspections[index];
471
-                  this.inspectionsMap[inspections[index].item_id] =
472
-                    inspections[index];
473
-                }
474
-                var items = this.project.inspection_reference;
475
-                for (var index in items) {
476
-                  if (items[index].id in inspectionsMap) {
477
-                    var item = {};
478
-                    for (var key in items[index]) {
479
-                      item[key] = items[index][key];
480
-                    }
481
-                    item.value = inspectionsMap[items[index].id].inspect_value;
482
-                    item.value_direction = "";
483
-                    if (item.range_type == 1) {
484
-                      var value = parseFloat(item.value);
485
-                      var range_min = parseFloat(item.range_min);
486
-                      var range_max = parseFloat(item.range_max);
487
-                      if (value < range_min) {
488
-                        item.value_direction = "↓";
489
-                      } else if (value > range_max) {
490
-                        item.value_direction = "↑";
491
-                      }
428
+          EditPatientInspection(this.patientID, this.form, this.form.remind_cycle, this.form.inspect_date, this.form.project_id).then(response => {
429
+            if (response.data.state == 1) {
430
+              this.$notify({
431
+                title: '成功',
432
+                message: '修改成功',
433
+                type: 'success',
434
+                duration: 2000
435
+              })
436
+              this.patient_info.remind_cycle =
437
+                  response.data.data.remind_cycle
438
+              this.itemDate = this.form.inspect_date
439
+              this.items = []
440
+              var inspections = response.data.data.inspections
441
+              this.inspections = response.data.data.inspections
442
+              if (inspections == null) {
443
+                this.inspections = []
444
+                return false
445
+              }
446
+              var inspectionsMap = {}
447
+              this.inspectionsMap = {}
448
+              for (var index in inspections) {
449
+                inspectionsMap[inspections[index].item_id] =
450
+                    inspections[index]
451
+                this.inspectionsMap[inspections[index].item_id] =
452
+                    inspections[index]
453
+              }
454
+              var items = this.project.inspection_reference
455
+              for (var index in items) {
456
+                if (items[index].id in inspectionsMap) {
457
+                  var item = {}
458
+                  for (var key in items[index]) {
459
+                    item[key] = items[index][key]
460
+                  }
461
+                  item.value = inspectionsMap[items[index].id].inspect_value
462
+                  item.value_direction = ''
463
+                  if (item.range_type == 1) {
464
+                    var value = parseFloat(item.value)
465
+                    var range_min = parseFloat(item.range_min)
466
+                    var range_max = parseFloat(item.range_max)
467
+                    if (value < range_min) {
468
+                      item.value_direction = '↓'
469
+                    } else if (value > range_max) {
470
+                      item.value_direction = '↑'
492 471
                     }
493
-                    this.items.push(item);
494 472
                   }
473
+                  this.items.push(item)
495 474
                 }
496
-
497
-                this.resetForm(formName);
498
-                this.dialogFormVisible = false;
499
-              } else {
500
-                this.$message.error(response.data.msg);
501
-                return false;
502 475
               }
503
-            })
476
+
477
+              this.resetForm(formName)
478
+              this.dialogFormVisible = false
479
+            } else {
480
+              this.$message.error(response.data.msg)
481
+              return false
482
+            }
483
+          })
504 484
             .catch(v => {
505
-              this.$message.error(v);
506
-              return false;
507
-            });
508
-          this.formLoading = false;
509
-          return false;
485
+              this.$message.error(v)
486
+              return false
487
+            })
488
+          this.formLoading = false
489
+          return false
510 490
         } else {
511
-          return false;
491
+          return false
512 492
         }
513
-      });
493
+      })
514 494
     },
515 495
     submitNew(formName) {
516 496
       this.$refs[formName].validate(valid => {
517 497
         if (valid) {
518
-          this.formLoading = true;
498
+          this.formLoading = true
519 499
           if (this.form.formItem.length == 0) {
520
-            this.$message.error("未填写项目");
521
-            return false;
500
+            this.$message.error('未填写项目')
501
+            return false
522 502
           }
523 503
           for (var index in this.form.formItem) {
524 504
             this.form.formItem[index].value =
525
-              "" + this.form.formItem[index].value;
505
+              '' + this.form.formItem[index].value
526 506
           }
527 507
           CreatePatientInspection(
528 508
             this.patientID,
@@ -532,208 +512,207 @@ export default {
532 512
             .then(response => {
533 513
               if (response.data.state == 1) {
534 514
                 this.$notify({
535
-                  title: "成功",
536
-                  message: "新增成功",
537
-                  type: "success",
515
+                  title: '成功',
516
+                  message: '新增成功',
517
+                  type: 'success',
538 518
                   duration: 2000
539
-                });
519
+                })
540 520
                 // this.form.remind_reycle = response.data.data.remind_reycc
541 521
                 this.patient_info.remind_cycle =
542
-                  response.data.data.remind_cycle;
543
-                console.log(this.patient_info.remind_cycle);
522
+                  response.data.data.remind_cycle
523
+                console.log(this.patient_info.remind_cycle)
544 524
 
545
-                this.itemDate = this.form.inspect_date;
546
-                this.items = [];
525
+                this.itemDate = this.form.inspect_date
526
+                this.items = []
547 527
                 for (var index in this.projects) {
548 528
                   if (this.projects[index].project_id == this.form.project_id) {
549
-                    this.projects[index].count++;
550
-                    break;
529
+                    this.projects[index].count++
530
+                    break
551 531
                   }
552 532
                 }
553
-                this.total += 1;
554
-                var inspections = response.data.data.inspections;
555
-                this.inspections = response.data.data.inspections;
533
+                this.total += 1
534
+                var inspections = response.data.data.inspections
535
+                this.inspections = response.data.data.inspections
556 536
                 if (inspections == null) {
557
-                  this.inspections = [];
558
-                  return false;
537
+                  this.inspections = []
538
+                  return false
559 539
                 }
560
-                var inspectionsMap = {};
561
-                this.inspectionsMap = {};
540
+                var inspectionsMap = {}
541
+                this.inspectionsMap = {}
562 542
                 for (var index in inspections) {
563 543
                   inspectionsMap[inspections[index].item_id] =
564
-                    inspections[index];
544
+                    inspections[index]
565 545
                   this.inspectionsMap[inspections[index].item_id] =
566
-                    inspections[index];
546
+                    inspections[index]
567 547
                 }
568
-                var items = this.project.inspection_reference;
548
+                var items = this.project.inspection_reference
569 549
                 for (var index in items) {
570 550
                   if (items[index].id in inspectionsMap) {
571
-                    var item = {};
551
+                    var item = {}
572 552
                     for (var key in items[index]) {
573
-                      item[key] = items[index][key];
553
+                      item[key] = items[index][key]
574 554
                     }
575
-                    item.value = inspectionsMap[items[index].id].inspect_value;
576
-                    item.value_direction = "";
555
+                    item.value = inspectionsMap[items[index].id].inspect_value
556
+                    item.value_direction = ''
577 557
                     if (item.range_type == 1) {
578
-                      var value = parseFloat(item.value);
579
-                      var range_min = parseFloat(item.range_min);
580
-                      var range_max = parseFloat(item.range_max);
558
+                      var value = parseFloat(item.value)
559
+                      var range_min = parseFloat(item.range_min)
560
+                      var range_max = parseFloat(item.range_max)
581 561
                       if (value < range_min) {
582
-                        item.value_direction = "↓";
562
+                        item.value_direction = '↓'
583 563
                       } else if (value > range_max) {
584
-                        item.value_direction = "↑";
564
+                        item.value_direction = '↑'
585 565
                       }
586 566
                     }
587
-                    this.items.push(item);
567
+                    this.items.push(item)
588 568
                   }
589 569
                 }
590 570
 
591
-                this.resetForm(formName);
592
-                this.dialogFormVisible = false;
571
+                this.resetForm(formName)
572
+                this.dialogFormVisible = false
593 573
 
594
-                this.queryParams.patient = this.patientID;
595
-                this.queryParams.project_id = this.project.project_id;
596
-                this.queryParams.page = 1;
597
-                this.total = 0;
598
-                this.fetchPatientInspections(this.queryParams);
574
+                this.queryParams.patient = this.patientID
575
+                this.queryParams.project_id = this.project.project_id
576
+                this.queryParams.page = 1
577
+                this.total = 0
578
+                this.fetchPatientInspections(this.queryParams)
599 579
               } else {
600
-                this.$message.error(response.data.msg);
601
-                return false;
580
+                this.$message.error(response.data.msg)
581
+                return false
602 582
               }
603 583
             })
604 584
             .catch(v => {
605
-              this.$message.error(v);
606
-              return false;
607
-            });
608
-          this.formLoading = false;
609
-          return false;
585
+              this.$message.error(v)
586
+              return false
587
+            })
588
+          this.formLoading = false
589
+          return false
610 590
         } else {
611
-          return false;
591
+          return false
612 592
         }
613
-      });
593
+      })
614 594
     },
615 595
     fetchInspectionReference() {
616 596
       fetchInspectionReference(this.patientID)
617 597
         .then(response => {
618 598
           if (response.data.state == 1) {
619
-            var reference = response.data.data.reference;
620
-            var patient_info = response.data.data.patient_info;
621
-            this.projects = reference;
622
-            this.patient_info = patient_info;
623
-            this.pageLoading = false;
624
-            this.form.remind_cycle = this.patient_info.remind_cycle;
599
+            var reference = response.data.data.reference
600
+            var patient_info = response.data.data.patient_info
601
+            this.projects = reference
602
+            this.patient_info = patient_info
603
+            this.pageLoading = false
604
+            this.form.remind_cycle = this.patient_info.remind_cycle
625 605
           } else {
626
-            this.$message.error(response.data.msg);
627
-            return false;
606
+            this.$message.error(response.data.msg)
607
+            return false
628 608
           }
629 609
         })
630
-        .catch(v => {});
610
+        .catch(v => {})
631 611
     },
632 612
     setCurrent(row) {
633
-      this.$refs.singleTable.setCurrentRow(row);
613
+      this.$refs.singleTable.setCurrentRow(row)
634 614
     },
635 615
     resetForm(formName) {
636
-      this.$refs[formName].resetFields();
616
+      this.$refs[formName].resetFields()
637 617
     },
638 618
     handleCurrentChange(row) {
639
-      this.itemDate = "";
640
-      this.form.method = "add";
641
-      if (typeof row === "undefined" || row == null) {
642
-        this.project = null;
643
-        this.items = [];
644
-        this.itemName = "请选择项目";
619
+      this.itemDate = ''
620
+      this.form.method = 'add'
621
+      if (typeof row === 'undefined' || row == null) {
622
+        this.project = null
623
+        this.items = []
624
+        this.itemName = '请选择项目'
645 625
       } else {
646
-        this.itemLoading = true;
647
-        this.project = row;
648
-        this.items = row.inspection_reference;
649
-        this.itemName = row.project_name;
626
+        this.itemLoading = true
627
+        this.project = row
628
+        this.items = row.inspection_reference
629
+        this.itemName = row.project_name
650 630
 
651
-        this.queryParams.patient = this.patientID;
652
-        this.queryParams.project_id = this.project.project_id;
653
-        this.queryParams.page = 1;
654
-        this.total = 0;
655
-        this.fetchPatientInspections(this.queryParams);
631
+        this.queryParams.patient = this.patientID
632
+        this.queryParams.project_id = this.project.project_id
633
+        this.queryParams.page = 1
634
+        this.total = 0
635
+        this.fetchPatientInspections(this.queryParams)
656 636
       }
657 637
     },
658 638
 
659 639
     handleCurrentChangePage(val) {
660
-      this.itemLoading = true;
661
-      this.queryParams.page = val;
662
-      this.fetchPatientInspections(this.queryParams);
640
+      this.itemLoading = true
641
+      this.queryParams.page = val
642
+      this.fetchPatientInspections(this.queryParams)
663 643
     },
664 644
     fetchPatientInspections(params) {
665
-      this.items = [];
645
+      this.items = []
666 646
       fetchPatientInspections(params)
667 647
         .then(response => {
668 648
           if (response.data.state == 1) {
669
-            var inspections = response.data.data.inspections;
670
-            this.total = response.data.data.total;
671
-            this.itemDate = response.data.data.date;
672
-            this.inspections = response.data.data.inspections;
649
+            var inspections = response.data.data.inspections
650
+            this.total = response.data.data.total
651
+            this.itemDate = response.data.data.date
652
+            this.inspections = response.data.data.inspections
673 653
             if (inspections == null) {
674
-              this.inspections = [];
675
-              return false;
654
+              this.inspections = []
655
+              return false
676 656
             }
677
-            var inspectionsMap = {};
678
-            this.inspectionsMap = {};
657
+            var inspectionsMap = {}
658
+            this.inspectionsMap = {}
679 659
             for (var index in inspections) {
680
-              inspectionsMap[inspections[index].item_id] = inspections[index];
681
-              this.inspectionsMap[inspections[index].item_id] =
682
-                inspections[index];
660
+              inspectionsMap[inspections[index].item_id] = inspections[index]
661
+              this.inspectionsMap[inspections[index].item_id] = inspections[index]
683 662
             }
684
-            var items = this.project.inspection_reference;
663
+            var items = this.project.inspection_reference
685 664
             for (var index in items) {
686
-              if (
687
-                items[index].id in inspectionsMap ||
688
-                items[index].item_id in inspectionsMap
689
-              ) {
690
-                var item = {};
665
+              if (items[index].id in inspectionsMap || items[index].item_id in inspectionsMap) {
666
+                var item = {}
691 667
                 for (var key in items[index]) {
692
-                  item[key] = items[index][key];
668
+                  item[key] = items[index][key]
693 669
                 }
694 670
                 if (item.item_id > 0) {
695
-                  item.value =
696
-                    inspectionsMap[items[index].item_id].inspect_value;
671
+                  if (inspectionsMap[items[index].item_id] == undefined) {
672
+                    item.value = inspectionsMap[items[index].id].inspect_value
673
+                  } else {
674
+                    item.value = inspectionsMap[items[index].item_id].inspect_value
675
+                  }
697 676
                 } else {
698
-                  item.value = inspectionsMap[items[index].id].inspect_value;
677
+                  item.value = inspectionsMap[items[index].id].inspect_value
699 678
                 }
700
-                item.value_direction = "";
679
+                item.value_direction = ''
701 680
                 if (item.range_type == 1) {
702
-                  var value = parseFloat(item.value);
703
-                  var range_min = parseFloat(item.range_min);
704
-                  var range_max = parseFloat(item.range_max);
681
+                  var value = parseFloat(item.value)
682
+                  var range_min = parseFloat(item.range_min)
683
+                  var range_max = parseFloat(item.range_max)
705 684
                   if (value < range_min) {
706
-                    item.value_direction = "↓";
685
+                    item.value_direction = '↓'
707 686
                   } else if (value > range_max) {
708
-                    item.value_direction = "↑";
687
+                    item.value_direction = '↑'
709 688
                   }
710 689
                 }
711
-                this.items.push(item);
690
+                this.items.push(item)
712 691
               }
713 692
             }
714
-            console.log(this.items);
693
+            console.log(this.items)
715 694
           }
716 695
         })
717
-        .catch(v => {});
696
+        .catch(v => {})
718 697
       setTimeout(() => {
719
-        this.itemLoading = false;
720
-      }, 1000);
698
+        this.itemLoading = false
699
+      }, 1000)
721 700
     }
722 701
   },
723 702
   created() {
724
-    const id = this.$route.query && this.$route.query.id;
725
-    this.patientID = parseInt(id);
703
+    const id = this.$route.query && this.$route.query.id
704
+    this.patientID = parseInt(id)
726 705
     if (isNaN(this.patientID) || this.patientID <= 0) {
727 706
       this.$notify.error({
728
-        title: "错误",
729
-        message: "无效的id"
730
-      });
731
-      this.$router.push("/patients/patients");
707
+        title: '错误',
708
+        message: '无效的id'
709
+      })
710
+      this.$router.push('/patients/patients')
732 711
     }
733 712
 
734
-    this.fetchInspectionReference();
713
+    this.fetchInspectionReference()
735 714
   }
736
-};
715
+}
737 716
 </script>
738 717
 
739 718
 <style>

+ 4 - 2
src/xt_pages/workforce/appointment.vue View File

@@ -210,6 +210,8 @@
210 210
 
211 211
       },
212 212
       getWeekPanels() {
213
+        // this.scheduleZoneRow = []
214
+        // this.scheduleZone = []
213 215
         getWeekPanels(1).then(response => {
214 216
           if (response.data.state == 0) {
215 217
             return false
@@ -1516,12 +1518,12 @@
1516 1518
             break
1517 1519
 
1518 1520
           case '_6' :
1519
-            return this.days[4]
1521
+            return this.days[3]
1520 1522
 
1521 1523
             break
1522 1524
 
1523 1525
           case  '_7':
1524
-            return this.days[4]
1526
+            return this.days[3]
1525 1527
 
1526 1528
             break
1527 1529
 

+ 2 - 3
src/xt_pages/workforce/template.vue View File

@@ -121,7 +121,6 @@
121 121
           <template-table :editable="true" :device_numbers="device_numbers" :template="first_template"
122 122
                           :patients="patients"></template-table>
123 123
         </el-tab-pane>
124
-        、
125 124
 
126 125
         <el-tab-pane name="second" :disabled="template_mode.mode != 2">
127 126
           <span slot="label"> 第二周 </span>
@@ -1759,13 +1758,13 @@
1759 1758
             break
1760 1759
 
1761 1760
           case '_6' :
1762
-            return this.days[4]
1761
+            return this.days[3]
1763 1762
 
1764 1763
 
1765 1764
             break
1766 1765
 
1767 1766
           case  '_7':
1768
-            return this.days[4]
1767
+            return this.days[3]
1769 1768
 
1770 1769
 
1771 1770
             break