plus-ui/src/api/dataCollection/powerPlant.ts
kakarotto5 dfa3c60b09 feat: 电厂信息管理前端页面
- 新增 src/api/dataCollection/powerPlant.ts API 接口
- 新增 src/views/phaseOne/dataCollection/powerPlant/index.vue 页面
2026-07-30 21:05:19 +08:00

48 lines
1.3 KiB
TypeScript

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' });
}