XMLWAN пре 4 година
родитељ
комит
b68d98b97c

+ 8 - 0
src/api/patient/patient.js Прегледај датотеку

@@ -440,3 +440,11 @@ export function GetDoctorAdviceDetail(id, params) {
440 440
     params: params
441 441
   })
442 442
 }
443
+
444
+export function DeleteManagement(id, params) {
445
+  return request({
446
+    url: '/m/api/patient/deletemanagement?id=' + id,
447
+    method: 'delete',
448
+    params: params
449
+  })
450
+}

+ 39 - 3
src/pages/doctorAdvice/components/DoctorManagement.vue Прегледај датотеку

@@ -40,7 +40,7 @@
40 40
                 <van-icon
41 41
                   class="ellipsis"
42 42
                   name="ellipsis"
43
-                  @click="newShow = true"
43
+                  @click="Delete(item.groupno, index)"
44 44
                 />
45 45
               </div>
46 46
 
@@ -181,14 +181,20 @@
181 181
         :actions="actions"
182 182
         cancel-text="取消"
183 183
         @cancel="onCancel"
184
+        @select="toDelete"
184 185
       />
185 186
     </div>
186 187
   </div>
187 188
 </template>
188 189
 
189 190
 <script>
190
-import { getDoctorAdvices, getPatientDetail } from "@/api/patient/patient";
191
+import {
192
+  getDoctorAdvices,
193
+  getPatientDetail,
194
+  DeleteManagement
195
+} from "@/api/patient/patient";
191 196
 import { uParseTime } from "@/utils/tools";
197
+import { Dialog } from "vant";
192 198
 const moment = require("moment");
193 199
 export default {
194 200
   props: {
@@ -226,7 +232,9 @@ export default {
226 232
       doctorAdvice: [],
227 233
       childList: [],
228 234
       patient_id: "",
229
-      doctor: []
235
+      doctor: [],
236
+      id: 0,
237
+      index: 0
230 238
     };
231 239
   },
232 240
   methods: {
@@ -314,6 +322,7 @@ export default {
314 322
           });
315 323
           // console.log(dataInfo);
316 324
           let list = Object.values(dataInfo); // list 转换成功的数据
325
+          console.log("list", list);
317 326
           let arr = [];
318 327
           list.map(item => {
319 328
             // console.log(item.child);
@@ -396,6 +405,33 @@ export default {
396 405
           return this.doctor[i].name;
397 406
         }
398 407
       }
408
+    },
409
+    Delete(id, index) {
410
+      console.log("index", index);
411
+      this.id = id;
412
+      this.index = index;
413
+      this.newShow = true;
414
+    },
415
+    toDelete(val) {
416
+      if (val.name == "删除") {
417
+        this.DeleteManagement(this.id, this.index);
418
+      }
419
+    },
420
+    DeleteManagement(id, index) {
421
+      console.log("id", id, "index", index);
422
+      Dialog.confirm({
423
+        title: "删除提示!",
424
+        message: "确认删除该条信息吗?,删除后将无法恢复!"
425
+      }).then(() => {
426
+        DeleteManagement(id).then(response => {
427
+          if (response.data.state === 1) {
428
+            var msg = response.data.data.msg;
429
+            console.log("msg", msg);
430
+            this.doctorAdvice.splice(index, 1);
431
+            this.newShow = false;
432
+          }
433
+        });
434
+      });
399 435
     }
400 436
   },
401 437
   created() {

+ 30 - 8
src/pages/doctorAdvice/components/LongDialysis.vue Прегледај датотеку

@@ -17,21 +17,30 @@
17 17
       </div>
18 18
 
19 19
       <div class="adviceBox" v-show="showOne">
20
-        <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
21
-          <div class="adviceOne" v-for="(item, index) in dialysisrecord" :key="index">
20
+        <van-list
21
+          v-model="loading"
22
+          :finished="finished"
23
+          finished-text="没有更多了"
24
+          @load="onLoad"
25
+        >
26
+          <div
27
+            class="adviceOne"
28
+            v-for="(item, index) in dialysisrecord"
29
+            :key="index"
30
+          >
22 31
             <div class="adviceTitle">
23 32
               <p>{{ getTime(item.created_time) }}</p>
24 33
               <van-icon
25 34
                 class="ellipsis"
26 35
                 name="ellipsis"
27
-                @click="toLongDialysis(item.id, item.index)"
36
+                @click="toLongDialysis(item.id, index)"
28 37
               />
29 38
             </div>
30 39
             <div class="orderContent">
31 40
               <p>透析模式:{{ item.mode_id }}</p>
32 41
               <p>
33 42
                 透析时长:{{ item.dialysis_duration_hour }}h{{
34
-                item.dialysis_duration_minute
43
+                  item.dialysis_duration_minute
35 44
                 }}min
36 45
               </p>
37 46
               <p>血流量(ml/min):{{ item.blood_flow_volume }}</p>
@@ -91,7 +100,7 @@
91 100
               <p>体液过多其他症状:{{ item.body_fluid_other }}</p>
92 101
               <p>
93 102
                 透析前使用特殊药物:{{
94
-                getSpecialMedicine(item.special_medicine)
103
+                  getSpecialMedicine(item.special_medicine)
95 104
                 }}
96 105
               </p>
97 106
               <p>使用其他特殊药物:{{ item.special_medicine_other }}</p>
@@ -118,10 +127,23 @@
118 127
 
119 128
     <!-- 弹出层 -->
120 129
     <div>
121
-      <van-popup v-model="typeShow" position="bottom" :style="{ height: '40%' }">
122
-        <van-picker show-toolbar :columns="columns" @cancel="onCancel" @confirm="onConfirm" />
130
+      <van-popup
131
+        v-model="typeShow"
132
+        position="bottom"
133
+        :style="{ height: '40%' }"
134
+      >
135
+        <van-picker
136
+          show-toolbar
137
+          :columns="columns"
138
+          @cancel="onCancel"
139
+          @confirm="onConfirm"
140
+        />
123 141
       </van-popup>
124
-      <van-popup v-model="startShow" position="bottom" :style="{ height: '40%' }">
142
+      <van-popup
143
+        v-model="startShow"
144
+        position="bottom"
145
+        :style="{ height: '40%' }"
146
+      >
125 147
         <van-datetime-picker
126 148
           v-model="currentDate"
127 149
           type="date"

+ 238 - 19
src/pages/patients/addPatient.vue Прегледај датотеку

@@ -9,7 +9,12 @@
9 9
     </van-sticky>
10 10
     <div class="basicTitle">基本信息</div>
11 11
     <div class="basicBox">
12
-      <van-field v-model="patientForm.name" required label="姓名" placeholder="请输入" />
12
+      <van-field
13
+        v-model="patientForm.name"
14
+        required
15
+        label="姓名"
16
+        placeholder="请输入"
17
+      />
13 18
       <van-field
14 19
         label="性别"
15 20
         v-model="patientForm.sex"
@@ -20,8 +25,14 @@
20 25
         @click="show = true"
21 26
       />
22 27
       <van-popup v-model="show" position="bottom" :style="{ height: '40%' }">
23
-        <van-picker :columns="columns" show-toolbar @change="onChange" />
28
+        <van-picker
29
+          :columns="columns"
30
+          show-toolbar
31
+          @confirm="onChange"
32
+          @cancel="onCancel5"
33
+        />
24 34
       </van-popup>
35
+
25 36
       <van-field
26 37
         v-model="patientForm.idCard"
27 38
         required
@@ -29,7 +40,13 @@
29 40
         @blur="checkIdCardNo"
30 41
         placeholder="请输入"
31 42
       />
32
-      <van-field v-model="patientForm.birthday" required label="出生日期" readonly placeholder="请输入" />
43
+      <van-field
44
+        v-model="patientForm.birthday"
45
+        required
46
+        label="出生日期"
47
+        readonly
48
+        placeholder="请输入"
49
+      />
33 50
       <van-field
34 51
         v-model="patientForm.phone"
35 52
         type="tel"
@@ -56,8 +73,20 @@
56 73
     <div v-show="bloodShow">
57 74
       <div class="basicTitle">血透信息</div>
58 75
       <div class="xtBox">
59
-        <van-field v-model="patientForm.dialysis" center clearable required label="透析号">
60
-          <van-button slot="button" size="small" type="info" @click="generatedialysisno">自动生成</van-button>
76
+        <van-field
77
+          v-model="patientForm.dialysis"
78
+          center
79
+          clearable
80
+          required
81
+          label="透析号"
82
+        >
83
+          <van-button
84
+            slot="button"
85
+            size="small"
86
+            type="info"
87
+            @click="generatedialysisno"
88
+            >自动生成</van-button
89
+          >
61 90
         </van-field>
62 91
 
63 92
         <van-field
@@ -69,8 +98,17 @@
69 98
           placeholder="请选择"
70 99
           @click="show10 = true"
71 100
         />
72
-        <van-popup v-model="show10" position="bottom" :style="{ height: '40%' }">
73
-          <van-picker :columns="columns3" show-toolbar @change="onChangeOne" />
101
+        <van-popup
102
+          v-model="show10"
103
+          position="bottom"
104
+          :style="{ height: '40%' }"
105
+        >
106
+          <van-picker
107
+            :columns="columns3"
108
+            show-toolbar
109
+            @confirm="onChangeOne"
110
+            @cancel="oncancelOne"
111
+          />
74 112
         </van-popup>
75 113
 
76 114
         <van-field
@@ -83,7 +121,12 @@
83 121
           @click="show9 = true"
84 122
         />
85 123
         <van-popup v-model="show9" position="bottom" :style="{ height: '40%' }">
86
-          <van-picker :columns="columns4" show-toolbar @change="onChangeTwo" />
124
+          <van-picker
125
+            :columns="columns4"
126
+            show-toolbar
127
+            @confirm="onChangeTwo"
128
+            @cancel="onCancelTwo"
129
+          />
87 130
         </van-popup>
88 131
 
89 132
         <van-cell>
@@ -144,7 +187,11 @@
144 187
     <div v-show="slowShow">
145 188
       <div class="basicTitle">慢病信息</div>
146 189
       <div class="xtBox">
147
-        <van-field v-model="patientForm.requipmentId" label="设备ID" placeholder="请输入" />
190
+        <van-field
191
+          v-model="patientForm.requipmentId"
192
+          label="设备ID"
193
+          placeholder="请输入"
194
+        />
148 195
 
149 196
         <van-cell>
150 197
           <!-- 使用 title 插槽来自定义标题 -->
@@ -211,8 +258,17 @@
211 258
           placeholder="请选择"
212 259
           @click="show14 = true"
213 260
         />
214
-        <van-popup v-model="show14" position="bottom" :style="{ height: '40%' }">
215
-          <van-picker :columns="patientType" show-toolbar @change="onChangeSix" />
261
+        <van-popup
262
+          v-model="show14"
263
+          position="bottom"
264
+          :style="{ height: '40%' }"
265
+        >
266
+          <van-picker
267
+            :columns="patientType"
268
+            show-toolbar
269
+            @confirm="onChangeSix"
270
+            @cancel="onCancelSix"
271
+          />
216 272
         </van-popup>
217 273
         <van-field
218 274
           label="治疗方式"
@@ -222,8 +278,17 @@
222 278
           placeholder="请选择"
223 279
           @click="show13 = true"
224 280
         />
225
-        <van-popup v-model="show13" position="bottom" :style="{ height: '40%' }">
226
-          <van-picker :columns="treatmentMethod" show-toolbar @change="onChangeSeven" />
281
+        <van-popup
282
+          v-model="show13"
283
+          position="bottom"
284
+          :style="{ height: '40%' }"
285
+        >
286
+          <van-picker
287
+            :columns="treatmentMethod"
288
+            show-toolbar
289
+            @confirm="onChangeSeven"
290
+            @cancel="onCancelSeven"
291
+          />
227 292
         </van-popup>
228 293
       </div>
229 294
     </div>
@@ -335,15 +400,42 @@ export default {
335 400
   },
336 401
   methods: {
337 402
     onChange(picker, value, index) {
338
-      this.patientForm.sex = value;
403
+      if (value == 0) {
404
+        this.patientForm.sex = "男";
405
+        this.show = false;
406
+      }
407
+      if (value == 1) {
408
+        this.patientForm.sex = "女";
409
+        this.show = false;
410
+      }
411
+    },
412
+    onCancel5() {
339 413
       this.show = false;
340 414
     },
341 415
     onChangeOne(picker, value, index) {
342
-      this.patientForm.patientsoure = value;
416
+      if (value == 0) {
417
+        this.patientForm.patientsoure = "门诊";
418
+        this.show10 = false;
419
+      }
420
+      if (value == 1) {
421
+        this.patientForm.patientsoure = "住院";
422
+        this.show10 = false;
423
+      }
424
+    },
425
+    oncancelOne() {
343 426
       this.show10 = false;
344 427
     },
345 428
     onChangeTwo(picker, value, index) {
346
-      this.patientForm.lapseto = value;
429
+      if (value == 0) {
430
+        this.patientForm.lapseto = "留治";
431
+        this.show9 = false;
432
+      }
433
+      if (value == 1) {
434
+        this.patientForm.lapseto = "转出";
435
+        this.show9 = false;
436
+      }
437
+    },
438
+    onCancelTwo() {
347 439
       this.show9 = false;
348 440
     },
349 441
     onChangeThree(picker, value, index) {
@@ -359,11 +451,81 @@ export default {
359 451
       this.show12 = false;
360 452
     },
361 453
     onChangeSix(picker, value, index) {
362
-      this.patientForm.patient_type = value;
454
+      if (value == 0) {
455
+        this.patientForm.patient_type = "尿毒症";
456
+        this.show14 = false;
457
+      }
458
+      if (value == 1) {
459
+        this.patientForm.patient_type = "慢性肾衰竭";
460
+        this.show14 = false;
461
+      }
462
+      if (value == 2) {
463
+        this.patientForm.patient_type = "糖尿病肾病";
464
+        this.show14 = false;
465
+      }
466
+      if (value == 3) {
467
+        this.patientForm.patient_type = "高血压肾病";
468
+        this.show14 = false;
469
+      }
470
+      if (value == 4) {
471
+        this.patientForm.patient_type = "肾病综合症";
472
+        this.show14 = false;
473
+      }
474
+      if (value == 5) {
475
+        this.patientForm.patient_type = "IGA肾病";
476
+        this.show14 = false;
477
+      }
478
+      if (value == 6) {
479
+        this.patientForm.patient_type = "慢性肾炎";
480
+        this.show14 = false;
481
+      }
482
+      if (value == 7) {
483
+        this.patientForm.patient_type = "紫癜性肾炎";
484
+        this.show14 = false;
485
+      }
486
+      if (value == 8) {
487
+        this.patientForm.patient_type = "狼疮性肾炎";
488
+        this.show14 = false;
489
+      }
490
+      if (value == 9) {
491
+        this.patientForm.patient_type = "小儿肾病";
492
+        this.show14 = false;
493
+      }
494
+      if (value == 10) {
495
+        this.patientForm.patient_type = "肾结石";
496
+        this.show14 = false;
497
+      }
498
+      if (value == 11) {
499
+        this.patientForm.patient_type = "其他";
500
+        this.show14 = false;
501
+      }
502
+    },
503
+    onCancelSix() {
363 504
       this.show14 = false;
364 505
     },
365 506
     onChangeSeven(picker, value, index) {
366
-      this.patientForm.treatmentMethod = value;
507
+      if (value == 0) {
508
+        this.patientForm.treatmentMethod = "西医治疗";
509
+        this.show13 = false;
510
+      }
511
+      if (value == 1) {
512
+        this.patientForm.treatmentMethod = "中医治疗";
513
+        this.show13 = false;
514
+      }
515
+      if (value == 2) {
516
+        this.patientForm.treatmentMethod = "血液透析";
517
+        this.show13 = false;
518
+      }
519
+      if (value == 3) {
520
+        this.patientForm.treatmentMethod = "腹膜透析";
521
+        this.show13 = false;
522
+      }
523
+      if (value == 4) {
524
+        this.patientForm.treatmentMethod = "肾移植";
525
+        this.show13 = false;
526
+      }
527
+    },
528
+    onCancelSeven() {
367 529
       this.show13 = false;
368 530
     },
369 531
     onChange1(picker, value, index) {
@@ -588,6 +750,21 @@ export default {
588 750
         return false;
589 751
       }
590 752
 
753
+      if (this.patientForm.patientsoure == "门诊") {
754
+        this.patientForm.patientsoure = 1;
755
+      }
756
+      if (this.patientForm.patientsoure == "住院") {
757
+        this.patientForm.patientsoure = 2;
758
+      }
759
+
760
+      if (this.patientForm.lapseto == "留治") {
761
+        this.patientForm.lapseto = 1;
762
+      }
763
+
764
+      if (this.patientForm.lapseto == "转出") {
765
+        this.patientForm.lapseto = 2;
766
+      }
767
+
591 768
       if (this.resultTwo.length === 0) {
592 769
         this.patientForm.is_infectious = 1;
593 770
       }
@@ -602,6 +779,49 @@ export default {
602 779
         this.patientForm.treatmentMethod = 0;
603 780
       }
604 781
 
782
+      if (this.patientForm.patient_type === "尿毒症") {
783
+        this.patientForm.patient_type = 1;
784
+      }
785
+      if (this.patientForm.patient_type === "慢性肾衰竭") {
786
+        this.patientForm.patient_type = 2;
787
+      }
788
+      if (this.patientForm.patient_type === "糖尿病肾病") {
789
+        this.patientForm.patient_type = 3;
790
+      }
791
+
792
+      if (this.patientForm.patient_type === "高血压肾病") {
793
+        this.patientForm.patient_type = 4;
794
+      }
795
+
796
+      if (this.patientForm.patient_type === "肾病综合症") {
797
+        this.patientForm.patient_type = 5;
798
+      }
799
+
800
+      if (this.patientForm.patient_type === "IGA肾病") {
801
+        this.patientForm.patient_type = 6;
802
+      }
803
+
804
+      if (this.patientForm.patient_type === "慢性肾炎") {
805
+        this.patientForm.patient_type = 7;
806
+      }
807
+
808
+      if (this.patientForm.patient_type === "紫癜性肾炎") {
809
+        this.patientForm.patient_type = 8;
810
+      }
811
+
812
+      if (this.patientForm.patient_type === "狼疮性肾炎") {
813
+        this.patientForm.patient_type = 9;
814
+      }
815
+      if (this.patientForm.patient_type === "小儿肾病") {
816
+        this.patientForm.patient_type = 10;
817
+      }
818
+      if (this.patientForm.patient_type === "肾结石") {
819
+        this.patientForm.patient_type = 11;
820
+      }
821
+      if (this.patientForm.patient_type === "其他") {
822
+        this.patientForm.patient_type = 12;
823
+      }
824
+
605 825
       if (this.patientForm.treatmentMethod === "西医治疗") {
606 826
         this.patientForm.treatmentMethod = 1;
607 827
       }
@@ -711,7 +931,6 @@ export default {
711 931
           this.$router.push({ path: "/patients" });
712 932
         } else {
713 933
           this.$toast("手机号码已存在");
714
-          console.log("性别", this.patientForm.sex);
715 934
           if (this.patientForm.sex === 1) {
716 935
             this.patientForm.sex = "男";
717 936
           }