From 5171251584a1c241b7e347155733c13657380f31 Mon Sep 17 00:00:00 2001 From: xiongqin <3323939337@qq.com> Date: Tue, 8 Jul 2025 09:54:12 +0800 Subject: [PATCH] =?UTF-8?q?xq=20fix:"=E9=87=8D=E6=96=B0=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BA=86=E9=80=86=E5=8F=98=E5=99=A8=E5=88=97=E8=A1=A8=E3=80=81?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=97=E8=A1=A8"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/business/inverter/index.ts | 70 ++++ src/api/business/inverter/types.ts | 509 +++++++++++++++++++++++ src/api/business/nbq/index.ts | 12 +- src/api/business/project/index.ts | 63 +++ src/api/business/project/types.ts | 126 ++++++ src/layout/components/Navbar.vue | 4 +- src/views/business/inverter/index.vue | 565 ++++++++++++++++++++++++++ src/views/business/project/index.vue | 283 +++++++++++++ src/views/details/nbqDetail/index.vue | 2 + src/views/system/user/index.vue | 2 +- 10 files changed, 1627 insertions(+), 9 deletions(-) create mode 100644 src/api/business/inverter/index.ts create mode 100644 src/api/business/inverter/types.ts create mode 100644 src/api/business/project/index.ts create mode 100644 src/api/business/project/types.ts create mode 100644 src/views/business/inverter/index.vue create mode 100644 src/views/business/project/index.vue diff --git a/src/api/business/inverter/index.ts b/src/api/business/inverter/index.ts new file mode 100644 index 0000000..159f129 --- /dev/null +++ b/src/api/business/inverter/index.ts @@ -0,0 +1,70 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { InverterVO, InverterForm, InverterQuery } from '@/api/business/inverter/types'; + +/** + * 查询逆变器列列表 + * @param query + * @returns {*} + */ + +export const listInverter = (query?: InverterQuery): AxiosPromise => { + return request({ + url: '/business/inverter/list', + method: 'get', + params: query + }); +}; + +/** + * 查询逆变器列详细 + * @param id + */ +export const getInverter = (id: string | number): AxiosPromise => { + return request({ + url: '/business/inverter/' + id, + method: 'get' + }); +}; + +/** + * 新增逆变器列 + * @param data + */ +export const addInverter = (data: InverterForm) => { + return request({ + url: '/business/inverter', + method: 'post', + data: data + }); +}; + +/** + * 修改逆变器列 + * @param data + */ +export const updateInverter = (data: InverterForm) => { + return request({ + url: '/business/inverter', + method: 'put', + data: data + }); +}; + +/** + * 删除逆变器列 + * @param id + */ +export const delInverter = (id: string | number | Array) => { + return request({ + url: '/business/inverter/' + id, + method: 'delete' + }); +}; + +export const getAll = () => { + return request({ + url: '/business/project/all', + method: 'get' + }); +}; diff --git a/src/api/business/inverter/types.ts b/src/api/business/inverter/types.ts new file mode 100644 index 0000000..9ada457 --- /dev/null +++ b/src/api/business/inverter/types.ts @@ -0,0 +1,509 @@ +export interface InverterVO { + /** + * 逆变器id + */ + id: string | number; + + /** + * 逆变器SN + */ + sn: string; + + /** + * 项目id + */ + projectId: string | number; + + /** + * 电站id + */ + stationid: string | number; + + /** + * 电站名称 + */ + stationname: string; + + /** + * 业主id + */ + userid: string | number; + + /** + * 装机容量 + */ + power: string; + + /** + * 装机容量单位 + */ + powerstr: string; + + /** + * 当日能量 + */ + etoday: string; + + /** + * 当日发电量原始值 + */ + etoday1: string; + + /** + * 当日能量单位 + */ + etodaystr: string; + + /** + * 总电量 + */ + etotal: string; + + /** + * 累计发电量原始值 + */ + etotal1: string; + + /** + * 总能量单位 + */ + etotalstr: string; + + /** + * 满发小时数 + */ + fullhour: string; + + /** + * 功率 + */ + pac: string; + + /** + * 功率单位 + */ + pacstr: string; + + /** + * 逆变器状态: +1 = 在线 +2 = 离线 +3 = 报警 + */ + state: number; + + /** + * 更新时间 + */ + datatimestamp: number; + + /** + * 采集器SN + */ + collectorsn: string; + + /** + * 逆变器类型 + */ + productmodel: string; + + /** + * 直流输入路数:值+1 = 实际路数 +如:值0 = 1路,值1 = 2路,值2 = 3路… + */ + dcinputtype: number; + + /** + * 交流输出类:0 = 单相,其他 = 三相 + */ + acoutputtype: number; + + /** + * 逆变器系列 + */ + series: string; + + /** + * 逆变器名称 + */ + name: string; + + /** + * 电站地址 + */ + addr: string; + + /** + * 采集器状态 + */ + collectorstate: number; + + /** + * 逆变器离线状态: +0 = 正常离线 +1 = 异常离线 + */ + stateexceptionflag: number; + + /** + * 累计满发小时数 + */ + totalfullhour: string; + + /** + * 逆变器电表类型,详见附录3 + */ + invertermetermodel: number; + + /** + * 创建时间 + */ + createdate: number; + + /** + * 质保结束时间 + */ + updateshelfendtime: number; + +} + +export interface InverterForm extends BaseEntity { + /** + * 逆变器id + */ + id?: string | number; + + /** + * 逆变器SN + */ + sn?: string; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 电站id + */ + stationid?: string | number; + + /** + * 电站名称 + */ + stationname?: string; + + /** + * 业主id + */ + userid?: string | number; + + /** + * 装机容量 + */ + power?: string; + + /** + * 装机容量单位 + */ + powerstr?: string; + + /** + * 当日能量 + */ + etoday?: string; + + /** + * 当日发电量原始值 + */ + etoday1?: string; + + /** + * 当日能量单位 + */ + etodaystr?: string; + + /** + * 总电量 + */ + etotal?: string; + + /** + * 累计发电量原始值 + */ + etotal1?: string; + + /** + * 总能量单位 + */ + etotalstr?: string; + + /** + * 满发小时数 + */ + fullhour?: string; + + /** + * 功率 + */ + pac?: string; + + /** + * 功率单位 + */ + pacstr?: string; + + /** + * 逆变器状态: +1 = 在线 +2 = 离线 +3 = 报警 + */ + state?: number; + + /** + * 更新时间 + */ + datatimestamp?: number; + + /** + * 采集器SN + */ + collectorsn?: string; + + /** + * 逆变器类型 + */ + productmodel?: string; + + /** + * 直流输入路数:值+1 = 实际路数 +如:值0 = 1路,值1 = 2路,值2 = 3路… + */ + dcinputtype?: number; + + /** + * 交流输出类:0 = 单相,其他 = 三相 + */ + acoutputtype?: number; + + /** + * 逆变器系列 + */ + series?: string; + + /** + * 逆变器名称 + */ + name?: string; + + /** + * 电站地址 + */ + addr?: string; + + /** + * 采集器状态 + */ + collectorstate?: number; + + /** + * 逆变器离线状态: +0 = 正常离线 +1 = 异常离线 + */ + stateexceptionflag?: number; + + /** + * 累计满发小时数 + */ + totalfullhour?: string; + + /** + * 逆变器电表类型,详见附录3 + */ + invertermetermodel?: number; + + /** + * 创建时间 + */ + createdate?: number; + + /** + * 质保结束时间 + */ + updateshelfendtime?: number; + +} + +export interface InverterQuery extends PageQuery { + + /** + * 逆变器SN + */ + sn?: string; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 电站id + */ + stationid?: string | number; + + /** + * 电站名称 + */ + stationname?: string; + + /** + * 业主id + */ + userid?: string | number; + + /** + * 装机容量 + */ + power?: string; + + /** + * 装机容量单位 + */ + powerstr?: string; + + /** + * 当日能量 + */ + etoday?: string; + + /** + * 当日发电量原始值 + */ + etoday1?: string; + + /** + * 当日能量单位 + */ + etodaystr?: string; + + /** + * 总电量 + */ + etotal?: string; + + /** + * 累计发电量原始值 + */ + etotal1?: string; + + /** + * 总能量单位 + */ + etotalstr?: string; + + /** + * 满发小时数 + */ + fullhour?: string; + + /** + * 功率 + */ + pac?: string; + + /** + * 功率单位 + */ + pacstr?: string; + + /** + * 逆变器状态: +1 = 在线 +2 = 离线 +3 = 报警 + */ + state?: number; + + /** + * 更新时间 + */ + datatimestamp?: number; + + /** + * 采集器SN + */ + collectorsn?: string; + + /** + * 逆变器类型 + */ + productmodel?: string; + + /** + * 直流输入路数:值+1 = 实际路数 +如:值0 = 1路,值1 = 2路,值2 = 3路… + */ + dcinputtype?: number; + + /** + * 交流输出类:0 = 单相,其他 = 三相 + */ + acoutputtype?: number; + + /** + * 逆变器系列 + */ + series?: string; + + /** + * 逆变器名称 + */ + name?: string; + + /** + * 电站地址 + */ + addr?: string; + + /** + * 采集器状态 + */ + collectorstate?: number; + + /** + * 逆变器离线状态: +0 = 正常离线 +1 = 异常离线 + */ + stateexceptionflag?: number; + + /** + * 累计满发小时数 + */ + totalfullhour?: string; + + /** + * 逆变器电表类型,详见附录3 + */ + invertermetermodel?: number; + + /** + * 创建时间 + */ + createdate?: number; + + /** + * 质保结束时间 + */ + updateshelfendtime?: number; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/api/business/nbq/index.ts b/src/api/business/nbq/index.ts index 33863e7..7c47d04 100644 --- a/src/api/business/nbq/index.ts +++ b/src/api/business/nbq/index.ts @@ -62,9 +62,9 @@ export const delNbq = (nbqId: string | number | Array) => { }); }; -export const getAll = () => { - return request({ - url: '/business/nbq/listNotPage', - method: 'get' - }); -}; +// export const getAll = () => { +// return request({ +// url: '/business/nbq/all', +// method: 'get' +// }); +// }; diff --git a/src/api/business/project/index.ts b/src/api/business/project/index.ts new file mode 100644 index 0000000..8d05143 --- /dev/null +++ b/src/api/business/project/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ProjectVO, ProjectForm, ProjectQuery } from '@/api/business/project/types'; + +/** + * 查询项目列列表 + * @param query + * @returns {*} + */ + +export const listProject = (query?: ProjectQuery): AxiosPromise => { + return request({ + url: '/business/project/list', + method: 'get', + params: query + }); +}; + +/** + * 查询项目列详细 + * @param projectId + */ +export const getProject = (projectId: string | number): AxiosPromise => { + return request({ + url: '/business/project/' + projectId, + method: 'get' + }); +}; + +/** + * 新增项目列 + * @param data + */ +export const addProject = (data: ProjectForm) => { + return request({ + url: '/business/project', + method: 'post', + data: data + }); +}; + +/** + * 修改项目列 + * @param data + */ +export const updateProject = (data: ProjectForm) => { + return request({ + url: '/business/project', + method: 'put', + data: data + }); +}; + +/** + * 删除项目列 + * @param projectId + */ +export const delProject = (projectId: string | number | Array) => { + return request({ + url: '/business/project/' + projectId, + method: 'delete' + }); +}; diff --git a/src/api/business/project/types.ts b/src/api/business/project/types.ts new file mode 100644 index 0000000..113cdb6 --- /dev/null +++ b/src/api/business/project/types.ts @@ -0,0 +1,126 @@ +export interface ProjectVO { + /** + * 项目id + */ + projectId: string | number; + + /** + * 项目简介 + */ + projectBrief: string; + + /** + * 项目地址 + */ + address: string; + + /** + * 项目负责人 + */ + projectLeader: string; + + /** + * 负责人电话 + */ + telephone: string; + + /** + * 状态 + */ + state: string; + + /** + * 项目类型(字典) + */ + type: string; + + /** + * 备注 + */ + remark: string; + +} + +export interface ProjectForm extends BaseEntity { + /** + * 项目id + */ + projectId?: string | number; + + /** + * 项目简介 + */ + projectBrief?: string; + + /** + * 项目地址 + */ + address?: string; + + /** + * 项目负责人 + */ + projectLeader?: string; + + /** + * 负责人电话 + */ + telephone?: string; + + /** + * 状态 + */ + state?: string; + + /** + * 项目类型(字典) + */ + type?: string; + + /** + * 备注 + */ + remark?: string; + +} + +export interface ProjectQuery extends PageQuery { + + /** + * 项目简介 + */ + projectBrief?: string; + + /** + * 项目地址 + */ + address?: string; + + /** + * 项目负责人 + */ + projectLeader?: string; + + /** + * 负责人电话 + */ + telephone?: string; + + /** + * 状态 + */ + state?: string; + + /** + * 项目类型(字典) + */ + type?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 2257d35..1b23e24 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -102,7 +102,7 @@ import { TenantVO } from '@/api/types'; import notice from './notice/index.vue'; import router from '@/router'; import { ElMessageBoxOptions } from 'element-plus/es/components/message-box/src/message-box.type'; -import { getAll } from '@/api/business/nbq'; +import { getAll } from '@/api/business/inverter'; import { useProgram } from '@/store/modules/program'; const appStore = useAppStore(); @@ -215,7 +215,7 @@ function getAllList() { const data = res.data; programList.value = data.map((item) => { return { - nbqId: item.nbqId, + nbqId: item.projectId, projectBrief: item.projectBrief }; }); diff --git a/src/views/business/inverter/index.vue b/src/views/business/inverter/index.vue new file mode 100644 index 0000000..502acaa --- /dev/null +++ b/src/views/business/inverter/index.vue @@ -0,0 +1,565 @@ + + + diff --git a/src/views/business/project/index.vue b/src/views/business/project/index.vue new file mode 100644 index 0000000..b707d08 --- /dev/null +++ b/src/views/business/project/index.vue @@ -0,0 +1,283 @@ + + + diff --git a/src/views/details/nbqDetail/index.vue b/src/views/details/nbqDetail/index.vue index 5bb77d8..a96a939 100644 --- a/src/views/details/nbqDetail/index.vue +++ b/src/views/details/nbqDetail/index.vue @@ -456,9 +456,11 @@ const { queryParams, form, rules } = toRefs(data); /** 查询逆变器列列表 */ const getList = async () => { + console.info(1); loading.value = true; const res = await listNbqDetail(queryParams.value); nbqDetailList.value = res.rows; + console.info(nbqDetailList.value); total.value = res.total; loading.value = false; }; diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 785f7b7..20d8f89 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -322,7 +322,7 @@ import { optionselect } from '@/api/system/post'; import { hasPermi } from '@/directive/permission'; import { checkPermi } from '@/utils/permission'; import { ref } from 'vue'; -import { getAll } from '@/api/business/nbq'; +import { getAll } from '@/api/business/inverter'; const props = { multiple: true }; const router = useRouter(); const { proxy } = getCurrentInstance() as ComponentInternalInstance;