From 11539543075b17d64a2b8d2c4a085634ba683eed Mon Sep 17 00:00:00 2001 From: shj <1790240199@qq.com> Date: 星期五, 15 七月 2022 16:47:05 +0800 Subject: [PATCH] Merge branch 'master' of https://sinanoaq.cn:8888/r/gtqtOut --- src/views/facilityManagement/EquipmentStatistics/index.vue | 67 +++++++++++++++++++++++++++++++++ 1 files changed, 67 insertions(+), 0 deletions(-) diff --git a/src/views/facilityManagement/EquipmentStatistics/index.vue b/src/views/facilityManagement/EquipmentStatistics/index.vue new file mode 100644 index 0000000..65cda52 --- /dev/null +++ b/src/views/facilityManagement/EquipmentStatistics/index.vue @@ -0,0 +1,67 @@ +<template> + <div class="box"> + <div class="title">设备设施统计</div> + <div ref="main" style="width: 100%; height: 400px"></div> + </div> +</template> +<script lang="ts"> +import { defineComponent, onMounted, ref } from 'vue'; +import * as echarts from 'echarts'; +export default defineComponent({ + setup() { + const main = ref(); + const init = () => { + var myChart = echarts.init(main.value); + var option = { + tooltip: {}, + grid: { + left: '3%', + right: '4%', + bottom: '5%', + containLabel: true, + }, + xAxis: { + type: 'category', + data: ['在用数', '报废数', '维修数', '停用数'], + }, + yAxis: { + type: 'value', + name: '数量', + nameTextStyle: { + color: '#aaa', + nameLocation: 'start', + }, + }, + color: ['#6394f9'], + series: [ + { + data: [120, 200, 150, 80, 70, 110, 130], + type: 'bar', + }, + ], + }; + + myChart.setOption(option); + }; + onMounted(() => { + init(); + }); + return { + init, + onMounted, + main, + }; + }, +}); +</script> +<style scoped> +.box { + background-color: #fff; + box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%); +} +.title { + font-size: 16px; + border-bottom: 1px solid #eee; + padding: 20px; +} +</style> -- Gitblit v1.9.2