|
@@ -29,9 +29,13 @@
|
29
|
29
|
finished-text="没有更多了"
|
30
|
30
|
@load="onLoad"
|
31
|
31
|
>
|
32
|
|
- <div class="adviceOne" v-for="item in 3" :key="item">
|
|
32
|
+ <div
|
|
33
|
+ class="adviceOne"
|
|
34
|
+ v-for="(item, index) in doctorAdvice"
|
|
35
|
+ :key="index"
|
|
36
|
+ >
|
33
|
37
|
<div class="adviceTitle">
|
34
|
|
- <p>2019.09.01</p>
|
|
38
|
+ <p>{{ getTime(item.advice_date) }}</p>
|
35
|
39
|
<van-icon
|
36
|
40
|
class="ellipsis"
|
37
|
41
|
name="ellipsis"
|
|
@@ -134,6 +138,7 @@
|
134
|
138
|
|
135
|
139
|
<script>
|
136
|
140
|
import { getDoctorAdvices, getPatientDetail } from "@/api/patient/patient";
|
|
141
|
+import { uParseTime } from "@/utils/tools";
|
137
|
142
|
const moment = require("moment");
|
138
|
143
|
export default {
|
139
|
144
|
data() {
|
|
@@ -151,6 +156,9 @@ export default {
|
151
|
156
|
.subtract(30, "days")
|
152
|
157
|
.format("YYYY-MM-DD"),
|
153
|
158
|
endTime: moment(new Date()).format("YYYY-MM-DD"),
|
|
159
|
+ endTimes: moment(new Date())
|
|
160
|
+ .add(1, "days")
|
|
161
|
+ .format("YYYY-MM-DD"),
|
154
|
162
|
minDate: new Date(1970, 0, 1),
|
155
|
163
|
maxDate: new Date(2025, 10, 1),
|
156
|
164
|
currentDate: new Date(),
|
|
@@ -162,7 +170,8 @@ export default {
|
162
|
170
|
},
|
163
|
171
|
total: "",
|
164
|
172
|
showOne: true,
|
165
|
|
- showTwo: false
|
|
173
|
+ showTwo: false,
|
|
174
|
+ doctorAdvice: []
|
166
|
175
|
};
|
167
|
176
|
},
|
168
|
177
|
methods: {
|
|
@@ -208,26 +217,26 @@ export default {
|
208
|
217
|
console.log("val", val);
|
209
|
218
|
},
|
210
|
219
|
getDoctorAdvices(patientid) {
|
211
|
|
- console.log("类型是什么", this.type);
|
212
|
220
|
if (this.type === "全部") {
|
213
|
221
|
this.form.type = 0;
|
214
|
222
|
}
|
215
|
|
- if (this.type === "透析患者") {
|
|
223
|
+ if (this.type === "长期医嘱") {
|
216
|
224
|
this.form.type = 1;
|
217
|
225
|
}
|
218
|
|
- if (this.type === "慢病患者") {
|
|
226
|
+ if (this.type === "临时医嘱") {
|
219
|
227
|
this.form.type = 2;
|
220
|
228
|
}
|
221
|
229
|
getDoctorAdvices(
|
222
|
230
|
patientid,
|
223
|
231
|
this.form.type,
|
224
|
232
|
this.startTime,
|
225
|
|
- this.endTime,
|
226
|
|
- this.limit,
|
227
|
|
- this.page
|
|
233
|
+ this.endTimes,
|
|
234
|
+ this.form.limit,
|
|
235
|
+ this.form.page
|
228
|
236
|
).then(response => {
|
229
|
237
|
if (response.data.state === 1) {
|
230
|
238
|
var advice = response.data.data.advice;
|
|
239
|
+ this.doctorAdvice = advice;
|
231
|
240
|
console.log("医嘱", advice);
|
232
|
241
|
var total = response.data.data.total;
|
233
|
242
|
console.log("总计", total);
|
|
@@ -249,6 +258,13 @@ export default {
|
249
|
258
|
this.patientName = patientDetail.name;
|
250
|
259
|
}
|
251
|
260
|
});
|
|
261
|
+ },
|
|
262
|
+ getTime(time) {
|
|
263
|
+ // return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
|
|
264
|
+ return uParseTime(time, "{y}-{m}-{d}");
|
|
265
|
+ },
|
|
266
|
+ getTimes(time) {
|
|
267
|
+ return uParseTime(time, "{h}:{i}:{s}");
|
252
|
268
|
}
|
253
|
269
|
},
|
254
|
270
|
created() {
|