From 7c45b758efded216582dbc976226cb4e66ee5b9c Mon Sep 17 00:00:00 2001 From: hyx Date: Fri, 15 Oct 2021 16:42:15 +0800 Subject: [PATCH] =?UTF-8?q?CN-154=20chart=E5=88=97=E8=A1=A8=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=BC=80=E5=8F=91=20CN-155=20chart=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/rightBox/settings/ChartBox.vue | 382 ++++++++++++++++++ src/components/table/settings/ChartTable.vue | 177 ++++++++ src/mixins/dataList.js | 6 +- src/router/index.js | 4 + src/utils/api.js | 1 + src/utils/constants.js | 3 +- src/views/settings/Chart.vue | 83 ++++ 7 files changed, 654 insertions(+), 2 deletions(-) create mode 100644 src/components/rightBox/settings/ChartBox.vue create mode 100644 src/components/table/settings/ChartTable.vue create mode 100644 src/views/settings/Chart.vue diff --git a/src/components/rightBox/settings/ChartBox.vue b/src/components/rightBox/settings/ChartBox.vue new file mode 100644 index 00000000..044adf1f --- /dev/null +++ b/src/components/rightBox/settings/ChartBox.vue @@ -0,0 +1,382 @@ + + + diff --git a/src/components/table/settings/ChartTable.vue b/src/components/table/settings/ChartTable.vue new file mode 100644 index 00000000..18794378 --- /dev/null +++ b/src/components/table/settings/ChartTable.vue @@ -0,0 +1,177 @@ + + + diff --git a/src/mixins/dataList.js b/src/mixins/dataList.js index ed261072..b9581603 100644 --- a/src/mixins/dataList.js +++ b/src/mixins/dataList.js @@ -69,7 +69,11 @@ export default { this.searchLabel = { ...this.searchLabel, ...this.pageObj } this.tools.loading = true delete this.searchLabel.total - get(this.url, this.searchLabel).then(response => { + let listUrl = this.url + if (this.listUrl) { + listUrl = this.listUrl + } + get(listUrl, this.searchLabel).then(response => { this.tools.loading = false if (response.code === 200) { for (let i = 0; i < response.data.list.length; i++) { diff --git a/src/router/index.js b/src/router/index.js index eb35f671..14ac931d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -37,6 +37,10 @@ const routes = [ { path: '/galaxyProxy', component: () => import('@/views/settings/GalaxyProxy') + }, + { + path: '/chart', + component: () => import('@/views/settings/Chart') } ] } diff --git a/src/utils/api.js b/src/utils/api.js index 5154d77a..93c07e18 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -16,6 +16,7 @@ export const api = { role: '/sys/role', galaxyProxy: '/galaxy/setting', operationLog: '/sys/log', + chartList: '/visual/chart/list', // 业务 panel: '/visual/panel', chart: '/visual/chart', diff --git a/src/utils/constants.js b/src/utils/constants.js index 3e63a9f4..f365fe8f 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -30,7 +30,8 @@ export const fromRoute = { networkAppPerformance: 'networkAppPerformance', dnsServiceInsights: 'dnsServiceInsights', user: 'user', - galaxyProxy: 'galaxyProxy' + galaxyProxy: 'galaxyProxy', + chart: 'chart' } /* panel类别和名称之间的映射 */ diff --git a/src/views/settings/Chart.vue b/src/views/settings/Chart.vue new file mode 100644 index 00000000..72e2edf3 --- /dev/null +++ b/src/views/settings/Chart.vue @@ -0,0 +1,83 @@ + +