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

master
zch 9 months ago
parent c7b713998f
commit 9eadb55c8a

@ -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
})
}

@ -55,9 +55,9 @@
</el-form-item>
</el-form>
<Chart ref="Chart1" class="chart1"/>
<Chart ref="Chart2" class="chart2"/>
<!-- <Chart ref="Chart2" class="chart2"/>
<Chart ref="Chart3" class="chart3"/>
<Chart ref="Chart4" class="chart4"/>
<Chart ref="Chart4" class="chart4"/>-->
</el-col>
</el-row>
</div>
@ -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)
})
})*/
}
}
}
</script>
<style scoped>
.chart1 {
<style scoped >
/*.chart1 {
width: 50%;
height: 40vh;
display: inline-block;
@ -681,5 +679,9 @@ export default {
width: 50%;
display: inline-block;
height: 40vh;
}*/
.chart1 {
width: 100%;
height: 75vh;
}
</style>

Loading…
Cancel
Save