Sfoglia il codice sorgente

患者中心逻辑

See999 4 anni fa
parent
commit
531284efc7

+ 14 - 40
src/pages/doctorAdvice/components/CourseManagement.vue Vedi File

@@ -16,17 +16,8 @@
16 16
         </div>
17 17
       </div>
18 18
       <div class="adviceBox" v-show="showOne">
19
-        <van-list
20
-          v-model="loading"
21
-          finished-text="没有更多了"
22
-          @load="onLoad"
23
-          :finished="finished"
24
-        >
25
-          <div
26
-            class="adviceOne"
27
-            v-for="(item, index) in this.courseManagement"
28
-            :key="item.id"
29
-          >
19
+        <van-list v-model="loading" finished-text="没有更多了" @load="onLoad" :finished="finished">
20
+          <div class="adviceOne" v-for="(item, index) in this.courseManagement" :key="item.id">
30 21
             <div class="adviceTitle">
31 22
               <p>{{ getTime(item.record_time) }}</p>
32 23
               <van-icon
@@ -64,23 +55,10 @@
64 55
 
65 56
     <!-- 弹出层 -->
66 57
     <div>
67
-      <van-popup
68
-        v-model="typeShow"
69
-        position="bottom"
70
-        :style="{ height: '40%' }"
71
-      >
72
-        <van-picker
73
-          show-toolbar
74
-          :columns="columns"
75
-          @cancel="onCancel"
76
-          @confirm="onConfirm"
77
-        />
58
+      <van-popup v-model="typeShow" position="bottom" :style="{ height: '40%' }">
59
+        <van-picker show-toolbar :columns="columns" @cancel="onCancel" @confirm="onConfirm" />
78 60
       </van-popup>
79
-      <van-popup
80
-        v-model="startShow"
81
-        position="bottom"
82
-        :style="{ height: '40%' }"
83
-      >
61
+      <van-popup v-model="startShow" position="bottom" :style="{ height: '40%' }">
84 62
         <van-datetime-picker
85 63
           v-model="currentDate"
86 64
           type="date"
@@ -213,22 +191,18 @@ export default {
213 191
           var total = response.data.data.total;
214 192
           this.total = total;
215 193
           console.log("总共", total);
194
+          this.loading = false;
216 195
         }
217 196
       });
218 197
     },
219 198
     onLoad() {
220 199
       setTimeout(() => {
221
-        for (let i = 0; i < this.limit; i++) {
222
-          this.list.push(this.list.length + 1);
223
-        }
224
-        // 加载状态结束
225
-        this.loading = false;
226
-        if (this.courseManagement.length > 10) {
227
-          this.page++;
228
-        }
229
-        this.getCourseManagement(this.patientid);
230
-        // 数据全部加载完成
231
-        if (this.list.length >= this.total) {
200
+        this.page++;
201
+        // console.log(this.page)
202
+        if (this.page <= Math.ceil(this.total / 10)) {
203
+          this.getCourseManagement(this.patientid);
204
+        } else {
205
+          this.loading = false;
232 206
           this.finished = true;
233 207
         }
234 208
       }, 1000);
@@ -307,7 +281,7 @@ export default {
307 281
     height: 3.125rem;
308 282
     align-items: center;
309 283
     .toolOne {
310
-      width: 5.625rem;
284
+      width: 6.25rem;
311 285
       height: 1.875rem;
312 286
       background: rgba(246, 246, 246, 1);
313 287
       border-radius: 5px;
@@ -317,7 +291,7 @@ export default {
317 291
       display: flex;
318 292
       align-items: center;
319 293
       justify-content: space-around;
320
-      margin-left: 1.25rem;
294
+      margin-left: 0.8125rem;
321 295
     }
322 296
   }
323 297
   .adviceBox {

+ 7 - 34
src/pages/doctorAdvice/components/DialysisRecord.vue Vedi File

@@ -23,20 +23,11 @@
23 23
       </div>
24 24
 
25 25
       <div class="adviceBox" v-show="showOne">
26
-        <van-list
27
-          v-model="loading"
28
-          :finished="finished"
29
-          finished-text="没有更多了"
30
-          @load="onLoad"
31
-        >
26
+        <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
32 27
           <div class="adviceOne" v-for="item in 3" :key="index">
33 28
             <div class="adviceTitle">
34 29
               <p>2019.09.01</p>
35
-              <van-icon
36
-                class="ellipsis"
37
-                name="ellipsis"
38
-                @click="newShow = true"
39
-              />
30
+              <van-icon class="ellipsis" name="ellipsis" @click="newShow = true" />
40 31
             </div>
41 32
             <div class="orderContent">
42 33
               <p>透析模式:HD</p>
@@ -65,23 +56,10 @@
65 56
 
66 57
     <!-- 弹出层 -->
67 58
     <div>
68
-      <van-popup
69
-        v-model="typeShow"
70
-        position="bottom"
71
-        :style="{ height: '40%' }"
72
-      >
73
-        <van-picker
74
-          show-toolbar
75
-          :columns="columns"
76
-          @cancel="onCancel"
77
-          @confirm="onConfirm"
78
-        />
59
+      <van-popup v-model="typeShow" position="bottom" :style="{ height: '40%' }">
60
+        <van-picker show-toolbar :columns="columns" @cancel="onCancel" @confirm="onConfirm" />
79 61
       </van-popup>
80
-      <van-popup
81
-        v-model="startShow"
82
-        position="bottom"
83
-        :style="{ height: '40%' }"
84
-      >
62
+      <van-popup v-model="startShow" position="bottom" :style="{ height: '40%' }">
85 63
         <van-datetime-picker
86 64
           v-model="currentDate"
87 65
           type="date"
@@ -101,12 +79,7 @@
101 79
           @cancel="endShow = false"
102 80
         />
103 81
       </van-popup>
104
-      <van-action-sheet
105
-        v-model="newShow"
106
-        :actions="actions"
107
-        cancel-text="取消"
108
-        @cancel="onCancel"
109
-      />
82
+      <van-action-sheet v-model="newShow" :actions="actions" cancel-text="取消" @cancel="onCancel" />
110 83
     </div>
111 84
   </div>
112 85
 </template>
@@ -216,7 +189,7 @@ export default {
216 189
     justify-content: space-around;
217 190
     align-items: center;
218 191
     .toolOne {
219
-      width: 5.625rem;
192
+      width: 6.25rem;
220 193
       height: 1.875rem;
221 194
       background: rgba(246, 246, 246, 1);
222 195
       border-radius: 5px;

+ 41 - 35
src/pages/doctorAdvice/components/DryWeight.vue Vedi File

@@ -17,17 +17,8 @@
17 17
       </div>
18 18
 
19 19
       <div class="adviceBox" v-show="showOne">
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 dryweight"
29
-            :key="index"
30
-          >
20
+        <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
21
+          <div class="adviceOne" v-for="(item, index) in dryweight" :key="index">
31 22
             <div class="adviceTitle">
32 23
               <p>{{ getTime(item.ctime) }}</p>
33 24
               <van-icon
@@ -84,7 +75,8 @@ import { Dialog } from "vant";
84 75
 const moment = require("moment");
85 76
 export default {
86 77
   props: {
87
-    active: Number
78
+    active: Number,
79
+    dryId: String
88 80
   },
89 81
   data() {
90 82
     return {
@@ -172,33 +164,45 @@ export default {
172 164
           var total = response.data.data.total;
173 165
           console.log("total", total);
174 166
           this.total = total;
167
+          this.loading = false;
168
+        }
169
+      });
170
+    },
171
+    getDryWeight1(patientid) {
172
+      getDryWeight(
173
+        patientid,
174
+        this.startTime,
175
+        this.endTimes,
176
+        this.limit,
177
+        this.page
178
+      ).then(response => {
179
+        if (response.data.state === 1) {
180
+          var dryweight = response.data.data.dryweight;
181
+          this.dryweight = dryweight;
182
+          console.log("dryweight", dryweight);
183
+          var total = response.data.data.total;
184
+          console.log("total", total);
185
+          this.total = total;
186
+          this.loading = false;
175 187
         }
176 188
       });
177 189
     },
178 190
     onLoad() {
179 191
       setTimeout(() => {
180
-        for (let i = 0; i < this.limit; i++) {
181
-          this.list.push(this.list.length + 1);
182
-        }
183
-        // 加载状态结束
184
-        this.loading = false;
185
-        console.log("长度", this.dryweight.length);
186
-        if (this.dryweight.length > 10) {
187
-          this.page++;
188
-        }
189
-        console.log("page是什么", this.page);
190
-        this.getDryWeight(
191
-          this.patient_id,
192
-          this.startTime,
193
-          this.endTimes,
194
-          this.limit,
195
-          this.page
196
-        );
197
-        // 数据全部加载完成
198
-        if (this.list.length >= this.total) {
192
+        this.page++;
193
+        if (this.page <= Math.ceil(this.total / 10)) {
194
+          this.getDryWeight(
195
+            this.patient_id,
196
+            this.startTime,
197
+            this.endTimes,
198
+            this.limit,
199
+            this.page
200
+          );
201
+        } else {
202
+          this.loading = false;
199 203
           this.finished = true;
200 204
         }
201
-      }, 1);
205
+      }, 3000);
202 206
     },
203 207
     getTime(time) {
204 208
       // return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
@@ -260,8 +264,10 @@ export default {
260 264
     }
261 265
   },
262 266
   created() {
267
+    console.log("created");
268
+    this.loading = true;
263 269
     var patientid = this.$route.query.patientid;
264
-    console.log("干体重id", patientid);
270
+    // console.log("干体重id", patientid);
265 271
     this.getDryWeight(patientid);
266 272
     this.patient_id = patientid;
267 273
     this.getPatientDetail(patientid);
@@ -278,7 +284,7 @@ export default {
278 284
     height: 3.125rem;
279 285
     align-items: center;
280 286
     .toolOne {
281
-      width: 5.625rem;
287
+      width: 6.25rem;
282 288
       height: 1.875rem;
283 289
       background: rgba(246, 246, 246, 1);
284 290
       border-radius: 5px;
@@ -288,7 +294,7 @@ export default {
288 294
       display: flex;
289 295
       align-items: center;
290 296
       justify-content: space-around;
291
-      margin-left: 1.25rem;
297
+      margin-left: 0.8125rem;
292 298
     }
293 299
   }
294 300
   .adviceBox {

+ 20 - 41
src/pages/doctorAdvice/components/Education.vue Vedi File

@@ -16,17 +16,8 @@
16 16
         </div>
17 17
       </div>
18 18
       <div class="adviceBox" v-show="showOne">
19
-        <van-list
20
-          v-model="loading"
21
-          :finished="finished"
22
-          finished-text="没有更多了"
23
-          @load="onLoad"
24
-        >
25
-          <div
26
-            class="adviceOne"
27
-            v-for="(item, index) in Education"
28
-            :key="index"
29
-          >
19
+        <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
20
+          <div class="adviceOne" v-for="(item, index) in Education" :key="index">
30 21
             <div class="adviceTitle">
31 22
               <p>{{ getTime(item.assessment_date) }}</p>
32 23
               <van-icon
@@ -37,9 +28,7 @@
37 28
             </div>
38 29
             <div class="statOrder">
39 30
               <div class="orderContent">
40
-                <p>
41
-                  {{ item.mission }}
42
-                </p>
31
+                <p>{{ item.mission }}</p>
43 32
               </div>
44 33
             </div>
45 34
             <div class="all" @click="toEducationDetail(item.id)">全部</div>
@@ -59,11 +48,7 @@
59 48
 
60 49
     <!-- 弹出层 -->
61 50
     <div>
62
-      <van-popup
63
-        v-model="startShow"
64
-        position="bottom"
65
-        :style="{ height: '40%' }"
66
-      >
51
+      <van-popup v-model="startShow" position="bottom" :style="{ height: '40%' }">
67 52
         <van-datetime-picker
68 53
           v-model="currentDate"
69 54
           type="date"
@@ -206,33 +191,26 @@ export default {
206 191
           var total = response.data.data.total;
207 192
           console.log("total", total);
208 193
           this.total = total;
194
+          this.loading = false;
209 195
         }
210 196
       });
211 197
     },
212 198
     onLoad() {
213 199
       setTimeout(() => {
214
-        for (let i = 0; i < this.limit; i++) {
215
-          this.list.push(this.list.length + 1);
216
-        }
217
-        // 加载状态结束
218
-        this.loading = false;
219
-        console.log("长度", this.Education.length);
220
-        if (this.Education.length > 10) {
221
-          this.page++;
222
-        }
223
-        console.log("page是什么", this.page);
224
-        this.getEducation(
225
-          this.patient_id,
226
-          this.limit,
227
-          this.page,
228
-          this.startTime,
229
-          this.endTime
230
-        );
231
-        // 数据全部加载完成
232
-        if (this.list.length >= this.total) {
200
+        this.page++;
201
+        if (this.page <= Math.ceil(this.total / 10)) {
202
+          this.getEducation(
203
+            this.patient_id,
204
+            this.limit,
205
+            this.page,
206
+            this.startTime,
207
+            this.endTime
208
+          );
209
+        } else {
210
+          this.loading = false;
233 211
           this.finished = true;
234 212
         }
235
-      }, 1);
213
+      }, 3000);
236 214
     },
237 215
     getTime(time) {
238 216
       // return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
@@ -277,6 +255,7 @@ export default {
277 255
     }
278 256
   },
279 257
   created() {
258
+    this.loading = true;
280 259
     var patientid = this.$route.query.patientid;
281 260
     this.getPatientDetail(patientid);
282 261
     this.getEducation(patientid);
@@ -294,7 +273,7 @@ export default {
294 273
     height: 3.125rem;
295 274
     align-items: center;
296 275
     .toolOne {
297
-      width: 5.625rem;
276
+      width: 6.25rem;
298 277
       height: 1.875rem;
299 278
       background: rgba(246, 246, 246, 1);
300 279
       border-radius: 5px;
@@ -304,7 +283,7 @@ export default {
304 283
       display: flex;
305 284
       align-items: center;
306 285
       justify-content: space-around;
307
-      margin-left: 1.25rem;
286
+      margin-left: 0.8125rem;
308 287
     }
309 288
   }
310 289
   .adviceBox {

+ 7 - 34
src/pages/doctorAdvice/components/Inspection.vue Vedi File

@@ -23,20 +23,11 @@
23 23
       </div>
24 24
 
25 25
       <div class="adviceBox" v-show="showOne">
26
-        <van-list
27
-          v-model="loading"
28
-          :finished="finished"
29
-          finished-text="没有更多了"
30
-          @load="onLoad"
31
-        >
26
+        <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
32 27
           <div class="adviceOne" v-for="item in 3" :key="index">
33 28
             <div class="adviceTitle">
34 29
               <p>2019.09.01</p>
35
-              <van-icon
36
-                class="ellipsis"
37
-                name="ellipsis"
38
-                @click="newShow = true"
39
-              />
30
+              <van-icon class="ellipsis" name="ellipsis" @click="newShow = true" />
40 31
             </div>
41 32
             <div class="orderContent">
42 33
               <p>血常规</p>
@@ -61,23 +52,10 @@
61 52
 
62 53
     <!-- 弹出层 -->
63 54
     <div>
64
-      <van-popup
65
-        v-model="typeShow"
66
-        position="bottom"
67
-        :style="{ height: '40%' }"
68
-      >
69
-        <van-picker
70
-          show-toolbar
71
-          :columns="columns"
72
-          @cancel="onCancel"
73
-          @confirm="onConfirm"
74
-        />
55
+      <van-popup v-model="typeShow" position="bottom" :style="{ height: '40%' }">
56
+        <van-picker show-toolbar :columns="columns" @cancel="onCancel" @confirm="onConfirm" />
75 57
       </van-popup>
76
-      <van-popup
77
-        v-model="startShow"
78
-        position="bottom"
79
-        :style="{ height: '40%' }"
80
-      >
58
+      <van-popup v-model="startShow" position="bottom" :style="{ height: '40%' }">
81 59
         <van-datetime-picker
82 60
           v-model="currentDate"
83 61
           type="date"
@@ -97,12 +75,7 @@
97 75
           @cancel="endShow = false"
98 76
         />
99 77
       </van-popup>
100
-      <van-action-sheet
101
-        v-model="newShow"
102
-        :actions="actions"
103
-        cancel-text="取消"
104
-        @cancel="onCancel"
105
-      />
78
+      <van-action-sheet v-model="newShow" :actions="actions" cancel-text="取消" @cancel="onCancel" />
106 79
     </div>
107 80
   </div>
108 81
 </template>
@@ -212,7 +185,7 @@ export default {
212 185
     justify-content: space-around;
213 186
     align-items: center;
214 187
     .toolOne {
215
-      width: 5.625rem;
188
+      width: 6.25rem;
216 189
       height: 1.875rem;
217 190
       background: rgba(246, 246, 246, 1);
218 191
       border-radius: 5px;

+ 22 - 60
src/pages/doctorAdvice/components/LongDialysis.vue Vedi File

@@ -17,30 +17,17 @@
17 17
       </div>
18 18
 
19 19
       <div class="adviceBox" v-show="showOne">
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
-          >
20
+        <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
21
+          <div class="adviceOne" v-for="(item, index) in dialysisrecord" :key="index">
31 22
             <div class="adviceTitle">
32 23
               <p>{{ getTime(item.created_time) }}</p>
33
-              <van-icon
34
-                class="ellipsis"
35
-                name="ellipsis"
36
-                @click="newShow = true"
37
-              />
24
+              <van-icon class="ellipsis" name="ellipsis" @click="newShow = true" />
38 25
             </div>
39 26
             <div class="orderContent">
40 27
               <p>透析模式:{{ item.mode_id }}</p>
41 28
               <p>
42 29
                 透析时长:{{ item.dialysis_duration_hour }}h{{
43
-                  item.dialysis_duration_minute
30
+                item.dialysis_duration_minute
44 31
                 }}min
45 32
               </p>
46 33
               <p>血流量(ml/min):{{ item.blood_flow_volume }}</p>
@@ -100,7 +87,7 @@
100 87
               <p>体液过多其他症状:{{ item.body_fluid_other }}</p>
101 88
               <p>
102 89
                 透析前使用特殊药物:{{
103
-                  getSpecialMedicine(item.special_medicine)
90
+                getSpecialMedicine(item.special_medicine)
104 91
                 }}
105 92
               </p>
106 93
               <p>使用其他特殊药物:{{ item.special_medicine_other }}</p>
@@ -127,23 +114,10 @@
127 114
 
128 115
     <!-- 弹出层 -->
129 116
     <div>
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
-        />
117
+      <van-popup v-model="typeShow" position="bottom" :style="{ height: '40%' }">
118
+        <van-picker show-toolbar :columns="columns" @cancel="onCancel" @confirm="onConfirm" />
141 119
       </van-popup>
142
-      <van-popup
143
-        v-model="startShow"
144
-        position="bottom"
145
-        :style="{ height: '40%' }"
146
-      >
120
+      <van-popup v-model="startShow" position="bottom" :style="{ height: '40%' }">
147 121
         <van-datetime-picker
148 122
           v-model="currentDate"
149 123
           type="date"
@@ -163,12 +137,7 @@
163 137
           @cancel="endShow = false"
164 138
         />
165 139
       </van-popup>
166
-      <van-action-sheet
167
-        v-model="newShow"
168
-        :actions="actions"
169
-        cancel-text="取消"
170
-        @cancel="onCancel"
171
-      />
140
+      <van-action-sheet v-model="newShow" :actions="actions" cancel-text="取消" @cancel="onCancel" />
172 141
     </div>
173 142
   </div>
174 143
 </template>
@@ -358,33 +327,26 @@ export default {
358 327
           console.log("长期透析处方", dialysis);
359 328
           var total = response.data.data.total;
360 329
           console.log("total", total);
330
+          this.loading = false;
361 331
         }
362 332
       });
363 333
     },
364 334
     onLoad() {
365 335
       setTimeout(() => {
366
-        for (let i = 0; i < this.limit; i++) {
367
-          this.list.push(this.list.length + 1);
368
-        }
369
-        // 加载状态结束
370
-        this.loading = false;
371
-        console.log("长期处方", this.dialysisrecord.length);
372
-        if (this.dialysisrecord.length >= 10) {
373
-          this.page++;
374
-        }
375
-        console.log("页数", this.page);
376
-        this.GetLongDialysisRecord(
377
-          this.patient_id,
378
-          this.limit,
379
-          this.page,
380
-          this.startTime,
381
-          this.endTimes
382
-        );
383
-        // 数据全部加载完成
384
-        if (this.list.length >= this.total) {
336
+        this.page++;
337
+        if (this.page <= Math.ceil(this.total / 10)) {
338
+          this.GetLongDialysisRecord(
339
+            this.patient_id,
340
+            this.limit,
341
+            this.page,
342
+            this.startTime,
343
+            this.endTimes
344
+          );
345
+        } else {
346
+          this.loading = false;
385 347
           this.finished = true;
386 348
         }
387
-      }, 5000);
349
+      }, 1000);
388 350
     },
389 351
     getTime(time) {
390 352
       // return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");

+ 19 - 43
src/pages/doctorAdvice/components/RescueRecord.vue Vedi File

@@ -16,17 +16,8 @@
16 16
         </div>
17 17
       </div>
18 18
       <div class="adviceBox" v-show="showOne">
19
-        <van-list
20
-          v-model="loading"
21
-          :finished="finished"
22
-          finished-text="没有更多了"
23
-          @load="onLoad"
24
-        >
25
-          <div
26
-            class="adviceOne"
27
-            v-for="(item, index) in this.rescueRecords"
28
-            :key="index"
29
-          >
19
+        <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
20
+          <div class="adviceOne" v-for="(item, index) in this.rescueRecords" :key="index">
30 21
             <div class="adviceTitle">
31 22
               <p>{{ getTime(item.record_time) }}</p>
32 23
               <van-icon
@@ -61,11 +52,7 @@
61 52
 
62 53
     <!-- 弹出层 -->
63 54
     <div>
64
-      <van-popup
65
-        v-model="startShow"
66
-        position="bottom"
67
-        :style="{ height: '40%' }"
68
-      >
55
+      <van-popup v-model="startShow" position="bottom" :style="{ height: '40%' }">
69 56
         <van-datetime-picker
70 57
           v-model="currentDate"
71 58
           type="date"
@@ -85,12 +72,7 @@
85 72
           @cancel="endShow = false"
86 73
         />
87 74
       </van-popup>
88
-      <van-action-sheet
89
-        v-model="newShow"
90
-        :actions="actions"
91
-        cancel-text="取消"
92
-        @select="Delete"
93
-      />
75
+      <van-action-sheet v-model="newShow" :actions="actions" cancel-text="取消" @select="Delete" />
94 76
     </div>
95 77
   </div>
96 78
 </template>
@@ -207,30 +189,24 @@ export default {
207 189
           this.rescueRecords = arr;
208 190
           var total = response.data.data.total;
209 191
           console.log("总计", total);
192
+          this.loading = false;
210 193
         }
211 194
       });
212 195
     },
213 196
     onLoad() {
214 197
       setTimeout(() => {
215
-        for (let i = 0; i < this.limit; i++) {
216
-          this.list.push(this.list.length + 1);
217
-        }
218
-        // 加载状态结束
219
-        this.loading = false;
220
-        console.log("长度", this.rescueRecords.length);
221
-        if (this.rescueRecords.length > 10) {
222
-          this.page++;
223
-        }
224
-        console.log("page是什么", this.page);
225
-        this.getRescueRecord(
226
-          this.patient_id,
227
-          this.startTime,
228
-          this.endTimes,
229
-          this.limit,
230
-          this.page
231
-        );
232
-        // 数据全部加载完成
233
-        if (this.list.length >= this.total) {
198
+        this.page++;
199
+        // console.log(this.page)
200
+        if (this.page <= Math.ceil(this.total / 10)) {
201
+          this.getRescueRecord(
202
+            this.patient_id,
203
+            this.startTime,
204
+            this.endTimes,
205
+            this.limit,
206
+            this.page
207
+          );
208
+        } else {
209
+          this.loading = false;
234 210
           this.finished = true;
235 211
         }
236 212
       }, 1000);
@@ -295,7 +271,7 @@ export default {
295 271
     height: 3.125rem;
296 272
     align-items: center;
297 273
     .toolOne {
298
-      width: 5.625rem;
274
+      width: 6.25rem;
299 275
       height: 1.875rem;
300 276
       background: rgba(246, 246, 246, 1);
301 277
       border-radius: 5px;
@@ -305,7 +281,7 @@ export default {
305 281
       display: flex;
306 282
       align-items: center;
307 283
       justify-content: space-around;
308
-      margin-left: 1.25rem;
284
+      margin-left: 0.8125rem;
309 285
     }
310 286
   }
311 287
   .adviceBox {

+ 104 - 35
src/pages/doctorAdvice/components/Scheduling.vue Vedi File

@@ -27,6 +27,7 @@
27 27
           :finished="finished"
28 28
           finished-text="没有更多了"
29 29
           @load="onLoad"
30
+          :immediate-check="immediateCheck"
30 31
         >
31 32
           <div class="adviceOne" v-for="(item,index) in scheduLing" :key="index">
32 33
             <div class="adviceTitle">
@@ -116,7 +117,8 @@ import { Dialog } from 'vant'
116 117
 const moment = require('moment')
117 118
 export default {
118 119
   props: {
119
-    active: Number
120
+    active: Number,
121
+    schedulingId: String
120 122
   },
121 123
   data () {
122 124
     return {
@@ -147,8 +149,9 @@ export default {
147 149
       scheduLing: [],
148 150
       list: [],
149 151
       id: 0,
150
-      index: 0
151
-
152
+      index: 0,
153
+      immediateCheck:false,
154
+      flag: true
152 155
     }
153 156
   },
154 157
   methods: {
@@ -248,7 +251,7 @@ export default {
248 251
             this.showOne = true
249 252
             this.showTwo = false
250 253
           }
251
-          console.log('病人详情', patientDetail)
254
+          // console.log('病人详情', patientDetail)
252 255
           this.patientName = patientDetail.name
253 256
         }
254 257
       })
@@ -313,11 +316,82 @@ export default {
313 316
           }
314 317
           let arr = this.scheduLing
315 318
           arr.push(...scheduling)
316
-          console.log('班次', scheduling)
319
+          // console.log('班次', scheduling)
317 320
           this.scheduLing = arr
318 321
           var total = response.data.data.total
319
-          console.log('total', total)
322
+          // console.log('total', total)
320 323
           this.total = total
324
+          this.loading = false;
325
+          console.log("1823792742736487362847623876执行这里")
326
+          
327
+        }
328
+      })
329
+    },
330
+    getScheduling1 (id) {
331
+      getScheduling(id, this.limit, this.page, this.startTime, this.endTime, this.types).then(response => {
332
+        if (response.data.state === 1) {
333
+          var scheduling = response.data.data.scheduling
334
+          for (let i = 0; i < scheduling.length; i++) {
335
+            if (scheduling[i].schedule_type === 1) {
336
+              scheduling[i].schedule_type = '上午'
337
+            }
338
+            if (scheduling[i].schedule_type === 2) {
339
+              scheduling[i].schedule_type = '中午'
340
+            }
341
+            if (scheduling[i].schedule_type === 3) {
342
+              scheduling[i].schedule_type = '下午'
343
+            }
344
+
345
+            if (scheduling[i].mode_id === 1) {
346
+              scheduling[i].mode_id = 'HD'
347
+            }
348
+            if (scheduling[i].mode_id === 2) {
349
+              scheduling[i].mode_id = 'HDF'
350
+            }
351
+            if (scheduling[i].mode_id === 3) {
352
+              scheduling[i].mode_id = 'HD+HP'
353
+            }
354
+            if (scheduling[i].mode_id === 4) {
355
+              scheduling[i].mode_id = 'HP'
356
+            }
357
+            if (scheduling[i].mode_id === 5) {
358
+              scheduling[i].mode_id = 'HF'
359
+            }
360
+            if (scheduling[i].mode_id === 6) {
361
+              scheduling[i].mode_id = 'SCUF'
362
+            }
363
+            if (scheduling[i].mode_id === 7) {
364
+              scheduling[i].mode_id = 'IUF'
365
+            }
366
+            if (scheduling[i].mode_id === 8) {
367
+              scheduling[i].mode_id = 'HFHD'
368
+            }
369
+            if (scheduling[i].mode_id === 9) {
370
+              scheduling[i].mode_id = 'HFHD+HP'
371
+            }
372
+            if (scheduling[i].mode_id === 10) {
373
+              scheduling[i].mode_id = 'PHF'
374
+            }
375
+            if (scheduling[i].mode_id === 11) {
376
+              scheduling[i].mode_id = 'HFR'
377
+            }
378
+            if (scheduling[i].mode_id === 12) {
379
+              scheduling[i].mode_id = 'HDF+HP'
380
+            }
381
+            if (scheduling[i].mode_id === 13) {
382
+              scheduling[i].mode_id = 'CRRT'
383
+            }
384
+            if (scheduling[i].mode_id === 14) {
385
+              scheduling[i].mode_id = '腹水回输'
386
+            }
387
+          }
388
+          // console.log('班次', scheduling)
389
+          this.scheduLing = scheduling
390
+          var total = response.data.data.total
391
+          // console.log('total', total)
392
+          this.total = total
393
+          console.log("骄傲搜看得见爱仕达卡拉胶山东矿机奥施康定几哈刷卡机还贷款")
394
+          this.loading = false;
321 395
         }
322 396
       })
323 397
     },
@@ -327,29 +401,23 @@ export default {
327 401
     },
328 402
     onLoad () {
329 403
       setTimeout(() => {
330
-        for (let i = 0; i < this.limit; i++) {
331
-          this.list.push(this.list.length + 1)
332
-        }
333
-        // 加载状态结束
334
-        this.loading = false
335
-        console.log('长度', this.scheduLing.length)
336
-        if (this.scheduLing.length > 10) {
337
-          this.page++
338
-        }
339
-        console.log('page是什么', this.page)
404
+        this.page++
405
+        // console.log(this.page)
406
+        if (this.page <= Math.ceil(this.total / 10)) {
340 407
         this.getScheduling(
341
-          this.patient_id,
342
-          this.startTime,
343
-          this.endTimes,
344
-          this.limit,
345
-          this.page,
346
-          this.types
347
-        )
348
-        // 数据全部加载完成
349
-        if (this.list.length >= this.total) {
350
-          this.finished = true
408
+            this.patient_id,
409
+            this.startTime,
410
+            this.endTimes,
411
+            this.limit,
412
+            this.page,
413
+            this.types
414
+          )
415
+          
416
+        } else {
417
+          this.loading = false;
418
+          this.finished = true;
351 419
         }
352
-      }, 1000)
420
+      }, 3000)
353 421
     },
354 422
     toEditSchduling (id) {
355 423
       var patientid = this.$route.query.patientid
@@ -379,28 +447,29 @@ export default {
379 447
           }
380 448
         })
381 449
       })
382
-    }
450
+    },
383 451
   },
384 452
   created () {
385
-    var patientid = this.$route.query.patientid
386
-    this.getPatientDetail(patientid)
387
-    this.getScheduling(patientid)
388
-    this.patient_id = patientid
389
-  }
453
+      this.loading = true;
454
+      var patientid = this.$route.query.patientid
455
+      this.getPatientDetail(patientid)
456
+      this.getScheduling(patientid)
457
+      this.patient_id = patientid
458
+  },
390 459
 }
391 460
 </script>
392 461
 
393 462
 <style lang="scss" scoped>
394 463
 .scheduling {
395 464
   height: 100%;
396
-  overflow-y: auto;
465
+  // overflow-y: auto;
397 466
   .toolBox {
398 467
     display: flex;
399 468
     height: 3.125rem;
400 469
     justify-content: space-around;
401 470
     align-items: center;
402 471
     .toolOne {
403
-      width: 5.625rem;
472
+      width: 6.25rem;
404 473
       height: 1.875rem;
405 474
       background: rgba(246, 246, 246, 1);
406 475
       border-radius: 5px;

+ 73 - 34
src/pages/doctorAdvice/index.vue Vedi File

@@ -8,39 +8,70 @@
8 8
       </div>
9 9
       <p @click="toEditPatient">基本信息</p>
10 10
     </div>
11
-    <van-tabs v-model="active" sticky>
11
+    <van-tabs v-model="active" sticky @click="onClick">
12 12
       <van-sticky>
13 13
         <div class="wapBox" @click="show1 = true">
14 14
           <van-icon class="wap" name="wap-nav" />
15 15
         </div>
16 16
       </van-sticky>
17
-      <van-tab v-for="(item, index) in title" :title="item" :key="index">
18
-        <doctor-management v-if="active == 0"></doctor-management>
19
-        <long-dialysis v-if="active == 1"></long-dialysis>
20
-        <dialysis-record v-if="active == 2"></dialysis-record>
21
-        <dry-weight v-if="active == 3" :active="active"></dry-weight>
22
-        <inspection v-if="active == 4"></inspection>
23
-        <course-management
24
-          v-if="active == 5"
25
-          :active="active"
26
-        ></course-management>
27
-        <rescue-record v-if="active == 6" :active="active"></rescue-record>
28
-        <scheduling v-if="active == 7" :active="active"></scheduling>
29
-        <education v-if="active == 8" :active="active"></education>
30
-        <signs-record v-if="active == 9" :active="active"></signs-record>
31
-        <recover-notes v-if="active == 10" :active="active"></recover-notes>
32
-        <medication-plan v-if="active == 11" :active="active"></medication-plan>
33
-        <device-management
34
-          v-if="active == 12"
35
-          :active="active"
36
-        ></device-management>
17
+      <van-tab title="医嘱">
18
+        <doctor-management :dryId="patient_id"></doctor-management>
37 19
       </van-tab>
20
+      <van-tab title="长期透析处方">
21
+        <long-dialysis></long-dialysis>
22
+      </van-tab>
23
+      <van-tab title="透析记录">
24
+        <dialysis-record></dialysis-record>
25
+      </van-tab>
26
+      <van-tab title="干体重">
27
+        <dry-weight :active="active" :dryId="patient_id"></dry-weight>
28
+      </van-tab>
29
+      <van-tab title="检验检查">
30
+        <inspection></inspection>
31
+      </van-tab>
32
+      <van-tab title="病程记录">
33
+        <course-management :active="active"></course-management>
34
+      </van-tab>
35
+      <van-tab title="抢救记录">
36
+        <rescue-record :active="active"></rescue-record>
37
+      </van-tab>
38
+      <van-tab title="排班信息">
39
+        <scheduling :active="active" :schedulingId="patient_id"></scheduling>
40
+      </van-tab>
41
+      <van-tab title="宣教信息">
42
+        <education :active="active"></education>
43
+      </van-tab>
44
+      <van-tab title="体征信息">
45
+        <signs-record :active="active"></signs-record>
46
+      </van-tab>
47
+      <van-tab title="康复笔记">
48
+        <recover-notes :active="active"></recover-notes>
49
+      </van-tab>
50
+      <van-tab title="用药管理">
51
+        <medication-plan :active="active"></medication-plan>
52
+      </van-tab>
53
+      <van-tab title="设备管理">
54
+        <device-management :active="active"></device-management>
55
+      </van-tab>
56
+
57
+      <!-- <van-tab v-for="(item, index) in title" :title="item" :key="index">
58
+        <doctor-management :dryId="patient_id"></doctor-management>
59
+        <long-dialysis></long-dialysis>
60
+        <dialysis-record></dialysis-record>
61
+        <dry-weight :active="active" :dryId="patient_id"></dry-weight>
62
+        <inspection></inspection>
63
+        <course-management :active="active"></course-management>
64
+        <rescue-record :active="active"></rescue-record>
65
+        <scheduling :active="active" :schedulingId="patient_id"></scheduling>
66
+        <education :active="active"></education>
67
+        <signs-record :active="active"></signs-record>
68
+        <recover-notes :active="active"></recover-notes>
69
+        <medication-plan :active="active"></medication-plan>
70
+        <device-management :active="active"></device-management>
71
+      </van-tab>-->
38 72
     </van-tabs>
39 73
     <van-popup v-model="show" position="top" :style="{ height: '100%' }">
40
-      <div
41
-        style="padding:10px;font-size:1.25rem;text-align:right"
42
-        @click="show = false"
43
-      >
74
+      <div style="padding:10px;font-size:1.25rem;text-align:right" @click="show = false">
44 75
         <van-icon name="cross" />
45 76
       </div>
46 77
       <van-search
@@ -67,10 +98,7 @@
67 98
     </van-popup>
68 99
 
69 100
     <van-popup v-model="show1" position="top" :style="{ height: '40%' }">
70
-      <div
71
-        style="padding:10px;font-size:1.25rem;text-align:right"
72
-        @click="show1 = false"
73
-      >
101
+      <div style="padding:10px;font-size:1.25rem;text-align:right" @click="show1 = false">
74 102
         <van-icon name="cross" />
75 103
       </div>
76 104
       <div class="titleBox">
@@ -79,9 +107,7 @@
79 107
           v-for="(item, index) in title"
80 108
           :key="index"
81 109
           @click="changeActive(index)"
82
-        >
83
-          {{ item }}
84
-        </div>
110
+        >{{ item }}</div>
85 111
       </div>
86 112
     </van-popup>
87 113
   </div>
@@ -127,6 +153,7 @@ export default {
127 153
     medicationPlan,
128 154
     deviceManagement
129 155
   },
156
+  inject: ["reload"],
130 157
   data() {
131 158
     return {
132 159
       show: false,
@@ -221,7 +248,10 @@ export default {
221 248
       limit: 10,
222 249
       page: 1,
223 250
       patient: [],
224
-      patient_id: ""
251
+      patient_id: "",
252
+      patient_info: {
253
+        patient_id: this.patient_id
254
+      }
225 255
     };
226 256
   },
227 257
   methods: {
@@ -403,8 +433,11 @@ export default {
403 433
         if (this.value === this.patient[i].name) {
404 434
           var id = this.patient[i].id;
405 435
           this.show = false;
406
-          this.$router.push("/patientdetail?patientid=" + id);
436
+          this.$router.push(
437
+            "/patientdetail?patientid=" + id + "&active=" + this.active
438
+          );
407 439
           this.patientName = this.value;
440
+          this.reload();
408 441
         }
409 442
       }
410 443
     },
@@ -421,6 +454,12 @@ export default {
421 454
     this.patient_id = patientid;
422 455
     this.getPatientDetail(patientid);
423 456
     this.getBloodDialysisPatientTwo();
457
+  },
458
+  watch: {
459
+    $route(newVal) {
460
+      console.log("index", newVal);
461
+      this.patient_id = newVal.query.patientid;
462
+    }
424 463
   }
425 464
 };
426 465
 </script>

+ 11 - 24
src/pages/patientManagement/components/Blood.vue Vedi File

@@ -15,12 +15,7 @@
15 15
       </div>
16 16
     </div>
17 17
     <div class="patientBox">
18
-      <van-list
19
-        v-model="loading"
20
-        :finished="finished"
21
-        finished-text="没有更多了"
22
-        @load="onLoad"
23
-      >
18
+      <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
24 19
         <div
25 20
           class="patientOne"
26 21
           v-for="(item, index) in patients"
@@ -34,23 +29,10 @@
34 29
     </div>
35 30
     <!-- 弹出层 -->
36 31
     <div>
37
-      <van-popup
38
-        v-model="typeShow"
39
-        position="bottom"
40
-        :style="{ height: '40%' }"
41
-      >
42
-        <van-picker
43
-          show-toolbar
44
-          :columns="columns"
45
-          @cancel="onCancel"
46
-          @confirm="onConfirm"
47
-        />
32
+      <van-popup v-model="typeShow" position="bottom" :style="{ height: '40%' }">
33
+        <van-picker show-toolbar :columns="columns" @cancel="onCancel" @confirm="onConfirm" />
48 34
       </van-popup>
49
-      <van-popup
50
-        v-model="typeShowOne"
51
-        position="bottom"
52
-        :style="{ height: '40%' }"
53
-      >
35
+      <van-popup v-model="typeShowOne" position="bottom" :style="{ height: '40%' }">
54 36
         <van-picker
55 37
           show-toolbar
56 38
           :columns="columnsOne"
@@ -169,17 +151,22 @@ export default {
169 151
         if (response.data.state === 1) {
170 152
           var bloodpatient = response.data.data.bloodPatient;
171 153
           console.log("血透病人", bloodpatient);
154
+          this.patients = bloodpatient;
172 155
         }
173 156
       });
174 157
     }
175 158
   },
176 159
   created() {
177 160
     console.log(this.searchValue);
178
-    this.getAllBloodDialysisPatient();
161
+    if (this.searchValue) {
162
+      this.SearchAllBlood(this.searchValue);
163
+    } else {
164
+      this.getAllBloodDialysisPatient();
165
+    }
179 166
   },
180 167
   watch: {
181 168
     searchValue(newVal) {
182
-      console.log("监听", newVal);
169
+      // console.log("监听", newVal);
183 170
       this.SearchAllBlood(newVal);
184 171
     }
185 172
   }

+ 5 - 1
src/pages/patientManagement/components/Member.vue Vedi File

@@ -82,7 +82,11 @@ export default {
82 82
   },
83 83
   created () {
84 84
     console.log(this.searchValue)
85
-    this.getAllMemberPatient()
85
+    if(this.searchValue){
86
+      this.getMemberSearchPatient(this.searchValue)
87
+    }else{
88
+      this.getAllMemberPatient()
89
+    }
86 90
   },
87 91
   watch: {
88 92
     searchValue (newVal) {

+ 6 - 1
src/pages/patientManagement/components/Slow.vue Vedi File

@@ -78,12 +78,17 @@ export default {
78 78
         if (response.data.state === 1) {
79 79
           var slowpatient = response.data.data.slowPatient
80 80
           console.log('慢病病人', slowpatient)
81
+          this.patients = slowpatient
81 82
         }
82 83
       })
83 84
     }
84 85
   },
85 86
   created () {
86
-    this.getAllSlowPatient()
87
+    if (this.searchValue) {
88
+      this.getSlowSearchPatient(this.searchValue)
89
+    }else{
90
+      this.getAllSlowPatient()
91
+    }
87 92
   },
88 93
   watch: {
89 94
     searchValue (newVal) {

+ 14 - 22
src/pages/patientManagement/patientManagement.vue Vedi File

@@ -10,22 +10,13 @@
10 10
       </div>
11 11
     </van-sticky>
12 12
     <div class="searchBox">
13
-      <van-search
14
-        v-model="value"
15
-        placeholder="搜索患者透析号/姓名/首拼"
16
-        @search="SearchAllPatient"
17
-      />
13
+      <van-search v-model="value" placeholder="搜索患者透析号/姓名/首拼" @search="SearchAllPatient" />
18 14
     </div>
19 15
     <div class="chooseBox">
20 16
       <van-tabs v-model="active" sticky>
21 17
         <van-tab title="全部患者">
22 18
           <div class="patientBox">
23
-            <van-list
24
-              v-model="loading"
25
-              finished-text="没有更多了"
26
-              @load="onLoad"
27
-              :finished="finished"
28
-            >
19
+            <van-list v-model="loading" finished-text="没有更多了" @load="onLoad" :finished="finished">
29 20
               <div
30 21
                 class="patientOne"
31 22
                 v-for="(item, index) in patients"
@@ -51,17 +42,8 @@
51 42
     </div>
52 43
     <!-- 弹出层 -->
53 44
     <div>
54
-      <van-popup
55
-        v-model="typeShow"
56
-        position="bottom"
57
-        :style="{ height: '40%' }"
58
-      >
59
-        <van-picker
60
-          show-toolbar
61
-          :columns="columns"
62
-          @cancel="onCancel"
63
-          @confirm="onConfirm"
64
-        />
45
+      <van-popup v-model="typeShow" position="bottom" :style="{ height: '40%' }">
46
+        <van-picker show-toolbar :columns="columns" @cancel="onCancel" @confirm="onConfirm" />
65 47
       </van-popup>
66 48
     </div>
67 49
   </div>
@@ -167,6 +149,7 @@ export default {
167 149
         if (response.data.state === 1) {
168 150
           var patient = response.data.data.patient;
169 151
           console.log("patient", patient);
152
+          this.patients = patient;
170 153
         }
171 154
       });
172 155
     }
@@ -175,6 +158,15 @@ export default {
175 158
     setRem();
176 159
     setHeight();
177 160
     this.getBloodDialysisPatient();
161
+  },
162
+  watch: {
163
+    value(newVal) {
164
+      if (newVal == "") {
165
+        this.getBloodDialysisPatient();
166
+      } else {
167
+        this.SearchAllPatient(newVal);
168
+      }
169
+    }
178 170
   }
179 171
 };
180 172
 </script>