mirror of
https://gitee.com/JavaLionLi/plus-ui.git
synced 2026-09-13 07:43:43 +08:00
- 新增 src/api/dataCollection/powerPlant.ts API 接口 - 新增 src/views/phaseOne/dataCollection/powerPlant/index.vue 页面
48 lines
1.3 KiB
TypeScript
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' });
|
|
}
|