From ed2117c738eedd3143d3b2ad6b0d40b2116afcf6 Mon Sep 17 00:00:00 2001 From: liuguocan <527956374@qq.com> Date: 星期二, 28 十一月 2023 14:44:49 +0800 Subject: [PATCH] 首页/物品分发/物品报废 --- admin-web/src/views/dashboard/components/LBJETJ.vue | 54 ++++++++++++++++++++++++------------------------------ 1 files changed, 24 insertions(+), 30 deletions(-) diff --git a/admin-web/src/views/dashboard/components/GDLX.vue b/admin-web/src/views/dashboard/components/LBJETJ.vue similarity index 67% copy from admin-web/src/views/dashboard/components/GDLX.vue copy to admin-web/src/views/dashboard/components/LBJETJ.vue index 1d2eda7..36d2057 100644 --- a/admin-web/src/views/dashboard/components/GDLX.vue +++ b/admin-web/src/views/dashboard/components/LBJETJ.vue @@ -1,14 +1,19 @@ <template> <div style="width: 100%"> - <div id="main3" /> - <p style="text-align: center;font-size: 16px;font-weight: 600">宸ュ崟绫诲瀷</p> + <el-card class="box-card"> + <div slot="header" class="clearfix"> + <span class="font-18 font-bold">绫诲埆閲戦缁熻</span> + </div> + <div id="LBJETJ" style="height: 300px"/> + </el-card> </div> </template> <script> import * as echarts from 'echarts'; +import * as dash from "@/api/dashboard/dash"; export default { - name: 'GDLX', + name: 'LBSLTJ', props: { activeId: { type: String, @@ -21,15 +26,10 @@ options: {}, }; }, - mounted() { + mounted(){ this.getCenterLine(); - // 鐩戝惉灞忓箷瀹藉害鍙樺寲锛氬綋娴忚鍣ㄥ彂鐢焤esize浜嬩欢鐨勬椂鍊欙紝瑙﹀彂echart鐨剅esize浜嬩欢锛岄噸缁榗anvas - window.addEventListener('resize', () => { - this.changeWidth(); - }); }, methods: { - getCenterLine() { // getCenterLine({ // id: this.activeId, @@ -39,8 +39,12 @@ // endDay: this.value2 ? this.value2[1] : null // }).then(res => { // const data = res.data - var chartDom = document.getElementById('main3'); + var chartDom = document.getElementById('LBJETJ'); this.myChart = echarts.init(chartDom); + // 鐩戝惉灞忓箷瀹藉害鍙樺寲锛氬綋娴忚鍣ㄥ彂鐢焤esize浜嬩欢鐨勬椂鍊欙紝瑙﹀彂echart鐨剅esize浜嬩欢锛岄噸缁榗anvas + window.addEventListener('resize', () => { + this.changeWidth(); + }); this.options = { color: [ '#1877FF','#5EDEA5','#F7BE12','#55C6E1','#ED653B'], tooltip: { @@ -49,27 +53,17 @@ type: 'shadow', }, }, - - // toolbox: { - // show: true, - // orient: 'vertical', - // left: 'right', - // top: 'center', - // feature: { - // mark: { show: true }, - // dataView: { show: true, readOnly: false }, - // magicType: { show: true, type: ['line', 'bar', 'stack'] }, - // restore: { show: true }, - // saveAsImage: { show: true }, - // }, - // }, - + legend: { + orient: 'vertical', + right: 0, + top: 60, + bottom: 20, + }, series: [ { name: 'Access From', type: 'pie', - radius: ['40%','65%'], minAngle: 2, // 鏈�灏忕殑鎵囧尯瑙掑害锛�0~360锛夛紝鐢ㄤ簬闃叉鏌愪釜鍊艰繃灏忓鑷存墖鍖哄お灏忓奖鍝嶄氦浜� avoidLabelOverlap: true, // 鏄惁鍚敤闃叉鏍囩閲嶅彔绛栫暐 itemStyle: { @@ -88,9 +82,9 @@ } }, data: [ - { value: 1048, name: '璁″垝宸ュ崟' }, - { value: 735, name: '鏁呴殰宸ュ崟' }, - { value: 580, name: '鏃ュ父宸ュ崟' }, + { value: 100, name: '绛夌骇涓�' }, + { value: 100, name: '绛夌骇浜�' }, + { value: 100, name: '绛夌骇涓�' }, ] }] @@ -104,7 +98,7 @@ }; </script> <style lang="scss" scoped> -#main3 { +#main2 { width: 100%; height: 300px; } -- Gitblit v1.9.1