Browse Source

修改bug

XMLWAN 4 years ago
parent
commit
cb7838b83a

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

@@ -76,7 +76,6 @@ export function GetPatientInfo(phone) {
76 76
 }
77 77
 
78 78
 export function savePatient(data) {
79
-  console.log('data', data)
80 79
   return request({
81 80
     url: '/m/api/patient/savepatient',
82 81
     method: 'post',

+ 49 - 11
src/pages/doctorAdvice/components/CourseManagement.vue View File

@@ -16,8 +16,17 @@
16 16
         </div>
17 17
       </div>
18 18
       <div class="adviceBox" v-show="showOne">
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">
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
+          >
21 30
             <div class="adviceTitle">
22 31
               <p>{{ getTime(item.record_time) }}</p>
23 32
               <van-icon
@@ -55,10 +64,23 @@
55 64
 
56 65
     <!-- 弹出层 -->
57 66
     <div>
58
-      <van-popup v-model="typeShow" position="bottom" :style="{ height: '40%' }">
59
-        <van-picker show-toolbar :columns="columns" @cancel="onCancel" @confirm="onConfirm" />
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
+        />
60 78
       </van-popup>
61
-      <van-popup v-model="startShow" position="bottom" :style="{ height: '40%' }">
79
+      <van-popup
80
+        v-model="startShow"
81
+        position="bottom"
82
+        :style="{ height: '40%' }"
83
+      >
62 84
         <van-datetime-picker
63 85
           v-model="currentDate"
64 86
           type="date"
@@ -110,10 +132,9 @@ export default {
110 132
       newShow: false,
111 133
       startShow: false,
112 134
       endShow: false,
113
-      startTime: moment()
114
-        .subtract(30, "days")
115
-        .format("YYYY-MM-DD"),
116
-      endTime: moment(new Date()).format("YYYY-MM-DD"),
135
+      startTime: "请选择",
136
+      endTime: "请选择",
137
+      endTimes: "",
117 138
       minDate: new Date(1970, 0, 1),
118 139
       maxDate: new Date(2025, 10, 1),
119 140
       currentDate: new Date(),
@@ -143,7 +164,7 @@ export default {
143 164
       this.typeShow = false;
144 165
     },
145 166
     getstartTime(value) {
146
-      console.log(value);
167
+      this.page = 1;
147 168
       let year = value.getFullYear();
148 169
       let month = value.getMonth() + 1;
149 170
       let day = value.getDate();
@@ -155,10 +176,18 @@ export default {
155 176
       }
156 177
 
157 178
       this.startTime = `${year}-${month}-${day}`;
179
+      this.courseManagement = [];
180
+      this.getCourseManagement(
181
+        this.patientid,
182
+        this.limit,
183
+        this.page,
184
+        this.startTime,
185
+        this.endTime
186
+      );
158 187
       this.startShow = false;
159 188
     },
160 189
     getstartTime2(value) {
161
-      console.log(value);
190
+      this.page = 1;
162 191
       let year = value.getFullYear();
163 192
       let month = value.getMonth() + 1;
164 193
       let day = value.getDate();
@@ -170,6 +199,15 @@ export default {
170 199
       }
171 200
 
172 201
       this.endTime = `${year}-${month}-${day}`;
202
+
203
+      this.courseManagement = [];
204
+      this.getCourseManagement(
205
+        this.patientid,
206
+        this.limit,
207
+        this.page,
208
+        this.startTime,
209
+        this.endTime
210
+      );
173 211
       this.endShow = false;
174 212
     },
175 213
     getTime(time) {

+ 85 - 20
src/pages/doctorAdvice/components/DialysisRecord.vue View File

@@ -23,8 +23,17 @@
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 dialysisRecord" :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 dialysisRecord"
35
+            :key="index"
36
+          >
28 37
             <div class="adviceTitle">
29 38
               <p>{{ getTime(item.dialysis_date) }}</p>
30 39
             </div>
@@ -56,15 +65,19 @@
56 65
               </p>
57 66
               <p>
58 67
                 透析时长(h):{{ item.prescription.dialysis_duration_hour }}h{{
59
-                item.prescription.dialysis_duration_minute
68
+                  item.prescription.dialysis_duration_minute
60 69
                 }}min
61 70
               </p>
62 71
               <p>干体重(kg):{{ item.predialysis_evaluation.dry_weight }}</p>
63
-              <p>透前称重(kg):{{ item.predialysis_evaluation.weight_before }}</p>
64
-              <p>透后称重(kg):{{ item.assessment_after_dislysis.weight_after }}</p>
72
+              <p>
73
+                透前称重(kg):{{ item.predialysis_evaluation.weight_before }}
74
+              </p>
75
+              <p>
76
+                透后称重(kg):{{ item.assessment_after_dislysis.weight_after }}
77
+              </p>
65 78
               <p>
66 79
                 透前血压(mmHg):{{
67
-                item.predialysis_evaluation.systolic_blood_pressure
80
+                  item.predialysis_evaluation.systolic_blood_pressure
68 81
                 }}/
69 82
                 {{ item.predialysis_evaluation.diastolic_blood_pressure }}
70 83
               </p>
@@ -76,10 +89,18 @@
76 89
               <p>
77 90
                 抗凝剂:
78 91
                 <span v-if="item.prescription.anticoagulant == 1">无肝素</span>
79
-                <span v-if="item.prescription.anticoagulant == 2">普通肝素</span>
80
-                <span v-if="item.prescription.anticoagulant == 3">低分子肝素</span>
81
-                <span v-if="item.prescription.anticoagulant == 4">阿加曲班</span>
82
-                <span v-if="item.prescription.anticoagulant == 5">枸橼酸钠</span>
92
+                <span v-if="item.prescription.anticoagulant == 2"
93
+                  >普通肝素</span
94
+                >
95
+                <span v-if="item.prescription.anticoagulant == 3"
96
+                  >低分子肝素</span
97
+                >
98
+                <span v-if="item.prescription.anticoagulant == 4"
99
+                  >阿加曲班</span
100
+                >
101
+                <span v-if="item.prescription.anticoagulant == 5"
102
+                  >枸橼酸钠</span
103
+                >
83 104
               </p>
84 105
               <p>
85 106
                 首剂:
@@ -117,7 +138,9 @@
117 138
               @click="
118 139
                 toDialysisRecordDetail(item.patient_id, item.dialysis_date)
119 140
               "
120
-            >全部</div>
141
+            >
142
+              全部
143
+            </div>
121 144
           </div>
122 145
         </van-list>
123 146
       </div>
@@ -134,10 +157,23 @@
134 157
 
135 158
     <!-- 弹出层 -->
136 159
     <div>
137
-      <van-popup v-model="typeShow" position="bottom" :style="{ height: '40%' }">
138
-        <van-picker show-toolbar :columns="columns" @cancel="onCancel" @confirm="onConfirm" />
160
+      <van-popup
161
+        v-model="typeShow"
162
+        position="bottom"
163
+        :style="{ height: '40%' }"
164
+      >
165
+        <van-picker
166
+          show-toolbar
167
+          :columns="columns"
168
+          @cancel="onCancel"
169
+          @confirm="onConfirm"
170
+        />
139 171
       </van-popup>
140
-      <van-popup v-model="startShow" position="bottom" :style="{ height: '40%' }">
172
+      <van-popup
173
+        v-model="startShow"
174
+        position="bottom"
175
+        :style="{ height: '40%' }"
176
+      >
141 177
         <van-datetime-picker
142 178
           v-model="currentDate"
143 179
           type="date"
@@ -201,10 +237,8 @@ export default {
201 237
         "CRRT",
202 238
         "腹水回输"
203 239
       ],
204
-      startTime: moment()
205
-        .subtract(30, "days")
206
-        .format("YYYY-MM-DD"),
207
-      endTime: moment(new Date()).format("YYYY-MM-DD"),
240
+      startTime: "请选择",
241
+      endTime: "请选择",
208 242
       minDate: new Date(1970, 0, 1),
209 243
       maxDate: new Date(2025, 10, 1),
210 244
       currentDate: new Date(),
@@ -217,7 +251,8 @@ export default {
217 251
       doctor: [],
218 252
       patient_name: "",
219 253
       index: 0,
220
-      id: 0
254
+      id: 0,
255
+      patient_id: 0
221 256
     };
222 257
   },
223 258
   methods: {
@@ -271,9 +306,20 @@ export default {
271 306
       if (value === "腹水回输") {
272 307
         this.types = 14;
273 308
       }
309
+      this.page = 1;
310
+      this.dialysisRecord = [];
311
+      this.getDialysisRecord(
312
+        this.patient_id,
313
+        this.limit,
314
+        this.page,
315
+        this.startTime,
316
+        this.endTime,
317
+        this.types
318
+      );
274 319
       this.typeShow = false;
275 320
     },
276 321
     getstartTime(value) {
322
+      this.page = 1;
277 323
       let year = value.getFullYear();
278 324
       let month = value.getMonth() + 1;
279 325
       let day = value.getDate();
@@ -283,11 +329,20 @@ export default {
283 329
       if (day >= 1 && day <= 9) {
284 330
         day = `0${day}`;
285 331
       }
286
-
287 332
       this.startTime = `${year}-${month}-${day}`;
333
+      this.dialysisRecord = [];
334
+      this.getDialysisRecord(
335
+        this.patient_id,
336
+        this.limit,
337
+        this.page,
338
+        this.startTime,
339
+        this.endTime,
340
+        this.types
341
+      );
288 342
       this.startShow = false;
289 343
     },
290 344
     getstartTime2(value) {
345
+      this.page = 1;
291 346
       let year = value.getFullYear();
292 347
       let month = value.getMonth() + 1;
293 348
       let day = value.getDate();
@@ -299,6 +354,15 @@ export default {
299 354
       }
300 355
 
301 356
       this.endTime = `${year}-${month}-${day}`;
357
+      this.dialysisRecord = [];
358
+      this.getDialysisRecord(
359
+        this.patient_id,
360
+        this.limit,
361
+        this.page,
362
+        this.startTime,
363
+        this.endTime,
364
+        this.types
365
+      );
302 366
       this.endShow = false;
303 367
     },
304 368
     getPatientDetail(patientid) {
@@ -404,6 +468,7 @@ export default {
404 468
     var patientid = this.$route.query.patientid;
405 469
     this.getPatientDetail(patientid);
406 470
     this.getDialysisRecord(patientid);
471
+    this.patient_id = patientid;
407 472
   }
408 473
 };
409 474
 </script>

+ 98 - 24
src/pages/doctorAdvice/components/DoctorManagement.vue View File

@@ -23,18 +23,36 @@
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="Delete(item.groupno, index)" />
40
+                <van-icon
41
+                  class="ellipsis"
42
+                  name="ellipsis"
43
+                  @click="Delete(item.groupno, index, it.execution_staff)"
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
-                  <span style="margin-left:1rem">{{ getTimes(it.start_time) }}</span>
53
+                  <span style="margin-left:1rem">{{
54
+                    getTimes(it.start_time)
55
+                  }}</span>
38 56
                 </div>
39 57
                 <div class="orderContent">
40 58
                   <p v-if="it.parent_id === 0">
@@ -62,10 +80,15 @@
62 80
                 </div>
63 81
               </div>
64 82
 
65
-              <div class="statOrder" v-if="it.advice_type == 3 && it.parent_id == 0">
83
+              <div
84
+                class="statOrder"
85
+                v-if="it.advice_type == 3 && it.parent_id == 0"
86
+              >
66 87
                 <div class="longOrderTitle">
67 88
                   <span>临时医嘱</span>
68
-                  <span style="margin-left:1rem">{{ getTimes(item.child[0].start_time) }}</span>
89
+                  <span style="margin-left:1rem">{{
90
+                    getTimes(item.child[0].start_time)
91
+                  }}</span>
69 92
                 </div>
70 93
                 <div class="orderContent">
71 94
                   <p>
@@ -94,7 +117,12 @@
94 117
                 </div>
95 118
               </div>
96 119
             </div>
97
-            <div class="all" @click="toDoctorAdviceDetail(item.child[0].groupno)">全部</div>
120
+            <div
121
+              class="all"
122
+              @click="toDoctorAdviceDetail(item.child[0].groupno)"
123
+            >
124
+              全部
125
+            </div>
98 126
           </div>
99 127
         </van-list>
100 128
       </div>
@@ -111,11 +139,24 @@
111 139
 
112 140
     <!-- 弹出层 -->
113 141
     <div>
114
-      <van-popup v-model="typeShow" position="bottom" :style="{ height: '40%' }">
115
-        <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
+        />
116 153
       </van-popup>
117 154
 
118
-      <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
+      >
119 160
         <van-datetime-picker
120 161
           v-model="currentDate"
121 162
           type="date"
@@ -169,13 +210,9 @@ export default {
169 210
       endShow: false,
170 211
       type: "全部",
171 212
       columns: ["全部", "长期医嘱", "临时医嘱"],
172
-      startTime: moment()
173
-        .subtract(30, "days")
174
-        .format("YYYY-MM-DD"),
175
-      endTime: moment(new Date()).format("YYYY-MM-DD"),
176
-      endTimes: moment(new Date())
177
-        .add(1, "days")
178
-        .format("YYYY-MM-DD"),
213
+      startTime: "请选择",
214
+      endTime: "请选择",
215
+      endTimes: "",
179 216
       minDate: new Date(1970, 0, 1),
180 217
       maxDate: new Date(2025, 10, 1),
181 218
       currentDate: new Date(),
@@ -193,7 +230,8 @@ export default {
193 230
       patient_id: "",
194 231
       doctor: [],
195 232
       id: 0,
196
-      index: 0
233
+      index: 0,
234
+      staff: 0
197 235
     };
198 236
   },
199 237
   methods: {
@@ -201,10 +239,21 @@ export default {
201 239
       this.typeShow = false;
202 240
     },
203 241
     onConfirm(value) {
242
+      this.page = 1;
204 243
       this.type = value;
205 244
       this.typeShow = false;
245
+      this.doctorAdvice = [];
246
+      this.getDoctorAdvices(
247
+        this.patient_id,
248
+        this.type,
249
+        this.startTime,
250
+        this.endTimes,
251
+        this.form.limit,
252
+        this.form.page
253
+      );
206 254
     },
207 255
     getstartTime(value) {
256
+      this.page = 1;
208 257
       let year = value.getFullYear();
209 258
       let month = value.getMonth() + 1;
210 259
       let day = value.getDate();
@@ -216,9 +265,19 @@ export default {
216 265
       }
217 266
 
218 267
       this.startTime = `${year}-${month}-${day}`;
268
+      this.doctorAdvice = [];
269
+      this.getDoctorAdvices(
270
+        this.patient_id,
271
+        this.type,
272
+        this.startTime,
273
+        this.endTime,
274
+        this.form.limit,
275
+        this.form.page
276
+      );
219 277
       this.startShow = false;
220 278
     },
221 279
     getstartTime2(value) {
280
+      this.page = 1;
222 281
       let year = value.getFullYear();
223 282
       let month = value.getMonth() + 1;
224 283
       let day = value.getDate();
@@ -230,6 +289,16 @@ export default {
230 289
       }
231 290
 
232 291
       this.endTime = `${year}-${month}-${day}`;
292
+
293
+      this.doctorAdvice = [];
294
+      this.getDoctorAdvices(
295
+        this.patient_id,
296
+        this.type,
297
+        this.startTime,
298
+        this.endTime,
299
+        this.form.limit,
300
+        this.form.page
301
+      );
233 302
       this.endShow = false;
234 303
     },
235 304
     changeData(val) {},
@@ -241,13 +310,13 @@ export default {
241 310
         this.form.type = 1;
242 311
       }
243 312
       if (this.type === "临时医嘱") {
244
-        this.form.type = 2;
313
+        this.form.type = 3;
245 314
       }
246 315
       getDoctorAdvices(
247 316
         patientid,
248 317
         this.form.type,
249 318
         this.startTime,
250
-        this.endTimes,
319
+        this.endTime,
251 320
         this.form.limit,
252 321
         this.form.page
253 322
       ).then(response => {
@@ -357,17 +426,22 @@ export default {
357 426
         }
358 427
       }
359 428
     },
360
-    Delete(id, index) {
429
+    Delete(id, index, staff) {
361 430
       this.id = id;
362 431
       this.index = index;
432
+      this.staff = staff;
363 433
       this.newShow = true;
364 434
     },
365 435
     toDelete(val) {
366 436
       if (val.name == "删除") {
367
-        this.DeleteManagement(this.id, this.index);
437
+        this.DeleteManagement(this.id, this.index, this.staff);
368 438
       }
369 439
     },
370
-    DeleteManagement(id, index) {
440
+    DeleteManagement(id, index, staff) {
441
+      if (staff > 0) {
442
+        this.$toast("医嘱已执行,无法删除");
443
+        return false;
444
+      }
371 445
       Dialog.confirm({
372 446
         title: "删除提示!",
373 447
         message: "确认删除该条信息吗?,删除后将无法恢复!"

+ 54 - 10
src/pages/doctorAdvice/components/DryWeight.vue View File

@@ -17,8 +17,17 @@
17 17
       </div>
18 18
 
19 19
       <div class="adviceBox" v-show="showOne">
20
-        <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
21
-          <div class="adviceOne" v-for="(item, index) in dryweight" :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 dryweight"
29
+            :key="index"
30
+          >
22 31
             <div class="adviceTitle">
23 32
               <p>{{ getTime(item.ctime) }}</p>
24 33
               <van-icon
@@ -61,6 +70,26 @@
61 70
         @select="onDeleteConfirm"
62 71
       />
63 72
     </div>
73
+    <van-popup v-model="startShow" position="bottom" :style="{ height: '40%' }">
74
+      <van-datetime-picker
75
+        v-model="currentDate"
76
+        type="date"
77
+        :min-date="minDate"
78
+        :max-date="maxDate"
79
+        @confirm="getstartTime"
80
+        @cancel="startShow = false"
81
+      />
82
+    </van-popup>
83
+    <van-popup v-model="endShow" position="bottom" :style="{ height: '40%' }">
84
+      <van-datetime-picker
85
+        v-model="currentDate"
86
+        type="date"
87
+        :min-date="minDate"
88
+        :max-date="maxDate"
89
+        @confirm="getstartTime2"
90
+        @cancel="endShow = false"
91
+      />
92
+    </van-popup>
64 93
   </div>
65 94
 </template>
66 95
 
@@ -83,15 +112,11 @@ export default {
83 112
       newShow: false,
84 113
       startShow: false,
85 114
       endShow: false,
86
-      startTime: moment()
87
-        .subtract(30, "days")
88
-        .format("YYYY-MM-DD"),
89
-      endTime: moment(new Date()).format("YYYY-MM-DD"),
115
+      startTime: "请选择",
116
+      endTime: "请选择",
90 117
       minDate: new Date(1970, 0, 1),
91 118
       maxDate: new Date(2025, 10, 1),
92
-      endTimes: moment(new Date())
93
-        .add(1, "days")
94
-        .format("YYYY-MM-DD"),
119
+      endTimes: "",
95 120
       currentDate: new Date(),
96 121
       actions: [{ name: "删除" }],
97 122
       page: 1,
@@ -118,6 +143,7 @@ export default {
118 143
       this.typeShow = false;
119 144
     },
120 145
     getstartTime(value) {
146
+      this.page = 1;
121 147
       let year = value.getFullYear();
122 148
       let month = value.getMonth() + 1;
123 149
       let day = value.getDate();
@@ -129,9 +155,19 @@ export default {
129 155
       }
130 156
 
131 157
       this.startTime = `${year}-${month}-${day}`;
158
+      this.dryweight = [];
159
+      this.getDryWeight(
160
+        this.patient_id,
161
+        this.startTime,
162
+        this.endTime,
163
+        this.limit,
164
+        this.page
165
+      );
166
+
132 167
       this.startShow = false;
133 168
     },
134 169
     getstartTime2(value) {
170
+      this.page = 1;
135 171
       let year = value.getFullYear();
136 172
       let month = value.getMonth() + 1;
137 173
       let day = value.getDate();
@@ -143,13 +179,21 @@ export default {
143 179
       }
144 180
 
145 181
       this.endTime = `${year}-${month}-${day}`;
182
+      this.dryweight = [];
183
+      this.getDryWeight(
184
+        this.patient_id,
185
+        this.startTime,
186
+        this.endTime,
187
+        this.limit,
188
+        this.page
189
+      );
146 190
       this.endShow = false;
147 191
     },
148 192
     getDryWeight(patientid) {
149 193
       getDryWeight(
150 194
         patientid,
151 195
         this.startTime,
152
-        this.endTimes,
196
+        this.endTime,
153 197
         this.limit,
154 198
         this.page
155 199
       ).then(response => {

+ 36 - 7
src/pages/doctorAdvice/components/Education.vue View File

@@ -16,8 +16,17 @@
16 16
         </div>
17 17
       </div>
18 18
       <div class="adviceBox" v-show="showOne">
19
-        <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
20
-          <div class="adviceOne" v-for="(item, index) in Education" :key="index">
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
+          >
21 30
             <div class="adviceTitle">
22 31
               <p>{{ getTime(item.assessment_date) }}</p>
23 32
               <van-icon
@@ -48,7 +57,11 @@
48 57
 
49 58
     <!-- 弹出层 -->
50 59
     <div>
51
-      <van-popup v-model="startShow" position="bottom" :style="{ height: '40%' }">
60
+      <van-popup
61
+        v-model="startShow"
62
+        position="bottom"
63
+        :style="{ height: '40%' }"
64
+      >
52 65
         <van-datetime-picker
53 66
           v-model="currentDate"
54 67
           type="date"
@@ -97,10 +110,8 @@ export default {
97 110
       newShow: false,
98 111
       startShow: false,
99 112
       endShow: false,
100
-      startTime: moment()
101
-        .subtract(30, "days")
102
-        .format("YYYY-MM-DD"),
103
-      endTime: moment(new Date()).format("YYYY-MM-DD"),
113
+      startTime: "请选择",
114
+      endTime: "请选择",
104 115
       minDate: new Date(1970, 0, 1),
105 116
       maxDate: new Date(2025, 10, 1),
106 117
       currentDate: new Date(),
@@ -128,6 +139,7 @@ export default {
128 139
       this.typeShow = false;
129 140
     },
130 141
     getstartTime(value) {
142
+      this.page = 1;
131 143
       let year = value.getFullYear();
132 144
       let month = value.getMonth() + 1;
133 145
       let day = value.getDate();
@@ -139,9 +151,18 @@ export default {
139 151
       }
140 152
 
141 153
       this.startTime = `${year}-${month}-${day}`;
154
+      this.Education = [];
155
+      this.getEducation(
156
+        this.patient_id,
157
+        this.limit,
158
+        this.page,
159
+        this.startTime,
160
+        this.endTime
161
+      );
142 162
       this.startShow = false;
143 163
     },
144 164
     getstartTime2(value) {
165
+      this.page = 1;
145 166
       let year = value.getFullYear();
146 167
       let month = value.getMonth() + 1;
147 168
       let day = value.getDate();
@@ -153,6 +174,14 @@ export default {
153 174
       }
154 175
 
155 176
       this.endTime = `${year}-${month}-${day}`;
177
+      this.Education = [];
178
+      this.getEducation(
179
+        this.patient_id,
180
+        this.limit,
181
+        this.page,
182
+        this.startTime,
183
+        this.endTime
184
+      );
156 185
       this.endShow = false;
157 186
     },
158 187
     getPatientDetail(patientid) {

+ 22 - 10
src/pages/doctorAdvice/components/LongDialysis.vue View File

@@ -207,13 +207,9 @@ export default {
207 207
         "嘉兴",
208 208
         "湖州"
209 209
       ],
210
-      startTime: moment()
211
-        .subtract(30, "days")
212
-        .format("YYYY-MM-DD"),
213
-      endTime: moment(new Date()).format("YYYY-MM-DD"),
214
-      endTimes: moment(new Date())
215
-        .add(1, "days")
216
-        .format("YYYY-MM-DD"),
210
+      startTime: "请选择",
211
+      endTime: "请选择",
212
+      endTimes: "",
217 213
       minDate: new Date(1970, 0, 1),
218 214
       maxDate: new Date(2025, 10, 1),
219 215
       currentDate: new Date(),
@@ -251,7 +247,7 @@ export default {
251 247
       this.typeShow = false;
252 248
     },
253 249
     getstartTime(value) {
254
-      console.log(value);
250
+      this.page = 1;
255 251
       let year = value.getFullYear();
256 252
       let month = value.getMonth() + 1;
257 253
       let day = value.getDate();
@@ -263,10 +259,18 @@ export default {
263 259
       }
264 260
 
265 261
       this.startTime = `${year}-${month}-${day}`;
262
+      this.dialysisrecord = [];
263
+      this.GetLongDialysisRecord(
264
+        this.patient_id,
265
+        this.limit,
266
+        this.page,
267
+        this.startTime,
268
+        this.endTime
269
+      );
266 270
       this.startShow = false;
267 271
     },
268 272
     getstartTime2(value) {
269
-      console.log(value);
273
+      this.page = 1;
270 274
       let year = value.getFullYear();
271 275
       let month = value.getMonth() + 1;
272 276
       let day = value.getDate();
@@ -278,9 +282,17 @@ export default {
278 282
       }
279 283
 
280 284
       this.endTime = `${year}-${month}-${day}`;
285
+      this.dialysisrecord = [];
286
+      this.GetLongDialysisRecord(
287
+        this.patient_id,
288
+        this.limit,
289
+        this.page,
290
+        this.startTime,
291
+        this.endTime
292
+      );
281 293
       this.endShow = false;
282 294
     },
283
-    GetLongDialysisRecord(id) {
295
+    GetLongDialysisRecord(id, limit, page, startime, endtime) {
284 296
       GetLongDialysisRecord(
285 297
         id,
286 298
         this.limit,

+ 43 - 9
src/pages/doctorAdvice/components/RescueRecord.vue View File

@@ -16,8 +16,17 @@
16 16
         </div>
17 17
       </div>
18 18
       <div class="adviceBox" v-show="showOne">
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">
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
+          >
21 30
             <div class="adviceTitle">
22 31
               <p>{{ getTime(item.record_time) }}</p>
23 32
               <van-icon
@@ -52,7 +61,11 @@
52 61
 
53 62
     <!-- 弹出层 -->
54 63
     <div>
55
-      <van-popup v-model="startShow" position="bottom" :style="{ height: '40%' }">
64
+      <van-popup
65
+        v-model="startShow"
66
+        position="bottom"
67
+        :style="{ height: '40%' }"
68
+      >
56 69
         <van-datetime-picker
57 70
           v-model="currentDate"
58 71
           type="date"
@@ -72,7 +85,12 @@
72 85
           @cancel="endShow = false"
73 86
         />
74 87
       </van-popup>
75
-      <van-action-sheet v-model="newShow" :actions="actions" cancel-text="取消" @select="Delete" />
88
+      <van-action-sheet
89
+        v-model="newShow"
90
+        :actions="actions"
91
+        cancel-text="取消"
92
+        @select="Delete"
93
+      />
76 94
     </div>
77 95
   </div>
78 96
 </template>
@@ -96,10 +114,9 @@ export default {
96 114
       newShow: false,
97 115
       startShow: false,
98 116
       endShow: false,
99
-      startTime: moment()
100
-        .subtract(30, "days")
101
-        .format("YYYY-MM-DD"),
102
-      endTime: moment(new Date()).format("YYYY-MM-DD"),
117
+      startTime: "请选择",
118
+      endTime: "请选择",
119
+      endTimes: "",
103 120
       minDate: new Date(1970, 0, 1),
104 121
       maxDate: new Date(2025, 10, 1),
105 122
       currentDate: new Date(),
@@ -127,6 +144,7 @@ export default {
127 144
       this.typeShow = false;
128 145
     },
129 146
     getstartTime(value) {
147
+      this.page = 1;
130 148
       let year = value.getFullYear();
131 149
       let month = value.getMonth() + 1;
132 150
       let day = value.getDate();
@@ -138,10 +156,18 @@ export default {
138 156
       }
139 157
 
140 158
       this.startTime = `${year}-${month}-${day}`;
159
+      this.rescueRecords = [];
160
+      this.getRescueRecord(
161
+        this.patient_id,
162
+        this.limit,
163
+        this.page,
164
+        this.startTime,
165
+        this.endTime
166
+      );
141 167
       this.startShow = false;
142 168
     },
143 169
     getstartTime2(value) {
144
-      console.log(value);
170
+      this.page = 1;
145 171
       let year = value.getFullYear();
146 172
       let month = value.getMonth() + 1;
147 173
       let day = value.getDate();
@@ -153,6 +179,14 @@ export default {
153 179
       }
154 180
 
155 181
       this.endTime = `${year}-${month}-${day}`;
182
+      this.rescueRecords = [];
183
+      this.getRescueRecord(
184
+        this.patient_id,
185
+        this.limit,
186
+        this.page,
187
+        this.startTime,
188
+        this.endTime
189
+      );
156 190
       this.endShow = false;
157 191
     },
158 192
     getPatientDetail(patientid) {

+ 10 - 6
src/pages/doctorAdvice/components/Scheduling.vue View File

@@ -129,10 +129,8 @@ export default {
129 129
       type: '全部',
130 130
       types: 0,
131 131
       columns: ['HD', 'HDF', 'HD+HP', 'HP', 'HF', 'SCUF', 'IUF', 'HFHD', 'HFHD+HP', 'PHF', 'HFR', 'HDF+HP', 'CRRT', '腹水回输'],
132
-      startTime: moment()
133
-        .subtract(30, 'days')
134
-        .format('YYYY-MM-DD'),
135
-      endTime: moment(new Date()).format('YYYY-MM-DD'),
132
+      startTime: '请选择',
133
+      endTime: '请选择',
136 134
       minDate: new Date(1970, 0, 1),
137 135
       maxDate: new Date(2025, 10, 1),
138 136
       currentDate: new Date(),
@@ -159,6 +157,7 @@ export default {
159 157
       this.typeShow = false
160 158
     },
161 159
     onConfirm (value) {
160
+      this.page = 1
162 161
       if (value === '全部') {
163 162
         this.types = 0
164 163
       }
@@ -207,10 +206,11 @@ export default {
207 206
       }
208 207
       this.type = value
209 208
       this.typeShow = false
209
+      this.scheduLing = []
210 210
       this.getScheduling(this.patient_id, this.limit, this.page, this.startTime, this.endTime, this.types)
211 211
     },
212 212
     getstartTime (value) {
213
-      console.log(value)
213
+      this.page = 1
214 214
       let year = value.getFullYear()
215 215
       let month = value.getMonth() + 1
216 216
       let day = value.getDate()
@@ -222,10 +222,12 @@ export default {
222 222
       }
223 223
 
224 224
       this.startTime = `${year}-${month}-${day}`
225
+      this.scheduLing = []
226
+      this.getScheduling(this.patient_id, this.limit, this.page, this.startTime, this.endTime, this.types)
225 227
       this.startShow = false
226 228
     },
227 229
     getstartTime2 (value) {
228
-      console.log(value)
230
+      this.page = 1
229 231
       let year = value.getFullYear()
230 232
       let month = value.getMonth() + 1
231 233
       let day = value.getDate()
@@ -237,6 +239,8 @@ export default {
237 239
       }
238 240
 
239 241
       this.endTime = `${year}-${month}-${day}`
242
+      this.scheduLing = []
243
+      this.getScheduling(this.patient_id, this.limit, this.page, this.startTime, this.endTime, this.types)
240 244
       this.endShow = false
241 245
     },
242 246
     getPatientDetail (patientid) {

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

@@ -928,29 +928,82 @@ export default {
928 928
       };
929 929
       savePatient(params).then(response => {
930 930
         if (response.data.state === 1) {
931
-          var patient = response.data.data.patient;
932
-          this.$toast("保存成功");
933
-          this.$router.push({ path: "/patients" });
934
-        } else {
935
-          this.$toast("手机号码已存在");
936
-          if (this.patientForm.sex === 1) {
937
-            this.patientForm.sex = "男";
938
-          }
939
-          if (this.patientForm.sex === 2) {
940
-            this.patientForm.sex = "女";
941
-          }
942
-          if (this.patientForm.patientsoure === 1) {
943
-            this.patientForm.patientsoure = "门诊";
931
+          var msg = response.data.data.msg;
932
+          console.log("msg", msg);
933
+          if (msg === "身份证号码已存在") {
934
+            this.$toast("身份证号码已存在");
935
+            if (this.patientForm.sex === 1) {
936
+              this.patientForm.sex = "男";
937
+            }
938
+            if (this.patientForm.sex === 2) {
939
+              this.patientForm.sex = "女";
940
+            }
941
+            if (this.patientForm.patientsoure === 1) {
942
+              this.patientForm.patientsoure = "门诊";
943
+            }
944
+            if (this.patientForm.patientsoure === 2) {
945
+              this.patientForm.patientsoure = "住院";
946
+            }
947
+            if (this.patientForm.lapseto === 1) {
948
+              this.patientForm.lapseto = "留治";
949
+            }
950
+            if (this.patientForm.lapseto === 2) {
951
+              this.patientForm.lapseto = "转出";
952
+            }
953
+            return false;
944 954
           }
945
-          if (this.patientForm.patientsoure === 2) {
946
-            this.patientForm.patientsoure = "住院";
955
+          if (msg === "手机号码已存在") {
956
+            this.$toast("手机号码已存在");
957
+            if (this.patientForm.sex === 1) {
958
+              this.patientForm.sex = "男";
959
+            }
960
+            if (this.patientForm.sex === 2) {
961
+              this.patientForm.sex = "女";
962
+            }
963
+            if (this.patientForm.patientsoure === 1) {
964
+              this.patientForm.patientsoure = "门诊";
965
+            }
966
+            if (this.patientForm.patientsoure === 2) {
967
+              this.patientForm.patientsoure = "住院";
968
+            }
969
+            if (this.patientForm.lapseto === 1) {
970
+              this.patientForm.lapseto = "留治";
971
+            }
972
+            if (this.patientForm.lapseto === 2) {
973
+              this.patientForm.lapseto = "转出";
974
+            }
975
+            return false;
947 976
           }
948
-          if (this.patientForm.lapseto === 1) {
949
-            this.patientForm.lapseto = "留治";
977
+          if (msg === "透析号已存在") {
978
+            this.$toast("透析号已存在");
979
+            if (this.patientForm.sex === 1) {
980
+              this.patientForm.sex = "男";
981
+            }
982
+            if (this.patientForm.sex === 2) {
983
+              this.patientForm.sex = "女";
984
+            }
985
+            if (this.patientForm.patientsoure === 1) {
986
+              this.patientForm.patientsoure = "门诊";
987
+            }
988
+            if (this.patientForm.patientsoure === 2) {
989
+              this.patientForm.patientsoure = "住院";
990
+            }
991
+            if (this.patientForm.lapseto === 1) {
992
+              this.patientForm.lapseto = "留治";
993
+            }
994
+            if (this.patientForm.lapseto === 2) {
995
+              this.patientForm.lapseto = "转出";
996
+            }
997
+            return false;
950 998
           }
951
-          if (this.patientForm.lapseto === 2) {
952
-            this.patientForm.lapseto = "转出";
999
+          var patient = response.data.data.patient;
1000
+          console.log("patient", patient);
1001
+          if (msg === undefined) {
1002
+            this.$toast("保存成功");
1003
+            this.$router.push({ path: "/patients" });
953 1004
           }
1005
+        } else {
1006
+          this.$toast("网络错误");
954 1007
         }
955 1008
       });
956 1009
     },

+ 86 - 10
src/pages/patients/editPatient.vue View File

@@ -641,9 +641,18 @@ export default {
641 641
             patientdetail.member_fistdate,
642 642
             "{y}-{m}-{d}"
643 643
           );
644
-          this.patientForm.fistDate = uParseTimeOne(
645
-            patientdetail.first_dialysis_date
646
-          );
644
+
645
+          console.log("首次透析日期", patientdetail.first_dialysis_date);
646
+
647
+          if (patientdetail.first_dialysis_date < 0) {
648
+            this.patientForm.fistDate = "";
649
+          }
650
+          if (patientdetail.first_dialysis_date > 0) {
651
+            this.patientForm.fistDate = uParseTimeOne(
652
+              patientdetail.first_dialysis_date
653
+            );
654
+          }
655
+
647 656
           this.patientForm.diagnose = patientdetail.diagnose;
648 657
           if (patientdetail.member_treatement === 1) {
649 658
             this.patientForm.treatmentMethod = "西医治疗";
@@ -800,11 +809,6 @@ export default {
800 809
         this.patientForm.lapseto = 0;
801 810
       }
802 811
 
803
-      if (this.resultTwo.length === 0 && this.result.indexOf("1") != -1) {
804
-        this.$toast("传染病不能为空");
805
-        return false;
806
-      }
807
-
808 812
       if (this.patientForm.patientsoure == "门诊") {
809 813
         this.patientForm.patientsoure = 1;
810 814
       }
@@ -980,8 +984,80 @@ export default {
980 984
       };
981 985
       updatedPatient(params).then(response => {
982 986
         if (response.data.state === 1) {
983
-          var patients = response.data.data.patients;
984
-          this.$router.push("/patientdetail?patientid=" + patients.id);
987
+          var msg = response.data.data.msg;
988
+          console.log("msg", msg);
989
+          if (msg === "身份证号码已存在") {
990
+            this.$toast("身份证号码已存在");
991
+            if (this.patientForm.sex === 1) {
992
+              this.patientForm.sex = "男";
993
+            }
994
+            if (this.patientForm.sex === 2) {
995
+              this.patientForm.sex = "女";
996
+            }
997
+            if (this.patientForm.patientsoure === 1) {
998
+              this.patientForm.patientsoure = "门诊";
999
+            }
1000
+            if (this.patientForm.patientsoure === 2) {
1001
+              this.patientForm.patientsoure = "住院";
1002
+            }
1003
+            if (this.patientForm.lapseto === 1) {
1004
+              this.patientForm.lapseto = "留治";
1005
+            }
1006
+            if (this.patientForm.lapseto === 2) {
1007
+              this.patientForm.lapseto = "转出";
1008
+            }
1009
+            return false;
1010
+          }
1011
+          if (msg == "手机号码已存在") {
1012
+            this.$toast("手机号码已存在");
1013
+            if (this.patientForm.sex === 1) {
1014
+              this.patientForm.sex = "男";
1015
+            }
1016
+            if (this.patientForm.sex === 2) {
1017
+              this.patientForm.sex = "女";
1018
+            }
1019
+            if (this.patientForm.patientsoure === 1) {
1020
+              this.patientForm.patientsoure = "门诊";
1021
+            }
1022
+            if (this.patientForm.patientsoure === 2) {
1023
+              this.patientForm.patientsoure = "住院";
1024
+            }
1025
+            if (this.patientForm.lapseto === 1) {
1026
+              this.patientForm.lapseto = "留治";
1027
+            }
1028
+            if (this.patientForm.lapseto === 2) {
1029
+              this.patientForm.lapseto = "转出";
1030
+            }
1031
+            return false;
1032
+          }
1033
+          if (msg === "透析号码已存在") {
1034
+            this.$toast("透析号码已存在");
1035
+            if (this.patientForm.sex === 1) {
1036
+              this.patientForm.sex = "男";
1037
+            }
1038
+            if (this.patientForm.sex === 2) {
1039
+              this.patientForm.sex = "女";
1040
+            }
1041
+            if (this.patientForm.patientsoure === 1) {
1042
+              this.patientForm.patientsoure = "门诊";
1043
+            }
1044
+            if (this.patientForm.patientsoure === 2) {
1045
+              this.patientForm.patientsoure = "住院";
1046
+            }
1047
+            if (this.patientForm.lapseto === 1) {
1048
+              this.patientForm.lapseto = "留治";
1049
+            }
1050
+            if (this.patientForm.lapseto === 2) {
1051
+              this.patientForm.lapseto = "转出";
1052
+            }
1053
+            return false;
1054
+          }
1055
+
1056
+          if (msg === undefined) {
1057
+            this.$toast("修改成功");
1058
+            var patients = response.data.data.patients;
1059
+            this.$router.push("/patientdetail?patientid=" + patients.id);
1060
+          }
985 1061
         }
986 1062
       });
987 1063
     },