From 01fe2da52377e26ac7d98bf6957e63583053e595 Mon Sep 17 00:00:00 2001
From: juzi <819872918@qq.com>
Date: Fri, 25 Aug 2023 16:27:46 +0800
Subject: [PATCH] =?UTF-8?q?=E8=83=BD=E6=BA=90=E7=9B=91=E6=8E=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/base/energyQuantityRealtime.js | 6 +-
src/api/base/factory.js | 8 +
src/api/monitoring/energyOverlimitLog.js | 54 ++++
src/api/monitoring/energyReport.js | 37 +++
src/api/monitoring/energyStatistics.js | 62 ++++
src/api/monitoring/energyStatisticsDet.js | 72 +++++
src/utils/dict.js | 5 +-
.../components/energyPlcConnectAdd.vue | 100 ++++--
.../components/energyPlcParam.vue | 30 +-
.../components/energyPlcParamView.vue | 127 --------
.../energy/base/energyPlcConnect/index.vue | 25 +-
.../base/energyQuantityRealtime/index.vue | 32 +-
.../energyLimit/components/energyLimitAdd.vue | 155 ++++-----
.../energy/monitoring/energyLimit/index.vue | 51 ++-
.../energy/monitoring/energyLimit/index1.vue | 296 ------------------
.../monitoring/energyOverlimitLog/index.vue | 152 +++++++++
.../energy/monitoring/energyReport/index.vue | 193 ++++++++++++
.../monitoring/energyReportSearch/index.vue | 168 ++++++++++
.../components/energyStatisticsAdd.vue | 128 ++++++++
.../components/energyStatisticsDet.vue | 223 +++++++++++++
.../components/energyStatisticsDetAdd.vue | 174 ++++++++++
.../monitoring/energyStatistics/index.vue | 245 +++++++++++++++
22 files changed, 1767 insertions(+), 576 deletions(-)
create mode 100644 src/api/base/factory.js
create mode 100644 src/api/monitoring/energyOverlimitLog.js
create mode 100644 src/api/monitoring/energyReport.js
create mode 100644 src/api/monitoring/energyStatistics.js
create mode 100644 src/api/monitoring/energyStatisticsDet.js
delete mode 100644 src/views/energy/base/energyPlcConnect/components/energyPlcParamView.vue
delete mode 100644 src/views/energy/monitoring/energyLimit/index1.vue
create mode 100644 src/views/energy/monitoring/energyOverlimitLog/index.vue
create mode 100644 src/views/energy/monitoring/energyReport/index.vue
create mode 100644 src/views/energy/monitoring/energyReportSearch/index.vue
create mode 100644 src/views/energy/monitoring/energyStatistics/components/energyStatisticsAdd.vue
create mode 100644 src/views/energy/monitoring/energyStatistics/components/energyStatisticsDet.vue
create mode 100644 src/views/energy/monitoring/energyStatistics/components/energyStatisticsDetAdd.vue
create mode 100644 src/views/energy/monitoring/energyStatistics/index.vue
diff --git a/src/api/base/energyQuantityRealtime.js b/src/api/base/energyQuantityRealtime.js
index 9ff21be5..03f10fdc 100644
--- a/src/api/base/energyQuantityRealtime.js
+++ b/src/api/base/energyQuantityRealtime.js
@@ -44,11 +44,11 @@ export function getEnergyQuantityRealtimePage(data) {
}
// 导出后端统计 能源抄表 实时 Excel
-export function exportEnergyQuantityRealtimeExcel(query) {
+export function exportEnergyQuantityRealtimeExcel(data) {
return request({
url: '/base/energy-quantity-realtime/export-excel',
- method: 'get',
- params: query,
+ method: 'post',
+ data: data,
responseType: 'blob'
})
}
diff --git a/src/api/base/factory.js b/src/api/base/factory.js
new file mode 100644
index 00000000..76829191
--- /dev/null
+++ b/src/api/base/factory.js
@@ -0,0 +1,8 @@
+import request from '@/utils/request'
+// 获得工厂产线工段设备树形结构
+export function getTree() {
+ return request({
+ url: '/base/factory/getTree',
+ method: 'get'
+ })
+}
\ No newline at end of file
diff --git a/src/api/monitoring/energyOverlimitLog.js b/src/api/monitoring/energyOverlimitLog.js
new file mode 100644
index 00000000..4605a675
--- /dev/null
+++ b/src/api/monitoring/energyOverlimitLog.js
@@ -0,0 +1,54 @@
+import request from '@/utils/request'
+
+// 创建能源超限记录
+export function createEnergyOverlimitLog(data) {
+ return request({
+ url: '/monitoring/energy-overlimit-log/create',
+ method: 'post',
+ data: data
+ })
+}
+
+// 更新能源超限记录
+export function updateEnergyOverlimitLog(data) {
+ return request({
+ url: '/monitoring/energy-overlimit-log/update',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除能源超限记录
+export function deleteEnergyOverlimitLog(id) {
+ return request({
+ url: '/monitoring/energy-overlimit-log/delete?id=' + id,
+ method: 'delete'
+ })
+}
+
+// 获得能源超限记录
+export function getEnergyOverlimitLog(id) {
+ return request({
+ url: '/monitoring/energy-overlimit-log/get?id=' + id,
+ method: 'get'
+ })
+}
+
+// 获得能源超限记录分页
+export function getEnergyOverlimitLogPage(data) {
+ return request({
+ url: '/monitoring/energy-overlimit-log/page',
+ method: 'post',
+ data: data
+ })
+}
+
+// 导出能源超限记录 Excel
+export function exportEnergyOverlimitLogExcel(query) {
+ return request({
+ url: '/monitoring/energy-overlimit-log/export-excel',
+ method: 'get',
+ params: query,
+ responseType: 'blob'
+ })
+}
diff --git a/src/api/monitoring/energyReport.js b/src/api/monitoring/energyReport.js
new file mode 100644
index 00000000..89dde91f
--- /dev/null
+++ b/src/api/monitoring/energyReport.js
@@ -0,0 +1,37 @@
+import request from '@/utils/request'
+
+// 获得能耗统计查询分页
+export function energyReportPage(data) {
+ return request({
+ url: '/monitoring/energy-report/page',
+ method: 'post',
+ data: data
+ })
+}
+
+// 获得能耗统计报表分页
+export function energyReportPageAuto(data) {
+ return request({
+ url: '/monitoring/energy-report/pageAuto',
+ method: 'post',
+ data: data
+ })
+}
+
+// 导出能耗统计查询
+export function energyReportPageExport(data) {
+ return request({
+ url: '/monitoring/energy-report/export',
+ method: 'post',
+ data: data
+ })
+}
+
+// 导出能耗统计报表
+export function energyReportPageExportAuto(data) {
+ return request({
+ url: '/monitoring/energy-report/exportAuto',
+ method: 'post',
+ data: data
+ })
+}
\ No newline at end of file
diff --git a/src/api/monitoring/energyStatistics.js b/src/api/monitoring/energyStatistics.js
new file mode 100644
index 00000000..578fdebd
--- /dev/null
+++ b/src/api/monitoring/energyStatistics.js
@@ -0,0 +1,62 @@
+import request from '@/utils/request'
+
+// 创建能源统计主
+export function createEnergyStatistics(data) {
+ return request({
+ url: '/monitoring/energy-statistics/create',
+ method: 'post',
+ data: data
+ })
+}
+
+// 更新能源统计主
+export function updateEnergyStatistics(data) {
+ return request({
+ url: '/monitoring/energy-statistics/update',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除能源统计主
+export function deleteEnergyStatistics(id) {
+ return request({
+ url: '/monitoring/energy-statistics/delete?id=' + id,
+ method: 'delete'
+ })
+}
+
+// 获得能源统计主
+export function getEnergyStatistics(id) {
+ return request({
+ url: '/monitoring/energy-statistics/get?id=' + id,
+ method: 'get'
+ })
+}
+
+// 获得能源统计主分页
+export function getEnergyStatisticsPage(data) {
+ return request({
+ url: '/monitoring/energy-statistics/page',
+ method: 'post',
+ data: data
+ })
+}
+
+// 导出能源统计主 Excel
+export function exportEnergyStatisticsExcel(query) {
+ return request({
+ url: '/monitoring/energy-statistics/export-excel',
+ method: 'get',
+ params: query,
+ responseType: 'blob'
+ })
+}
+
+// 获取编码
+export function getCode() {
+ return request({
+ url: '/monitoring/energy-statistics/getCode',
+ method: 'get'
+ })
+}
diff --git a/src/api/monitoring/energyStatisticsDet.js b/src/api/monitoring/energyStatisticsDet.js
new file mode 100644
index 00000000..524f838f
--- /dev/null
+++ b/src/api/monitoring/energyStatisticsDet.js
@@ -0,0 +1,72 @@
+import request from '@/utils/request'
+
+// 创建能源统计详细表
+export function createEnergyStatisticsDet(data) {
+ return request({
+ url: '/monitoring/energy-statistics-det/create',
+ method: 'post',
+ data: data
+ })
+}
+
+// 更新能源统计详细表
+export function updateEnergyStatisticsDet(data) {
+ return request({
+ url: '/monitoring/energy-statistics-det/update',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除能源统计详细表
+export function deleteEnergyStatisticsDet(id) {
+ return request({
+ url: '/monitoring/energy-statistics-det/delete?id=' + id,
+ method: 'delete'
+ })
+}
+
+// 获得能源统计详细表
+export function getEnergyStatisticsDet(id) {
+ return request({
+ url: '/monitoring/energy-statistics-det/get?id=' + id,
+ method: 'get'
+ })
+}
+
+// 获得能源统计详细表分页
+export function getEnergyStatisticsDetPage(data) {
+ return request({
+ url: '/monitoring/energy-statistics-det/page',
+ method: 'post',
+ data: data
+ })
+}
+
+// 导出能源统计详细表 Excel
+export function exportEnergyStatisticsDetExcel(query) {
+ return request({
+ url: '/monitoring/energy-statistics-det/export-excel',
+ method: 'get',
+ params: query,
+ responseType: 'blob'
+ })
+}
+
+// 获得 新增参数关联 分页
+export function addParamPage(data) {
+ return request({
+ url: '/monitoring/energy-statistics-det/addParamPage',
+ method: 'post',
+ data: data
+ })
+}
+
+// 删除(批量)
+export function deleteMany(data) {
+ return request({
+ url: '/monitoring/energy-statistics-det/deleteMany',
+ method: 'post',
+ data: data
+ })
+}
\ No newline at end of file
diff --git a/src/utils/dict.js b/src/utils/dict.js
index aa6c9f58..cd20bbbd 100644
--- a/src/utils/dict.js
+++ b/src/utils/dict.js
@@ -88,7 +88,10 @@ export const DICT_TYPE = {
PRODUCT_TYPE: 'product_type',
// ============== ENERGY - 能源模块 =============
- ENERGY_UNIT: 'energy_unit'
+ ENERGY_UNIT: 'energy_unit',
+ MONITOR_INDEX_TYPE: 'monitor_index_type',
+ OBJECT_TYPE: 'object_type',
+ STATISTIC_TYPE: 'statistic_type'
}
/**
diff --git a/src/views/energy/base/energyPlcConnect/components/energyPlcConnectAdd.vue b/src/views/energy/base/energyPlcConnect/components/energyPlcConnectAdd.vue
index a16804c6..d94c6478 100644
--- a/src/views/energy/base/energyPlcConnect/components/energyPlcConnectAdd.vue
+++ b/src/views/energy/base/energyPlcConnect/components/energyPlcConnectAdd.vue
@@ -1,24 +1,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/energy/base/energyPlcConnect/components/energyPlcParam.vue b/src/views/energy/base/energyPlcConnect/components/energyPlcParam.vue
index 2e362853..41b9cd36 100644
--- a/src/views/energy/base/energyPlcConnect/components/energyPlcParam.vue
+++ b/src/views/energy/base/energyPlcConnect/components/energyPlcParam.vue
@@ -7,9 +7,9 @@
-
+
-
+
新增
@@ -105,7 +105,7 @@ export default {
connectId: null
},
plcTableName: '',
- bindObjectType: '',
+ objName: '',
// 弹出层标题
addOrEditTitle: "",
// 是否显示弹出层
@@ -128,7 +128,7 @@ export default {
this.visible = true
this.queryParams.connectId = data.id
this.plcTableName = data.plcTableName
- this.bindObjectType = data.bindObjectType
+ this.objName = data.objName
this.getList()
if (title === 'view') {
this.showBtn = false
@@ -136,19 +136,15 @@ export default {
} else {
this.showBtn = true
this.tableBtn = [
- this.$auth.hasPermi('base:energy-plc-param:update')
- ? {
- type: 'edit',
- btnName: '编辑'
- }
- : undefined,
- this.$auth.hasPermi('base:energy-plc-param:delete')
- ? {
- type: 'delete',
- btnName: '删除'
- }
- : undefined
- ].filter((v) => v)
+ {
+ type: 'edit',
+ btnName: '编辑'
+ },
+ {
+ type: 'delete',
+ btnName: '删除'
+ }
+ ]
}
},
getList() {
diff --git a/src/views/energy/base/energyPlcConnect/components/energyPlcParamView.vue b/src/views/energy/base/energyPlcConnect/components/energyPlcParamView.vue
deleted file mode 100644
index 2838751a..00000000
--- a/src/views/energy/base/energyPlcConnect/components/energyPlcParamView.vue
+++ /dev/null
@@ -1,127 +0,0 @@
-
-
-
-
-
diff --git a/src/views/energy/base/energyPlcConnect/index.vue b/src/views/energy/base/energyPlcConnect/index.vue
index 83dec1c6..10d90aec 100644
--- a/src/views/energy/base/energyPlcConnect/index.vue
+++ b/src/views/energy/base/energyPlcConnect/index.vue
@@ -38,7 +38,7 @@
@confirm="handleConfirm"
:before-close="handleCancel"
>
-
+
@@ -48,16 +48,17 @@
+
diff --git a/src/views/energy/monitoring/energyLimit/index.vue b/src/views/energy/monitoring/energyLimit/index.vue
index 2073a279..04e8f497 100644
--- a/src/views/energy/monitoring/energyLimit/index.vue
+++ b/src/views/energy/monitoring/energyLimit/index.vue
@@ -38,7 +38,7 @@
@confirm="handleConfirm"
:before-close="handleCancel"
>
-
+
@@ -46,13 +46,19 @@
diff --git a/src/views/energy/monitoring/energyOverlimitLog/index.vue b/src/views/energy/monitoring/energyOverlimitLog/index.vue
new file mode 100644
index 00000000..9ed41515
--- /dev/null
+++ b/src/views/energy/monitoring/energyOverlimitLog/index.vue
@@ -0,0 +1,152 @@
+
+
+
+
+
diff --git a/src/views/energy/monitoring/energyReport/index.vue b/src/views/energy/monitoring/energyReport/index.vue
new file mode 100644
index 00000000..6065a67e
--- /dev/null
+++ b/src/views/energy/monitoring/energyReport/index.vue
@@ -0,0 +1,193 @@
+
+
+
+
+
diff --git a/src/views/energy/monitoring/energyReportSearch/index.vue b/src/views/energy/monitoring/energyReportSearch/index.vue
new file mode 100644
index 00000000..08e6256e
--- /dev/null
+++ b/src/views/energy/monitoring/energyReportSearch/index.vue
@@ -0,0 +1,168 @@
+
+
+
+
+
diff --git a/src/views/energy/monitoring/energyStatistics/components/energyStatisticsAdd.vue b/src/views/energy/monitoring/energyStatistics/components/energyStatisticsAdd.vue
new file mode 100644
index 00000000..0326ec95
--- /dev/null
+++ b/src/views/energy/monitoring/energyStatistics/components/energyStatisticsAdd.vue
@@ -0,0 +1,128 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDet.vue b/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDet.vue
new file mode 100644
index 00000000..c5e6249d
--- /dev/null
+++ b/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDet.vue
@@ -0,0 +1,223 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 新增
+ 批量删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDetAdd.vue b/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDetAdd.vue
new file mode 100644
index 00000000..1e3ce28e
--- /dev/null
+++ b/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDetAdd.vue
@@ -0,0 +1,174 @@
+
+
+
+
+
+
+
diff --git a/src/views/energy/monitoring/energyStatistics/index.vue b/src/views/energy/monitoring/energyStatistics/index.vue
new file mode 100644
index 00000000..b4abedbe
--- /dev/null
+++ b/src/views/energy/monitoring/energyStatistics/index.vue
@@ -0,0 +1,245 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+