123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247 |
- <template>
- <div class="left-charts">
- <div class="left-chart-item">
- <dv-charts class="item-chart" :option="option" />
- <div class="item-chart-word-num zongshu">总数</div>
- </div>
- <div class="left-chart-item">
- <dv-charts class="item-chart" :option="option1" />
- <div class="item-chart-word-num zaixianshu">在线数</div>
- </div>
- <div class="left-chart-item">
- <dv-charts class="item-chart" :option="option2" />
- <div class="item-chart-word-num lixianshu">离线数</div>
- </div>
- <div class="left-chart-item">
- <dv-charts class="item-chart" :option="option3" />
- <div class="item-chart-word-num gaojingshu">告警数</div>
- </div>
- </div>
- </template>
- <script>
- export default {
- name: "BottomCharts",
- props:{
- data:{
- type:Object,
- default:{},
- }
- },
- components: {
- },
- data() {
- return {
- equTotalData: {},
- deviceCount: 0,
- deviceOnline: 0,
- un_deviceOnline: 0,
- alarmCount: 0,
- option: {
- series: [
- {
- type: "gauge",
- startAngle: -Math.PI / 2,
- endAngle: Math.PI * 1.5,
- arcLineWidth: 10,
- radius:'80%',
- data: [
- {
- name: "itemA",
- value: this.data.deviceCount,
- // gradient: ["#03c2fd", "#1ed3e5", "#2fded6"],
- gradient: ["#01dcdf"],
- },
- ],
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- pointer: {
- show: false,
- },
- dataItemStyle: {
- lineCap: "round",
- },
- details: {
- show: true,
- formatter: "{value}",
- style: {
- fill: "#1ed3e5",
- fontSize: 30,
- },
- },
- },
- ],
- },
- option1: {
- series: [
- {
- type: "gauge",
- startAngle: -Math.PI / 2,
- endAngle: Math.PI * 1.5,
- arcLineWidth: 10,
- radius:'80%',
- data: [
- {
- name: "itemA",
- value: this.data.deviceOnline,
- // gradient: ["#03c2fd", "#1ed3e5", "#2fded6"],
- gradient: ["#33faaa"],
- },
- ],
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- pointer: {
- show: false,
- },
- dataItemStyle: {
- lineCap: "round",
- },
- details: {
- show: true,
- formatter: "{value}",
- style: {
- fill: "#1ed3e5",
- fontSize: 30,
- },
- },
- },
- ],
- },
- option2: {
- series: [
- {
- type: "gauge",
- startAngle: -Math.PI / 2,
- endAngle: Math.PI * 1.5,
- arcLineWidth: 10,
- radius:'80%',
- data: [
- {
- name: "itemA",
- value: this.data.un_deviceOnline,
- // gradient: ["#03c2fd", "#1ed3e5", "#2fded6"],
- gradient: ["#f7ac20"],
- },
- ],
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- pointer: {
- show: false,
- },
- dataItemStyle: {
- lineCap: "round",
- },
- details: {
- show: true,
- formatter: "{value}",
- style: {
- fill: "#1ed3e5",
- fontSize: 30,
- },
- },
- },
- ],
- },
- option3: {
- series: [
- {
- type: "gauge",
- startAngle: -Math.PI / 2,
- endAngle: Math.PI * 1.5,
- arcLineWidth: 10,
- radius:'80%',
- data: [
- {
- name: "itemA",
- value: this.data.alarmCount,
- // gradient: ["#03c2fd", "#1ed3e5", "#2fded6"],
- gradient: ["#f93496", "#f61967", "#f2053e"],
- },
- ],
- axisLabel: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- pointer: {
- show: false,
- },
- dataItemStyle: {
- lineCap: "round",
- },
- details: {
- show: true,
- formatter: "{value}",
- style: {
- fill: "#1ed3e5",
- fontSize: 30,
- },
- },
- animationFrame: 10,
- },
- ],
- },
- };
- },
- mounted() {
- // this.deviceView();
- },
- methods: {
-
- },
- };
- </script>
- <style lang="scss">
- .left-charts {
- width: 100%;
- height: 80%;
- display: flex;
- position: relative;
- .left-chart-item {
- width: 25%;
- height: 100%;
- box-sizing: border-box;
- text-align: center;
- .item-chart {
- height: calc(100% - 80px);
- position: relative;
- }
- .item-chart-word-num {
- font-size: 20px;
- margin-top: 15px;
- font-weight: bold;
- }
- .zongshu {
- color: rgb(0, 253, 250);
- }
- .zaixianshu {
- color: rgb(7, 247, 168);
- }
- .lixianshu {
- color: rgb(227, 179, 55);
- }
- .gaojingshu {
- color: rgb(245, 2, 61);
- }
- }
- }
- </style>
|