From d1439b8bb1ebaf6410e8f26b79b1ac364797a658 Mon Sep 17 00:00:00 2001 From: wuyize Date: Wed, 13 Jul 2022 17:11:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=B8=80=E4=BA=9B=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TendencyChart.vue | 13 ++++++------- src/components/echartsBar.vue | 12 +++++++++--- src/views/ProjectGroup.vue | 2 +- src/views/ProjectInfo.vue | 26 +++++++++++++------------- 4 files changed, 29 insertions(+), 24 deletions(-) diff --git a/src/components/TendencyChart.vue b/src/components/TendencyChart.vue index 69f4452..6f00f3b 100644 --- a/src/components/TendencyChart.vue +++ b/src/components/TendencyChart.vue @@ -20,18 +20,17 @@ export default { }, watch: { enable: function (val) { + console.log("ENABLE"+val) if(val) this.initEcharts(); }, }, - computed: { - getTotalNumber() { - return this.dataList.reduce((prev, item) => { - prev += item.value - return prev - }, 0); - } + mounted() { + console.log("ENABLE"+this.enable) + if(this.enable) + this.initEcharts(); }, + methods: { // 获取配置 getOption() { diff --git a/src/components/echartsBar.vue b/src/components/echartsBar.vue index e6a0415..01a7f0c 100644 --- a/src/components/echartsBar.vue +++ b/src/components/echartsBar.vue @@ -20,14 +20,19 @@ export default { } }, props: { - task: {} + task: null }, - + emits: ['mounted'], watch: { task: function (val) { + console.log("initEchartsBar") + console.log(this.task) this.initEcharts() } }, + mounted() { + this.$emit("mounted"); + }, methods: { @@ -113,9 +118,10 @@ export default { this.init() }); + const that = this //this.chart.setOption(option); window.addEventListener("resize", function () { - this.chart.resize(); + that.chart.resize(); }); } diff --git a/src/views/ProjectGroup.vue b/src/views/ProjectGroup.vue index 8f24566..4c077c9 100644 --- a/src/views/ProjectGroup.vue +++ b/src/views/ProjectGroup.vue @@ -5,7 +5,7 @@

项目团队

- 新增成员 + 新增成员
diff --git a/src/views/ProjectInfo.vue b/src/views/ProjectInfo.vue index 4cd95af..bad0099 100644 --- a/src/views/ProjectInfo.vue +++ b/src/views/ProjectInfo.vue @@ -52,17 +52,12 @@ display: flex;flex-direction:row; justify-content: space-between;background-color: white; border-radius: 10px;">

项目

-
+ +

个人

-
- - + + @@ -73,7 +68,9 @@

详细信息

- 编辑 + 编辑 +
@@ -260,7 +257,7 @@ title="提示" v-model="dialogVisible" width="30%" - > + >
确认删除该公告?