瀏覽代碼

修改样式

See999 4 年之前
父節點
當前提交
56d76dc8e6
共有 2 個文件被更改,包括 209 次插入210 次删除
  1. 2 2
      src/pages/patients/addPatient.vue
  2. 207 208
      src/pages/patients/editPatient.vue

+ 2 - 2
src/pages/patients/addPatient.vue 查看文件

@@ -131,6 +131,7 @@
131 131
           v-model="patientForm.admissionNumber"
132 132
           type="text"
133 133
           label="住院(门诊)号"
134
+          placeholder="请填写"
134 135
         />
135 136
 
136 137
         <van-field
@@ -154,13 +155,12 @@
154 155
 
155 156
         <van-field
156 157
           v-model="patientForm.diagnose"
157
-          rows="2"
158
+          rows="1"
158 159
           autosize
159 160
           label="诊断"
160 161
           type="textarea"
161 162
           maxlength="50"
162 163
           placeholder="请输入主要诊断信息"
163
-          show-word-limit
164 164
         />
165 165
       </div>
166 166
     </div>

+ 207 - 208
src/pages/patients/editPatient.vue 查看文件

@@ -148,13 +148,12 @@
148 148
         </van-popup>
149 149
         <van-field
150 150
           v-model="message"
151
-          rows="2"
151
+          rows="1"
152 152
           autosize
153 153
           label="诊断"
154 154
           type="textarea"
155 155
           maxlength="50"
156 156
           placeholder="请输入主要诊断信息"
157
-          show-word-limit
158 157
         />
159 158
       </div>
160 159
     </div>
@@ -270,24 +269,24 @@ import {
270 269
   getSlowPatientInfo,
271 270
   getMemberPatientInfo,
272 271
   GetPatientDetail
273
-} from '@/api/patient/patient'
272
+} from "@/api/patient/patient";
274 273
 import {
275 274
   isCardNo,
276 275
   checkMobile,
277 276
   getFileExtension,
278 277
   uParseTime
279
-} from '@/utils/tools'
280
-import { getToken } from '@/api/qiniu'
281
-const moment = require('moment')
278
+} from "@/utils/tools";
279
+import { getToken } from "@/api/qiniu";
280
+const moment = require("moment");
282 281
 export default {
283
-  data () {
282
+  data() {
284 283
     var checkMobileRule = (rule, value, callback) => {
285 284
       if (!checkMobile(value)) {
286
-        callback(new Error('请填写正确的手机号'))
285
+        callback(new Error("请填写正确的手机号"));
287 286
       } else {
288
-        callback()
287
+        callback();
289 288
       }
290
-    }
289
+    };
291 290
 
292 291
     return {
293 292
       show: false,
@@ -295,20 +294,20 @@ export default {
295 294
       show2: false,
296 295
       show3: false,
297 296
       show4: false,
298
-      name: '',
299
-      columns: ['男', '女'],
300
-      columns1: ['1', '2', '3'],
301
-      columns2: ['门诊', '住院'],
302
-      columns4: ['留治', '转出'],
303
-      sex: '',
304
-      idCard: '',
305
-      birthday: '',
306
-      tel: '',
297
+      name: "",
298
+      columns: ["男", "女"],
299
+      columns1: ["1", "2", "3"],
300
+      columns2: ["门诊", "住院"],
301
+      columns4: ["留治", "转出"],
302
+      sex: "",
303
+      idCard: "",
304
+      birthday: "",
305
+      tel: "",
307 306
       result: [],
308
-      dialysisNumber: '',
309
-      source: '',
310
-      source2: '',
311
-      source3: '',
307
+      dialysisNumber: "",
308
+      source: "",
309
+      source2: "",
310
+      source3: "",
312 311
       show10: false,
313 312
       show9: false,
314 313
       show8: false,
@@ -318,322 +317,322 @@ export default {
318 317
       show12: false,
319 318
       show13: false,
320 319
       show14: false,
321
-      hospitalNum: '',
320
+      hospitalNum: "",
322 321
       minDate: new Date(1970, 0, 1),
323 322
       maxDate: new Date(2025, 10, 1),
324 323
       currentDate: new Date(),
325
-      time: '',
326
-      message: '',
327
-      patient_id: '',
324
+      time: "",
325
+      message: "",
326
+      patient_id: "",
328 327
       resultTwo: [],
329 328
       resultThree: [],
330 329
       resultFour: [],
331 330
       patientForm: {
332
-        name: '',
333
-        sex: '',
334
-        idCard: '',
335
-        birthday: '',
336
-        phone: '',
337
-        dialysis: '',
338
-        patient_type: '',
339
-        admissionNumber: '',
340
-        patientsoure: '',
341
-        lapseto: '',
331
+        name: "",
332
+        sex: "",
333
+        idCard: "",
334
+        birthday: "",
335
+        phone: "",
336
+        dialysis: "",
337
+        patient_type: "",
338
+        admissionNumber: "",
339
+        patientsoure: "",
340
+        lapseto: "",
342 341
         contagions: [],
343
-        fistDate: '',
344
-        diagnose: '',
345
-        requipmentId: '',
342
+        fistDate: "",
343
+        diagnose: "",
344
+        requipmentId: "",
346 345
         slowcontagions: [],
347
-        slowDisease: '',
348
-        memberIllnessTime: '',
349
-        memberlapseto: '',
350
-        TreatmentMethod: '',
346
+        slowDisease: "",
347
+        memberIllnessTime: "",
348
+        memberlapseto: "",
349
+        TreatmentMethod: "",
351 350
         bloodPatient: 0,
352 351
         slowPatient: 0,
353 352
         memberPatient: 0,
354
-        avatar: '',
355
-        memberFistDate: ''
353
+        avatar: "",
354
+        memberFistDate: ""
356 355
       },
357 356
       bloodShow: true,
358 357
       slowShow: false,
359 358
       memberShow: false,
360 359
       patientType: [],
361 360
       treatmentMethod: [
362
-        '西医治疗',
363
-        '中医治疗',
364
-        '血液透析',
365
-        '腹膜透析',
366
-        '肾移植'
361
+        "西医治疗",
362
+        "中医治疗",
363
+        "血液透析",
364
+        "腹膜透析",
365
+        "肾移植"
367 366
       ]
368
-    }
367
+    };
369 368
   },
370 369
   methods: {
371
-    onChange (picker, value, index) {
372
-      console.log(value)
373
-      this.sex = value
374
-      this.show = false
370
+    onChange(picker, value, index) {
371
+      console.log(value);
372
+      this.sex = value;
373
+      this.show = false;
375 374
     },
376
-    onChange1 (picker, value, index) {
377
-      this.patientForm.patientsoure = value
378
-      this.show3 = false
375
+    onChange1(picker, value, index) {
376
+      this.patientForm.patientsoure = value;
377
+      this.show3 = false;
379 378
     },
380
-    onChange2 (picker, value, index) {
381
-      this.patientForm.lapseto = value
382
-      this.show4 = false
379
+    onChange2(picker, value, index) {
380
+      this.patientForm.lapseto = value;
381
+      this.show4 = false;
383 382
     },
384
-    onChange3 (picker, value, index) {
385
-      this.source3 = value
386
-      this.show3 = false
383
+    onChange3(picker, value, index) {
384
+      this.source3 = value;
385
+      this.show3 = false;
387 386
     },
388
-    onChange4 (picker, value, index) {
389
-      this.source = value
390
-      this.show1 = false
387
+    onChange4(picker, value, index) {
388
+      this.source = value;
389
+      this.show1 = false;
391 390
     },
392
-    onCancel () {
393
-      this.show2 = false
391
+    onCancel() {
392
+      this.show2 = false;
394 393
     },
395
-    onConfirm (value) {
396
-      let year = value.getFullYear()
397
-      let month = value.getMonth() + 1
398
-      let day = value.getDate()
394
+    onConfirm(value) {
395
+      let year = value.getFullYear();
396
+      let month = value.getMonth() + 1;
397
+      let day = value.getDate();
399 398
       if (month >= 1 && month <= 9) {
400
-        month = `0${month}`
399
+        month = `0${month}`;
401 400
       }
402 401
       if (day >= 1 && day <= 9) {
403
-        day = `0${day}`
402
+        day = `0${day}`;
404 403
       }
405 404
 
406
-      this.time = `${year}-${month}-${day}`
407
-      console.log(this.currentDate)
408
-      this.show2 = false
405
+      this.time = `${year}-${month}-${day}`;
406
+      console.log(this.currentDate);
407
+      this.show2 = false;
409 408
     },
410
-    toReturn () {
411
-      this.$router.push('/patientdetail?patientid=' + this.patient_id)
409
+    toReturn() {
410
+      this.$router.push("/patientdetail?patientid=" + this.patient_id);
412 411
     },
413
-    changeMode (val) {
414
-      alert(val)
412
+    changeMode(val) {
413
+      alert(val);
415 414
       if (val == 1) {
416 415
         getBloodPatientInfo(this.patientForm.phone).then(response => {
417 416
           if (response.data.state === 1) {
418
-            var msg = response.data.data.msg
419
-            console.log('患者不存在')
417
+            var msg = response.data.data.msg;
418
+            console.log("患者不存在");
420 419
           } else {
421
-            this.$toast('血透患者已存在')
422
-            return false
420
+            this.$toast("血透患者已存在");
421
+            return false;
423 422
           }
424
-        })
423
+        });
425 424
       }
426 425
 
427 426
       if (val == 2) {
428 427
         getSlowPatientInfo(this.patientForm.phone).then(response => {
429 428
           if (response.data.state === 1) {
430
-            var msg = response.data.data.msg
431
-            console.log('患者不存在')
429
+            var msg = response.data.data.msg;
430
+            console.log("患者不存在");
432 431
           } else {
433
-            this.$toast('慢病患者已存在')
434
-            return false
432
+            this.$toast("慢病患者已存在");
433
+            return false;
435 434
           }
436
-        })
435
+        });
437 436
       }
438 437
 
439 438
       if (val == 3) {
440 439
         getMemberPatientInfo(this.patientForm.phone).then(response => {
441 440
           if (response.data.state === 1) {
442
-            var msg = response.data.data.msg
443
-            console.log('会员不存在')
441
+            var msg = response.data.data.msg;
442
+            console.log("会员不存在");
444 443
           } else {
445
-            this.$toast('会员已存在')
446
-            return false
444
+            this.$toast("会员已存在");
445
+            return false;
447 446
           }
448
-        })
447
+        });
449 448
       }
450 449
 
451
-      if (this.result.indexOf('1') != -1) {
452
-        this.bloodShow = true
453
-        this.slowShow = false
454
-        this.memberShow = false
450
+      if (this.result.indexOf("1") != -1) {
451
+        this.bloodShow = true;
452
+        this.slowShow = false;
453
+        this.memberShow = false;
455 454
       }
456
-      if (this.result.indexOf('2') != -1) {
457
-        this.slowShow = true
458
-        this.bloodShow = false
459
-        this.memberShow = false
455
+      if (this.result.indexOf("2") != -1) {
456
+        this.slowShow = true;
457
+        this.bloodShow = false;
458
+        this.memberShow = false;
460 459
       }
461
-      if (this.result.indexOf('3') != -1) {
462
-        this.memberShow = true
463
-        this.bloodShow = false
464
-        this.slowShow = false
460
+      if (this.result.indexOf("3") != -1) {
461
+        this.memberShow = true;
462
+        this.bloodShow = false;
463
+        this.slowShow = false;
465 464
       }
466 465
 
467
-      if (this.result.indexOf('1') != -1 && this.result.indexOf('2') != -1) {
468
-        this.bloodShow = true
469
-        this.slowShow = true
470
-        this.memberShow = false
466
+      if (this.result.indexOf("1") != -1 && this.result.indexOf("2") != -1) {
467
+        this.bloodShow = true;
468
+        this.slowShow = true;
469
+        this.memberShow = false;
471 470
       }
472 471
       if (
473
-        this.result.indexOf('1') != -1 &&
474
-        this.result.indexOf('2') != -1 &&
475
-        this.result.indexOf('3') != -1
472
+        this.result.indexOf("1") != -1 &&
473
+        this.result.indexOf("2") != -1 &&
474
+        this.result.indexOf("3") != -1
476 475
       ) {
477
-        this.bloodShow = true
478
-        this.slowShow = true
479
-        this.memberShow = true
476
+        this.bloodShow = true;
477
+        this.slowShow = true;
478
+        this.memberShow = true;
480 479
       }
481 480
 
482
-      if (this.result.indexOf('1') != -1 && this.result.indexOf('3') != -1) {
483
-        this.bloodShow = false
484
-        this.slowShow = true
485
-        this.memberShow = true
481
+      if (this.result.indexOf("1") != -1 && this.result.indexOf("3") != -1) {
482
+        this.bloodShow = false;
483
+        this.slowShow = true;
484
+        this.memberShow = true;
486 485
       }
487
-      if (this.result.indexOf('3') != -1 && this.result.indexOf('1') != -1) {
488
-        this.bloodShow = true
489
-        this.slowShow = false
490
-        this.memberShow = true
486
+      if (this.result.indexOf("3") != -1 && this.result.indexOf("1") != -1) {
487
+        this.bloodShow = true;
488
+        this.slowShow = false;
489
+        this.memberShow = true;
491 490
       }
492
-      if (this.result.indexOf('2') != -1 && this.result.indexOf('3') != -1) {
493
-        this.bloodShow = false
494
-        this.slowShow = true
495
-        this.memberShow = true
491
+      if (this.result.indexOf("2") != -1 && this.result.indexOf("3") != -1) {
492
+        this.bloodShow = false;
493
+        this.slowShow = true;
494
+        this.memberShow = true;
496 495
       }
497 496
 
498 497
       if (
499
-        this.result.indexOf('2') != -1 &&
500
-        this.result.indexOf('3') != -1 &&
501
-        this.result.indexOf('1') != -1
498
+        this.result.indexOf("2") != -1 &&
499
+        this.result.indexOf("3") != -1 &&
500
+        this.result.indexOf("1") != -1
502 501
       ) {
503
-        this.bloodShow = true
504
-        this.slowShow = true
505
-        this.memberShow = true
502
+        this.bloodShow = true;
503
+        this.slowShow = true;
504
+        this.memberShow = true;
506 505
       }
507 506
 
508 507
       if (this.result.length == 0) {
509
-        this.bloodShow = false
510
-        this.slowShow = false
511
-        this.memberShow = false
508
+        this.bloodShow = false;
509
+        this.slowShow = false;
510
+        this.memberShow = false;
512 511
       }
513 512
     },
514
-    generatedialysisno () {
513
+    generatedialysisno() {
515 514
       GenerateDialysisNo().then(response => {
516 515
         // eslint-disable-next-line eqeqeq
517 516
         if (response.data.state == 1) {
518
-          var no = response.data.data.no + ''
519
-          console.log('no是什么', no)
520
-          this.patientForm.dialysis = no
521
-          console.log('no', no)
517
+          var no = response.data.data.no + "";
518
+          console.log("no是什么", no);
519
+          this.patientForm.dialysis = no;
520
+          console.log("no", no);
522 521
           // console.log("no是设么", response.data.data.no);
523 522
           // this.patientForm.dialysis = no;
524 523
         }
525
-      })
524
+      });
526 525
     },
527
-    onChangeSix (picker, value, index) {
528
-      this.patientForm.patient_type = value
529
-      this.show14 = false
526
+    onChangeSix(picker, value, index) {
527
+      this.patientForm.patient_type = value;
528
+      this.show14 = false;
530 529
     },
531
-    onChangeSeven (picker, value, index) {
532
-      this.patientForm.treatmentMethod = value
533
-      this.show13 = false
530
+    onChangeSeven(picker, value, index) {
531
+      this.patientForm.treatmentMethod = value;
532
+      this.show13 = false;
534 533
     },
535
-    GetPatientDetail (patientid) {
534
+    GetPatientDetail(patientid) {
536 535
       GetPatientDetail(patientid).then(response => {
537 536
         if (response.data.state === 1) {
538
-          var patientdetail = response.data.data.patientDetail
539
-          var diseases = response.data.data.diseases
537
+          var patientdetail = response.data.data.patientDetail;
538
+          var diseases = response.data.data.diseases;
540 539
           for (let i = 0; i < diseases.length; i++) {
541
-            this.resultTwo.push(String(diseases[i]))
540
+            this.resultTwo.push(String(diseases[i]));
542 541
           }
543
-          console.log('传染病', diseases)
542
+          console.log("传染病", diseases);
544 543
           if (patientdetail.gender === 1) {
545
-            patientdetail.gender = '男'
544
+            patientdetail.gender = "男";
546 545
           }
547 546
           if (patientdetail.gender === 2) {
548
-            patientdetail.gender = '女'
547
+            patientdetail.gender = "女";
549 548
           }
550 549
           if (patientdetail.source === 1) {
551
-            patientdetail.source = '门诊'
550
+            patientdetail.source = "门诊";
552 551
           }
553 552
           if (patientdetail.source === 2) {
554
-            patientdetail.source = '住院'
553
+            patientdetail.source = "住院";
555 554
           }
556 555
           if (patientdetail.lapseto === 1) {
557
-            patientdetail.lapseto = '留治'
556
+            patientdetail.lapseto = "留治";
558 557
           }
559 558
           if (patientdetail.lapseto === 2) {
560
-            patientdetail.lapseto = '转出'
559
+            patientdetail.lapseto = "转出";
561 560
           }
562
-          console.log('病人详情', patientdetail)
563
-          this.patientForm.name = patientdetail.name
564
-          this.patientForm.sex = patientdetail.gender
565
-          this.patientForm.idCard = patientdetail.id_card_no
561
+          console.log("病人详情", patientdetail);
562
+          this.patientForm.name = patientdetail.name;
563
+          this.patientForm.sex = patientdetail.gender;
564
+          this.patientForm.idCard = patientdetail.id_card_no;
566 565
           this.patientForm.birthday = uParseTime(
567 566
             patientdetail.birthday,
568
-            '{y}-{m}-{d}'
569
-          )
570
-          this.patientForm.phone = patientdetail.phone
567
+            "{y}-{m}-{d}"
568
+          );
569
+          this.patientForm.phone = patientdetail.phone;
571 570
 
572 571
           if (patientdetail.blood_patients == 1) {
573
-            this.result.push(String(1))
572
+            this.result.push(String(1));
574 573
           }
575 574
           if (patientdetail.slow_patients == 1) {
576
-            this.result.push(String(2))
575
+            this.result.push(String(2));
577 576
           }
578 577
           if (patientdetail.member_patients == 1) {
579
-            this.result.push(String(3))
578
+            this.result.push(String(3));
580 579
           }
581
-          this.patientForm.dialysis = patientdetail.dialysis_no
582
-          this.patientForm.patientsoure = patientdetail.source
583
-          this.patientForm.lapseto = patientdetail.lapseto
584
-          this.patientForm.admissionNumber = patientdetail.admission_number
580
+          this.patientForm.dialysis = patientdetail.dialysis_no;
581
+          this.patientForm.patientsoure = patientdetail.source;
582
+          this.patientForm.lapseto = patientdetail.lapseto;
583
+          this.patientForm.admissionNumber = patientdetail.admission_number;
585 584
           this.patientForm.fistDate = uParseTime(
586 585
             patientdetail.first_dialysis_date
587
-          )
588
-          this.patientForm.diagnose = patientdetail.diagnose
586
+          );
587
+          this.patientForm.diagnose = patientdetail.diagnose;
589 588
         }
590
-      })
589
+      });
591 590
     },
592
-    GetIllnessList () {
591
+    GetIllnessList() {
593 592
       GetIllnessList().then(response => {
594 593
         if (response.data.state === 1) {
595
-          var illnesslist = response.data.data.illnesslist
596
-          this.illnesslist = illnesslist
597
-          var arr = []
594
+          var illnesslist = response.data.data.illnesslist;
595
+          this.illnesslist = illnesslist;
596
+          var arr = [];
598 597
           for (let i = 0; i < illnesslist.length; i++) {
599
-            arr.push(illnesslist[i].illness_name)
598
+            arr.push(illnesslist[i].illness_name);
600 599
           }
601 600
 
602
-          this.patientType = arr
603
-          console.log('病种', illnesslist)
601
+          this.patientType = arr;
602
+          console.log("病种", illnesslist);
604 603
         }
605
-      })
604
+      });
606 605
     },
607
-    checkIdCardNo () {
606
+    checkIdCardNo() {
608 607
       if (!isCardNo(this.patientForm.idCard)) {
609
-        this.$toast('身份证号码信息有误!')
610
-        this.patientForm.birthday = ''
611
-        return false
608
+        this.$toast("身份证号码信息有误!");
609
+        this.patientForm.birthday = "";
610
+        return false;
612 611
       }
613
-      var thisLen = this.patientForm.idCard.length
614
-      var birth = ''
612
+      var thisLen = this.patientForm.idCard.length;
613
+      var birth = "";
615 614
       if (thisLen === 15) {
616
-        birth = '19' + this.patientForm.idCard.substr(6, 6)
615
+        birth = "19" + this.patientForm.idCard.substr(6, 6);
617 616
       } else {
618
-        birth = this.patientForm.idCard.substr(6, 8)
617
+        birth = this.patientForm.idCard.substr(6, 8);
619 618
       }
620 619
       this.patientForm.birthday =
621 620
         birth.substr(0, 4) +
622
-        '-' +
621
+        "-" +
623 622
         birth.substr(4, 2) +
624
-        '-' +
625
-        birth.substr(6, 2)
626
-      console.log('出生日期', this.patientForm.birthday)
623
+        "-" +
624
+        birth.substr(6, 2);
625
+      console.log("出生日期", this.patientForm.birthday);
627 626
     }
628 627
   },
629
-  created () {
630
-    var patientid = this.$route.query.patientid
631
-    this.patient_id = patientid
632
-    console.log('phones是什么', patientid)
633
-    this.GetPatientDetail(patientid)
634
-    this.GetIllnessList()
628
+  created() {
629
+    var patientid = this.$route.query.patientid;
630
+    this.patient_id = patientid;
631
+    console.log("phones是什么", patientid);
632
+    this.GetPatientDetail(patientid);
633
+    this.GetIllnessList();
635 634
   }
636
-}
635
+};
637 636
 </script>
638 637
 
639 638
 <style lang="scss" scoped>