diff --git a/src/views/index.vue b/src/views/index.vue index 0569304..21d0e3e 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1,35 +1,80 @@ @@ -41,6 +86,7 @@ import RaddarChart from './dashboard/RaddarChart' import PieChart from './dashboard/PieChart' import BarChart from './dashboard/BarChart' import {getServicePackageList} from "@/api/system/servicePackage"; +import {getMyNotifyMessagePage, getUnreadNotifyMessageList} from "@/api/system/notify/message"; const lineChartData = { newVisitis: { @@ -73,23 +119,36 @@ export default { data() { return { lineChartData: lineChartData.newVisitis, - serviceList:[], - warnList:[], - messageList:[], - queryParams:{ - pageNo:1, - pageSize:10 - } + serviceList: [], + warnList: [], + messageList: [], + queryParams: { + pageNo: 1, + pageSize: 10 + }, + messageQueryParams: { + pageNo: 1, + pageSize: 10 + }, + messageTotal: 0 } }, created() { this.getServiceList() + this.getNotifyMessage() }, methods: { handleSetLineChartData(type) { this.lineChartData = lineChartData[type] }, - getServiceList(){ + getNotifyMessage() { + // 执行查询 + getMyNotifyMessagePage(this.messageQueryParams).then(response => { + this.messageList = response.data.list; + this.messageTotal = response.data.total; + }); + }, + getServiceList() { getServicePackageList(this.queryParams).then(response => { this.serviceList = response.data; @@ -113,7 +172,7 @@ export default { } } -@media (max-width:1024px) { +@media (max-width: 1024px) { .chart-wrapper { padding: 8px; }