From b9aacff047fc8a662c99f40fc02e9a5f41c9972b Mon Sep 17 00:00:00 2001 From: zhouhaibin Date: Thu, 9 May 2024 15:26:18 +0800 Subject: [PATCH] =?UTF-8?q?=E2=80=9C=E6=96=B0=E5=A2=9E=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=8F=AF=E8=A7=86=E5=8C=96=E5=9B=BE=E7=BA=B8=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/main.ts | 6 +- .../workbench/components/DonutChart.vue | 90 ++++++++ .../components/DonutChartByMoney.vue | 68 ++++++ .../workbench/components/PieChart.vue | 51 +++++ src/views/dashboard/workbench/index.vue | 163 ++++++++++++--- .../projectPlan/planinfoFileDetail.vue | 3 +- .../planSummary/indeForDashboard.vue | 193 ++++++++++++++++++ .../projectSummary/planSummary/index.vue | 13 +- 9 files changed, 548 insertions(+), 40 deletions(-) create mode 100644 src/views/dashboard/workbench/components/DonutChart.vue create mode 100644 src/views/dashboard/workbench/components/DonutChartByMoney.vue create mode 100644 src/views/dashboard/workbench/components/PieChart.vue create mode 100644 src/views/projectSummary/planSummary/indeForDashboard.vue diff --git a/package.json b/package.json index e547be8..9f49143 100644 --- a/package.json +++ b/package.json @@ -100,6 +100,7 @@ "tinymce": "^5.10.7", "unocss": "0.53.4", "vditor": "^3.9.4", + "vue-echarts": "^6.6.0", "vue": "^3.3.4", "vue-i18n": "^9.6.4", "vue-json-pretty": "^2.2.4", diff --git a/src/main.ts b/src/main.ts index 64c19c9..7a490d6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -16,6 +16,9 @@ import { initAppConfigStore } from '@/logics/initAppConfig'; import { router, setupRouter } from '@/router'; import { setupRouterGuard } from '@/router/guard'; import { setupStore } from '@/store'; +// echart图表 +import "echarts" +import ECharts from "vue-echarts" import App from './App.vue'; @@ -59,7 +62,8 @@ async function bootstrap() { // https://next.router.vuejs.org/api/#isready // await router.isReady(); - + // echart图表 + app.component('v-chart', ECharts) app.mount('#app'); } diff --git a/src/views/dashboard/workbench/components/DonutChart.vue b/src/views/dashboard/workbench/components/DonutChart.vue new file mode 100644 index 0000000..f656e29 --- /dev/null +++ b/src/views/dashboard/workbench/components/DonutChart.vue @@ -0,0 +1,90 @@ + + + + + diff --git a/src/views/dashboard/workbench/components/DonutChartByMoney.vue b/src/views/dashboard/workbench/components/DonutChartByMoney.vue new file mode 100644 index 0000000..311149c --- /dev/null +++ b/src/views/dashboard/workbench/components/DonutChartByMoney.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/src/views/dashboard/workbench/components/PieChart.vue b/src/views/dashboard/workbench/components/PieChart.vue new file mode 100644 index 0000000..7018665 --- /dev/null +++ b/src/views/dashboard/workbench/components/PieChart.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/src/views/dashboard/workbench/index.vue b/src/views/dashboard/workbench/index.vue index 5a678e7..380ffdd 100644 --- a/src/views/dashboard/workbench/index.vue +++ b/src/views/dashboard/workbench/index.vue @@ -1,38 +1,145 @@ diff --git a/src/views/projectLib/projectPlan/planinfoFileDetail.vue b/src/views/projectLib/projectPlan/planinfoFileDetail.vue index 3af12f3..3acf13f 100644 --- a/src/views/projectLib/projectPlan/planinfoFileDetail.vue +++ b/src/views/projectLib/projectPlan/planinfoFileDetail.vue @@ -28,10 +28,11 @@ onMounted(async () => { // processName.value =await getProcessName(dataTo.planinfoid) }) async function init(data) { - processName.value =await getProcessName({pid:data.planinfoid}) planinfoid.value = data.planinfoid taskName.value = data.taskName isfinish.value = data.isfinish + processName.value =await getProcessName({pid:data.planinfoid}) + } diff --git a/src/views/projectSummary/planSummary/indeForDashboard.vue b/src/views/projectSummary/planSummary/indeForDashboard.vue new file mode 100644 index 0000000..2e70324 --- /dev/null +++ b/src/views/projectSummary/planSummary/indeForDashboard.vue @@ -0,0 +1,193 @@ + + + + + \ No newline at end of file diff --git a/src/views/projectSummary/planSummary/index.vue b/src/views/projectSummary/planSummary/index.vue index 3938032..9d65448 100644 --- a/src/views/projectSummary/planSummary/index.vue +++ b/src/views/projectSummary/planSummary/index.vue @@ -69,21 +69,14 @@