From e39e71708b7a08920b098f0e851e0375aec6c26e Mon Sep 17 00:00:00 2001 From: zhangyu Date: Fri, 7 May 2021 11:16:17 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6=20=E4=B8=8D?= =?UTF-8?q?=E4=BC=A0pageSize=20-1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/cli/webSSH.vue | 11 +++++--- .../rightBox/administration/modelBox.vue | 26 ++++++++++++++----- nezha-fronted/src/main.js | 13 +++++++++- 3 files changed, 39 insertions(+), 11 deletions(-) diff --git a/nezha-fronted/src/components/cli/webSSH.vue b/nezha-fronted/src/components/cli/webSSH.vue index 97a0b2d13..71c170b0f 100644 --- a/nezha-fronted/src/components/cli/webSSH.vue +++ b/nezha-fronted/src/components/cli/webSSH.vue @@ -201,7 +201,7 @@ @@ -109,7 +113,7 @@ export default { }, created () { this.getBrandList() - this.ChartTemplateList() + // this.ChartTemplateList() }, methods: { clickOutside () { @@ -185,12 +189,20 @@ export default { }) }) }, - /* 获取chart列表数据 */ - ChartTemplateList () { - this.$get('visual/panel/chart', { pageSize: -1, varType: 1, panelId: 0 }).then(res => { - this.chartlList = res.data.list - }) + resultFormat (resp) { + if (resp && resp.data) { + const assetData = {} + assetData.list = resp.data.list + assetData.totalRow = resp.data.total + return assetData + } } + /* 获取chart列表数据 */ + // ChartTemplateList () { + // this.$get('visual/panel/chart', { pageSize: -1, varType: 1, panelId: 0 }).then(res => { + // this.chartlList = res.data.list + // }) + // } } } diff --git a/nezha-fronted/src/main.js b/nezha-fronted/src/main.js index 9dc324315..283b00eec 100644 --- a/nezha-fronted/src/main.js +++ b/nezha-fronted/src/main.js @@ -33,7 +33,18 @@ import bus from '@/libs/bus' import theme from '@/assets/css/theme.scss' import myDatePicker from '@/components/common/myDatePicker' import vSelectPage from 'v-selectpage' -Vue.use(vSelectPage) +Vue.use(vSelectPage, { + dataLoad: function (vue, url, params) { + if (params.pageNumber) { + params.pageNo = params.pageNumber + } + return new Promise((resolve, reject) => { + get(url, params).then(res => { + resolve(res) + }, e => reject(e)) + }) + } +}) Vue.use(myDatePicker) Vue.component('Pagination', Pagination) Vue.component('searchInput', searchInput)