XMLWAN 4 年前
父节点
当前提交
4308079b25

+ 35 - 0
src/api/patient/patient.js 查看文件

@@ -321,3 +321,38 @@ export function getEducationDetail(id, params) {
321 321
     params: params
322 322
   })
323 323
 }
324
+
325
+export function DeleteEducationOne(id, params) {
326
+  return request({
327
+    url: '/m/api/patient/deleteeductionone?id=' + id,
328
+    method: 'delete',
329
+    params: params
330
+  })
331
+}
332
+
333
+export function getRescueRecordDetail(id, params) {
334
+  return request({
335
+    url: '/m/api/patient/getrescuerecorddetail?id=' + id,
336
+    method: 'get',
337
+    params: params
338
+  })
339
+}
340
+
341
+export function DeleteRescueRecord(id, params) {
342
+  return request({
343
+    url: '/m/api/patient/deleterescuerecord?id=' + id,
344
+    method: 'delete',
345
+    params: params
346
+  })
347
+}
348
+
349
+export function toSearchPatient(keyword) {
350
+  const params = {
351
+    keyword: keyword
352
+  }
353
+  return request({
354
+    url: '/m/api/patient/tosearchepatient',
355
+    method: 'get',
356
+    params: params
357
+  })
358
+}

+ 68 - 27
src/pages/allRescue/index.vue 查看文件

@@ -2,39 +2,80 @@
2 2
   <div class="page_allRescue">
3 3
     <van-sticky>
4 4
       <div class="allRescueTitle">
5
-        <i class="iconfont icon-zuojiantou jiantou"></i>
5
+        <i class="iconfont icon-zuojiantou jiantou" @click="toReturn"></i>
6 6
         <span class="titleName">张三的抢救记录</span>
7 7
       </div>
8 8
     </van-sticky>
9 9
     <div class="courseBox">
10 10
       <div class="courseOne">
11 11
         <div class="statOrder">
12
-          <p class="time">2019.01.01</p>
13
-          <div class="statOrderTitle">
14
-            <span>抢救记录</span>
15
-          </div>
12
+          <p class="time">{{ getTime(recorddetail.record_time) }}</p>
16 13
           <div class="orderContent">
17 14
             <p>
18
-              病历书写基本规范2010》第二十二条规定:“病程记录
19
-              是指继入院记录之后,对患者病情和诊疗过程所进行的
20
-              连续性记录。内容包括患病历书写基本规范2010》第二十二条规定:“病程记录
21
-              是指继入院记录之后,对患者病情和诊疗过程所进行的
22
-              连续性记录。内容包括患
15
+              {{ recorddetail.content }}
23 16
             </p>
24 17
           </div>
25 18
           <div class="doctorBox">
26
-            <p>记录医生:钱蛮子</p>
19
+            <p>记录医生:{{ recorddetail.user_name }}</p>
27 20
           </div>
28 21
         </div>
29 22
       </div>
30 23
     </div>
31 24
   </div>
32 25
 </template>
33
-
26
+<script>
27
+import { getRescueRecordDetail } from "@/api/patient/patient";
28
+import { uParseTime } from "@/utils/tools";
29
+import { setRem, setHeight } from "@/libs/functionRem";
30
+import "../../styles/resetStyle.scss";
31
+export default {
32
+  props: {
33
+    active: Number
34
+  },
35
+  data() {
36
+    return {
37
+      patientid: 0,
38
+      active: 0,
39
+      recorddetail: {}
40
+    };
41
+  },
42
+  methods: {
43
+    getRescueRecordDetail(id) {
44
+      getRescueRecordDetail(id).then(response => {
45
+        if (response.data.state === 1) {
46
+          var recorddetail = response.data.data.recordDetail;
47
+          this.recorddetail = recorddetail;
48
+          console.log("记录详情", recorddetail);
49
+        }
50
+      });
51
+    },
52
+    toReturn() {
53
+      this.$router.push(
54
+        "/patientdetail?patientid=" + this.patientid + "&active=" + this.active
55
+      );
56
+    },
57
+    getTime(time) {
58
+      // return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
59
+      return uParseTime(time, "{y}-{m}-{d}");
60
+    }
61
+  },
62
+  created() {
63
+    this.active = parseInt(this.$route.query.active);
64
+    setRem();
65
+    setHeight();
66
+    var id = this.$route.query.id;
67
+    console.log("id", id);
68
+    var patientid = this.$route.query.patientid;
69
+    this.patientid = patientid;
70
+    console.log("patientid", patientid);
71
+    this.getRescueRecordDetail(id);
72
+  }
73
+};
74
+</script>
34 75
 <style lang="scss" scoped>
35
-  .page_allRescue {
36
-    height: 100%;
37
-    overflow-y: auto;
76
+.page_allRescue {
77
+  height: 100%;
78
+  overflow-y: auto;
38 79
   .allRescueTitle {
39 80
     background: #fff;
40 81
     padding: 0 1.125rem;
@@ -58,11 +99,11 @@
58 99
   .courseOne {
59 100
     box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.1);
60 101
     padding-bottom: 1.25rem;
61
-  .time {
62
-    font-size: 1.125rem;
63
-    margin-top: 0.625rem;
64
-    font-weight: bold;
65
-  }
102
+    .time {
103
+      font-size: 1.125rem;
104
+      margin-top: 0.625rem;
105
+      font-weight: bold;
106
+    }
66 107
   }
67 108
   .statOrderTitle {
68 109
     color: #5b98ff;
@@ -73,9 +114,9 @@
73 114
   .orderContent {
74 115
     font-size: 0.875rem;
75 116
     color: rgba(49, 50, 52, 1);
76
-  p {
77
-    line-height: 1.125rem;
78
-  }
117
+    p {
118
+      line-height: 1.125rem;
119
+    }
79 120
   }
80 121
   .doctorBox {
81 122
     font-size: 0.75rem;
@@ -86,8 +127,8 @@
86 127
     justify-content: space-between;
87 128
     margin-top: 0.625rem;
88 129
   }
89
-  }
90
-  ::-webkit-scrollbar {
91
-    width: 0;
92
-  }
130
+}
131
+::-webkit-scrollbar {
132
+  width: 0;
133
+}
93 134
 </style>

+ 36 - 4
src/pages/doctorAdvice/components/Education.vue 查看文件

@@ -32,7 +32,7 @@
32 32
               <van-icon
33 33
                 class="ellipsis"
34 34
                 name="ellipsis"
35
-                @click="newShow = true"
35
+                @click="toDeleteEducation(item.id, item.index)"
36 36
               />
37 37
             </div>
38 38
             <div class="statOrder">
@@ -87,14 +87,18 @@
87 87
         v-model="newShow"
88 88
         :actions="actions"
89 89
         cancel-text="取消"
90
-        @cancel="onCancel"
90
+        @select="DeleteEducation"
91 91
       />
92 92
     </div>
93 93
   </div>
94 94
 </template>
95 95
 
96 96
 <script>
97
-import { getPatientDetail, getEducation } from "@/api/patient/patient";
97
+import {
98
+  getPatientDetail,
99
+  getEducation,
100
+  DeleteEducationOne
101
+} from "@/api/patient/patient";
98 102
 import { uParseTime } from "@/utils/tools";
99 103
 import Vue from "vue";
100 104
 import { Dialog } from "vant";
@@ -125,7 +129,9 @@ export default {
125 129
       finished: false,
126 130
       list: [],
127 131
       Education: [],
128
-      patient_id: ""
132
+      patient_id: "",
133
+      id: 0,
134
+      index: 0
129 135
     };
130 136
   },
131 137
   methods: {
@@ -242,6 +248,32 @@ export default {
242 248
           "&active=" +
243 249
           this.active
244 250
       );
251
+    },
252
+    toDeleteEducation(id, index) {
253
+      this.id = id;
254
+      this.index = index;
255
+      this.newShow = true;
256
+    },
257
+    DeleteEducation(value) {
258
+      console.log("value", value);
259
+      if (value.name == "删除") {
260
+        this.DeleteEducationOne(this.id, this.index);
261
+      }
262
+    },
263
+    DeleteEducationOne(id, index) {
264
+      Dialog.confirm({
265
+        title: "删除提示!",
266
+        message: "确认删除该条信息吗?,删除后将无法恢复!"
267
+      }).then(() => {
268
+        DeleteEducationOne(id).then(response => {
269
+          if (response.data.state === 1) {
270
+            var msg = response.data.data.msg;
271
+            console.log("msg", msg);
272
+            this.Education.splice(index, 1);
273
+            this.newShow = false;
274
+          }
275
+        });
276
+      });
245 277
     }
246 278
   },
247 279
   created() {

+ 51 - 10
src/pages/doctorAdvice/components/RescueRecord.vue 查看文件

@@ -28,18 +28,14 @@
28 28
             :key="index"
29 29
           >
30 30
             <div class="adviceTitle">
31
-              <p>2019.09.01</p>
31
+              <p>{{ getTime(item.record_time) }}</p>
32 32
               <van-icon
33 33
                 class="ellipsis"
34 34
                 name="ellipsis"
35
-                @click="newShow = true"
35
+                @click="toDeleteRescueRecord(item.id, item.index)"
36 36
               />
37 37
             </div>
38 38
             <div class="statOrder">
39
-              <div class="statOrderTitle">
40
-                <span>日常抢救</span>
41
-              </div>
42
-
43 39
               <div class="orderContent">
44 40
                 <p>
45 41
                   <span v-html="item.content"></span>
@@ -49,7 +45,7 @@
49 45
                 <p>记录医生:{{ item.user_name }}</p>
50 46
               </div>
51 47
             </div>
52
-            <div class="all">全部</div>
48
+            <div class="all" @click="toRescueRecord(item.id)">全部</div>
53 49
           </div>
54 50
         </van-list>
55 51
       </div>
@@ -93,19 +89,26 @@
93 89
         v-model="newShow"
94 90
         :actions="actions"
95 91
         cancel-text="取消"
96
-        @cancel="onCancel"
92
+        @select="Delete"
97 93
       />
98 94
     </div>
99 95
   </div>
100 96
 </template>
101 97
 
102 98
 <script>
103
-import { getPatientDetail, getRescueRecord } from "@/api/patient/patient";
99
+import {
100
+  getPatientDetail,
101
+  getRescueRecord,
102
+  DeleteRescueRecord
103
+} from "@/api/patient/patient";
104 104
 import { uParseTime } from "@/utils/tools";
105 105
 import Vue from "vue";
106 106
 import { Dialog } from "vant";
107 107
 const moment = require("moment");
108 108
 export default {
109
+  props: {
110
+    active: Number
111
+  },
109 112
   data() {
110 113
     return {
111 114
       newShow: false,
@@ -128,7 +131,9 @@ export default {
128 131
       finished: false,
129 132
       rescueRecords: [],
130 133
       patient_id: 0,
131
-      list: []
134
+      list: [],
135
+      id: 0,
136
+      index: 0
132 137
     };
133 138
   },
134 139
   methods: {
@@ -233,6 +238,42 @@ export default {
233 238
     getTime(time) {
234 239
       // return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
235 240
       return uParseTime(time, "{y}-{m}-{d}");
241
+    },
242
+    toRescueRecord(id) {
243
+      var patientid = this.$route.query.patientid;
244
+      this.$router.push(
245
+        "/rescuerecord?id=" +
246
+          id +
247
+          "&patientid=" +
248
+          patientid +
249
+          "&active=" +
250
+          this.active
251
+      );
252
+    },
253
+    toDeleteRescueRecord(id, index) {
254
+      this.id = id;
255
+      this.index = index;
256
+      this.newShow = true;
257
+    },
258
+    Delete(value) {
259
+      if (value.name == "删除") {
260
+        this.DeleteRescueRecord(this.id, this.index);
261
+      }
262
+    },
263
+    DeleteRescueRecord(id, index) {
264
+      Dialog.confirm({
265
+        title: "删除提示!",
266
+        message: "确认删除该条信息吗?,删除后将无法恢复!"
267
+      }).then(() => {
268
+        DeleteRescueRecord(id).then(response => {
269
+          if (response.data.state === 1) {
270
+            var msg = response.data.data.msg;
271
+            console.log("msg", msg);
272
+            this.rescueRecords.splice(index, 1);
273
+            this.newShow = false;
274
+          }
275
+        });
276
+      });
236 277
     }
237 278
   },
238 279
   created() {

+ 1 - 1
src/pages/doctorAdvice/index.vue 查看文件

@@ -24,7 +24,7 @@
24 24
           v-if="active == 5"
25 25
           :active="active"
26 26
         ></course-management>
27
-        <rescue-record v-if="active == 6"></rescue-record>
27
+        <rescue-record v-if="active == 6" :active="active"></rescue-record>
28 28
         <scheduling v-if="active == 7" :active="active"></scheduling>
29 29
         <education v-if="active == 8" :active="active"></education>
30 30
         <signs-record v-if="active == 9" :active="active"></signs-record>

+ 1 - 1
src/pages/patientManagement/patientManagement.vue 查看文件

@@ -129,7 +129,7 @@ export default {
129 129
         if (this.list.length >= this.total) {
130 130
           this.finished = true;
131 131
         }
132
-      }, 100);
132
+      }, 1000);
133 133
     },
134 134
     getBloodDialysisPatient() {
135 135
       getBloodDialysisPatient(this.page, this.limit).then(response => {

+ 19 - 4
src/pages/search/index.vue 查看文件

@@ -2,7 +2,11 @@
2 2
   <div class="page_search">
3 3
     <div class="header">
4 4
       <i class="iconfont icon-zuojiantou" @click="toHomeIndex"></i>
5
-      <van-search v-model="value" placeholder=" 姓名 / 首拼 / 透析号" />
5
+      <van-search
6
+        v-model="value"
7
+        placeholder=" 姓名 / 首拼 / 透析号"
8
+        @search="toSearchPatient"
9
+      />
6 10
     </div>
7 11
     <div class="searchList">
8 12
       <div class="patientOne">
@@ -54,12 +58,14 @@
54 58
 </template>
55 59
 
56 60
 <script>
57
-// import { SaveSearch } from "@/api/login/login";
61
+import { toSearchPatient } from "@/api/patient/patient";
58 62
 export default {
59 63
   data() {
60 64
     return {
61 65
       searchVal: "",
62
-      active: 0
66
+      active: 0,
67
+      keyword: "",
68
+      value: ""
63 69
     };
64 70
   },
65 71
   methods: {
@@ -71,8 +77,17 @@ export default {
71 77
     },
72 78
     toHomeIndex() {
73 79
       this.$router.push({ path: "/homeIndex" });
80
+    },
81
+    toSearchPatient(val) {
82
+      toSearchPatient(val).then(response => {
83
+        if (response.data.state === 1) {
84
+          var patient = response.data.data.patient;
85
+          console.log("patient", patient);
86
+        }
87
+      });
74 88
     }
75
-  }
89
+  },
90
+  created() {}
76 91
 };
77 92
 </script>
78 93
 

+ 7 - 0
src/router/index.js 查看文件

@@ -104,6 +104,13 @@ export default new Router({
104 104
       name: 'editeducation',
105 105
       component: () => import('@/pages/allEducation/index')
106 106
 
107
+    },
108
+    // 全部抢救记录
109
+    {
110
+      path: '/rescuerecord',
111
+      name: 'rescuerecord',
112
+      component: () => import('@/pages/allRescue/index')
113
+
107 114
     },
108 115
     //
109 116
     {