From c4727d712f0021e1104967b2533005d1f01b5a5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E4=B8=BD=E5=90=9B?= <664953382@qq.com> Date: Fri, 13 Aug 2021 13:39:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=8A=98=E7=BA=BF=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/home/index.js | 28 ++++++++++++++ src/views/dashboard/LineChart.vue | 8 ++-- src/views/index.vue | 63 ++++++++++++++++++++++++++++--- 3 files changed, 90 insertions(+), 9 deletions(-) diff --git a/src/api/home/index.js b/src/api/home/index.js index e2b30a8..b4e791b 100644 --- a/src/api/home/index.js +++ b/src/api/home/index.js @@ -14,3 +14,31 @@ export function getMonthPolicyCount(params) { params }); } +// 需求增加趋势 +export function getMonthNeedCount(params) { + return request({ + url: '/data/getMonthNeedCount', + params + }); +} +// 解读增加趋势 +export function getMonthReadCount(params) { + return request({ + url: '/data/getMonthReadCount', + params + }); +} +// 成果增加趋势 +export function getMonthResultCount(params) { + return request({ + url: '/data/getMonthResultCount', + params + }); +} +// 客户增加趋势 +export function getMonthUserCount(params) { + return request({ + url: '/data/getMonthUserCount', + params + }); +} diff --git a/src/views/dashboard/LineChart.vue b/src/views/dashboard/LineChart.vue index 804a7db..cead467 100644 --- a/src/views/dashboard/LineChart.vue +++ b/src/views/dashboard/LineChart.vue @@ -61,7 +61,7 @@ export default { this.chart = echarts.init(this.$el, 'macarons') this.setOptions(this.chartData) }, - setOptions({ expectedData, actualData,keys } = {}) { + setOptions({ expectedData, actualData,keys,arr } = {}) { this.chart.setOption({ xAxis: { data: keys, @@ -94,10 +94,10 @@ export default { } }, legend: { - data: [] + data: arr }, series: [{ - name: 'expected', itemStyle: { + name: arr[0], itemStyle: { normal: { color: '#ff944b', lineStyle: { @@ -113,7 +113,7 @@ export default { animationEasing: 'cubicInOut' }, { - name: 'actual', + name: arr[1], smooth: true, type: 'line', itemStyle: { diff --git a/src/views/index.vue b/src/views/index.vue index 909f192..e0a84d2 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -34,9 +34,19 @@ -

政策增加趋势

+ + +

政策解读趋势

+ +
+ +

需求成果趋势

+ +
+
- +

客户增加趋势

+
@@ -44,22 +54,46 @@