import axios from 'axios'; import type { TableData } from '@arco-design/web-vue/es/table/interface'; import instance from './interceptor'; export interface RootObject { pageIndex: number; pageSize: number; name: string; address: string; status: number; startTime: string; endTime: string; entityType: number; } export interface Data { id: number; entityType: number; name: string; address: string; status: number; time: string; data: string; } export interface ExportUrl { success: boolean; message: string; code: string; data: string; } export interface DashboardList { success: boolean; message: string; code: string; data: Data[]; totalCount: number; totalPage: number; } export interface DashboardParams { pageIndex: number; pageSize: number; name: string | null; address: string | null; status: number | null; time: [string, string]; startTime: string | null; endTime: string | null; entityType: number | null; } export async function queryDashboardList( params: object ): Promise { const res = await instance.post('/api/Author/GetDeviceList', params); return res.data; } export async function exportDashboardList(params: object): Promise { const res = await instance.post('/api/Author/Export', params); return res.data; }