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)