From d12f1b8ec4eed1818cbf6d923e3d36658957d995 Mon Sep 17 00:00:00 2001 From: ljx <864490211@qq.com> Date: Mon, 24 Nov 2025 10:55:45 +0800 Subject: [PATCH] =?UTF-8?q?q=3D5=20=E5=A0=A1=E5=BA=A7=20=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E6=A0=B7=E5=93=81=E6=83=85=E5=86=B5=E4=BF=AE=E6=94=B9=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E6=9C=88=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/baozuo-demo3/LeftCmp.vue | 22 ++++++++++++---------- src/main.js | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/components/baozuo-demo3/LeftCmp.vue b/src/components/baozuo-demo3/LeftCmp.vue index 2143ff3..407060c 100644 --- a/src/components/baozuo-demo3/LeftCmp.vue +++ b/src/components/baozuo-demo3/LeftCmp.vue @@ -47,9 +47,9 @@
- {{ item.value }}% + {{currentMonth>=index+1? item.value : '0' }}%
@@ -81,7 +81,7 @@ import * as echarts from 'echarts'; import testRes from './test' import LeftChart2 from './LeftChart2' -console.log(testRes) +const currentMonth = new Date().getMonth() + 1; export default { name: 'CenterCmp', components: { @@ -124,6 +124,7 @@ export default { return { + currentMonth: currentMonth, config: { data: [ { @@ -204,13 +205,13 @@ export default { { name: '03月', value: 90 }, { name: '04月', value: 85 }, { name: '05月', value: 95 }, - { name: '06月', value: 0 }, - { name: '07月', value: 0 }, - { name: '08月', value: 0 }, - { name: '09月', value: 0 }, - { name: '10月', value: 0 }, - { name: '11月', value: 0 }, - { name: '12月', value: 0 }, + { name: '06月', value: 99 }, + { name: '07月', value: 100 }, + { name: '08月', value: 88 }, + { name: '09月', value: 92 }, + { name: '10月', value: 96 }, + { name: '11月', value: 89 }, + { name: '12月', value: 97 }, ], staffList: [ { name: '负责人', arrived: 1, total: 1 }, @@ -234,6 +235,7 @@ export default { mounted() { this.initRightChart(); this.initPieChart(); // 新增初始化饼图方法 + }, // 在methods中添加方法 methods: { diff --git a/src/main.js b/src/main.js index 8436592..83f7ec3 100644 --- a/src/main.js +++ b/src/main.js @@ -1,7 +1,7 @@ import Vue from 'vue' import App from './App.vue' // import App from './AppV2.vue' -//import App from './AppV3.vue' +// import App from './AppV3.vue' import ElementUI from 'element-ui' import 'element-ui/lib/theme-chalk/index.css'