|
@@ -18,6 +18,19 @@
|
18
|
18
|
>{{ item.label }}</li>
|
19
|
19
|
</ul>
|
20
|
20
|
</div>
|
|
21
|
+ <label class="title">
|
|
22
|
+ <span class="name">查看范围</span> :
|
|
23
|
+ </label>
|
|
24
|
+ <div class="time">
|
|
25
|
+ <ul class>
|
|
26
|
+ <li
|
|
27
|
+ :class="item.state == way ? 'active' : ''"
|
|
28
|
+ @click="selectWay(item.state)"
|
|
29
|
+ v-for="item in wayArr"
|
|
30
|
+ :key="item.value"
|
|
31
|
+ >{{ item.label }}</li>
|
|
32
|
+ </ul>
|
|
33
|
+ </div>
|
21
|
34
|
<label class="title">
|
22
|
35
|
<span class="name">日期查询</span> :
|
23
|
36
|
</label>
|
|
@@ -49,7 +62,7 @@
|
49
|
62
|
:picker-options="pickerOptions"
|
50
|
63
|
></el-date-picker>
|
51
|
64
|
</div>
|
52
|
|
- <div class="cell clearfix" style="align-items:normal">
|
|
65
|
+ <div v-if="way == 0" class="cell clearfix" style="align-items:normal">
|
53
|
66
|
<div style="float:left">
|
54
|
67
|
<div class="infoBox">
|
55
|
68
|
<div class="infoOne">
|
|
@@ -260,6 +273,12 @@
|
260
|
273
|
</div>
|
261
|
274
|
</div>
|
262
|
275
|
</div>
|
|
276
|
+ <div style="margin-bottom:20px;">
|
|
277
|
+ <line-chart :options="bar"></line-chart>
|
|
278
|
+ </div>
|
|
279
|
+ <div>
|
|
280
|
+ <line-chart :options="bar"></line-chart>
|
|
281
|
+ </div>
|
263
|
282
|
</div>
|
264
|
283
|
</div>
|
265
|
284
|
</template>
|
|
@@ -268,16 +287,19 @@
|
268
|
287
|
|
269
|
288
|
<script>
|
270
|
289
|
const moment = require('moment')
|
|
290
|
+import echarts from "echarts";
|
271
|
291
|
import { GetOICData } from "@/api/qcd";
|
272
|
292
|
import PieChart from "../qcd/components/BarChart";
|
273
|
293
|
import { uParseTime } from "@/utils/tools";
|
274
|
294
|
import BreadCrumb from "@/xt_pages/components/bread-crumb";
|
|
295
|
+import LineChart from "../qcd/components/LineChart";
|
275
|
296
|
import {getDialysisModeType,getTotalLapseCount,getTotalSexCount,getTotalInfectiousCount,getTotalAgeCount,getTotalDialysisCount} from "@/api/common/common"
|
276
|
297
|
export default {
|
277
|
298
|
name: "dialysisTotal",
|
278
|
299
|
components: {
|
279
|
300
|
PieChart,
|
280
|
|
- BreadCrumb
|
|
301
|
+ BreadCrumb,
|
|
302
|
+ LineChart
|
281
|
303
|
},
|
282
|
304
|
data() {
|
283
|
305
|
return {
|
|
@@ -324,6 +346,98 @@ export default {
|
324
|
346
|
rollOutTotal:0,
|
325
|
347
|
outTotal:0,
|
326
|
348
|
dialysisAge:[],
|
|
349
|
+
|
|
350
|
+ way: 0,
|
|
351
|
+ wayArr: [
|
|
352
|
+ { value: 0, label: "统计表", state: 0 },
|
|
353
|
+ { value: 1, label: "统计图", state: 1 }
|
|
354
|
+ ],
|
|
355
|
+ bar: {
|
|
356
|
+ title: {
|
|
357
|
+ text: "ECharts 入门示例"
|
|
358
|
+ },
|
|
359
|
+ tooltip: {},
|
|
360
|
+ legend: {
|
|
361
|
+ data: [],
|
|
362
|
+ left: 0
|
|
363
|
+ },
|
|
364
|
+ xAxis: {
|
|
365
|
+ data: []
|
|
366
|
+ },
|
|
367
|
+ yAxis: {
|
|
368
|
+ axisLabel: {
|
|
369
|
+ formatter: "{value} %"
|
|
370
|
+ },
|
|
371
|
+ show: false
|
|
372
|
+ },
|
|
373
|
+ series: [
|
|
374
|
+ {
|
|
375
|
+ name: "",
|
|
376
|
+ type: "bar",
|
|
377
|
+ data: [],
|
|
378
|
+ barWidth: 30,
|
|
379
|
+ label: {
|
|
380
|
+ normal: {
|
|
381
|
+ show: true,
|
|
382
|
+ position: "top"
|
|
383
|
+ }
|
|
384
|
+ },
|
|
385
|
+ //配置样式
|
|
386
|
+ itemStyle: {
|
|
387
|
+ //通常情况下:
|
|
388
|
+
|
|
389
|
+ //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
|
|
390
|
+ normal: {
|
|
391
|
+ color: function(params) {
|
|
392
|
+ //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
|
|
393
|
+ var colorList = [
|
|
394
|
+ ["#A9E0F3", "#9FBDFC"],
|
|
395
|
+
|
|
396
|
+ ["#FFD7C0", "#FF9994"]
|
|
397
|
+ ];
|
|
398
|
+
|
|
399
|
+ var index = params.dataIndex;
|
|
400
|
+ if (params.dataIndex >= colorList.length) {
|
|
401
|
+ index = params.dataIndex % colorList.length;
|
|
402
|
+ }
|
|
403
|
+
|
|
404
|
+ return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
405
|
+ { offset: 0, color: colorList[index][0] },
|
|
406
|
+ // { offset: 0.5, color: colorList[index][1] },
|
|
407
|
+ { offset: 1, color: colorList[index][1] }
|
|
408
|
+ ]);
|
|
409
|
+ },
|
|
410
|
+ barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
|
|
411
|
+ },
|
|
412
|
+
|
|
413
|
+ //鼠标悬停时:
|
|
414
|
+ emphasis: {
|
|
415
|
+ shadowBlur: 10,
|
|
416
|
+ shadowOffsetX: 0,
|
|
417
|
+ shadowColor: "rgba(0, 0, 0, 0.2)"
|
|
418
|
+ }
|
|
419
|
+ }
|
|
420
|
+ }
|
|
421
|
+ ],
|
|
422
|
+ dataZoom: [
|
|
423
|
+ {
|
|
424
|
+ // Y轴固定,让内容滚动
|
|
425
|
+ type: 'slider',
|
|
426
|
+ show: false,
|
|
427
|
+ xAxisIndex: [0],
|
|
428
|
+ start: 1,
|
|
429
|
+ end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
|
|
430
|
+ zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
|
|
431
|
+ },
|
|
432
|
+ {
|
|
433
|
+ type: 'inside',
|
|
434
|
+ xAxisIndex: [0],
|
|
435
|
+ start: 1,
|
|
436
|
+ end: 20,
|
|
437
|
+ zoomLock: true // 锁定区域禁止缩放
|
|
438
|
+ }
|
|
439
|
+ ]
|
|
440
|
+ }
|
327
|
441
|
};
|
328
|
442
|
},
|
329
|
443
|
methods: {
|
|
@@ -610,6 +724,9 @@ export default {
|
610
|
724
|
|
611
|
725
|
}
|
612
|
726
|
})
|
|
727
|
+ },
|
|
728
|
+ selectWay(index){
|
|
729
|
+ this.way = index
|
613
|
730
|
}
|
614
|
731
|
},
|
615
|
732
|
created() {
|