| | |
| | | }; |
| | | |
| | | // 新增接口:获取状态统计数据 |
| | | export const getstatusCount = () => { |
| | | export const getstatusCount = (params) => { |
| | | return request({ |
| | | url: '/drone-device-core/jobEvent/getstatusCount', |
| | | method: 'get', |
| | | params, |
| | | }); |
| | | }; |
| | | |
| | |
| | | |
| | | async fetchTabCounts() { |
| | | try { |
| | | const response = await getstatusCount(); |
| | | // 判断是否有部门筛选 |
| | | let params = {}; |
| | | if (this.filters.department) { |
| | | params.deptId = this.filters.department; |
| | | } |
| | | const response = await getstatusCount(params); |
| | | const { statusCount, totalCount, userCount } = response.data.data; |
| | | this.tabs.forEach(tab => { |
| | | if (tab.name === 'all') { |
| | |
| | | handleSearch() { |
| | | this.page.currentPage = 1; |
| | | this.fetchTableData(); |
| | | this.fetchTabCounts(); |
| | | }, |
| | | |
| | | handleReset() { |