|
@@ -644,21 +644,21 @@ export default {
|
644
|
644
|
domId: "onlineEcharts1",
|
645
|
645
|
onlineNum: this.onlineDeviceList[0].num,
|
646
|
646
|
onlineTatalNum: this.onlineDeviceList[0].tatalnum,
|
647
|
|
- onlineColor: "#339CFF",
|
|
647
|
+ onlineColor: ["#ABD5FF", "#339CFF", "#E2EEFE"],
|
648
|
648
|
subtext: "最近1小时"
|
649
|
649
|
});
|
650
|
650
|
this.initOnlineEcharts({
|
651
|
651
|
domId: "onlineEcharts2",
|
652
|
652
|
onlineNum: this.onlineDeviceList[1].num,
|
653
|
653
|
onlineTatalNum: this.onlineDeviceList[1].tatalnum,
|
654
|
|
- onlineColor: "#52C41A",
|
|
654
|
+ onlineColor: ["#D3F6C1", "#52C41A", "#E9FFDE"],
|
655
|
655
|
subtext: "最近48小时"
|
656
|
656
|
});
|
657
|
657
|
this.initOnlineEcharts({
|
658
|
658
|
domId: "onlineEcharts3",
|
659
|
659
|
onlineNum: this.onlineDeviceList[2].num,
|
660
|
660
|
onlineTatalNum: this.onlineDeviceList[2].tatalnum,
|
661
|
|
- onlineColor: "#ED4A99",
|
|
661
|
+ onlineColor: ["#FCC9E3", "#ED4A99", "#FFE0EF"],
|
662
|
662
|
subtext: "最近7天"
|
663
|
663
|
});
|
664
|
664
|
} else {
|
|
@@ -669,60 +669,136 @@ export default {
|
669
|
669
|
initOnlineEcharts({ onlineNum, onlineTatalNum, onlineColor, domId }) {
|
670
|
670
|
let options = {
|
671
|
671
|
tooltip: {
|
672
|
|
- trigger: "item",
|
673
|
|
- formatter: "{d}%",
|
674
|
|
- show: true
|
|
672
|
+ show: false
|
675
|
673
|
},
|
676
|
674
|
legend: {
|
677
|
675
|
show: false
|
678
|
676
|
},
|
679
|
677
|
series: [
|
680
|
678
|
{
|
|
679
|
+ z: 1,
|
|
680
|
+ silent: true,
|
681
|
681
|
name: "底盘",
|
682
|
682
|
type: "pie",
|
|
683
|
+ startAngle: 90,
|
683
|
684
|
radius: ["40%", "55%"],
|
684
|
685
|
center: ["50%", "45%"],
|
685
|
|
- avoidLabelOverlap: false,
|
686
|
|
- hoverAnimation: false,
|
687
|
|
- label: {
|
688
|
|
- normal: {
|
689
|
|
- show: false,
|
690
|
|
- position: "center"
|
691
|
|
- },
|
692
|
|
- emphasis: {
|
693
|
|
- show: false
|
694
|
|
- }
|
|
686
|
+ itemStyle: {
|
|
687
|
+ borderRadius: "50%",
|
|
688
|
+ borderColor: "none",
|
|
689
|
+ borderWidth: 1
|
695
|
690
|
},
|
696
|
|
- labelLine: {
|
697
|
|
- normal: {
|
698
|
|
- show: false
|
699
|
|
- }
|
|
691
|
+ label: {
|
|
692
|
+ show: false
|
700
|
693
|
},
|
701
|
694
|
data: [
|
702
|
695
|
{
|
703
|
696
|
value: onlineNum,
|
704
|
697
|
name: "在线",
|
705
|
|
- selected: false,
|
706
|
698
|
itemStyle: {
|
707
|
|
- color: onlineColor
|
|
699
|
+ normal: {
|
|
700
|
+ color: {
|
|
701
|
+ // 完成的圆环的颜色
|
|
702
|
+ colorStops: [
|
|
703
|
+ {
|
|
704
|
+ offset: 0,
|
|
705
|
+ color: onlineColor[0]
|
|
706
|
+ },
|
|
707
|
+ {
|
|
708
|
+ offset: 1,
|
|
709
|
+ color: onlineColor[1]
|
|
710
|
+ }
|
|
711
|
+ ]
|
|
712
|
+ },
|
|
713
|
+ label: {
|
|
714
|
+ show: false
|
|
715
|
+ },
|
|
716
|
+ labelLine: {
|
|
717
|
+ show: false
|
|
718
|
+ }
|
|
719
|
+ }
|
708
|
720
|
}
|
709
|
721
|
},
|
710
|
722
|
{
|
711
|
723
|
value: onlineTatalNum - onlineNum,
|
712
|
|
- tooltip: {
|
713
|
|
- show: false
|
714
|
|
- },
|
715
|
724
|
name: "离线",
|
716
|
725
|
itemStyle: {
|
717
|
|
- color: "#E9EEF4"
|
|
726
|
+ color: "rgba(255,255,255,0)",
|
|
727
|
+ decal: {
|
|
728
|
+ symbol: "none"
|
|
729
|
+ }
|
718
|
730
|
},
|
719
|
731
|
label: {
|
720
|
|
- normal: {
|
721
|
|
- show: false
|
|
732
|
+ show: false
|
|
733
|
+ }
|
|
734
|
+ }
|
|
735
|
+ ]
|
|
736
|
+ },
|
|
737
|
+ // 白色小圆
|
|
738
|
+ {
|
|
739
|
+ z: 2,
|
|
740
|
+ name: "cricle",
|
|
741
|
+ type: "pie",
|
|
742
|
+ radius: ["41%", "53.5%"],
|
|
743
|
+ center: ["50%", "45%"],
|
|
744
|
+ silent: true,
|
|
745
|
+ startAngle:
|
|
746
|
+ 108 + ((onlineTatalNum - onlineNum) / onlineTatalNum) * 360,
|
|
747
|
+ itemStyle: {
|
|
748
|
+ borderRadius: "50%",
|
|
749
|
+ borderColor: "none",
|
|
750
|
+ borderWidth: 1
|
|
751
|
+ },
|
|
752
|
+ label: {
|
|
753
|
+ show: false
|
|
754
|
+ },
|
|
755
|
+ data: [
|
|
756
|
+ {
|
|
757
|
+ value: 4,
|
|
758
|
+ name: "Search Engine",
|
|
759
|
+ itemStyle: {
|
|
760
|
+ color: "#fff"
|
|
761
|
+ }
|
|
762
|
+ },
|
|
763
|
+ {
|
|
764
|
+ value: 100,
|
|
765
|
+ itemStyle: {
|
|
766
|
+ color: "none",
|
|
767
|
+ decal: {
|
|
768
|
+ symbol: "none"
|
722
|
769
|
}
|
|
770
|
+ },
|
|
771
|
+ label: {
|
|
772
|
+ show: false
|
723
|
773
|
}
|
724
|
774
|
}
|
725
|
775
|
]
|
|
776
|
+ },
|
|
777
|
+ // 背景
|
|
778
|
+ {
|
|
779
|
+ z: 0,
|
|
780
|
+ type: "pie",
|
|
781
|
+ name: "内层细圆环",
|
|
782
|
+ radius: ["40%", "55%"],
|
|
783
|
+ center: ["50%", "45%"],
|
|
784
|
+ startAngle: 90,
|
|
785
|
+ hoverAnimation: false,
|
|
786
|
+ clockWise: true,
|
|
787
|
+ silent: true,
|
|
788
|
+ itemStyle: {
|
|
789
|
+ normal: {
|
|
790
|
+ color: onlineColor[2],
|
|
791
|
+ shadowBlur: 0,
|
|
792
|
+ shadowColor: "#66666a"
|
|
793
|
+ }
|
|
794
|
+ },
|
|
795
|
+ tooltip: {
|
|
796
|
+ show: false
|
|
797
|
+ },
|
|
798
|
+ label: {
|
|
799
|
+ show: false
|
|
800
|
+ },
|
|
801
|
+ data: [onlineTatalNum]
|
726
|
802
|
}
|
727
|
803
|
]
|
728
|
804
|
};
|