import request from '@/utils/request'; import type { AxiosPromise } from 'axios'; /** 电厂信息 */ export interface PowerPlantInfo { plantId?: number; plantCode: string; plantName: string; plantShortName?: string; plantType?: string; installedCapacity?: number; address?: string; ownerUnit?: string; operationDate?: string; remark?: string; createTime?: string; } /** 分页查询 */ export function listPowerPlant(query: any) { return request({ url: '/dataCollection/powerPlant/list', method: 'get', params: query }); } /** 查询详情 */ export function getPowerPlant(plantId: number) { return request({ url: '/dataCollection/powerPlant/' + plantId, method: 'get' }); } /** 新增 */ export function addPowerPlant(data: PowerPlantInfo) { return request({ url: '/dataCollection/powerPlant', method: 'post', data }); } /** 修改 */ export function updatePowerPlant(data: PowerPlantInfo) { return request({ url: '/dataCollection/powerPlant', method: 'put', data }); } /** 删除 */ export function delPowerPlant(plantIds: number | number[]) { return request({ url: '/dataCollection/powerPlant/' + plantIds, method: 'delete' }); } /** 导出 */ export function exportPowerPlant(query: any) { return request({ url: '/dataCollection/powerPlant/export', method: 'post', params: query, responseType: 'blob' }); }