From e1773dae03a65a38d45547ae36b4e1d9b5b109de Mon Sep 17 00:00:00 2001 From: juzi <819872918@qq.com> Date: Sun, 7 Apr 2024 15:39:26 +0800 Subject: [PATCH 1/3] 1 --- .../energy/base/energyQuantityManual/components/AddTable.vue | 4 ++-- src/views/energy/base/energyQuantityManual/index.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/energy/base/energyQuantityManual/components/AddTable.vue b/src/views/energy/base/energyQuantityManual/components/AddTable.vue index 741453cc..2b2c463a 100644 --- a/src/views/energy/base/energyQuantityManual/components/AddTable.vue +++ b/src/views/energy/base/energyQuantityManual/components/AddTable.vue @@ -20,9 +20,9 @@ @change="changeSelect(scope.row, 'tableName')"> + :value="item.value"> diff --git a/src/views/energy/base/energyQuantityManual/index.vue b/src/views/energy/base/energyQuantityManual/index.vue index 08303e0f..c7f16ef2 100644 --- a/src/views/energy/base/energyQuantityManual/index.vue +++ b/src/views/energy/base/energyQuantityManual/index.vue @@ -63,7 +63,7 @@ const tableProps = [ { prop: 'unit', label: '单位', - filter: publicFormatter('energy_unit'), + filter: publicFormatter('unit_dict'), minWidth: 110, }, { From 949675b3a2e8d7b9881b66592b8443b50094b10b Mon Sep 17 00:00:00 2001 From: juzi <819872918@qq.com> Date: Sun, 7 Apr 2024 16:13:57 +0800 Subject: [PATCH 2/3] 1 --- .../orderCompletionMonitoring/index.vue | 772 +++++++++--------- 1 file changed, 405 insertions(+), 367 deletions(-) diff --git a/src/views/order/monitoring/orderCompletionMonitoring/index.vue b/src/views/order/monitoring/orderCompletionMonitoring/index.vue index 45fc2de7..45bb7f8d 100644 --- a/src/views/order/monitoring/orderCompletionMonitoring/index.vue +++ b/src/views/order/monitoring/orderCompletionMonitoring/index.vue @@ -1,390 +1,428 @@ \ No newline at end of file From c85c6e4323a9d3e6eada5ed75c1237aa36be437f Mon Sep 17 00:00:00 2001 From: juzi <819872918@qq.com> Date: Mon, 8 Apr 2024 10:41:43 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=83=BD=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/searchArea.vue | 5 +- .../qoqAnalysis/components/searchArea.vue | 5 +- .../trendAnalysis/components/searchArea.vue | 5 +- .../yoyAnalysis/components/searchArea.vue | 5 +- src/views/energy/base/energyPlc/index.vue | 400 +++++++------ .../components/energyPlcParam.vue | 464 ++++++++------- .../energy/base/energyPlcConnect/index.vue | 10 +- .../components/InputArea.vue | 38 -- .../components/SelectArea.vue | 44 -- .../components/energyQuantityManualAdd.vue | 30 +- .../base/energyQuantityManual/index.vue | 16 +- .../base/energyQuantityRealtime/index.vue | 458 ++++++++------- src/views/energy/base/energyType/index.vue | 18 +- .../energy/base/tableNameConfig/index.vue | 4 +- .../energyLimit/components/energyLimitAdd.vue | 4 + .../energy/monitoring/energyLimit/index.vue | 6 +- .../monitoring/energyOverlimitLog/index.vue | 7 +- .../energy/monitoring/energyReport/index.vue | 4 +- .../monitoring/energyReportSearch/index.vue | 316 +++++----- .../components/energyStatisticsDet.vue | 481 +++++++++------- .../components/energyStatisticsDetAdd.vue | 337 ++++++----- .../monitoring/energyStatistics/index.vue | 17 +- .../energy/monitoring/orderEnergy/index.vue | 540 +++++++++--------- .../orderCompletionMonitoring/index.vue | 1 + 24 files changed, 1651 insertions(+), 1564 deletions(-) delete mode 100644 src/views/energy/base/energyQuantityManual/components/InputArea.vue delete mode 100644 src/views/energy/base/energyQuantityManual/components/SelectArea.vue diff --git a/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue b/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue index 67a4a76d..b24e6ed7 100644 --- a/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue +++ b/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue @@ -187,8 +187,11 @@ @click="resetBtn"> 重置 - + - + 重置 - + - + -
- - - - - - - - - - - - -
+
+ + + + + + + + + + + +
diff --git a/src/views/energy/base/energyPlcConnect/components/energyPlcParam.vue b/src/views/energy/base/energyPlcConnect/components/energyPlcParam.vue index 059ca6a7..b49198fb 100644 --- a/src/views/energy/base/energyPlcConnect/components/energyPlcParam.vue +++ b/src/views/energy/base/energyPlcConnect/components/energyPlcParam.vue @@ -1,226 +1,258 @@ diff --git a/src/views/energy/base/energyPlcConnect/index.vue b/src/views/energy/base/energyPlcConnect/index.vue index 5b2b9db0..2c0c103f 100644 --- a/src/views/energy/base/energyPlcConnect/index.vue +++ b/src/views/energy/base/energyPlcConnect/index.vue @@ -57,14 +57,18 @@ import { getTree } from '@/api/analysis/energyAnalysis'; import { getEnergyTypeListAll } from '@/api/base/energyType'; import EnergyPlcConnectAdd from './components/energyPlcConnectAdd'; import EnergyPlcParam from './components/energyPlcParam'; +import tableHeightMixin from '@/mixins/lb/tableHeightMixin'; const tableProps = [ { prop: 'objName', label: '对象', + minWidth: 130, + showOverflowtooltip: true, }, { prop: 'objCode', label: '对象编码', + minWidth: 150, showOverflowtooltip: true, }, { @@ -86,11 +90,13 @@ const tableProps = [ { prop: 'varNum', label: '绑定参数数量', + width: 110, }, ]; export default { name: 'EnergyPlcConnect', components: { EnergyPlcConnectAdd, EnergyPlcParam }, + mixins: [tableHeightMixin], data() { return { formConfig: [ @@ -144,7 +150,6 @@ export default { } : undefined, ].filter((v) => v), - tableH: this.tableHeight(260), // 总条数 total: 0, // 班次基础信息列表 @@ -165,9 +170,6 @@ export default { }; }, created() { - window.addEventListener('resize', () => { - this.tableH = this.tableHeight(260); - }); this.getList(); }, mounted() { diff --git a/src/views/energy/base/energyQuantityManual/components/InputArea.vue b/src/views/energy/base/energyQuantityManual/components/InputArea.vue deleted file mode 100644 index 0a3a83fc..00000000 --- a/src/views/energy/base/energyQuantityManual/components/InputArea.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - \ No newline at end of file diff --git a/src/views/energy/base/energyQuantityManual/components/SelectArea.vue b/src/views/energy/base/energyQuantityManual/components/SelectArea.vue deleted file mode 100644 index 2f573d6d..00000000 --- a/src/views/energy/base/energyQuantityManual/components/SelectArea.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - \ No newline at end of file diff --git a/src/views/energy/base/energyQuantityManual/components/energyQuantityManualAdd.vue b/src/views/energy/base/energyQuantityManual/components/energyQuantityManualAdd.vue index 4cfefa61..ceeb44c8 100644 --- a/src/views/energy/base/energyQuantityManual/components/energyQuantityManualAdd.vue +++ b/src/views/energy/base/energyQuantityManual/components/energyQuantityManualAdd.vue @@ -40,18 +40,10 @@ - @@ -64,21 +56,7 @@ import { } from '@/api/base/energyQuantityManual'; import moment from 'moment'; import AddTable from './AddTable'; -import InputArea from './InputArea'; -import SelectArea from './SelectArea'; import { energyTableGet } from '@/api/base/energyQuantityManual'; -const tableProps = [ - { - prop: 'tableName', - label: '表名*', - subcomponent: SelectArea, - }, - { - prop: 'readingQuantity', - label: '抄表数*', - subcomponent: InputArea, - }, -]; export default { name: 'EnergyQuantityManualAdd', props: { @@ -92,7 +70,6 @@ export default { }, data() { return { - tableProps, tableData: [], tableNameList: [], //表名list addButtonShow: '新增', @@ -122,6 +99,7 @@ export default { } else if (params.type === 'meterReading') { this.isEdit = false; this.form.energyTypeId = params.energyTypeId; + this.selEnergyType(this.form.energyTypeId); let obj = {}; obj.tableName = params.tableName + ''; obj.readingQuantity = 0; @@ -133,6 +111,7 @@ export default { energyQuantityManualGet({ id: this.form.id }).then((res) => { if (res.code === 0) { this.form.energyTypeId = res.data.energyTypeId; + this.selEnergyType(this.form.energyTypeId); this.form.recordTime = res.data.recordTime ? res.data.recordTime : null; @@ -164,6 +143,11 @@ export default { this.tableNameList = []; energyTableGet({ energyTypeId: id }).then((res) => { this.tableNameList = res.data.tableObjs || []; + if (this.tableNameList.length === 0) { + this.$modal.msgWarning( + '当前能源类型暂无配置表名,请先到《表名配置》页面配置' + ); + } }); }, submitForm() { diff --git a/src/views/energy/base/energyQuantityManual/index.vue b/src/views/energy/base/energyQuantityManual/index.vue index c7f16ef2..f4ecaf23 100644 --- a/src/views/energy/base/energyQuantityManual/index.vue +++ b/src/views/energy/base/energyQuantityManual/index.vue @@ -52,12 +52,12 @@ import { publicFormatter } from '@/utils/dict'; import { parseTimeTable } from '@/utils/ruoyi'; import EnergyQuantityManualAdd from './components/energyQuantityManualAdd'; import moment from 'moment'; +import tableHeightMixin from '@/mixins/lb/tableHeightMixin'; const tableProps = [ { - prop: 'energyType', + prop: 'energyTypeLabel', label: '能源类型', minWidth: 110, - filter: publicFormatter('energy_type'), showOverflowtooltip: true, }, { @@ -142,7 +142,6 @@ export default { }, ], tableProps, - tableH: this.tableHeight(260), // 总条数 total: 0, // 班次基础信息列表 @@ -181,10 +180,8 @@ export default { }; }, components: { EnergyQuantityManualAdd }, + mixins: [tableHeightMixin], created() { - window.addEventListener('resize', () => { - this.tableH = this.tableHeight(260); - }); let end = moment(moment().format('YYYY-MM-DD 23:59:59')).valueOf(); let start = moment( moment().subtract(7, 'days').format('YYYY-MM-DD 00:00:00') @@ -244,6 +241,11 @@ export default { ? item.amount.toFixed(2) : '' : ''; + this.getDictDatas('energy_type').map((subItem) => { + if (item.energyType === subItem.value) { + item.energyTypeLabel = subItem.label; + } + }); }); this.list = arr; this.total = response.data.total; @@ -305,7 +307,7 @@ export default { handleDelete(row) { console.log(row.id); this.$modal - .confirm('是否确认删除能源类型为"' + row.energyType + '"的数据项?') + .confirm('是否确认删除能源类型为"' + row.energyTypeLabel + '"的数据项?') .then(function () { return energyQuantityManualDelete({ id: row.id }); }) diff --git a/src/views/energy/base/energyQuantityRealtime/index.vue b/src/views/energy/base/energyQuantityRealtime/index.vue index b0226246..0b496447 100644 --- a/src/views/energy/base/energyQuantityRealtime/index.vue +++ b/src/views/energy/base/energyQuantityRealtime/index.vue @@ -1,220 +1,254 @@ diff --git a/src/views/energy/base/energyType/index.vue b/src/views/energy/base/energyType/index.vue index 9197ecb6..19b2cba1 100644 --- a/src/views/energy/base/energyType/index.vue +++ b/src/views/energy/base/energyType/index.vue @@ -40,6 +40,7 @@ import { getEnergyTypePage, deleteEnergyType } from '@/api/base/energyType'; import { publicFormatter } from '@/utils/dict'; import InnerTable from './components/InnerTable'; import EnergyTypeAdd from './components/energyTypeAdd'; +import tableHeightMixin from '@/mixins/lb/tableHeightMixin'; const tableProps = [ { prop: 'code', @@ -48,9 +49,8 @@ const tableProps = [ minWidth: 150, }, { - prop: 'name', + prop: 'energyTypeLabel', label: '能源类型', - filter: publicFormatter('energy_type'), }, { prop: 'unit', @@ -70,6 +70,7 @@ const tableProps = [ export default { name: 'EnergyType', components: { EnergyTypeAdd }, + mixins: [tableHeightMixin], data() { return { formConfig: [ @@ -96,7 +97,7 @@ export default { } : undefined, ].filter((v) => v), - tableH: this.tableHeight(220), + heightNum: 220, pricingMethodList: [ { value: 0, label: '分时间段计价' }, { value: 1, label: '分使用量计价' }, @@ -118,9 +119,6 @@ export default { }; }, created() { - window.addEventListener('resize', () => { - this.tableH = this.tableHeight(220); - }); this.getList(); }, methods: { @@ -142,6 +140,11 @@ export default { item.pricingMethod = i.label; } }); + this.getDictDatas('energy_type').map((subItem) => { + if (item.name === subItem.value) { + item.energyTypeLabel = subItem.label; + } + }); }); this.list = arr; this.total = response.data.total; @@ -174,8 +177,9 @@ export default { }, /** 删除按钮操作 */ handleDelete(row) { + console.log(row); this.$modal - .confirm('是否确认删除能源类型为"' + row.name + '"的数据项?') + .confirm('是否确认删除能源类型为"' + row.energyTypeLabel + '"的数据项?') .then(function () { return deleteEnergyType(row.id); }) diff --git a/src/views/energy/base/tableNameConfig/index.vue b/src/views/energy/base/tableNameConfig/index.vue index 4c8b05ff..28a88967 100644 --- a/src/views/energy/base/tableNameConfig/index.vue +++ b/src/views/energy/base/tableNameConfig/index.vue @@ -32,6 +32,7 @@ import { energyTablePage } from '@/api/base/energyQuantityManual'; import { publicFormatter } from '@/utils/dict'; import tableNameConfigUpdate from './components/tableNameConfigUpdate.vue'; +import tableHeightMixin from '@/mixins/lb/tableHeightMixin'; const tableProps = [ { prop: 'energyType', @@ -63,10 +64,11 @@ export default { pageNo: 1, pageSize: 100, }, - tableH: this.tableHeight(165), + heightNum: 165, centervisible: false, }; }, + mixins: [tableHeightMixin], created() { this.getList(); }, diff --git a/src/views/energy/monitoring/energyLimit/components/energyLimitAdd.vue b/src/views/energy/monitoring/energyLimit/components/energyLimitAdd.vue index 934063e9..a5b0c111 100644 --- a/src/views/energy/monitoring/energyLimit/components/energyLimitAdd.vue +++ b/src/views/energy/monitoring/energyLimit/components/energyLimitAdd.vue @@ -182,6 +182,7 @@ export default { limitType: '', minValue: 0, maxValue: 0, + tableName: '', }, objIds: [], // 回显数组 isEdit: false, //是否是编辑 @@ -214,6 +215,9 @@ export default { if (res.code === 0) { this.form = res.data; this.form.plcParamId = res.data.plcParamId || ''; + this.form.tableName = this.form.tableName + ? this.form.tableName + '' + : ''; this.form.method = this.form.method ? this.form.method + '' : ''; this.form.limitType = this.form.limitType ? this.form.limitType + '' diff --git a/src/views/energy/monitoring/energyLimit/index.vue b/src/views/energy/monitoring/energyLimit/index.vue index 940ef488..4a4d20b9 100644 --- a/src/views/energy/monitoring/energyLimit/index.vue +++ b/src/views/energy/monitoring/energyLimit/index.vue @@ -51,6 +51,7 @@ import { getEnergyTypeListAll } from '@/api/base/energyType'; import { getTree } from '@/api/analysis/energyAnalysis'; import { publicFormatter } from '@/utils/dict'; import EnergyLimitAdd from './components/energyLimitAdd'; +import tableHeightMixin from '@/mixins/lb/tableHeightMixin'; const tableProps = [ { prop: 'method', @@ -104,6 +105,7 @@ const tableProps = [ export default { name: 'EnergyLimit', components: { EnergyLimitAdd }, + mixins: [tableHeightMixin], data() { return { formConfig: [ @@ -156,7 +158,6 @@ export default { } : undefined, ].filter((v) => v), - tableH: this.tableHeight(260), // 总条数 total: 0, // 班次基础信息列表 @@ -181,9 +182,6 @@ export default { }; }, created() { - window.addEventListener('resize', () => { - this.tableH = this.tableHeight(260); - }); this.getList(); this.getTypeList(); // 获取对象树形结构 diff --git a/src/views/energy/monitoring/energyOverlimitLog/index.vue b/src/views/energy/monitoring/energyOverlimitLog/index.vue index 8336e738..71118768 100644 --- a/src/views/energy/monitoring/energyOverlimitLog/index.vue +++ b/src/views/energy/monitoring/energyOverlimitLog/index.vue @@ -45,6 +45,7 @@ import { getEnergyOverlimitLogPage } from '@/api/monitoring/energyOverlimitLog'; import { getEnergyTypeListAll } from '@/api/base/energyType'; import { publicFormatter } from '@/utils/dict'; import { parseTime } from '@/utils/ruoyi'; +import tableHeightMixin from '@/mixins/lb/tableHeightMixin'; const tableProps = [ { prop: 'objName', @@ -123,6 +124,7 @@ const tableProps2 = [ ]; export default { name: 'EnergyOverlimitLog', + mixins: [tableHeightMixin], data() { return { formConfig: [ @@ -151,10 +153,10 @@ export default { activeName: 'auto', tableProps, tableProps2, - tableH: this.tableHeight(260), total: 0, list: [], list2: [], + heightNum: 300, // 查询参数 queryParams: { pageNo: 1, @@ -170,9 +172,6 @@ export default { }; }, created() { - window.addEventListener('resize', () => { - this.tableH = this.tableHeight(260); - }); this.getList(); this.getTypeList(); }, diff --git a/src/views/energy/monitoring/energyReport/index.vue b/src/views/energy/monitoring/energyReport/index.vue index f814ebe4..9ddb9532 100644 --- a/src/views/energy/monitoring/energyReport/index.vue +++ b/src/views/energy/monitoring/energyReport/index.vue @@ -72,7 +72,7 @@ const tableProps = [ }, ]; export default { - name: 'EnergyLimit', + name: 'EnergyReport', data() { return { isFold: false, @@ -181,7 +181,7 @@ export default { return energyReportPageExportAuto({ ...this.queryParams }); }) .then((response) => { - this.$download.excel(response, '能源统计报表.xls'); + this.$download.excel(response, '能耗统计报表.xls'); }) .catch(() => {}); } diff --git a/src/views/energy/monitoring/energyReportSearch/index.vue b/src/views/energy/monitoring/energyReportSearch/index.vue index 93e2c6cf..aba8cebe 100644 --- a/src/views/energy/monitoring/energyReportSearch/index.vue +++ b/src/views/energy/monitoring/energyReportSearch/index.vue @@ -1,161 +1,171 @@ diff --git a/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDet.vue b/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDet.vue index 4c57331d..71f75c18 100644 --- a/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDet.vue +++ b/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDet.vue @@ -1,230 +1,271 @@ diff --git a/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDetAdd.vue b/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDetAdd.vue index b1da1c03..4442f837 100644 --- a/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDetAdd.vue +++ b/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDetAdd.vue @@ -1,179 +1,178 @@ diff --git a/src/views/energy/monitoring/energyStatistics/index.vue b/src/views/energy/monitoring/energyStatistics/index.vue index fe64b362..42c0b26d 100644 --- a/src/views/energy/monitoring/energyStatistics/index.vue +++ b/src/views/energy/monitoring/energyStatistics/index.vue @@ -53,6 +53,7 @@ import { publicFormatter } from '@/utils/dict'; import { getEnergyTypeListAll } from '@/api/base/energyType'; import EnergyStatisticsAdd from './components/energyStatisticsAdd'; import EnergyStatisticsDet from './components/energyStatisticsDet'; +import tableHeightMixin from '@/mixins/lb/tableHeightMixin'; const tableProps = [ { prop: 'name', @@ -70,9 +71,9 @@ const tableProps = [ filter: publicFormatter('statistic_type'), }, { - prop: 'energyType', + prop: 'energyTypeLabel', label: '能源类型', - filter: publicFormatter('energy_type'), + showOverflowtooltip: true, }, { prop: 'paramNum', @@ -86,6 +87,7 @@ const tableProps = [ export default { name: 'EnergyStatistics', components: { EnergyStatisticsAdd, EnergyStatisticsDet }, + mixins: [tableHeightMixin], data() { return { formConfig: [ @@ -139,7 +141,6 @@ export default { } : undefined, ].filter((v) => v), - tableH: this.tableHeight(260), // 总条数 total: 0, // 班次基础信息列表 @@ -158,9 +159,6 @@ export default { }; }, created() { - window.addEventListener('resize', () => { - this.tableH = this.tableHeight(260); - }); this.getList(); }, mounted() { @@ -187,6 +185,13 @@ export default { getList() { getEnergyStatisticsPage(this.queryParams).then((response) => { let arr = response.data.list || []; + arr.map((item) => { + this.getDictDatas('energy_type').map((subItem) => { + if (item.energyType === subItem.value) { + item.energyTypeLabel = subItem.label; + } + }); + }); this.list = arr; this.total = response.data.total; }); diff --git a/src/views/energy/monitoring/orderEnergy/index.vue b/src/views/energy/monitoring/orderEnergy/index.vue index 96e8e5d2..f12e467f 100644 --- a/src/views/energy/monitoring/orderEnergy/index.vue +++ b/src/views/energy/monitoring/orderEnergy/index.vue @@ -1,271 +1,289 @@ \ No newline at end of file diff --git a/src/views/order/monitoring/orderCompletionMonitoring/index.vue b/src/views/order/monitoring/orderCompletionMonitoring/index.vue index 45bb7f8d..8bd89fe2 100644 --- a/src/views/order/monitoring/orderCompletionMonitoring/index.vue +++ b/src/views/order/monitoring/orderCompletionMonitoring/index.vue @@ -290,6 +290,7 @@ export default { sunNum += item.orderMonitorVOS[i].actualquantity || 0; arr3.push(subObj); } + woIdString = woIdString.slice(0, -1); } item.woIdString = woIdString; arr3.push({