|
@@ -98,7 +98,7 @@
|
98
|
98
|
</div>
|
99
|
99
|
</div>
|
100
|
100
|
</template>
|
101
|
|
-
|
|
101
|
+
|
102
|
102
|
<script>
|
103
|
103
|
import echarts from "echarts";
|
104
|
104
|
import LineChart from "../../components/LineChart";
|
|
@@ -210,7 +210,16 @@ export default {
|
210
|
210
|
};
|
211
|
211
|
},
|
212
|
212
|
methods: {
|
213
|
|
- changeTime() {},
|
|
213
|
+ changeTime(val) {
|
|
214
|
+ var time = this.getTimestamp(val) - this.getTimestamp(this.listQuery.end_time);
|
|
215
|
+ if (time > 0) {
|
|
216
|
+ this.$message.error("结束时间不能小于开始时间");
|
|
217
|
+ this.listQuery.start_time = "";
|
|
218
|
+ } else {
|
|
219
|
+ this.geStatistics()
|
|
220
|
+ }
|
|
221
|
+
|
|
222
|
+ },
|
214
|
223
|
changeEndTime(val) {
|
215
|
224
|
var time =
|
216
|
225
|
this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
|
|
@@ -218,8 +227,13 @@ export default {
|
218
|
227
|
this.$message.error("结束时间不能小于开始时间");
|
219
|
228
|
this.listQuery.end_time = "";
|
220
|
229
|
} else {
|
|
230
|
+ this.geStatistics()
|
221
|
231
|
}
|
222
|
232
|
},
|
|
233
|
+ getTimestamp(time) {
|
|
234
|
+ // 把时间日期转成时间戳
|
|
235
|
+ return new Date(time).getTime() / 1000;
|
|
236
|
+ },
|
223
|
237
|
handleSizeChange(limit) {
|
224
|
238
|
this.listQuery.limit = limit;
|
225
|
239
|
this.geStatistics();
|
|
@@ -236,7 +250,7 @@ export default {
|
236
|
250
|
geStatistics(this.listQuery).then(response=>{
|
237
|
251
|
if(response.data.state === 1){
|
238
|
252
|
var dtd = response.data.data.statistics
|
239
|
|
- console.log("statistics",dtd)
|
|
253
|
+ console.log("dtd",dtd)
|
240
|
254
|
var dd = {};
|
241
|
255
|
for (const index in dtd) {
|
242
|
256
|
if (!(dtd[index].date in dd)) {
|
|
@@ -272,10 +286,70 @@ export default {
|
272
|
286
|
this.tableData.push({ date: key, data: dd[key], total: total });
|
273
|
287
|
}
|
274
|
288
|
var ttd = response.data.data.ttd
|
275
|
|
- console.log("ttd",ttd)
|
276
|
|
-
|
|
289
|
+ console.log("ttd",ttd)
|
|
290
|
+ // for(let i=0;i<ttd.length;i++){
|
|
291
|
+ // if(ttd[i].mode_id == "1"){
|
|
292
|
+ // ttd[i].mode_id == "HD"
|
|
293
|
+ // }
|
|
294
|
+ // if(ttd[i].mode_id == "2"){
|
|
295
|
+ // ttd[i].mode_id == "HDF"
|
|
296
|
+ // }
|
|
297
|
+ // if(ttd[i].mode_id == "3"){
|
|
298
|
+ // ttd[i].mode_id == "HD+HP"
|
|
299
|
+ // }
|
|
300
|
+ // if(ttd[i].mode_id == "4"){
|
|
301
|
+ // ttd[i].mode_id == "HP"
|
|
302
|
+ // }
|
|
303
|
+ // if(ttd[i].mode_id == "5"){
|
|
304
|
+ // ttd[i].mode_id == "HF"
|
|
305
|
+ // }
|
|
306
|
+ // if(ttd[i].mode_id == "6"){
|
|
307
|
+ // ttd[i].mode_id == "SCUF"
|
|
308
|
+ // }
|
|
309
|
+ // if(ttd[i].mode_id == "7"){
|
|
310
|
+ // ttd[i].mode_id == "IUF"
|
|
311
|
+ // }
|
|
312
|
+ // if(ttd[i].mode_id == "8"){
|
|
313
|
+ // ttd[i].mode_id == "HFHD"
|
|
314
|
+ // }
|
|
315
|
+ // if(ttd[i].mode_id == "9"){
|
|
316
|
+ // ttd[i].mode_id == "HFHD+HP"
|
|
317
|
+ // }
|
|
318
|
+ // if(ttd[i].mode_id == "10"){
|
|
319
|
+ // ttd[i].mode_id == "PHF"
|
|
320
|
+ // }
|
|
321
|
+ // if(ttd[i].mode_id == "11"){
|
|
322
|
+ // ttd[i].mode_id == "HFR"
|
|
323
|
+ // }
|
|
324
|
+ // if(ttd[i].mode_id == "12"){
|
|
325
|
+ // ttd[i].mode_id == "HDF+HP"
|
|
326
|
+ // }
|
|
327
|
+ // if(ttd[i].mode_id == "13"){
|
|
328
|
+ // ttd[i].mode_id == "CRRT"
|
|
329
|
+ // }
|
|
330
|
+ // if(ttd[i].mode_id == "14"){
|
|
331
|
+ // ttd[i].mode_id == "腹水回输"
|
|
332
|
+ // }
|
|
333
|
+ // if(ttd[i].mode_id == "15"){
|
|
334
|
+ // ttd[i].mode_id == "HD前置换"
|
|
335
|
+ // }
|
|
336
|
+ // if(ttd[i].mode_id == "16"){
|
|
337
|
+ // ttd[i].mode_id == "HD后置换"
|
|
338
|
+ // }
|
|
339
|
+ // if(ttd[i].mode_id == "17"){
|
|
340
|
+ // ttd[i].mode_id == "HDF前置换"
|
|
341
|
+ // }
|
|
342
|
+ // if(ttd[i].mode_id == "18"){
|
|
343
|
+ // ttd[i].mode_id == "HDF后置换"
|
|
344
|
+ // }
|
|
345
|
+ //
|
|
346
|
+ // if(ttd[i].mode_id == "19"){
|
|
347
|
+ // ttd[i].mode_id == IUF+HD
|
|
348
|
+ // }
|
|
349
|
+ // }
|
|
350
|
+
|
277
|
351
|
this.total = response.data.data.total
|
278
|
|
-
|
|
352
|
+ console.log("total",this.total)
|
279
|
353
|
|
280
|
354
|
}
|
281
|
355
|
})
|
|
@@ -283,7 +357,7 @@ export default {
|
283
|
357
|
},
|
284
|
358
|
created(){
|
285
|
359
|
this.modeOptions = this.$store.getters.treatment_mode;
|
286
|
|
-
|
|
360
|
+
|
287
|
361
|
var nowDate = new Date();
|
288
|
362
|
var nowYear = nowDate.getFullYear();
|
289
|
363
|
var nowMonth = nowDate.getMonth() + 1;
|