XMLWAN 4 年 前
コミット
b684e7ca05
共有4 個のファイルを変更した171 個の追加39 個の削除を含む
  1. 8 0
      src/api/patient/patient.js
  2. 140 33
      src/pages/doctorAdvice/components/DoctorManagement.vue
  3. 17 6
      src/pages/doctorAdvice/index.vue
  4. 6 0
      src/router/index.js

+ 8 - 0
src/api/patient/patient.js ファイルの表示

@@ -432,3 +432,11 @@ export function getDialysisRecord(id, limit, page, startime, endtime, dislysType
432 432
     params: params
433 433
   })
434 434
 }
435
+
436
+export function GetDoctorAdviceDetail(id, params) {
437
+  return request({
438
+    url: '/m/api/patient/getdoctoradvicedetail?id=' + id,
439
+    method: 'get',
440
+    params: params
441
+  })
442
+}

+ 140 - 33
src/pages/doctorAdvice/components/DoctorManagement.vue ファイルの表示

@@ -23,60 +23,106 @@
23 23
       </div>
24 24
 
25 25
       <div class="adviceBox" v-show="showOne">
26
-        <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
27
-          <div class="adviceOne" v-for="(item, index) in doctorAdvice" :key="index">
26
+        <van-list
27
+          v-model="loading"
28
+          :finished="finished"
29
+          finished-text="没有更多了"
30
+          @load="onLoad"
31
+        >
32
+          <div
33
+            class="adviceOne"
34
+            v-for="(item, index) in doctorAdvice"
35
+            :key="index"
36
+          >
28 37
             <div v-for="(it, i) in item.child" :key="i">
29 38
               <div class="adviceTitle" v-if="it.advice_date">
30 39
                 <p>{{ it.advice_date ? getTime(it.advice_date) : "" }}</p>
31
-                <van-icon class="ellipsis" name="ellipsis" @click="newShow = true" />
40
+                <van-icon
41
+                  class="ellipsis"
42
+                  name="ellipsis"
43
+                  @click="newShow = true"
44
+                />
32 45
               </div>
33 46
 
34
-              <div class="statOrder" v-if="it.advice_type == 1 && it.parent_id == 0">
47
+              <div
48
+                class="statOrder"
49
+                v-if="it.advice_type == 1 && it.parent_id == 0"
50
+              >
35 51
                 <div class="statOrderTitle">
36 52
                   <span>长期医嘱</span>
37 53
                   <span style="margin-left:1rem">
38
-                    {{
39
-                    getTimes(it.created_time)
40
-                    }}
54
+                    {{ getTimes(it.start_time) }}
41 55
                   </span>
42 56
                 </div>
43 57
                 <div class="orderContent">
44 58
                   <p v-if="it.parent_id === 0">
45
-                    {{ it.advice_name }} 单次用量 {{ it.advice_desc
46
-                    }}{{ it.drug_spec_unit }} 静脉注射
59
+                    {{ it.advice_name }} {{ it.advice_desc
60
+                    }}{{ it.drug_spec_unit }} {{ it.prescribing_number
61
+                    }}{{ it.prescribing_number_unit }} {{ it.single_dose
62
+                    }}{{ it.single_dose_unit }} {{ it.delivery_way }}
63
+                    {{ it.execution_frequency }}
47 64
                   </p>
48
-                  <div v-for="(i,index) in childList" :key="index">
49
-                    <p v-if="i.parent_id == it.id">▲ {{ i.advice_name }} 单次用量 1g</p>
65
+                  <div v-for="(i, index) in childList" :key="index">
66
+                    <p v-if="i.parent_id == it.id">
67
+                      ▲ {{ i.advice_name }} {{ i.advice_desc
68
+                      }}{{ i.drug_spec_unit }} {{ i.prescribing_number
69
+                      }}{{ i.prescribing_number_unit }} {{ i.single_dose
70
+                      }}{{ i.single_dose_unit }}
71
+                      {{ i.delivery_way }}
72
+                      {{ i.execution_frequency }}
73
+                    </p>
50 74
                   </div>
51 75
                 </div>
52 76
                 <div class="doctorBox">
53 77
                   <p>开嘱医生:{{ it.user_name }}</p>
54
-                  <p>执行护士:欧巧漫</p>
55
-                  <p>核对护士:钱多多</p>
78
+                  <p>执行护士:{{ getDoctor(it.execution_staff) }}</p>
79
+                  <p>核对护士:{{ getDoctor(it.checker) }}</p>
56 80
                 </div>
57 81
               </div>
58 82
 
59
-              <div class="statOrder" v-if="it.advice_type == 3">
83
+              <div
84
+                class="statOrder"
85
+                v-if="it.advice_type == 3 && it.parent_id == 0"
86
+              >
60 87
                 <div class="longOrderTitle">
61 88
                   <span>临时医嘱</span>
62 89
                   <span style="margin-left:1rem">
63
-                    {{
64
-                    getTimes(item.child[0].created_time)
65
-                    }}
90
+                    {{ getTimes(item.child[0].start_time) }}
66 91
                   </span>
67 92
                 </div>
68 93
                 <div class="orderContent">
69
-                  <p>那曲肝素钙注射液 单次用量 3075iu 静脉注射</p>
70
-                  <p>▲ 左卡尼汀注射液 单次用量 1g</p>
94
+                  <p>
95
+                    {{ it.advice_name }} {{ it.advice_desc
96
+                    }}{{ it.drug_spec_unit }} {{ it.prescribing_number
97
+                    }}{{ it.prescribing_number_unit }} {{ it.single_dose
98
+                    }}{{ it.single_dose_unit }} {{ it.delivery_way }}
99
+                    {{ it.execution_frequency }}
100
+                  </p>
101
+
102
+                  <div v-for="(i, index) in childList" :key="index">
103
+                    <p v-if="i.parent_id == it.id">
104
+                      ▲ {{ i.advice_name }} {{ i.advice_desc
105
+                      }}{{ i.drug_spec_unit }} {{ i.prescribing_number
106
+                      }}{{ i.prescribing_number_unit }} {{ i.single_dose
107
+                      }}{{ i.single_dose_unit }}
108
+                      {{ i.delivery_way }}
109
+                      {{ i.execution_frequency }}
110
+                    </p>
111
+                  </div>
71 112
                 </div>
72 113
                 <div class="doctorBox">
73
-                  <p>开嘱医生:效益</p>
74
-                  <p>执行护士:欧巧漫</p>
75
-                  <p>核对护士:钱多多</p>
114
+                  <p>开嘱医生:{{ it.user_name }}</p>
115
+                  <p>执行护士:{{ getDoctor(it.execution_staff) }}</p>
116
+                  <p>核对护士:{{ getDoctor(it.checker) }}</p>
76 117
                 </div>
77 118
               </div>
78 119
             </div>
79
-            <div class="all">全部</div>
120
+            <div
121
+              class="all"
122
+              @click="toDoctorAdviceDetail(item.child[0].groupno)"
123
+            >
124
+              全部
125
+            </div>
80 126
           </div>
81 127
         </van-list>
82 128
       </div>
@@ -93,11 +139,24 @@
93 139
 
94 140
     <!-- 弹出层 -->
95 141
     <div>
96
-      <van-popup v-model="typeShow" position="bottom" :style="{ height: '40%' }">
97
-        <van-picker show-toolbar :columns="columns" @cancel="onCancel" @confirm="onConfirm" />
142
+      <van-popup
143
+        v-model="typeShow"
144
+        position="bottom"
145
+        :style="{ height: '40%' }"
146
+      >
147
+        <van-picker
148
+          show-toolbar
149
+          :columns="columns"
150
+          @cancel="onCancel"
151
+          @confirm="onConfirm"
152
+        />
98 153
       </van-popup>
99 154
 
100
-      <van-popup v-model="startShow" position="bottom" :style="{ height: '40%' }">
155
+      <van-popup
156
+        v-model="startShow"
157
+        position="bottom"
158
+        :style="{ height: '40%' }"
159
+      >
101 160
         <van-datetime-picker
102 161
           v-model="currentDate"
103 162
           type="date"
@@ -117,7 +176,12 @@
117 176
           @cancel="endShow = false"
118 177
         />
119 178
       </van-popup>
120
-      <van-action-sheet v-model="newShow" :actions="actions" cancel-text="取消" @cancel="onCancel" />
179
+      <van-action-sheet
180
+        v-model="newShow"
181
+        :actions="actions"
182
+        cancel-text="取消"
183
+        @cancel="onCancel"
184
+      />
121 185
     </div>
122 186
   </div>
123 187
 </template>
@@ -127,10 +191,12 @@ import { getDoctorAdvices, getPatientDetail } from "@/api/patient/patient";
127 191
 import { uParseTime } from "@/utils/tools";
128 192
 const moment = require("moment");
129 193
 export default {
194
+  props: {
195
+    active: Number
196
+  },
130 197
   data() {
131 198
     return {
132 199
       loading: false,
133
-      onLoad: false,
134 200
       finished: false,
135 201
       newShow: false,
136 202
       typeShow: false,
@@ -158,7 +224,9 @@ export default {
158 224
       showOne: true,
159 225
       showTwo: false,
160 226
       doctorAdvice: [],
161
-      childList: []
227
+      childList: [],
228
+      patient_id: "",
229
+      doctor: []
162 230
     };
163 231
   },
164 232
   methods: {
@@ -224,7 +292,6 @@ export default {
224 292
         if (response.data.state === 1) {
225 293
           var advice = response.data.data.advice;
226 294
           // this.doctorAdvice = advice;
227
-          console.log("医嘱", advice);
228 295
           let objarr = [];
229 296
           for (let i = 0; i < advice.length; i++) {
230 297
             if (advice[i].parent_id != 0) {
@@ -232,9 +299,8 @@ export default {
232 299
             }
233 300
           }
234 301
           this.childList = objarr;
235
-          console.log("objaa", objarr);
236 302
           var total = response.data.data.total;
237
-          // console.log("总计", total);
303
+          this.total = total;
238 304
           let dataInfo = {};
239 305
           advice.forEach((item, index) => {
240 306
             let { groupno } = item;
@@ -248,7 +314,6 @@ export default {
248 314
           });
249 315
           // console.log(dataInfo);
250 316
           let list = Object.values(dataInfo); // list 转换成功的数据
251
-          // console.log(list);
252 317
           let arr = [];
253 318
           list.map(item => {
254 319
             // console.log(item.child);
@@ -263,8 +328,13 @@ export default {
263 328
               });
264 329
             }
265 330
           });
331
+
332
+          var doctor = response.data.data.doctor;
333
+          this.doctor = doctor;
334
+          console.log("医生", doctor);
266 335
           console.log("list", list);
267 336
           this.doctorAdvice = list;
337
+          this.loading = false;
268 338
         }
269 339
       });
270 340
     },
@@ -290,12 +360,49 @@ export default {
290 360
     },
291 361
     getTimes(time) {
292 362
       return uParseTime(time, "{h}:{i}");
363
+    },
364
+    onLoad() {
365
+      setTimeout(() => {
366
+        this.page++;
367
+        if (this.page <= Math.ceil(this.total / 10)) {
368
+          this.getDoctorAdvices(
369
+            this.patient_id,
370
+            this.form.type,
371
+            this.startTime,
372
+            this.endTimes,
373
+            this.form.limit,
374
+            this.form.page
375
+          );
376
+        } else {
377
+          this.loading = false;
378
+          this.finished = true;
379
+        }
380
+      }, 1000);
381
+    },
382
+    toDoctorAdviceDetail(id) {
383
+      var patientid = this.$route.query.patientid;
384
+      this.$router.push(
385
+        "/alldoctoradvice?id=" +
386
+          id +
387
+          "&patientid=" +
388
+          patientid +
389
+          "&active=" +
390
+          this.active
391
+      );
392
+    },
393
+    getDoctor(id) {
394
+      for (let i = 0; i < this.doctor.length; i++) {
395
+        if ((this.doctor[i].admin_user_id = id)) {
396
+          return this.doctor[i].name;
397
+        }
398
+      }
293 399
     }
294 400
   },
295 401
   created() {
296 402
     var patientid = this.$route.query.patientid;
297 403
     this.getDoctorAdvices(patientid);
298 404
     this.getPatientDetail(patientid);
405
+    this.patient_id = patientid;
299 406
   },
300 407
   watch: {
301 408
     $route(to, from) {

+ 17 - 6
src/pages/doctorAdvice/index.vue ファイルの表示

@@ -15,13 +15,16 @@
15 15
         </div>
16 16
       </van-sticky>
17 17
       <van-tab title="医嘱">
18
-        <doctor-management :dryId="patient_id"></doctor-management>
18
+        <doctor-management
19
+          :dryId="patient_id"
20
+          :active="active"
21
+        ></doctor-management>
19 22
       </van-tab>
20 23
       <van-tab title="长期透析处方">
21
-        <long-dialysis></long-dialysis>
24
+        <long-dialysis :active="active"></long-dialysis>
22 25
       </van-tab>
23 26
       <van-tab title="透析记录">
24
-        <dialysis-record></dialysis-record>
27
+        <dialysis-record :active="active"></dialysis-record>
25 28
       </van-tab>
26 29
       <van-tab title="干体重">
27 30
         <dry-weight :active="active" :dryId="patient_id"></dry-weight>
@@ -71,7 +74,10 @@
71 74
       </van-tab>-->
72 75
     </van-tabs>
73 76
     <van-popup v-model="show" position="top" :style="{ height: '100%' }">
74
-      <div style="padding:10px;font-size:1.25rem;text-align:right" @click="show = false">
77
+      <div
78
+        style="padding:10px;font-size:1.25rem;text-align:right"
79
+        @click="show = false"
80
+      >
75 81
         <van-icon name="cross" />
76 82
       </div>
77 83
       <van-search
@@ -98,7 +104,10 @@
98 104
     </van-popup>
99 105
 
100 106
     <van-popup v-model="show1" position="top" :style="{ height: '40%' }">
101
-      <div style="padding:10px;font-size:1.25rem;text-align:right" @click="show1 = false">
107
+      <div
108
+        style="padding:10px;font-size:1.25rem;text-align:right"
109
+        @click="show1 = false"
110
+      >
102 111
         <van-icon name="cross" />
103 112
       </div>
104 113
       <div class="titleBox">
@@ -107,7 +116,9 @@
107 116
           v-for="(item, index) in title"
108 117
           :key="index"
109 118
           @click="changeActive(index)"
110
-        >{{ item }}</div>
119
+        >
120
+          {{ item }}
121
+        </div>
111 122
       </div>
112 123
     </van-popup>
113 124
   </div>

+ 6 - 0
src/router/index.js ファイルの表示

@@ -131,6 +131,12 @@ export default new Router({
131 131
       name: 'longdialysis',
132 132
       component: () => import('@/pages/allLongDialysis/index')
133 133
     },
134
+    //, 
135
+    {
136
+      path: '/alldoctoradvice',
137
+      name: '/alldoctoradvice',
138
+      component: () => import('@/pages/allDoctorAdvice/index')
139
+    },
134 140
     {
135 141
       path: '/product',
136 142
       name: 'Product',