change - 更改蒸汽曲线为显示蒸汽整点数据,图表显示仪表值instrumentValue

master
zch 9 months ago
parent c7b713998f
commit 9eadb55c8a

@ -42,3 +42,12 @@ export function delReportPointSteam(objId) {
method: 'delete' method: 'delete'
}) })
} }
// 查询蒸汽整点数据(曲线)
export function pointSteamInstantList(query) {
return request({
url: '/ems/report/reportPointSteam/pointSteamInstantList',
method: 'get',
params: query
})
}

@ -55,9 +55,9 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<Chart ref="Chart1" class="chart1"/> <Chart ref="Chart1" class="chart1"/>
<Chart ref="Chart2" class="chart2"/> <!-- <Chart ref="Chart2" class="chart2"/>
<Chart ref="Chart3" class="chart3"/> <Chart ref="Chart3" class="chart3"/>
<Chart ref="Chart4" class="chart4"/> <Chart ref="Chart4" class="chart4"/>-->
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -71,7 +71,7 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { parseTime } from '@/utils/ruoyi' import { parseTime } from '@/utils/ruoyi'
import Chart from '@/components/Charts/Chart' import Chart from '@/components/Charts/Chart'
import * as echarts from 'echarts' import * as echarts from 'echarts'
import {listRecordSteamInstant, steamInstantList} from "@/api/ems/record/recordSteamInstant"; import {pointSteamInstantList} from "@/api/ems/report/reportPointSteam";
export default { export default {
name: 'currentSteamCurve', name: 'currentSteamCurve',
@ -116,16 +116,12 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
monitorCode: null, monitorCode: null,
collectTime: null, instrumentValue: null,
fluxFlow: null, expend: null,
steamFlow: null, recordTime: null,
heatInstantValue: null, beginTime: null,
heatTotalValue: null, endTime: null,
temperature: null, updateFlag: null
press: null,
density: null,
differencePress: null,
recordTime: null
}, },
// //
form: {}, form: {},
@ -140,18 +136,18 @@ export default {
] ]
}, },
columns: [ columns: [
{ key: 0, label: `自增标识`, visible: false }, { key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `计量设备编号`, visible: true }, { key: 1, label: `计量设备编号`, visible: true },
{ key: 2, label: `采集时间`, visible: true }, { key: 2, label: `仪表值`, visible: true },
{ key: 3, label: `瞬时流`, visible: true }, { key: 3, label: ``, visible: true },
{ key: 4, label: `累计流量`, visible: true }, { key: 4, label: `记录时间`, visible: false },
{ key: 5, label: `瞬时热量`, visible: true }, { key: 5, label: `开始时间`, visible: true },
{ key: 6, label: `累计热量`, visible: true }, { key: 6, label: `结束时间`, visible: true },
{ key: 7, label: `温度`, visible: false }, { key: 7, label: `修改标识`, visible: true },
{ key: 8, label: `压力`, visible: false }, { key: 8, label: `创建人`, visible: false },
{ key: 9, label: `密度`, visible: false }, { key: 9, label: `创建时间`, visible: false },
{ key: 10, label: `压力差值`, visible: false }, { key: 10, label: `更新人`, visible: false },
{ key: 11, label: `记录时间`, visible: true }, { key: 11, label: `更新时间`, visible: false },
{ key: 12, label: `计量设备名称`, visible: true } { key: 12, label: `计量设备名称`, visible: true }
] ]
} }
@ -207,23 +203,17 @@ export default {
reset() { reset() {
this.form = { this.form = {
objId: null, objId: null,
collectTime: null,
sensorId: null,
speed: null,
displacement: null,
acceleration: null,
temperature: null,
recodeTime: null,
remark: null,
monitorCode: null, monitorCode: null,
fluxFlow: null, instrumentValue: null,
steamFlow: null, expend: null,
heatInstantValue: null, recordTime: null,
heatTotalValue: null, beginTime: null,
press: null, endTime: null,
density: null, updateFlag: null,
differencePress: null, createBy: null,
recordTime: null createTime: null,
updateBy: null,
updateTime: null
} }
this.resetForm('form') this.resetForm('form')
}, },
@ -268,16 +258,16 @@ export default {
this.handleQuery() this.handleQuery()
}, },
/** 震动曲线 */ /** 曲线 */
async getChart() { async getChart() {
if (this.queryParams.sensorId == null) { if (this.queryParams.sensorId == null) {
return return
} }
let query = JSON.parse(JSON.stringify(this.queryParams)) let query = JSON.parse(JSON.stringify(this.queryParams))
const {data} = await steamInstantList(query) const {data} = await pointSteamInstantList(query)
let option1 = { let option1 = {
title: { title: {
text: this.selectMonitorName + ' 瞬时流量曲线', text: this.selectMonitorName + ' 仪表值',
x: 'center' x: 'center'
}, },
grid: { grid: {
@ -302,7 +292,7 @@ export default {
right: 0 right: 0
}, },
xAxis: { xAxis: {
data: data.map(e => e.collectTime), data: data.map(e => e.recordTime),
axisLine: { axisLine: {
show: true, //X线 show: true, //X线
lineStyle: { lineStyle: {
@ -322,7 +312,7 @@ export default {
yAxis: [ yAxis: [
{ {
type: 'value', type: 'value',
name: '瞬时流量y', name: '仪表值',
nameTextStyle: { nameTextStyle: {
color: '#000000' color: '#000000'
}, },
@ -348,17 +338,17 @@ export default {
], ],
series: [ series: [
{ {
name: '瞬时流量', name: '仪表值',
type: 'line', type: 'line',
smooth: true, //线 smooth: true, //线
showAllSymbol: true, // showAllSymbol: true, //
symbol: 'circle', // symbol: 'circle', //
symbolSize: 10, // symbolSize: 10, //
data: data.map(e => e.fluxFlow) data: data.map(e => e.instrumentValue)
}, },
] ]
} }
let option2 = { /* let option2 = {
title: { title: {
text: this.selectMonitorName + ' 累计流量曲线', text: this.selectMonitorName + ' 累计流量曲线',
x: 'center' x: 'center'
@ -607,13 +597,21 @@ export default {
data: data.map(e => e.heatTotalValue) data: data.map(e => e.heatTotalValue)
}, },
] ]
} }*/
this.$refs.Chart1.setData(option1) this.$refs.Chart1.setData(option1)
this.$refs.Chart2.setData(option2) /* this.$refs.Chart2.setData(option2)
this.$refs.Chart3.setData(option3) this.$refs.Chart3.setData(option3)
this.$refs.Chart4.setData(option4) 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.Chart2.chart, this.$refs.Chart3.chart, this.$refs.Chart4.chart)*/
echarts.connect(this.$refs.Chart1.chart)
this.$refs.Chart1.chart.on('datazoom', (e) => { 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].start = e.start
option2.dataZoom[0].end = e.end option2.dataZoom[0].end = e.end
this.$refs.Chart2.setData(option2) this.$refs.Chart2.setData(option2)
@ -623,8 +621,8 @@ export default {
option4.dataZoom[0].start = e.start option4.dataZoom[0].start = e.start
option4.dataZoom[0].end = e.end option4.dataZoom[0].end = e.end
this.$refs.Chart4.setData(option4) 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].start = e.start
option1.dataZoom[0].end = e.end option1.dataZoom[0].end = e.end
this.$refs.Chart1.setData(option1) this.$refs.Chart1.setData(option1)
@ -656,13 +654,13 @@ export default {
option1.dataZoom[0].start = e.start option1.dataZoom[0].start = e.start
option1.dataZoom[0].end = e.end option1.dataZoom[0].end = e.end
this.$refs.Chart4.setData(option1) this.$refs.Chart4.setData(option1)
}) })*/
} }
} }
} }
</script> </script>
<style scoped > <style scoped >
.chart1 { /*.chart1 {
width: 50%; width: 50%;
height: 40vh; height: 40vh;
display: inline-block; display: inline-block;
@ -681,5 +679,9 @@ export default {
width: 50%; width: 50%;
display: inline-block; display: inline-block;
height: 40vh; height: 40vh;
}*/
.chart1 {
width: 100%;
height: 75vh;
} }
</style> </style>

Loading…
Cancel
Save