From e51fedc48e3edc3c18fa951b6d44756af6843ea4 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 22 Feb 2021 11:31:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=97=B6=E9=97=B4=E6=AE=B5?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test_client/src/api/analyse.js | 3 +- test_client/src/views/analyse/chart.vue | 5 ++ .../src/views/components/PanelGroup.vue | 3 +- test_client/src/views/dashboard/index.vue | 58 +++++++++++++++++-- test_server/analyse/views.py | 19 ++++-- 5 files changed, 78 insertions(+), 10 deletions(-) diff --git a/test_client/src/api/analyse.js b/test_client/src/api/analyse.js index 90634e3..f61cd72 100644 --- a/test_client/src/api/analyse.js +++ b/test_client/src/api/analyse.js @@ -1,9 +1,10 @@ import request from '@/utils/request' -export function getBasicCount() { +export function getBasicCount(query) { return request({ url: '/analyse/basic/', method: 'get', + params:query }) } diff --git a/test_client/src/views/analyse/chart.vue b/test_client/src/views/analyse/chart.vue index 681a28a..3f54120 100644 --- a/test_client/src/views/analyse/chart.vue +++ b/test_client/src/views/analyse/chart.vue @@ -8,6 +8,7 @@ start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" + @change="change" > \ No newline at end of file diff --git a/test_client/src/views/components/PanelGroup.vue b/test_client/src/views/components/PanelGroup.vue index cf088ef..de583b6 100644 --- a/test_client/src/views/components/PanelGroup.vue +++ b/test_client/src/views/components/PanelGroup.vue @@ -62,6 +62,7 @@ export default { components: { CountTo }, + props:['query'], data() { return { ret:{ @@ -81,7 +82,7 @@ export default { }, getBasicCount() { this.listLoading = true; - getBasicCount().then(response => { + getBasicCount(this.query).then(response => { this.ret = response.data; }); }, diff --git a/test_client/src/views/dashboard/index.vue b/test_client/src/views/dashboard/index.vue index 4f9e6d3..756d0ef 100644 --- a/test_client/src/views/dashboard/index.vue +++ b/test_client/src/views/dashboard/index.vue @@ -1,6 +1,21 @@