From dfa3c60b0927758e12c7fc45d397b8279f4bb5b0 Mon Sep 17 00:00:00 2001 From: kakarotto5 Date: Thu, 30 Jul 2026 21:05:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=94=B5=E5=8E=82=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 src/api/dataCollection/powerPlant.ts API 接口 - 新增 src/views/phaseOne/dataCollection/powerPlant/index.vue 页面 --- src/api/dataCollection/powerPlant.ts | 47 +++ .../dataCollection/powerPlant/index.vue | 314 ++++++++++++++++++ 2 files changed, 361 insertions(+) create mode 100644 src/api/dataCollection/powerPlant.ts create mode 100644 src/views/phaseOne/dataCollection/powerPlant/index.vue diff --git a/src/api/dataCollection/powerPlant.ts b/src/api/dataCollection/powerPlant.ts new file mode 100644 index 00000000..18cc2d18 --- /dev/null +++ b/src/api/dataCollection/powerPlant.ts @@ -0,0 +1,47 @@ +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' }); +} diff --git a/src/views/phaseOne/dataCollection/powerPlant/index.vue b/src/views/phaseOne/dataCollection/powerPlant/index.vue new file mode 100644 index 00000000..8590e647 --- /dev/null +++ b/src/views/phaseOne/dataCollection/powerPlant/index.vue @@ -0,0 +1,314 @@ + + +