2025-11-20紧急优化内容
This commit is contained in:
@ -156,28 +156,28 @@ export function getClusterData({siteId,stackId,clusterId,dateTime,pageNum,pageSi
|
|||||||
//储能
|
//储能
|
||||||
export function storagePower(siteId,startTime,endTime) {
|
export function storagePower(siteId,startTime,endTime) {
|
||||||
return request({
|
return request({
|
||||||
url: `/ems/siteMonitor/runningGraph/storagePower?siteId=${siteId}&startTime=${startTime}&endTime=${endTime}`,
|
url: `/ems/siteMonitor/runningGraph/storagePower?siteId=${siteId}&startDate=${startTime}&endDate=${endTime}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//poc温度
|
//poc温度
|
||||||
export function pcsMaxTemp(siteId,startTime,endTime) {
|
export function pcsMaxTemp(siteId,startTime,endTime) {
|
||||||
return request({
|
return request({
|
||||||
url: `/ems/siteMonitor/runningGraph/pcsMaxTemp?siteId=${siteId}&startTime=${startTime}&endTime=${endTime}`,
|
url: `/ems/siteMonitor/runningGraph/pcsMaxTemp?siteId=${siteId}&startDate=${startTime}&endDate=${endTime}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 电池平均soc
|
// 电池平均soc
|
||||||
export function batteryAveSoc(siteId,startTime,endTime) {
|
export function batteryAveSoc(siteId,startTime,endTime) {
|
||||||
return request({
|
return request({
|
||||||
url: `/ems/siteMonitor/runningGraph/batteryAveSoc?siteId=${siteId}&startTime=${startTime}&endTime=${endTime}`,
|
url: `/ems/siteMonitor/runningGraph/batteryAveSoc?siteId=${siteId}&startDate=${startTime}&endDate=${endTime}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 电池平均温度
|
// 电池平均温度
|
||||||
export function batteryAveTemp(siteId,startTime,endTime) {
|
export function batteryAveTemp(siteId,startTime,endTime) {
|
||||||
return request({
|
return request({
|
||||||
url: `/ems/siteMonitor/runningGraph/batteryAveTemp?siteId=${siteId}&startTime=${startTime}&endTime=${endTime}`,
|
url: `/ems/siteMonitor/runningGraph/batteryAveTemp?siteId=${siteId}&startDate=${startTime}&endDate=${endTime}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,12 +51,12 @@
|
|||||||
.sbjk-card-container{
|
.sbjk-card-container{
|
||||||
.el-card__header {
|
.el-card__header {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
padding: 10px 14px;
|
padding: 5px 14px;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: 5px 5px 0 0;
|
border-radius: 5px 5px 0 0;
|
||||||
.large-title{
|
.large-title{
|
||||||
font-size: 20px;
|
font-size: 18px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
padding: 0 50px 0 11px;
|
padding: 0 50px 0 11px;
|
||||||
@ -78,6 +78,12 @@
|
|||||||
right: 25px;
|
right: 25px;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
|
.alarm-icon{
|
||||||
|
font-size: 22px;
|
||||||
|
color: #fff;
|
||||||
|
display: block;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//红色背景颜色标题
|
//红色背景颜色标题
|
||||||
|
|||||||
@ -130,6 +130,12 @@ export const dzjk=[
|
|||||||
component: () => import('@/views/ems/dzjk/tjbb/dbbb/index.vue'),
|
component: () => import('@/views/ems/dzjk/tjbb/dbbb/index.vue'),
|
||||||
name: 'DzjkTjbbDbbb',
|
name: 'DzjkTjbbDbbb',
|
||||||
meta: { title: '电表报表',breadcrumb: false,activeMenu: '/dzjk',activeSecondMenuName:'DzjkTjbb'},
|
meta: { title: '电表报表',breadcrumb: false,activeMenu: '/dzjk',activeSecondMenuName:'DzjkTjbb'},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'sybb',
|
||||||
|
component: () => import('@/views/ems/dzjk/tjbb/sybb/index.vue'),
|
||||||
|
name: 'DzjkTjbbSybb',
|
||||||
|
meta: { title: '收益报表',breadcrumb: false,activeMenu: '/dzjk',activeSecondMenuName:'DzjkTjbb'},
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@ -8,9 +8,18 @@
|
|||||||
'running-card-container':baseInfo.workStatus === '0'
|
'running-card-container':baseInfo.workStatus === '0'
|
||||||
}">
|
}">
|
||||||
<div slot="header">
|
<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">
|
<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>
|
</div>
|
||||||
<div class="descriptions-main">
|
<div class="descriptions-main">
|
||||||
@ -133,9 +142,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
// 查看设备电位表格
|
// 查看设备电位表格
|
||||||
pointDetail(row){
|
pointDetail(row,dataType){
|
||||||
const {siteId,deviceId} = row
|
const {siteId,deviceId} = row
|
||||||
this.$refs.pointTable.showTable({siteId,deviceId,deviceCategory:'CLUSTER'})
|
this.$refs.pointTable.showTable({siteId,deviceId,deviceCategory:'CLUSTER'},dataType)
|
||||||
},
|
},
|
||||||
showChart(pointName,deviceId){
|
showChart(pointName,deviceId){
|
||||||
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory:'CLUSTER',deviceId})
|
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory:'CLUSTER',deviceId})
|
||||||
|
|||||||
@ -9,8 +9,17 @@
|
|||||||
shadow="always">
|
shadow="always">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<span class="large-title">{{baseInfo.deviceName}}</span>
|
<span class="large-title">{{baseInfo.deviceName}}</span>
|
||||||
|
<div class="info">
|
||||||
|
<div>数据更新时间:{{ baseInfo.dataUpdateTime || '-'}}</div>
|
||||||
|
</div>
|
||||||
<div class="alarm">
|
<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>
|
</div>
|
||||||
<div class="descriptions-main">
|
<div class="descriptions-main">
|
||||||
@ -147,9 +156,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
// 查看设备电位表格
|
// 查看设备电位表格
|
||||||
pointDetail(row){
|
pointDetail(row,dataType){
|
||||||
const {siteId,deviceId} = row
|
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'){
|
showChart(pointName,deviceId,deviceCategory = 'STACK'){
|
||||||
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory,deviceId})
|
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory,deviceId})
|
||||||
|
|||||||
@ -23,7 +23,13 @@
|
|||||||
<div>数据更新时间:{{ item.dataUpdateTime }}</div>
|
<div>数据更新时间:{{ item.dataUpdateTime }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="alarm">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -146,9 +152,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 查看设备电位表格
|
// 查看设备电位表格
|
||||||
pointDetail(row){
|
pointDetail(row,dataType){
|
||||||
const {deviceId} = row
|
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){
|
showChart(pointName,deviceId){
|
||||||
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory:'AMMETER',deviceId})
|
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory:'AMMETER',deviceId})
|
||||||
|
|||||||
@ -54,9 +54,12 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作">
|
<el-table-column label="操作">
|
||||||
<template slot-scope="scope">
|
<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>
|
||||||
|
<el-button @click="$emit('pointDetail',scope.row,'alarmPoint')" type="text" size="small">
|
||||||
|
报警点位详细
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -115,7 +118,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
//查看表格行图表
|
//查看表格行图表
|
||||||
chartDetail(row, dataType = "") {
|
chartDetail(row, dataType = "") {
|
||||||
const { clusterDeviceId, deviceId } = row;
|
|
||||||
this.$emit("chart", { ...row, dataType });
|
this.$emit("chart", { ...row, dataType });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -170,9 +170,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 查看设备电位表格
|
// 查看设备电位表格
|
||||||
pointDetail(row){
|
pointDetail(row,dataType){
|
||||||
const {deviceId,clusterDeviceId} = row
|
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) {
|
changeMenu(menu) {
|
||||||
const { activeBtn } = this;
|
const { activeBtn } = this;
|
||||||
|
|||||||
@ -31,11 +31,11 @@
|
|||||||
<div>数据更新时间:{{ pcsItem.dataUpdateTime }}</div>
|
<div>数据更新时间:{{ pcsItem.dataUpdateTime }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="alarm">
|
<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">
|
<el-badge :value="pcsItem.alarmNum || 0" class="item">
|
||||||
<i
|
<i
|
||||||
class="el-icon-message-solid"
|
class="el-icon-message-solid alarm-icon"
|
||||||
style="font-size: 26px; color: #fff; display: block"
|
@click="pointDetail(pcsItem,'alarmPoint')"
|
||||||
></i>
|
></i>
|
||||||
</el-badge>
|
</el-badge>
|
||||||
</div>
|
</div>
|
||||||
@ -273,9 +273,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 查看设备电位表格
|
// 查看设备电位表格
|
||||||
pointDetail(row){
|
pointDetail(row,dataType){
|
||||||
const {siteId,deviceId} = row
|
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) {
|
showChart(pointName, deviceId,isBranch=false) {
|
||||||
pointName &&
|
pointName &&
|
||||||
|
|||||||
@ -14,7 +14,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
import resize from "@/mixins/ems/resize";
|
import resize from "@/mixins/ems/resize";
|
||||||
import { formatDate } from "@/filters/ems";
|
|
||||||
import { storagePower } from "@/api/ems/dzjk";
|
import { storagePower } from "@/api/ems/dzjk";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -37,9 +36,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
init(siteId, timeRange) {
|
init(siteId, timeRange) {
|
||||||
this.chart.showLoading();
|
this.chart.showLoading();
|
||||||
const x = [];
|
|
||||||
const data1 = [],
|
|
||||||
data2 = [];
|
|
||||||
const [startTime='', endTime=''] = timeRange;
|
const [startTime='', endTime=''] = timeRange;
|
||||||
storagePower(siteId,startTime,endTime)
|
storagePower(siteId,startTime,endTime)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
@ -50,7 +46,6 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
setOption(data) {
|
setOption(data) {
|
||||||
// data=[{deviceId:'pcs1',energyStoragePowList:[{createDate,deviceId,pcsTotalActPower,pcsTotalReactivePower}]}]
|
|
||||||
let xdata = [],
|
let xdata = [],
|
||||||
series = [];
|
series = [];
|
||||||
data.forEach((element, index) => {
|
data.forEach((element, index) => {
|
||||||
@ -65,8 +60,13 @@ export default {
|
|||||||
// color:'#FFBD00'
|
// color:'#FFBD00'
|
||||||
},
|
},
|
||||||
data: (element.energyStoragePowList || []).map(
|
data: (element.energyStoragePowList || []).map(
|
||||||
(i) => i.pcsTotalActPower
|
(i) => {
|
||||||
),
|
return {
|
||||||
|
value:i.pcsTotalActPower,
|
||||||
|
year:i.dateDay || ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "line",
|
type: "line",
|
||||||
@ -75,7 +75,12 @@ export default {
|
|||||||
// color:'#FFBD00'
|
// color:'#FFBD00'
|
||||||
},
|
},
|
||||||
data: (element.energyStoragePowList || []).map(
|
data: (element.energyStoragePowList || []).map(
|
||||||
(i) => i.pcsTotalReactivePower
|
(i) => {
|
||||||
|
return {
|
||||||
|
value: i.pcsTotalReactivePower,
|
||||||
|
year:i.dateDay || ''
|
||||||
|
}
|
||||||
|
}
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -94,11 +99,24 @@ export default {
|
|||||||
containLabel: true,
|
containLabel: true,
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
show:true,
|
||||||
trigger: "axis",
|
trigger: "axis",
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
// 坐标轴指示器,坐标轴触发有效
|
// 坐标轴指示器,坐标轴触发有效
|
||||||
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
|
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: {
|
textStyle: {
|
||||||
color: "#333333",
|
color: "#333333",
|
||||||
|
|||||||
@ -14,7 +14,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
import resize from "@/mixins/ems/resize";
|
import resize from "@/mixins/ems/resize";
|
||||||
import { formatDate } from "@/filters/ems";
|
|
||||||
import { batteryAveSoc } from "@/api/ems/dzjk";
|
import { batteryAveSoc } from "@/api/ems/dzjk";
|
||||||
export default {
|
export default {
|
||||||
mixins: [resize],
|
mixins: [resize],
|
||||||
@ -50,7 +49,10 @@ export default {
|
|||||||
ydata = [];
|
ydata = [];
|
||||||
data.forEach((element) => {
|
data.forEach((element) => {
|
||||||
xdata.push(element.createDate);
|
xdata.push(element.createDate);
|
||||||
ydata.push(element.batterySOC);
|
ydata.push({
|
||||||
|
value:element.batterySOC,
|
||||||
|
year:element.dateDay,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
xdata = this.chart.setOption({
|
xdata = this.chart.setOption({
|
||||||
legend: {
|
legend: {
|
||||||
@ -66,11 +68,24 @@ export default {
|
|||||||
containLabel: true,
|
containLabel: true,
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
show:true,
|
||||||
trigger: "axis",
|
trigger: "axis",
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
// 坐标轴指示器,坐标轴触发有效
|
// 坐标轴指示器,坐标轴触发有效
|
||||||
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
|
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: {
|
textStyle: {
|
||||||
color: "#333333",
|
color: "#333333",
|
||||||
|
|||||||
@ -14,7 +14,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
import resize from "@/mixins/ems/resize";
|
import resize from "@/mixins/ems/resize";
|
||||||
import { formatDate } from "@/filters/ems";
|
|
||||||
import { batteryAveTemp } from "@/api/ems/dzjk";
|
import { batteryAveTemp } from "@/api/ems/dzjk";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -37,9 +36,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
init(siteId,timeRange) {
|
init(siteId,timeRange) {
|
||||||
this.chart.showLoading();
|
this.chart.showLoading();
|
||||||
const x = [];
|
|
||||||
const data1 = [],
|
|
||||||
data2 = [];
|
|
||||||
const [startTime='', endTime=''] = timeRange;
|
const [startTime='', endTime=''] = timeRange;
|
||||||
batteryAveTemp(siteId,startTime,endTime)
|
batteryAveTemp(siteId,startTime,endTime)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
@ -54,7 +50,12 @@ export default {
|
|||||||
ydata = [];
|
ydata = [];
|
||||||
data.forEach((element) => {
|
data.forEach((element) => {
|
||||||
xdata.push(element.createDate);
|
xdata.push(element.createDate);
|
||||||
ydata.push(element.batteryTemp);
|
ydata.push(
|
||||||
|
{
|
||||||
|
value: element.batteryTemp,
|
||||||
|
year: element.dateDay
|
||||||
|
}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
xdata = this.chart.setOption({
|
xdata = this.chart.setOption({
|
||||||
legend: {
|
legend: {
|
||||||
@ -70,11 +71,24 @@ export default {
|
|||||||
containLabel: true,
|
containLabel: true,
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
show:true,
|
||||||
trigger: "axis",
|
trigger: "axis",
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
// 坐标轴指示器,坐标轴触发有效
|
// 坐标轴指示器,坐标轴触发有效
|
||||||
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
|
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: {
|
textStyle: {
|
||||||
color: "#333333",
|
color: "#333333",
|
||||||
|
|||||||
@ -14,7 +14,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
import resize from "@/mixins/ems/resize";
|
import resize from "@/mixins/ems/resize";
|
||||||
import { formatDate } from "@/filters/ems";
|
|
||||||
import { pcsMaxTemp } from "@/api/ems/dzjk";
|
import { pcsMaxTemp } from "@/api/ems/dzjk";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -37,8 +36,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
init(siteId,timeRange) {
|
init(siteId,timeRange) {
|
||||||
this.chart.showLoading();
|
this.chart.showLoading();
|
||||||
const x = [];
|
|
||||||
const data = [];
|
|
||||||
const [startTime='', endTime=''] = timeRange;
|
const [startTime='', endTime=''] = timeRange;
|
||||||
pcsMaxTemp(siteId,startTime,endTime)
|
pcsMaxTemp(siteId,startTime,endTime)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
@ -61,7 +58,12 @@ export default {
|
|||||||
areaStyle: {
|
areaStyle: {
|
||||||
// color:'#FFBD00'
|
// color:'#FFBD00'
|
||||||
},
|
},
|
||||||
data: (element.maxTempVoList || []).map((i) => i.temp),
|
data: (element.maxTempVoList || []).map((i) => {
|
||||||
|
return {
|
||||||
|
value: i.temp,
|
||||||
|
year: i.dateDay
|
||||||
|
}
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.chart.setOption({
|
this.chart.setOption({
|
||||||
@ -78,11 +80,24 @@ export default {
|
|||||||
containLabel: true,
|
containLabel: true,
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
show:true,
|
||||||
trigger: "axis",
|
trigger: "axis",
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
// 坐标轴指示器,坐标轴触发有效
|
// 坐标轴指示器,坐标轴触发有效
|
||||||
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
|
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: {
|
textStyle: {
|
||||||
color: "#333333",
|
color: "#333333",
|
||||||
|
|||||||
@ -8,8 +8,17 @@
|
|||||||
shadow="always">
|
shadow="always">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<span class="large-title">{{item.deviceName}}</span>
|
<span class="large-title">{{item.deviceName}}</span>
|
||||||
|
<div class="info">
|
||||||
|
<div>数据更新时间:{{ item.dataUpdateTime || '-'}}</div>
|
||||||
|
</div>
|
||||||
<div class="alarm">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -54,9 +63,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
// 查看设备电位表格
|
// 查看设备电位表格
|
||||||
pointDetail(row){
|
pointDetail(row,dataType){
|
||||||
const {deviceId} = row
|
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){
|
showChart(pointName,deviceId){
|
||||||
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory:'COOLING',deviceId})
|
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory:'COOLING',deviceId})
|
||||||
|
|||||||
204
src/views/ems/dzjk/tjbb/sybb/index.vue
Normal file
204
src/views/ems/dzjk/tjbb/sybb/index.vue
Normal 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>
|
||||||
@ -10,7 +10,7 @@
|
|||||||
destroy-on-close
|
destroy-on-close
|
||||||
lock-scroll
|
lock-scroll
|
||||||
show-close
|
show-close
|
||||||
title="点位清单"
|
:title="dataType === 'point' ? '点位清单' : '报警点位'"
|
||||||
width="950px"
|
width="950px"
|
||||||
>
|
>
|
||||||
<el-form :inline="true" label-width="100px">
|
<el-form :inline="true" label-width="100px">
|
||||||
@ -30,14 +30,15 @@
|
|||||||
style="width: 150px"
|
style="width: 150px"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="modbus ip">
|
<!-- <el-form-item label="modbus ip">-->
|
||||||
<el-input
|
<!-- <el-input-->
|
||||||
v-model="form.ipAddress"
|
<!-- v-model="form.ipAddress"-->
|
||||||
clearable
|
<!-- clearable-->
|
||||||
placeholder="请输入ip"
|
<!-- placeholder="请输入ip"-->
|
||||||
style="width: 150px"
|
<!-- style="width: 150px"-->
|
||||||
></el-input>
|
<!-- ></el-input>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
|
<br>
|
||||||
<el-form-item label="最小值">
|
<el-form-item label="最小值">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.lower"
|
v-model="form.lower"
|
||||||
@ -54,14 +55,14 @@
|
|||||||
style="width: 150px"
|
style="width: 150px"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="modbus 端口">
|
<!-- <el-form-item label="modbus 端口">-->
|
||||||
<el-input
|
<!-- <el-input-->
|
||||||
v-model="form.ipPort"
|
<!-- v-model="form.ipPort"-->
|
||||||
clearable
|
<!-- clearable-->
|
||||||
placeholder="请输入端口"
|
<!-- placeholder="请输入端口"-->
|
||||||
style="width: 150px"
|
<!-- style="width: 150px"-->
|
||||||
></el-input>
|
<!-- ></el-input>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item style="margin-left: 20px">
|
<el-form-item style="margin-left: 20px">
|
||||||
<el-button type="primary" @click="search">搜索</el-button>
|
<el-button type="primary" @click="search">搜索</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -81,13 +82,14 @@
|
|||||||
label="数据点位名称"
|
label="数据点位名称"
|
||||||
prop="pointName"
|
prop="pointName"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column label="modbus地址">
|
<!-- <el-table-column label="modbus地址">-->
|
||||||
<template slot-scope="scope">
|
<!-- <template slot-scope="scope">-->
|
||||||
<span>{{
|
<!-- <span>{{-->
|
||||||
`${scope.row.ipAddress || ""} ${scope.row.ipPort || ""}`
|
<!-- `${scope.row.ipAddress || ""} ${scope.row.ipPort || ""}`-->
|
||||||
}}</span>
|
<!-- }}</span>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
|
<el-table-column label="寄存器地址" prop="寄存器地址"></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="最新值"
|
label="最新值"
|
||||||
prop="pointValue"
|
prop="pointValue"
|
||||||
@ -144,6 +146,7 @@ export default {
|
|||||||
this.pageSize = 10;
|
this.pageSize = 10;
|
||||||
this.pageNum = 1;
|
this.pageNum = 1;
|
||||||
this.totalSize = 0;
|
this.totalSize = 0;
|
||||||
|
this.dataType = '';
|
||||||
this.form = {
|
this.form = {
|
||||||
sortMethod: "desc", //升序不传或者asc、降序desc)
|
sortMethod: "desc", //升序不传或者asc、降序desc)
|
||||||
sortData: this.defaultSort.prop,
|
sortData: this.defaultSort.prop,
|
||||||
@ -151,8 +154,8 @@ export default {
|
|||||||
dataPoint: "", //点位名称
|
dataPoint: "", //点位名称
|
||||||
lower: "", //
|
lower: "", //
|
||||||
upper: "", //
|
upper: "", //
|
||||||
ipAddress: "",
|
// ipAddress: "",
|
||||||
ipPort: "",
|
// ipPort: "",
|
||||||
};
|
};
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
@ -169,6 +172,7 @@ export default {
|
|||||||
defaultSort: { prop: "updateTime", order: "descending" },
|
defaultSort: { prop: "updateTime", order: "descending" },
|
||||||
show: false,
|
show: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
|
dataType:'',//展示的数据类型 point点位/alarmPoint报警点位
|
||||||
form: {
|
form: {
|
||||||
sortData: "updateTime", //最新值升序不传或者asc、降序desc)
|
sortData: "updateTime", //最新值升序不传或者asc、降序desc)
|
||||||
sortMethod: "desc", //升序不传或者asc、降序desc)
|
sortMethod: "desc", //升序不传或者asc、降序desc)
|
||||||
@ -176,8 +180,8 @@ export default {
|
|||||||
dataPoint: "", //点位名称
|
dataPoint: "", //点位名称
|
||||||
lower: "", //
|
lower: "", //
|
||||||
upper: "", //
|
upper: "", //
|
||||||
ipAddress: "",
|
// ipAddress: "",
|
||||||
ipPort: "",
|
// ipPort: "",
|
||||||
},
|
},
|
||||||
deviceCategory: "",
|
deviceCategory: "",
|
||||||
deviceId: "",
|
deviceId: "",
|
||||||
@ -212,22 +216,57 @@ export default {
|
|||||||
this.form.sortData = column.prop;
|
this.form.sortData = column.prop;
|
||||||
this.form.sortMethod = column.order === "descending" ? "desc" : "asc";
|
this.form.sortMethod = column.order === "descending" ? "desc" : "asc";
|
||||||
console.log("切换排序方式", column, this.form);
|
console.log("切换排序方式", column, this.form);
|
||||||
this.getData();
|
this.getData()
|
||||||
},
|
},
|
||||||
search() {
|
search() {
|
||||||
this.pageNum = 1;
|
this.pageNum = 1;
|
||||||
this.getData();
|
this.getData()
|
||||||
},
|
},
|
||||||
showTable({ deviceCategory, siteId, deviceId, parentId = "" }) {
|
// 分页
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.pageSize = val;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.getData()
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.pageNum = val;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.getData()
|
||||||
|
});
|
||||||
|
},
|
||||||
|
showTable({ deviceCategory, siteId, deviceId, parentId = "" },dataType) {
|
||||||
|
this.dataType = dataType;
|
||||||
this.deviceCategory = deviceCategory;
|
this.deviceCategory = deviceCategory;
|
||||||
this.siteId = siteId;
|
this.siteId = siteId;
|
||||||
this.deviceId = deviceId;
|
this.deviceId = deviceId;
|
||||||
this.parentId = deviceCategory === "BATTERY" ? parentId : ""; //只有单体电池需要这个值
|
this.parentId = deviceCategory === "BATTERY" ? parentId : ""; //只有单体电池需要这个值
|
||||||
this.show = true;
|
this.show = true;
|
||||||
this.getData();
|
this.getData()
|
||||||
|
},
|
||||||
|
getAlarmPointData(param){
|
||||||
|
this.loading = true;
|
||||||
|
getDevicePointList(param)
|
||||||
|
.then((response) => {
|
||||||
|
this.tableData = response?.rows || [];
|
||||||
|
this.totalSize = response?.total || 0;
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getPointData(param){
|
||||||
|
this.loading = true;
|
||||||
|
getDevicePointList(param)
|
||||||
|
.then((response) => {
|
||||||
|
this.tableData = response?.rows || [];
|
||||||
|
this.totalSize = response?.total || 0;
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getData() {
|
getData() {
|
||||||
this.loading = true;
|
|
||||||
const {
|
const {
|
||||||
siteId,
|
siteId,
|
||||||
deviceId,
|
deviceId,
|
||||||
@ -242,11 +281,11 @@ export default {
|
|||||||
dataPoint,
|
dataPoint,
|
||||||
lower,
|
lower,
|
||||||
upper,
|
upper,
|
||||||
ipAddress,
|
// ipAddress,
|
||||||
ipPort,
|
// ipPort,
|
||||||
},
|
},
|
||||||
} = this;
|
} = this;
|
||||||
getDevicePointList({
|
const params = {
|
||||||
siteId,
|
siteId,
|
||||||
deviceId,
|
deviceId,
|
||||||
deviceCategory,
|
deviceCategory,
|
||||||
@ -259,29 +298,10 @@ export default {
|
|||||||
dataPoint,
|
dataPoint,
|
||||||
lower,
|
lower,
|
||||||
upper,
|
upper,
|
||||||
ipAddress,
|
ipAddress:'',
|
||||||
ipPort,
|
ipPort:'',
|
||||||
})
|
}
|
||||||
.then((response) => {
|
this.dataType === 'point' ? this.getPointData(params) : this.getAlarmPointData(params)
|
||||||
this.tableData = response?.rows || [];
|
|
||||||
this.totalSize = response?.total || 0;
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 分页
|
|
||||||
handleSizeChange(val) {
|
|
||||||
this.pageSize = val;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.getData();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleCurrentChange(val) {
|
|
||||||
this.pageNum = val;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.getData();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@ -13,12 +13,6 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-button type="primary" @click="addDevice" native-type="button">新增设备</el-button>
|
<el-button type="primary" @click="addDevice" native-type="button">新增设备</el-button>
|
||||||
<el-button
|
|
||||||
@click="uploadPointDetail"
|
|
||||||
type="success"
|
|
||||||
plain>
|
|
||||||
上传点位清单
|
|
||||||
</el-button>
|
|
||||||
<el-table
|
<el-table
|
||||||
class="common-table"
|
class="common-table"
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
@ -59,18 +53,34 @@
|
|||||||
width="250">
|
width="250">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@click="pointDetail(scope.row)"
|
@click="pointDetail(scope.row,'point')"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini">
|
size="mini">
|
||||||
点位清单
|
点位清单
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
@click="pointDetail(scope.row,'alarmPoint')"
|
||||||
|
type="primary"
|
||||||
|
size="mini">
|
||||||
|
报警点位清单
|
||||||
|
</el-button>
|
||||||
|
<br>
|
||||||
<el-button
|
<el-button
|
||||||
@click="downloadPointDetail(scope.row)"
|
@click="downloadPointDetail(scope.row)"
|
||||||
|
style="margin-top:10px;"
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
size="mini">
|
size="mini">
|
||||||
下载点位清单
|
下载点位清单
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
@click="uploadPointDetail(scope.row)"
|
||||||
|
style="margin-top:10px;"
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
size="mini">
|
||||||
|
上传点位清单
|
||||||
|
</el-button>
|
||||||
<br>
|
<br>
|
||||||
<el-button
|
<el-button
|
||||||
@click="editDevice(scope.row)"
|
@click="editDevice(scope.row)"
|
||||||
@ -116,13 +126,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getDeviceInfoList,getDeviceDetailInfo,deleteService,exportPointList,importPointList} from'@/api/ems/site'
|
import {getDeviceInfoList,getDeviceDetailInfo,deleteService} from'@/api/ems/site'
|
||||||
import {getAllSites} from '@/api/ems/zddt'
|
import {getAllSites} from '@/api/ems/zddt'
|
||||||
import {formatNumber} from "@/filters/ems";
|
import {formatNumber} from "@/filters/ems";
|
||||||
import PointTable from './PointTable.vue'
|
import PointTable from './PointTable.vue'
|
||||||
import AddDevice from "./AddDevice.vue";
|
import AddDevice from "./AddDevice.vue";
|
||||||
import PointUpload from "./PointUpload.vue";
|
import PointUpload from "./PointUpload.vue";
|
||||||
import {download} from "@/utils/request";
|
|
||||||
export default {
|
export default {
|
||||||
name: "Sblb",
|
name: "Sblb",
|
||||||
components:{AddDevice,PointTable,PointUpload},
|
components:{AddDevice,PointTable,PointUpload},
|
||||||
@ -164,8 +173,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
// 查看设备电位表格
|
// 查看设备电位表格
|
||||||
pointDetail(row){
|
pointDetail(row,dataType){
|
||||||
this.$refs.pointTable.showTable(row)
|
this.$refs.pointTable.showTable(row,dataType)
|
||||||
},
|
},
|
||||||
// 下载点位清单
|
// 下载点位清单
|
||||||
downloadPointDetail({siteId,deviceCategory,deviceName}){
|
downloadPointDetail({siteId,deviceCategory,deviceName}){
|
||||||
|
|||||||
Reference in New Issue
Block a user