From 9eadb55c8ab8a68e66dfeae5dd7561cdfd31d2f9 Mon Sep 17 00:00:00 2001 From: zch Date: Fri, 11 Oct 2024 10:43:06 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E6=9B=B4=E6=94=B9=E8=92=B8?= =?UTF-8?q?=E6=B1=BD=E6=9B=B2=E7=BA=BF=E4=B8=BA=E6=98=BE=E7=A4=BA=E8=92=B8?= =?UTF-8?q?=E6=B1=BD=E6=95=B4=E7=82=B9=E6=95=B0=E6=8D=AE=EF=BC=8C=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E6=98=BE=E7=A4=BA=E4=BB=AA=E8=A1=A8=E5=80=BCinstrumen?= =?UTF-8?q?tValue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ems/report/reportPointSteam.js | 9 ++ .../ems/report/currentSteamCurve/index.vue | 118 +++++++++--------- 2 files changed, 69 insertions(+), 58 deletions(-) diff --git a/src/api/ems/report/reportPointSteam.js b/src/api/ems/report/reportPointSteam.js index faefc90..5e05c13 100644 --- a/src/api/ems/report/reportPointSteam.js +++ b/src/api/ems/report/reportPointSteam.js @@ -42,3 +42,12 @@ export function delReportPointSteam(objId) { method: 'delete' }) } + +// 查询蒸汽整点数据(曲线) +export function pointSteamInstantList(query) { + return request({ + url: '/ems/report/reportPointSteam/pointSteamInstantList', + method: 'get', + params: query + }) +} diff --git a/src/views/ems/report/currentSteamCurve/index.vue b/src/views/ems/report/currentSteamCurve/index.vue index 42eac17..5750463 100644 --- a/src/views/ems/report/currentSteamCurve/index.vue +++ b/src/views/ems/report/currentSteamCurve/index.vue @@ -55,9 +55,9 @@ - + @@ -71,7 +71,7 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css' import { parseTime } from '@/utils/ruoyi' import Chart from '@/components/Charts/Chart' import * as echarts from 'echarts' -import {listRecordSteamInstant, steamInstantList} from "@/api/ems/record/recordSteamInstant"; +import {pointSteamInstantList} from "@/api/ems/report/reportPointSteam"; export default { name: 'currentSteamCurve', @@ -116,16 +116,12 @@ export default { pageNum: 1, pageSize: 10, monitorCode: null, - collectTime: null, - fluxFlow: null, - steamFlow: null, - heatInstantValue: null, - heatTotalValue: null, - temperature: null, - press: null, - density: null, - differencePress: null, - recordTime: null + instrumentValue: null, + expend: null, + recordTime: null, + beginTime: null, + endTime: null, + updateFlag: null }, // 表单参数 form: {}, @@ -140,18 +136,18 @@ export default { ] }, columns: [ - { key: 0, label: `自增标识`, visible: false }, + { key: 0, label: `主键标识`, visible: false }, { key: 1, label: `计量设备编号`, visible: true }, - { key: 2, label: `采集时间`, visible: true }, - { key: 3, label: `瞬时流量`, visible: true }, - { key: 4, label: `累计流量`, visible: true }, - { key: 5, label: `瞬时热量`, visible: true }, - { key: 6, label: `累计热量`, visible: true }, - { key: 7, label: `温度`, visible: false }, - { key: 8, label: `压力`, visible: false }, - { key: 9, label: `密度`, visible: false }, - { key: 10, label: `压力差值`, visible: false }, - { key: 11, label: `记录时间`, visible: true }, + { key: 2, label: `仪表值`, visible: true }, + { key: 3, label: `耗量`, visible: true }, + { key: 4, label: `记录时间`, visible: false }, + { key: 5, label: `开始时间`, visible: true }, + { key: 6, label: `结束时间`, visible: true }, + { key: 7, label: `修改标识`, visible: true }, + { key: 8, label: `创建人`, visible: false }, + { key: 9, label: `创建时间`, visible: false }, + { key: 10, label: `更新人`, visible: false }, + { key: 11, label: `更新时间`, visible: false }, { key: 12, label: `计量设备名称`, visible: true } ] } @@ -207,23 +203,17 @@ export default { reset() { this.form = { objId: null, - collectTime: null, - sensorId: null, - speed: null, - displacement: null, - acceleration: null, - temperature: null, - recodeTime: null, - remark: null, monitorCode: null, - fluxFlow: null, - steamFlow: null, - heatInstantValue: null, - heatTotalValue: null, - press: null, - density: null, - differencePress: null, - recordTime: null + instrumentValue: null, + expend: null, + recordTime: null, + beginTime: null, + endTime: null, + updateFlag: null, + createBy: null, + createTime: null, + updateBy: null, + updateTime: null } this.resetForm('form') }, @@ -268,16 +258,16 @@ export default { this.handleQuery() }, - /** 震动曲线 */ + /** 曲线 */ async getChart() { if (this.queryParams.sensorId == null) { return } let query = JSON.parse(JSON.stringify(this.queryParams)) - const {data} = await steamInstantList(query) + const {data} = await pointSteamInstantList(query) let option1 = { title: { - text: this.selectMonitorName + ' 瞬时流量曲线', + text: this.selectMonitorName + ' 仪表值', x: 'center' }, grid: { @@ -302,7 +292,7 @@ export default { right: 0 }, xAxis: { - data: data.map(e => e.collectTime), + data: data.map(e => e.recordTime), axisLine: { show: true, //隐藏X轴轴线 lineStyle: { @@ -322,7 +312,7 @@ export default { yAxis: [ { type: 'value', - name: '瞬时流量y', + name: '仪表值', nameTextStyle: { color: '#000000' }, @@ -348,17 +338,17 @@ export default { ], series: [ { - name: '瞬时流量', + name: '仪表值', type: 'line', smooth: true, //平滑曲线显示 showAllSymbol: true, //显示所有图形。 symbol: 'circle', //标记的图形为实心圆 symbolSize: 10, //标记的大小 - data: data.map(e => e.fluxFlow) + data: data.map(e => e.instrumentValue) }, ] } - let option2 = { + /* let option2 = { title: { text: this.selectMonitorName + ' 累计流量曲线', x: 'center' @@ -607,13 +597,21 @@ export default { data: data.map(e => e.heatTotalValue) }, ] - } + }*/ this.$refs.Chart1.setData(option1) - this.$refs.Chart2.setData(option2) +/* this.$refs.Chart2.setData(option2) this.$refs.Chart3.setData(option3) - this.$refs.Chart4.setData(option4) - echarts.connect(this.$refs.Chart1.chart, this.$refs.Chart2.chart, this.$refs.Chart3.chart, this.$refs.Chart4.chart) - this.$refs.Chart1.chart.on('datazoom', (e) => { + this.$refs.Chart4.setData(option4)*/ +/* echarts.connect(this.$refs.Chart1.chart, this.$refs.Chart2.chart, this.$refs.Chart3.chart, this.$refs.Chart4.chart)*/ + echarts.connect(this.$refs.Chart1.chart) + + this.$refs.Chart1.chart.on('datazoom', (e) => { + option.dataZoom[0].start = e.start; + option.dataZoom[0].end = e.end; + this.$refs.Chart1.setData(option); + }); + +/* this.$refs.Chart1.chart.on('datazoom', (e) => { option2.dataZoom[0].start = e.start option2.dataZoom[0].end = e.end this.$refs.Chart2.setData(option2) @@ -623,8 +621,8 @@ export default { option4.dataZoom[0].start = e.start option4.dataZoom[0].end = e.end this.$refs.Chart4.setData(option4) - }) - this.$refs.Chart2.chart.on('datazoom', (e) => { + })*/ + /* this.$refs.Chart2.chart.on('datazoom', (e) => { option1.dataZoom[0].start = e.start option1.dataZoom[0].end = e.end this.$refs.Chart1.setData(option1) @@ -656,13 +654,13 @@ export default { option1.dataZoom[0].start = e.start option1.dataZoom[0].end = e.end this.$refs.Chart4.setData(option1) - }) + })*/ } } } -