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>

View File

@ -10,7 +10,7 @@
destroy-on-close
lock-scroll
show-close
title="点位清单"
:title="dataType === 'point' ? '点位清单' : '报警点位'"
width="950px"
>
<el-form :inline="true" label-width="100px">
@ -30,14 +30,15 @@
style="width: 150px"
></el-input>
</el-form-item>
<el-form-item label="modbus ip">
<el-input
v-model="form.ipAddress"
clearable
placeholder="请输入ip"
style="width: 150px"
></el-input>
</el-form-item>
<!-- <el-form-item label="modbus ip">-->
<!-- <el-input-->
<!-- v-model="form.ipAddress"-->
<!-- clearable-->
<!-- placeholder="请输入ip"-->
<!-- style="width: 150px"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<br>
<el-form-item label="最小值">
<el-input
v-model="form.lower"
@ -54,14 +55,14 @@
style="width: 150px"
></el-input>
</el-form-item>
<el-form-item label="modbus 端口">
<el-input
v-model="form.ipPort"
clearable
placeholder="请输入端口"
style="width: 150px"
></el-input>
</el-form-item>
<!-- <el-form-item label="modbus 端口">-->
<!-- <el-input-->
<!-- v-model="form.ipPort"-->
<!-- clearable-->
<!-- placeholder="请输入端口"-->
<!-- style="width: 150px"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<el-form-item style="margin-left: 20px">
<el-button type="primary" @click="search">搜索</el-button>
</el-form-item>
@ -81,13 +82,14 @@
label="数据点位名称"
prop="pointName"
></el-table-column>
<el-table-column label="modbus地址">
<template slot-scope="scope">
<span>{{
`${scope.row.ipAddress || ""} ${scope.row.ipPort || ""}`
}}</span>
</template>
</el-table-column>
<!-- <el-table-column label="modbus地址">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{-->
<!-- `${scope.row.ipAddress || ""} ${scope.row.ipPort || ""}`-->
<!-- }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="寄存器地址" prop="寄存器地址"></el-table-column>
<el-table-column
label="最新值"
prop="pointValue"
@ -144,6 +146,7 @@ export default {
this.pageSize = 10;
this.pageNum = 1;
this.totalSize = 0;
this.dataType = '';
this.form = {
sortMethod: "desc", //升序不传或者asc、降序desc
sortData: this.defaultSort.prop,
@ -151,8 +154,8 @@ export default {
dataPoint: "", //点位名称
lower: "", //
upper: "", //
ipAddress: "",
ipPort: "",
// ipAddress: "",
// ipPort: "",
};
this.loading = false;
}
@ -169,6 +172,7 @@ export default {
defaultSort: { prop: "updateTime", order: "descending" },
show: false,
loading: false,
dataType:'',//展示的数据类型 point点位/alarmPoint报警点位
form: {
sortData: "updateTime", //最新值升序不传或者asc、降序desc
sortMethod: "desc", //升序不传或者asc、降序desc
@ -176,8 +180,8 @@ export default {
dataPoint: "", //点位名称
lower: "", //
upper: "", //
ipAddress: "",
ipPort: "",
// ipAddress: "",
// ipPort: "",
},
deviceCategory: "",
deviceId: "",
@ -212,22 +216,57 @@ export default {
this.form.sortData = column.prop;
this.form.sortMethod = column.order === "descending" ? "desc" : "asc";
console.log("切换排序方式", column, this.form);
this.getData();
this.getData()
},
search() {
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.siteId = siteId;
this.deviceId = deviceId;
this.parentId = deviceCategory === "BATTERY" ? parentId : ""; //只有单体电池需要这个值
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() {
this.loading = true;
const {
siteId,
deviceId,
@ -242,11 +281,11 @@ export default {
dataPoint,
lower,
upper,
ipAddress,
ipPort,
// ipAddress,
// ipPort,
},
} = this;
getDevicePointList({
const params = {
siteId,
deviceId,
deviceCategory,
@ -259,29 +298,10 @@ export default {
dataPoint,
lower,
upper,
ipAddress,
ipPort,
})
.then((response) => {
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();
});
ipAddress:'',
ipPort:'',
}
this.dataType === 'point' ? this.getPointData(params) : this.getAlarmPointData(params)
},
},
};

View File

@ -13,12 +13,6 @@
</el-form-item>
</el-form>
<el-button type="primary" @click="addDevice" native-type="button">新增设备</el-button>
<el-button
@click="uploadPointDetail"
type="success"
plain>
上传点位清单
</el-button>
<el-table
class="common-table"
:data="tableData"
@ -59,18 +53,34 @@
width="250">
<template slot-scope="scope">
<el-button
@click="pointDetail(scope.row)"
@click="pointDetail(scope.row,'point')"
type="primary"
size="mini">
点位清单
</el-button>
<el-button
@click="pointDetail(scope.row,'alarmPoint')"
type="primary"
size="mini">
报警点位清单
</el-button>
<br>
<el-button
@click="downloadPointDetail(scope.row)"
style="margin-top:10px;"
type="primary"
plain
size="mini">
下载点位清单
</el-button>
<el-button
@click="uploadPointDetail(scope.row)"
style="margin-top:10px;"
type="success"
plain
size="mini">
上传点位清单
</el-button>
<br>
<el-button
@click="editDevice(scope.row)"
@ -116,13 +126,12 @@
</template>
<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 {formatNumber} from "@/filters/ems";
import PointTable from './PointTable.vue'
import AddDevice from "./AddDevice.vue";
import PointUpload from "./PointUpload.vue";
import {download} from "@/utils/request";
export default {
name: "Sblb",
components:{AddDevice,PointTable,PointUpload},
@ -164,8 +173,8 @@ export default {
},
methods:{
// 查看设备电位表格
pointDetail(row){
this.$refs.pointTable.showTable(row)
pointDetail(row,dataType){
this.$refs.pointTable.showTable(row,dataType)
},
// 下载点位清单
downloadPointDetail({siteId,deviceCategory,deviceName}){