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 DataList { id?: number; entityType: number | null; deviceType: number | null; name: string; address: string; status?: number; time?: string; data?: string; routeInfoId?: number | null; } export interface ExportUrl { success: boolean; message: string; code: string; data: string; } export interface DeviceList { success: boolean; message: string; code: string; data: DataList[]; totalCount: number; totalPage: number; } export interface DeviceParams { 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; station?: string | null; } export interface LoginRes { success: boolean; data: DataList; message: string; code: string; } export async function queryDeviceList(params: object): Promise { const res = await instance.post('/api/Author/GetDeviceList', params); return res.data; } export async function exportDeviceList(params: object): Promise { const res = await instance.post('/api/Author/Export', params); return res.data; } export async function getDeviceDetails(params: object): Promise { const res = await instance.post('/api/Author/GetDevice', params); return res.data; } export async function saveDeviceDetails(params: object): Promise { const res = await instance.post('/api/Author/SaveDevice', params); return res.data; } export async function deleteDeviceDetails(params: object): Promise { const res = await instance.post('/api/Author/DeleteDevice', params); return res.data; }