2025-11-20紧急优化内容

This commit is contained in:
白菜
2025-11-26 17:50:06 +08:00
parent 1378947a9e
commit 7fb6d1aa47
17 changed files with 459 additions and 117 deletions

View File

@ -8,9 +8,18 @@
'running-card-container':baseInfo.workStatus === '0'
}">
<div slot="header">
<span class="large-title">{{baseInfo.parentDeviceName?`${baseInfo.parentDeviceName} > ` : ''}}{{baseInfo.deviceName}}</span>
<span class="large-title">{{baseInfo.parentDeviceName?`${baseInfo.parentDeviceName} -> ` : ''}}{{baseInfo.deviceName}}</span>
<div class="info">
<div>数据更新时间{{ baseInfo.dataUpdateTime || '-'}}</div>
</div>
<div class="alarm">
<el-button type="primary" size="small" style="margin-right:20px;" @click="pointDetail(baseInfo)">详细</el-button>
<el-button type="primary" size="small" style="margin-right:20px;" @click="pointDetail(baseInfo,'point')">详细</el-button>
<el-badge :value="baseInfo.alarmNum || 0" class="item">
<i
class="el-icon-message-solid alarm-icon"
@click="pointDetail(baseInfo,'alarmPoint')"
></i>
</el-badge>
</div>
</div>
<div class="descriptions-main">
@ -133,9 +142,9 @@ export default {
},
methods:{
// 查看设备电位表格
pointDetail(row){
pointDetail(row,dataType){
const {siteId,deviceId} = row
this.$refs.pointTable.showTable({siteId,deviceId,deviceCategory:'CLUSTER'})
this.$refs.pointTable.showTable({siteId,deviceId,deviceCategory:'CLUSTER'},dataType)
},
showChart(pointName,deviceId){
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory:'CLUSTER',deviceId})

View File

@ -9,8 +9,17 @@
shadow="always">
<div slot="header">
<span class="large-title">{{baseInfo.deviceName}}</span>
<div class="info">
<div>数据更新时间{{ baseInfo.dataUpdateTime || '-'}}</div>
</div>
<div class="alarm">
<el-button type="primary" size="small" style="margin-right:20px;" @click="pointDetail(baseInfo)">详细</el-button>
<el-button type="primary" size="small" style="margin-right:20px;" @click="pointDetail(baseInfo,'point')">详细</el-button>
<el-badge :value="baseInfo.alarmNum || 0" class="item">
<i
class="el-icon-message-solid alarm-icon"
@click="pointDetail(baseInfo,'alarmPoint')"
></i>
</el-badge>
</div>
</div>
<div class="descriptions-main">
@ -147,9 +156,9 @@ export default {
},
methods:{
// 查看设备电位表格
pointDetail(row){
pointDetail(row,dataType){
const {siteId,deviceId} = row
this.$refs.pointTable.showTable({siteId,deviceId,deviceCategory:'STACK'})
this.$refs.pointTable.showTable({siteId,deviceId,deviceCategory:'STACK'},dataType)
},
showChart(pointName,deviceId,deviceCategory = 'STACK'){
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory,deviceId})

View File

@ -23,7 +23,13 @@
<div>数据更新时间{{ item.dataUpdateTime }}</div>
</div>
<div class="alarm">
<el-button type="primary" size="small" style="margin-right:20px;" @click="pointDetail(item)">详细</el-button>
<el-button type="primary" size="small" style="margin-right:20px;" @click="pointDetail(item,'point')">详细</el-button>
<el-badge :value="item.alarmNum || 0" class="item">
<i
class="el-icon-message-solid alarm-icon"
@click="pointDetail(item,'alarmPoint')"
></i>
</el-badge>
</div>
</div>
<el-row>
@ -146,9 +152,9 @@ export default {
},
methods: {
// 查看设备电位表格
pointDetail(row){
pointDetail(row,dataType){
const {deviceId} = row
this.$refs.pointTable.showTable({siteId:this.siteId,deviceId,deviceCategory:'AMMETER'})
this.$refs.pointTable.showTable({siteId:this.siteId,deviceId,deviceCategory:'AMMETER'},dataType)
},
showChart(pointName,deviceId){
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory:'AMMETER',deviceId})

View File

@ -54,9 +54,12 @@
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button @click="$emit('pointDetail',scope.row)" type="text" size="small">
<el-button @click="$emit('pointDetail',scope.row,'point')" type="text" size="small">
详细
</el-button>
<el-button @click="$emit('pointDetail',scope.row,'alarmPoint')" type="text" size="small">
报警点位详细
</el-button>
</template>
</el-table-column>
</el-table>
@ -115,7 +118,6 @@ export default {
methods: {
//查看表格行图表
chartDetail(row, dataType = "") {
const { clusterDeviceId, deviceId } = row;
this.$emit("chart", { ...row, dataType });
},
},

View File

@ -170,9 +170,9 @@ export default {
},
methods: {
// 查看设备电位表格
pointDetail(row){
pointDetail(row,dataType){
const {deviceId,clusterDeviceId} = row
this.$refs.pointTable.showTable({siteId:this.siteId,deviceId,deviceCategory:'BATTERY',parentId:clusterDeviceId})
this.$refs.pointTable.showTable({siteId:this.siteId,deviceId,deviceCategory:'BATTERY',parentId:clusterDeviceId},dataType)
},
changeMenu(menu) {
const { activeBtn } = this;

View File

@ -31,11 +31,11 @@
<div>数据更新时间{{ pcsItem.dataUpdateTime }}</div>
</div>
<div class="alarm">
<el-button type="primary" size="small" style="margin-right:20px;" @click="pointDetail(pcsItem)">详细</el-button>
<el-button type="primary" size="small" style="margin-right:20px;" @click="pointDetail(pcsItem,'point')">详细</el-button>
<el-badge :value="pcsItem.alarmNum || 0" class="item">
<i
class="el-icon-message-solid"
style="font-size: 26px; color: #fff; display: block"
class="el-icon-message-solid alarm-icon"
@click="pointDetail(pcsItem,'alarmPoint')"
></i>
</el-badge>
</div>
@ -273,9 +273,9 @@ export default {
},
methods: {
// 查看设备电位表格
pointDetail(row){
pointDetail(row,dataType){
const {siteId,deviceId} = row
this.$refs.pointTable.showTable({siteId,deviceId,deviceCategory:'PCS'})
this.$refs.pointTable.showTable({siteId,deviceId,deviceCategory:'PCS'},dataType)
},
showChart(pointName, deviceId,isBranch=false) {
pointName &&

View File

@ -14,7 +14,6 @@
<script>
import * as echarts from "echarts";
import resize from "@/mixins/ems/resize";
import { formatDate } from "@/filters/ems";
import { storagePower } from "@/api/ems/dzjk";
export default {
@ -37,9 +36,6 @@ export default {
methods: {
init(siteId, timeRange) {
this.chart.showLoading();
const x = [];
const data1 = [],
data2 = [];
const [startTime='', endTime=''] = timeRange;
storagePower(siteId,startTime,endTime)
.then((response) => {
@ -50,7 +46,6 @@ export default {
});
},
setOption(data) {
// data=[{deviceId:'pcs1',energyStoragePowList:[{createDate,deviceId,pcsTotalActPower,pcsTotalReactivePower}]}]
let xdata = [],
series = [];
data.forEach((element, index) => {
@ -65,8 +60,13 @@ export default {
// color:'#FFBD00'
},
data: (element.energyStoragePowList || []).map(
(i) => i.pcsTotalActPower
),
(i) => {
return {
value:i.pcsTotalActPower,
year:i.dateDay || ''
}
}
)
},
{
type: "line",
@ -75,7 +75,12 @@ export default {
// color:'#FFBD00'
},
data: (element.energyStoragePowList || []).map(
(i) => i.pcsTotalReactivePower
(i) => {
return {
value: i.pcsTotalReactivePower,
year:i.dateDay || ''
}
}
),
}
);
@ -94,11 +99,24 @@ export default {
containLabel: true,
},
tooltip: {
show:true,
trigger: "axis",
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
},
formatter :(params)=>{
if(params.length <= 0) return
let result = (params[0].data.year || '')+ params[0].name + '<div>'
params.forEach(item=>{
const {color,seriesName,value} = item
result += `<div style="position: relative;padding-left:20px;line-height: 20px;">
<div style="position: absolute;top:50%;left:0;width:12px;height:12px;border-radius:100%;background: ${color};transform: translateY(-50%)"></div>
<span>${seriesName}</span><span style="margin-left:20px;font-weight: 700">${value}</span></div>`
})
result+='</div>'
return result
}
},
textStyle: {
color: "#333333",

View File

@ -14,7 +14,6 @@
<script>
import * as echarts from "echarts";
import resize from "@/mixins/ems/resize";
import { formatDate } from "@/filters/ems";
import { batteryAveSoc } from "@/api/ems/dzjk";
export default {
mixins: [resize],
@ -50,7 +49,10 @@ export default {
ydata = [];
data.forEach((element) => {
xdata.push(element.createDate);
ydata.push(element.batterySOC);
ydata.push({
value:element.batterySOC,
year:element.dateDay,
});
});
xdata = this.chart.setOption({
legend: {
@ -66,11 +68,24 @@ export default {
containLabel: true,
},
tooltip: {
show:true,
trigger: "axis",
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
},
formatter :(params)=>{
if(params.length <= 0) return
let result = (params[0].data.year || '')+ params[0].name + '<div>'
params.forEach(item=>{
const {color,seriesName,value} = item
result += `<div style="position: relative;padding-left:20px;line-height: 20px;">
<div style="position: absolute;top:50%;left:0;width:12px;height:12px;border-radius:100%;background: ${color};transform: translateY(-50%)"></div>
<span>${seriesName}</span><span style="margin-left:20px;font-weight: 700">${value}</span></div>`
})
result+='</div>'
return result
}
},
textStyle: {
color: "#333333",

View File

@ -14,7 +14,6 @@
<script>
import * as echarts from "echarts";
import resize from "@/mixins/ems/resize";
import { formatDate } from "@/filters/ems";
import { batteryAveTemp } from "@/api/ems/dzjk";
export default {
@ -37,9 +36,6 @@ export default {
methods: {
init(siteId,timeRange) {
this.chart.showLoading();
const x = [];
const data1 = [],
data2 = [];
const [startTime='', endTime=''] = timeRange;
batteryAveTemp(siteId,startTime,endTime)
.then((response) => {
@ -54,7 +50,12 @@ export default {
ydata = [];
data.forEach((element) => {
xdata.push(element.createDate);
ydata.push(element.batteryTemp);
ydata.push(
{
value: element.batteryTemp,
year: element.dateDay
}
);
});
xdata = this.chart.setOption({
legend: {
@ -70,11 +71,24 @@ export default {
containLabel: true,
},
tooltip: {
show:true,
trigger: "axis",
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
},
formatter :(params)=>{
if(params.length <= 0) return
let result = (params[0].data.year || '')+ params[0].name + '<div>'
params.forEach(item=>{
const {color,seriesName,value} = item
result += `<div style="position: relative;padding-left:20px;line-height: 20px;">
<div style="position: absolute;top:50%;left:0;width:12px;height:12px;border-radius:100%;background: ${color};transform: translateY(-50%)"></div>
<span>${seriesName}</span><span style="margin-left:20px;font-weight: 700">${value}</span></div>`
})
result+='</div>'
return result
}
},
textStyle: {
color: "#333333",

View File

@ -14,7 +14,6 @@
<script>
import * as echarts from "echarts";
import resize from "@/mixins/ems/resize";
import { formatDate } from "@/filters/ems";
import { pcsMaxTemp } from "@/api/ems/dzjk";
export default {
@ -37,8 +36,6 @@ export default {
methods: {
init(siteId,timeRange) {
this.chart.showLoading();
const x = [];
const data = [];
const [startTime='', endTime=''] = timeRange;
pcsMaxTemp(siteId,startTime,endTime)
.then((response) => {
@ -61,7 +58,12 @@ export default {
areaStyle: {
// color:'#FFBD00'
},
data: (element.maxTempVoList || []).map((i) => i.temp),
data: (element.maxTempVoList || []).map((i) => {
return {
value: i.temp,
year: i.dateDay
}
}),
});
});
this.chart.setOption({
@ -78,11 +80,24 @@ export default {
containLabel: true,
},
tooltip: {
show:true,
trigger: "axis",
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
},
formatter :(params)=>{
if(params.length <= 0) return
let result = (params[0].data.year || '')+ params[0].name + '<div>'
params.forEach(item=>{
const {color,seriesName,value} = item
result += `<div style="position: relative;padding-left:20px;line-height: 20px;">
<div style="position: absolute;top:50%;left:0;width:12px;height:12px;border-radius:100%;background: ${color};transform: translateY(-50%)"></div>
<span>${seriesName}</span><span style="margin-left:20px;font-weight: 700">${value}</span></div>`
})
result+='</div>'
return result
}
},
textStyle: {
color: "#333333",

View File

@ -8,8 +8,17 @@
shadow="always">
<div slot="header">
<span class="large-title">{{item.deviceName}}</span>
<div class="info">
<div>数据更新时间{{ item.dataUpdateTime || '-'}}</div>
</div>
<div class="alarm">
<el-button type="primary" size="small" style="margin-right:20px;" @click="pointDetail(item)">详细</el-button>
<el-button type="primary" size="small" style="margin-right:20px;" @click="pointDetail(item,'point')">详细</el-button>
<el-badge :value="item.alarmNum || 0" class="item">
<i
class="el-icon-message-solid alarm-icon"
@click="pointDetail(item,'alarmPoint')"
></i>
</el-badge>
</div>
</div>
<el-row>
@ -54,9 +63,9 @@ export default {
},
methods:{
// 查看设备电位表格
pointDetail(row){
pointDetail(row,dataType){
const {deviceId} = row
this.$refs.pointTable.showTable({siteId:this.siteId,deviceId,deviceCategory:'COOLING'})
this.$refs.pointTable.showTable({siteId:this.siteId,deviceId,deviceCategory:'COOLING'},dataType)
},
showChart(pointName,deviceId){
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory:'COOLING',deviceId})

View File

@ -0,0 +1,204 @@
<template>
<div style="width:100%" v-loading="loading">
<!-- 搜索栏-->
<el-form :inline="true" class="select-container">
<el-form-item label="时间选择">
<el-date-picker
v-model="dateRange"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:clearable="false"
:picker-options="pickerOptions"
:default-value="defaultDateRange"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSearch" native-type="button">搜索</el-button>
</el-form-item>
<el-form-item>
<el-button @click="onReset" native-type="button">重置</el-button>
</el-form-item>
</el-form>
<!--表格-->
<el-table
class="common-table"
:data="tableData"
stripe
style="width: 100%;margin-top:25px;">
<!-- 汇总列-->
<el-table-column label="汇总">
<el-table-column
prop="dataTime"
label="日期"
width="120">
</el-table-column>
</el-table-column>
<!--充电量列-->
<el-table-column label="充电价格" align="center">
<el-table-column
align="center"
prop="activePeakKwh"
label="尖">
</el-table-column>
<el-table-column
align="center"
prop="activeHighKwh"
label="峰">
</el-table-column>
<el-table-column
align="center"
prop="activeFlatKwh"
label="平">
</el-table-column>
<el-table-column
align="center"
prop="activeValleyKwh"
label="谷">
</el-table-column>
<el-table-column
align="center"
prop="activeTotalKwh"
label="总">
</el-table-column>
</el-table-column>
<!--充电量列-->
<el-table-column label="放电价格" align="center">
<el-table-column
align="center"
prop="reActivePeakKwh"
label="尖">
</el-table-column>
<el-table-column
align="center"
prop="reActiveHighKwh"
label="峰">
</el-table-column>
<el-table-column
align="center"
prop="reActiveFlatKwh"
label="平">
</el-table-column>
<el-table-column
align="center"
prop="reActiveValleyKwh"
label="谷">
</el-table-column>
<el-table-column
align="center"
prop="reActiveTotalKwh"
label="总">
</el-table-column>
</el-table-column>
<!-- 效率-->
<!-- <el-table-column label="效率(%)" align="center">-->
<!-- <el-table-column-->
<!-- align="center"-->
<!-- prop="effect">-->
<!-- </el-table-column>-->
<!-- </el-table-column>-->
</el-table>
<el-pagination
v-show="tableData.length>0"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-size="pageSize"
:page-sizes="[10, 20, 30, 40]"
layout="total, sizes, prev, pager, next, jumper"
:total="totalSize"
style="margin-top:15px;text-align: center"
>
</el-pagination>
</div>
</template>
<script>
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
import { getAmmeterData} from '@/api/ems/dzjk'
import {formatDate} from "@/filters/ems";
export default {
name:'DzjkTjbbSybb',
mixins: [getQuerySiteId],
data() {
return {
loading:false,
pickerOptions:{
disabledDate(time) {
return time.getTime() > Date.now();
},
},
defaultDateRange:[],//默认展示的时间
dateRange:[],
tableData:[],
pageSize:10,//分页栏当前每个数据总数
pageNum:1,//分页栏当前页数
totalSize:0,//table表格数据总数
}
},
methods:{
// 搜索
onSearch(){
this.pageNum =1//每次搜索从1开始搜索
this.getData()
},
// 重置
onReset(){
this.dateRange=this.defaultDateRange
this.pageNum =1//每次搜索从1开始搜索
this.getData()
},
// 分页
handleSizeChange(val) {
this.pageSize = val;
this.$nextTick(()=>{
this.getData()
})
},
handleCurrentChange(val) {
this.pageNum = val
this.$nextTick(()=>{
this.getData()
})
},
// 获取数据
getData(){
this.loading=true
const {siteId,pageNum,pageSize} =this
const [startTime='',endTime='']=(this.dateRange || [])
getAmmeterData({siteId:siteId,startTime,endTime,pageSize,pageNum}).then(response=>{
this.tableData=response?.rows || [];
this.totalSize = response?.total || 0
}).finally(()=> {
this.loading = false
})
},
init(){
this.dateRange=[]
this.tableData=[]
this.totalSize=0
this.pageSize=10
this.pageNum = 1
const now = new Date().getTime();
const lastMonth = new Date(now-30 * 24 * 60 * 60 * 1000).getTime();
this.defaultDateRange = [formatDate(lastMonth), formatDate(now)];
this.dateRange=[formatDate(lastMonth), formatDate(now)];
this.getData()
},
},
}
</script>
<style scoped lang="scss">
::v-deep{
.common-table.el-table .el-table__header-wrapper th, .common-table.el-table .el-table__fixed-header-wrapper th{
border-bottom: 1px solid #dfe6ec;
}
}
</style>