Commit 02d37741 authored by 张伯涛's avatar 张伯涛

二级大屏页面完善

parent 9e641212
...@@ -70,6 +70,12 @@ export const GetGISRankWaterUC = params => { ...@@ -70,6 +70,12 @@ export const GetGISRankWaterUC = params => {
console.log(error); console.log(error);
}) })
} }
//24小时热源温度压力流量趋势曲线
export const GetGYHeatSourceTrend = params => {
return http.post(`/api/gis/GetGYHeatSourceTrend`, params).then(res => res).catch(function (error) {
console.log(error);
})
}
//一次侧机组补水曲线 //一次侧机组补水曲线
export const getGYSupplyWaterTrend = params => { export const getGYSupplyWaterTrend = params => {
return http.post(`/api/gis/GYSupplyWaterTrend`, params).then(res => res).catch(function (error) { return http.post(`/api/gis/GYSupplyWaterTrend`, params).then(res => res).catch(function (error) {
......
...@@ -320,7 +320,19 @@ import AMapLoader from "@amap/amap-jsapi-loader"; ...@@ -320,7 +320,19 @@ import AMapLoader from "@amap/amap-jsapi-loader";
<div v-show="mapLevel === 2"> <div v-show="mapLevel === 2">
<div class="secondLeftLayer"> <div class="secondLeftLayer">
<div class="secondLeftLayer_one"> <div class="secondLeftLayer_one">
<div style="display: flex;justify-content: space-between;padding: 10px">
<div class="secondLeftLayer_title"><p>热源趋势曲线</p></div> <div class="secondLeftLayer_title"><p>热源趋势曲线</p></div>
<div style="display: flex;align-items: center">
<ul v-for="(item,index) in heatSourceBtnList" :key="index">
<li
:class="[item.value === heatType ? 'activeBtn' : 'normalBtn']"
@click="choseHeatSource(item)"
>
{{item.name}}
</li>
</ul>
</div>
</div>
<div class="secondLeftLayer1" id="secondLeftLayer1"></div> <div class="secondLeftLayer1" id="secondLeftLayer1"></div>
</div> </div>
<div class="secondLeftLayer_two"> <div class="secondLeftLayer_two">
...@@ -436,7 +448,7 @@ import { ...@@ -436,7 +448,7 @@ import {
postAreaList, postAreaList,
postGYSupplyWater, postGYSupplyWater,
postTransferOpenValue, postTransferOpenValue,
postGYSupplyHeatUCDeviation, getGYSupplyWaterTrend, postGYSupplyHeatUCDeviation, getGYSupplyWaterTrend, GetGYHeatSourceTrend,
} from "../api/screenDisplay"; } from "../api/screenDisplay";
import moment from 'moment' import moment from 'moment'
import {defineComponent} from "vue"; import {defineComponent} from "vue";
...@@ -465,6 +477,14 @@ export default defineComponent({ ...@@ -465,6 +477,14 @@ export default defineComponent({
}, },
data() { data() {
return { return {
heatSourceList: [], // 热源趋势echarts展示
pressureList: [], //压力列表
flowList: [], //流量列表
temperatureList: [], //温度列表
trendList: [],
trendX: ['0时','1时','2时','3时','4时','5时','6时','7时','8时','9时','10时','11时','12时','13时','14时','15时','16时','17时','18时','19时','20时','21时','22时','23时'],
trendY: [],
heatTrendY: [],
enterpriseId: '', enterpriseId: '',
classOptions: { classOptions: {
step: 0.5,//滚动速度值越大越快,但是值太小会卡顿 step: 0.5,//滚动速度值越大越快,但是值太小会卡顿
...@@ -475,7 +495,13 @@ export default defineComponent({ ...@@ -475,7 +495,13 @@ export default defineComponent({
{name: '水耗', value: 2}, {name: '水耗', value: 2},
{name: '电耗', value: 3}, {name: '电耗', value: 3},
], ],
RankType: 1, // 能耗类型(1:热耗,2:水耗,3电耗) heatSourceBtnList: [
{name: '温度', value: 1},
{name: '压力', value: 2},
{name: '流量', value: 3},
],
RankType: 1, // 能耗类型(1:热耗,2:水耗,3:电耗)
heatType: 1, // 能耗类型(1:温度,2:压力,3:流量)
rankList: [], rankList: [],
alarmDataList: [], alarmDataList: [],
waterRankList: [], waterRankList: [],
...@@ -554,6 +580,11 @@ export default defineComponent({ ...@@ -554,6 +580,11 @@ export default defineComponent({
}; };
}, },
methods: { methods: {
// 热源趋势曲线类型切换
choseHeatSource(item) {
this.heatType = item.value
this.getHeatSourceTrend(); //获取热源趋势曲线
},
// 机组排名类型切换 // 机组排名类型切换
choseRankType(item) { choseRankType(item) {
this.RankType = item.value this.RankType = item.value
...@@ -1021,9 +1052,38 @@ export default defineComponent({ ...@@ -1021,9 +1052,38 @@ export default defineComponent({
}, },
// 热源趋势曲线 // 热源趋势曲线
getHeatSourceTrend() { getHeatSourceTrend() {
const nowDate = moment(new Date()).format('YYYY-MM-DD')
const StartTime = nowDate + ' 00:00:00'
const EndTime = nowDate + ' 23:59:59'
const params = {
StartTime: '2024-08-26 00:00:00',
EndTime: '2024-08-27 00:00:00',
CenterId: '7E0263D8-61BC-46F9-AA4F-52394687F8CD',
}
GetGYHeatSourceTrend(params).then(res => {
this.temperatureList = res.data.temperatureList //温度列表
this.pressureList = res.data.pressureList //压力列表
this.flowList = res.data.flowList //流量列表
if(this.heatType === 1) {
this.heatSourceList = this.temperatureList
}else if(this.heatType === 2){
this.heatSourceList = this.pressureList
}else {
this.heatSourceList = this.flowList
}
this.heatTrendY = []
for (let i = 0; i < this.heatSourceList.length; i++) {
const name = this.heatSourceList[i][0].supplyName
const data = this.heatSourceList[i].map(item => item.hourRecord)
const yItem = {name: name, data:data}
this.heatTrendY.push(yItem)
}
console.log('this.heatTrendY',this.heatTrendY)
if (document.querySelector("#secondLeftLayer1")) { if (document.querySelector("#secondLeftLayer1")) {
this.echartInitHeatSource(); // 热源趋势echarts this.echartInitHeatSource(); // 热源趋势echarts
} }
})
}, },
// 获取组织结构 // 获取组织结构
handleGetOrg() { handleGetOrg() {
...@@ -1034,15 +1094,29 @@ export default defineComponent({ ...@@ -1034,15 +1094,29 @@ export default defineComponent({
}, },
// 一次侧补水量曲线 // 一次侧补水量曲线
handleGetGYSupplyWaterTrend() { handleGetGYSupplyWaterTrend() {
const nowDate = moment(new Date()).format('YYYY-MM-DD')
const StartTime = nowDate + ' 00:00:00'
const EndTime = nowDate + ' 23:59:59'
const params = { const params = {
StartTime: '2024-08-26 00:00:00', StartTime: StartTime,
EndTime: '2024-08-26 17:00:00', EndTime: EndTime,
CenterId: '7E0263D8-61BC-46F9-AA4F-52394687F8CD', CenterId: '7E0263D8-61BC-46F9-AA4F-52394687F8CD',
} }
getGYSupplyWaterTrend(params).then(res => { getGYSupplyWaterTrend(params).then(res => {
if(res.data && res.data.length > 0) {
this.trendList = res.data
// this.trendX = this.trendList[0].map(item => item.gatherTime)
this.trendY = []
for (let i = 0; i < this.trendList.length; i++) {
const name = this.trendList[i][0].supplyName
const data = this.trendList[i].map(item => item.waterRecord)
const yItem = {name: name, data:data}
this.trendY.push(yItem)
}
if (document.querySelector("#secondLeftLayer2")) { if (document.querySelector("#secondLeftLayer2")) {
this.echartInitgeMoisturizing(); // 热源趋势echarts this.echartInitgeMoisturizing(); // 热源趋势echarts
} }
}
}) })
}, },
//获取当日实时能耗 //获取当日实时能耗
...@@ -1076,7 +1150,6 @@ export default defineComponent({ ...@@ -1076,7 +1150,6 @@ export default defineComponent({
// 二次侧机组补水量排名 // 二次侧机组补水量排名
handleGetGISRankWaterUC() { handleGetGISRankWaterUC() {
const nowDate = moment(new Date()).format('YYYY-MM-DD') const nowDate = moment(new Date()).format('YYYY-MM-DD')
console.log('nowDate',nowDate)
const StartTime = nowDate + ' 00:00:00' const StartTime = nowDate + ' 00:00:00'
const EndTime = nowDate + ' 23:59:59' const EndTime = nowDate + ' 23:59:59'
const params = { const params = {
...@@ -1322,9 +1395,12 @@ export default defineComponent({ ...@@ -1322,9 +1395,12 @@ export default defineComponent({
var option; var option;
option = { option = {
tooltip: {
trigger: "axis",
},
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], data: this.trendX,
axisLabel: { axisLabel: {
color: "#ffffff", color: "#ffffff",
fontSize: "10px", fontSize: "10px",
...@@ -1357,12 +1433,17 @@ export default defineComponent({ ...@@ -1357,12 +1433,17 @@ export default defineComponent({
top: 10, top: 10,
bottom: 35, bottom: 35,
}, },
series: [ // series: [
{ // {
data: [150, 230, 224, 218, 135, 147, 260], // data: this.trendY,
type: 'line' // type: 'line'
} // }
] // ]
series: this.trendY.map(series => ({
name: series.name,
type: 'line',
data: series.data
}))
}; };
option && myChart.setOption(option); option && myChart.setOption(option);
...@@ -1374,9 +1455,12 @@ export default defineComponent({ ...@@ -1374,9 +1455,12 @@ export default defineComponent({
var option; var option;
option = { option = {
tooltip: {
trigger: "axis",
},
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], data: this.trendX,
axisLabel: { axisLabel: {
color: "#ffffff", color: "#ffffff",
fontSize: "10px", fontSize: "10px",
...@@ -1409,12 +1493,17 @@ export default defineComponent({ ...@@ -1409,12 +1493,17 @@ export default defineComponent({
top: 10, top: 10,
bottom: 35, bottom: 35,
}, },
series: [ series: this.heatTrendY.map(series => ({
{ name: series.name,
data: [150, 230, 224, 218, 135, 147, 260], type: 'line',
type: 'line' data: series.data
} }))
] // series: [
// {
// data: [150, 230, 224, 218, 135, 147, 260],
// type: 'line'
// }
// ]
}; };
option && myChart.setOption(option); option && myChart.setOption(option);
......
...@@ -19,7 +19,7 @@ const tableHeaderClass = data => { // 表头样式 ...@@ -19,7 +19,7 @@ const tableHeaderClass = data => { // 表头样式
const tableBodyClass = data => { // 表体样式 const tableBodyClass = data => { // 表体样式
return 'table-body-class' return 'table-body-class'
} }
const searchKey = ref('2024') // 查询参数 const searchKey = ref('') // 查询参数
const reviseWindowOpen = ref(false) const reviseWindowOpen = ref(false)
const addWindowOpen = ref(false) const addWindowOpen = ref(false)
const reviseForm = ref({}) const reviseForm = ref({})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment