Browse Source

更新数据

XMLWAN 4 years ago
parent
commit
b68d98b97c

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

440
     params: params
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 View File

40
                 <van-icon
40
                 <van-icon
41
                   class="ellipsis"
41
                   class="ellipsis"
42
                   name="ellipsis"
42
                   name="ellipsis"
43
-                  @click="newShow = true"
43
+                  @click="Delete(item.groupno, index)"
44
                 />
44
                 />
45
               </div>
45
               </div>
46
 
46
 
181
         :actions="actions"
181
         :actions="actions"
182
         cancel-text="取消"
182
         cancel-text="取消"
183
         @cancel="onCancel"
183
         @cancel="onCancel"
184
+        @select="toDelete"
184
       />
185
       />
185
     </div>
186
     </div>
186
   </div>
187
   </div>
187
 </template>
188
 </template>
188
 
189
 
189
 <script>
190
 <script>
190
-import { getDoctorAdvices, getPatientDetail } from "@/api/patient/patient";
191
+import {
192
+  getDoctorAdvices,
193
+  getPatientDetail,
194
+  DeleteManagement
195
+} from "@/api/patient/patient";
191
 import { uParseTime } from "@/utils/tools";
196
 import { uParseTime } from "@/utils/tools";
197
+import { Dialog } from "vant";
192
 const moment = require("moment");
198
 const moment = require("moment");
193
 export default {
199
 export default {
194
   props: {
200
   props: {
226
       doctorAdvice: [],
232
       doctorAdvice: [],
227
       childList: [],
233
       childList: [],
228
       patient_id: "",
234
       patient_id: "",
229
-      doctor: []
235
+      doctor: [],
236
+      id: 0,
237
+      index: 0
230
     };
238
     };
231
   },
239
   },
232
   methods: {
240
   methods: {
314
           });
322
           });
315
           // console.log(dataInfo);
323
           // console.log(dataInfo);
316
           let list = Object.values(dataInfo); // list 转换成功的数据
324
           let list = Object.values(dataInfo); // list 转换成功的数据
325
+          console.log("list", list);
317
           let arr = [];
326
           let arr = [];
318
           list.map(item => {
327
           list.map(item => {
319
             // console.log(item.child);
328
             // console.log(item.child);
396
           return this.doctor[i].name;
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
   created() {
437
   created() {

+ 30 - 8
src/pages/doctorAdvice/components/LongDialysis.vue View File

17
       </div>
17
       </div>
18
 
18
 
19
       <div class="adviceBox" v-show="showOne">
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
             <div class="adviceTitle">
31
             <div class="adviceTitle">
23
               <p>{{ getTime(item.created_time) }}</p>
32
               <p>{{ getTime(item.created_time) }}</p>
24
               <van-icon
33
               <van-icon
25
                 class="ellipsis"
34
                 class="ellipsis"
26
                 name="ellipsis"
35
                 name="ellipsis"
27
-                @click="toLongDialysis(item.id, item.index)"
36
+                @click="toLongDialysis(item.id, index)"
28
               />
37
               />
29
             </div>
38
             </div>
30
             <div class="orderContent">
39
             <div class="orderContent">
31
               <p>透析模式:{{ item.mode_id }}</p>
40
               <p>透析模式:{{ item.mode_id }}</p>
32
               <p>
41
               <p>
33
                 透析时长:{{ item.dialysis_duration_hour }}h{{
42
                 透析时长:{{ item.dialysis_duration_hour }}h{{
34
-                item.dialysis_duration_minute
43
+                  item.dialysis_duration_minute
35
                 }}min
44
                 }}min
36
               </p>
45
               </p>
37
               <p>血流量(ml/min):{{ item.blood_flow_volume }}</p>
46
               <p>血流量(ml/min):{{ item.blood_flow_volume }}</p>
91
               <p>体液过多其他症状:{{ item.body_fluid_other }}</p>
100
               <p>体液过多其他症状:{{ item.body_fluid_other }}</p>
92
               <p>
101
               <p>
93
                 透析前使用特殊药物:{{
102
                 透析前使用特殊药物:{{
94
-                getSpecialMedicine(item.special_medicine)
103
+                  getSpecialMedicine(item.special_medicine)
95
                 }}
104
                 }}
96
               </p>
105
               </p>
97
               <p>使用其他特殊药物:{{ item.special_medicine_other }}</p>
106
               <p>使用其他特殊药物:{{ item.special_medicine_other }}</p>
118
 
127
 
119
     <!-- 弹出层 -->
128
     <!-- 弹出层 -->
120
     <div>
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
       </van-popup>
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
         <van-datetime-picker
147
         <van-datetime-picker
126
           v-model="currentDate"
148
           v-model="currentDate"
127
           type="date"
149
           type="date"

+ 238 - 19
src/pages/patients/addPatient.vue View File

9
     </van-sticky>
9
     </van-sticky>
10
     <div class="basicTitle">基本信息</div>
10
     <div class="basicTitle">基本信息</div>
11
     <div class="basicBox">
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
       <van-field
18
       <van-field
14
         label="性别"
19
         label="性别"
15
         v-model="patientForm.sex"
20
         v-model="patientForm.sex"
20
         @click="show = true"
25
         @click="show = true"
21
       />
26
       />
22
       <van-popup v-model="show" position="bottom" :style="{ height: '40%' }">
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
       </van-popup>
34
       </van-popup>
35
+
25
       <van-field
36
       <van-field
26
         v-model="patientForm.idCard"
37
         v-model="patientForm.idCard"
27
         required
38
         required
29
         @blur="checkIdCardNo"
40
         @blur="checkIdCardNo"
30
         placeholder="请输入"
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
       <van-field
50
       <van-field
34
         v-model="patientForm.phone"
51
         v-model="patientForm.phone"
35
         type="tel"
52
         type="tel"
56
     <div v-show="bloodShow">
73
     <div v-show="bloodShow">
57
       <div class="basicTitle">血透信息</div>
74
       <div class="basicTitle">血透信息</div>
58
       <div class="xtBox">
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
         </van-field>
90
         </van-field>
62
 
91
 
63
         <van-field
92
         <van-field
69
           placeholder="请选择"
98
           placeholder="请选择"
70
           @click="show10 = true"
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
         </van-popup>
112
         </van-popup>
75
 
113
 
76
         <van-field
114
         <van-field
83
           @click="show9 = true"
121
           @click="show9 = true"
84
         />
122
         />
85
         <van-popup v-model="show9" position="bottom" :style="{ height: '40%' }">
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
         </van-popup>
130
         </van-popup>
88
 
131
 
89
         <van-cell>
132
         <van-cell>
144
     <div v-show="slowShow">
187
     <div v-show="slowShow">
145
       <div class="basicTitle">慢病信息</div>
188
       <div class="basicTitle">慢病信息</div>
146
       <div class="xtBox">
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
         <van-cell>
196
         <van-cell>
150
           <!-- 使用 title 插槽来自定义标题 -->
197
           <!-- 使用 title 插槽来自定义标题 -->
211
           placeholder="请选择"
258
           placeholder="请选择"
212
           @click="show14 = true"
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
         </van-popup>
272
         </van-popup>
217
         <van-field
273
         <van-field
218
           label="治疗方式"
274
           label="治疗方式"
222
           placeholder="请选择"
278
           placeholder="请选择"
223
           @click="show13 = true"
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
         </van-popup>
292
         </van-popup>
228
       </div>
293
       </div>
229
     </div>
294
     </div>
335
   },
400
   },
336
   methods: {
401
   methods: {
337
     onChange(picker, value, index) {
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
       this.show = false;
413
       this.show = false;
340
     },
414
     },
341
     onChangeOne(picker, value, index) {
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
       this.show10 = false;
426
       this.show10 = false;
344
     },
427
     },
345
     onChangeTwo(picker, value, index) {
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
       this.show9 = false;
439
       this.show9 = false;
348
     },
440
     },
349
     onChangeThree(picker, value, index) {
441
     onChangeThree(picker, value, index) {
359
       this.show12 = false;
451
       this.show12 = false;
360
     },
452
     },
361
     onChangeSix(picker, value, index) {
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
       this.show14 = false;
504
       this.show14 = false;
364
     },
505
     },
365
     onChangeSeven(picker, value, index) {
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
       this.show13 = false;
529
       this.show13 = false;
368
     },
530
     },
369
     onChange1(picker, value, index) {
531
     onChange1(picker, value, index) {
588
         return false;
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
       if (this.resultTwo.length === 0) {
768
       if (this.resultTwo.length === 0) {
592
         this.patientForm.is_infectious = 1;
769
         this.patientForm.is_infectious = 1;
593
       }
770
       }
602
         this.patientForm.treatmentMethod = 0;
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
       if (this.patientForm.treatmentMethod === "西医治疗") {
825
       if (this.patientForm.treatmentMethod === "西医治疗") {
606
         this.patientForm.treatmentMethod = 1;
826
         this.patientForm.treatmentMethod = 1;
607
       }
827
       }
711
           this.$router.push({ path: "/patients" });
931
           this.$router.push({ path: "/patients" });
712
         } else {
932
         } else {
713
           this.$toast("手机号码已存在");
933
           this.$toast("手机号码已存在");
714
-          console.log("性别", this.patientForm.sex);
715
           if (this.patientForm.sex === 1) {
934
           if (this.patientForm.sex === 1) {
716
             this.patientForm.sex = "男";
935
             this.patientForm.sex = "男";
717
           }
936
           }