首页、单体电池
This commit is contained in:
71
src/views/ems/dzjk/home/ClInfo.vue
Normal file
71
src/views/ems/dzjk/home/ClInfo.vue
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
<template>
|
||||||
|
<el-card shadow="always" class="common-card-container common-card-container-body-no-padding">
|
||||||
|
<div slot="header">
|
||||||
|
<span class="card-title">策略信息</span>
|
||||||
|
</div>
|
||||||
|
<!-- <el-empty :image-size="100" ></el-empty> -->
|
||||||
|
<div style="box-sizing: border-box; height: 250px;padding:20px 15px;" >
|
||||||
|
<el-descriptions class="home-normal-info" :column="2" >
|
||||||
|
<el-descriptions-item size="mini" label="模板名称">模板1</el-descriptions-item>
|
||||||
|
<el-descriptions-item size="mini" label="SOC限制">开/关</el-descriptions-item>
|
||||||
|
<el-descriptions-item size="mini" label="SOC下限">0%</el-descriptions-item>
|
||||||
|
<el-descriptions-item size="mini" label="SOC上限">100%</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-table
|
||||||
|
:data="info.tableData || []"
|
||||||
|
border
|
||||||
|
style="width: 100%;margin-top:15px;">
|
||||||
|
<el-table-column
|
||||||
|
prop="startTime"
|
||||||
|
label="开始时间">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="endTime"
|
||||||
|
label="结束时间">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="chargeDischargePower"
|
||||||
|
label="充放功率(kW)">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="chargeStatus"
|
||||||
|
label="充电状态">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{chargeStatusOptions[scope.row.chargeStatus]}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {mapState} from 'vuex'
|
||||||
|
export default{
|
||||||
|
props:{
|
||||||
|
info:{
|
||||||
|
require:true,
|
||||||
|
type:Object,
|
||||||
|
default:()=>{
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed:{
|
||||||
|
...mapState({
|
||||||
|
chargeStatusOptions: state => state?.ems?.chargeStatusOptions || {},
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@ -1,148 +0,0 @@
|
|||||||
|
|
||||||
<template>
|
|
||||||
<el-row style="background:#fff;margin-top:30px;">
|
|
||||||
<el-col :xs="24" :sm="24" :lg="24">
|
|
||||||
<el-card shadow="always" class="common-card-container common-card-container-body-no-padding">
|
|
||||||
<div slot="header">
|
|
||||||
<span class="card-title">能量流转</span>
|
|
||||||
</div>
|
|
||||||
<div style="height: 310px" id="nllzChart"></div>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import * as echarts from 'echarts'
|
|
||||||
import resize from '@/mixins/ems/resize'
|
|
||||||
import {formatNumber} from "@/filters/ems";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
mixins: [resize],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
chart: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.initChart()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
if (!this.chart) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.chart.dispose()
|
|
||||||
this.chart = null
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initChart() {
|
|
||||||
this.chart = echarts.init(document.querySelector('#nllzChart'))
|
|
||||||
},
|
|
||||||
setOption(data) {
|
|
||||||
const {siteMonitorDataVo=[],gridNrtPower,loadNrtPower,energyStorageNrtPower,energyStorageAvailElec} = data
|
|
||||||
const source = [['日期','充电量','放电量']]
|
|
||||||
siteMonitorDataVo.forEach(item=>{
|
|
||||||
source.push([item.ammeterDate, item.chargedCap,item.disChargedCap])
|
|
||||||
})
|
|
||||||
this.chart.setOption({
|
|
||||||
title: [
|
|
||||||
// 右上角
|
|
||||||
{
|
|
||||||
text: `电网 实时功率:${formatNumber(gridNrtPower)} kW`,
|
|
||||||
top: 10,
|
|
||||||
right: 10,
|
|
||||||
textStyle:{
|
|
||||||
fontSize:12,
|
|
||||||
color:'#666666'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 右下角
|
|
||||||
{
|
|
||||||
text: `负载 实时功率:${formatNumber(loadNrtPower)} kW`,
|
|
||||||
bottom: 10,
|
|
||||||
right: 10,
|
|
||||||
textStyle:{
|
|
||||||
fontSize:12,
|
|
||||||
color:'#666666'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 左下角第一行
|
|
||||||
{
|
|
||||||
text: '储能',
|
|
||||||
bottom: 40,
|
|
||||||
left: 10,
|
|
||||||
textStyle:{
|
|
||||||
fontSize:12,
|
|
||||||
color:'#666666'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 左下角第二行
|
|
||||||
{
|
|
||||||
text: `实时功率:${formatNumber(energyStorageNrtPower)} kW`,
|
|
||||||
bottom: 26,
|
|
||||||
left: 10,
|
|
||||||
textStyle:{
|
|
||||||
fontSize:12,
|
|
||||||
color:'#666666'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 左下角第三行
|
|
||||||
{
|
|
||||||
text: `可用电量:${formatNumber(energyStorageAvailElec)} kWh`,
|
|
||||||
bottom: 10,
|
|
||||||
left: 10,
|
|
||||||
textStyle:{
|
|
||||||
fontSize:12,
|
|
||||||
color:'#666666'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
grid:{
|
|
||||||
left:200
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
|
||||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
textStyle:{
|
|
||||||
color:"#333333",
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
axisLine: {
|
|
||||||
lineStyle:{
|
|
||||||
color: '#333333',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value',
|
|
||||||
axisLine: {
|
|
||||||
lineStyle:{
|
|
||||||
color: '#333333',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dataset:{
|
|
||||||
source
|
|
||||||
// source: [['日期','充电量','放电量']]
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name:'充电量',
|
|
||||||
type: 'line',
|
|
||||||
},{
|
|
||||||
name:'放电量',
|
|
||||||
type: 'line',
|
|
||||||
}]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
@ -10,7 +10,7 @@
|
|||||||
<span class="card-title">静态信息</span>
|
<span class="card-title">静态信息</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="box-sizing: border-box; height: 250px;padding:20px 15px;" >
|
<div style="box-sizing: border-box; height: 250px;padding:20px 15px;" >
|
||||||
<el-descriptions class="single-zd-info-container" :column="1" >
|
<el-descriptions class="home-normal-info" :column="1" >
|
||||||
<el-descriptions-item size="mini" v-for="(item,index) in singleZdInfo" :key="index+'singleZdInfo'" :label="item.title">{{info[item.attr] | formatNumber }}</el-descriptions-item>
|
<el-descriptions-item size="mini" v-for="(item,index) in singleZdInfo" :key="index+'singleZdInfo'" :label="item.title">{{info[item.attr] | formatNumber }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
@ -32,14 +32,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="24" :lg="10">
|
<el-col :xs="24" :sm="24" :lg="10">
|
||||||
<el-card shadow="always" class="common-card-container common-card-container-body-no-padding">
|
<cl-info :info="{}"/>
|
||||||
<div slot="header">
|
|
||||||
<span class="card-title">策略信息</span>
|
|
||||||
</div>
|
|
||||||
<div style="box-sizing: border-box; height: 250px;padding:20px 15px;" >
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="24" :lg="24">
|
<el-col :xs="24" :sm="24" :lg="24">
|
||||||
<week-chart ref="weekChart"/>
|
<week-chart ref="weekChart"/>
|
||||||
@ -58,10 +51,11 @@ import {getDzjkHomeView} from '@/api/ems/dzjk'
|
|||||||
import WeekChart from "./WeekChart.vue";
|
import WeekChart from "./WeekChart.vue";
|
||||||
import ActiveChart from "./ActiveChart.vue";
|
import ActiveChart from "./ActiveChart.vue";
|
||||||
import AlarmTable from "./AlarmTable.vue";
|
import AlarmTable from "./AlarmTable.vue";
|
||||||
|
import ClInfo from './ClInfo.vue';
|
||||||
import getQuerySiteId from '@/mixins/ems/getQuerySiteId'
|
import getQuerySiteId from '@/mixins/ems/getQuerySiteId'
|
||||||
export default {
|
export default {
|
||||||
name:'DzjkSbjkHome',
|
name:'DzjkSbjkHome',
|
||||||
components: {WeekChart,ActiveChart,AlarmTable},
|
components: {WeekChart,ActiveChart,AlarmTable,ClInfo},
|
||||||
mixins: [getQuerySiteId],
|
mixins: [getQuerySiteId],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -136,6 +130,7 @@ export default {
|
|||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//数据概览
|
//数据概览
|
||||||
.sjgl-data{
|
.sjgl-data{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@ -159,6 +154,17 @@ export default {
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.home-normal-info{
|
||||||
|
font-size: 12px;
|
||||||
|
.el-descriptions-item__container{
|
||||||
|
.el-descriptions-item__label{
|
||||||
|
color:#666666;
|
||||||
|
}
|
||||||
|
.el-descriptions-item__content{
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/* card标题里的时间选择器 */
|
/* card标题里的时间选择器 */
|
||||||
.time-range-card{
|
.time-range-card{
|
||||||
&.common-card-container .el-card__header{
|
&.common-card-container .el-card__header{
|
||||||
|
|||||||
125
src/views/ems/dzjk/sbjk/dtdc/Table.vue
Normal file
125
src/views/ems/dzjk/sbjk/dtdc/Table.vue
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-table
|
||||||
|
class="common-table"
|
||||||
|
:data="tableData"
|
||||||
|
stripe
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="deviceId" label="单体编号"> </el-table-column>
|
||||||
|
<el-table-column prop="clusterDeviceId" label="簇号"> </el-table-column>
|
||||||
|
<el-table-column prop="voltage" label="电压(V)">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
@click="chartDetail(scope.row, 'voltage')"
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
{{ scope.row.voltage }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="temperature" label="温度(℃)">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
@click="chartDetail(scope.row, 'temperature')"
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
{{ scope.row.temperature }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="soc" label="SOC(%)">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
@click="chartDetail(scope.row, 'soc')"
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
{{ scope.row.soc }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="soh" label="SOH(%)">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
@click="chartDetail(scope.row, 'soh')"
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
{{ scope.row.soh }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="曲线图">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button @click="chartDetail(scope.row)" type="text" size="small">
|
||||||
|
展示
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</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>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
tableData: {
|
||||||
|
require: true,
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return [];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pageNum: {
|
||||||
|
require: true,
|
||||||
|
type: Number,
|
||||||
|
default: 1,
|
||||||
|
},
|
||||||
|
pageSize: {
|
||||||
|
require: true,
|
||||||
|
type: Number,
|
||||||
|
default: 10,
|
||||||
|
},
|
||||||
|
totalSize: {
|
||||||
|
require: true,
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//查看表格行图表
|
||||||
|
chartDetail(row, dataType = "") {
|
||||||
|
const { clusterDeviceId, deviceId } = row;
|
||||||
|
this.$emit("chart", { clusterDeviceId, deviceId, dataType });
|
||||||
|
},
|
||||||
|
// 分页
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.$emit("handleSizeChange", val);
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.$emit("handleCurrentChange", val);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style></style>
|
||||||
@ -1,224 +1,205 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-card v-loading="loading" shadow="always" class="common-card-container common-card-container-no-title-bg">
|
<el-card
|
||||||
<div slot="header">
|
v-loading="loading"
|
||||||
<span class="large-title">单体电池实时数据</span>
|
shadow="always"
|
||||||
</div>
|
class="common-card-container common-card-container-no-title-bg"
|
||||||
<!-- 搜索栏-->
|
>
|
||||||
<el-form :inline="true" class="select-container">
|
<div slot="header">
|
||||||
<el-form-item label="电池堆">
|
<span class="large-title">单体电池实时数据</span>
|
||||||
<el-select v-model="search.stackId" placeholder="请选择" @change="changeStackId">
|
</div>
|
||||||
<el-option :label="item.deviceName" :value="item.id" v-for="(item,index) in stackOptions" :key="index+'stackOptions'"></el-option>
|
<!-- 搜索栏-->
|
||||||
</el-select>
|
<el-form :inline="true" class="select-container">
|
||||||
</el-form-item>
|
<el-form-item label="编号">
|
||||||
<el-form-item label="电池簇">
|
<el-input
|
||||||
<el-select v-model="search.clusterId" :no-data-text="!search.stackId && stackOptions.length > 0 ? '请先选择电池堆':'无数据'" placeholder="请选择" :loading="clusterloading" loading-text="正在加载数据">
|
v-model="search.deviceId"
|
||||||
<el-option :label="item.deviceName" :value="item.id" v-for="(item,index) in clusterOptions" :key="index+'clusterOptions'"></el-option>
|
placeholder="请输入"
|
||||||
</el-select>
|
clearable
|
||||||
</el-form-item>
|
style="width: 150px"
|
||||||
<el-form-item>
|
/>
|
||||||
<el-button type="primary" @click="onSearch" native-type="button">搜索</el-button>
|
</el-form-item>
|
||||||
</el-form-item>
|
<el-form-item label="电池堆">
|
||||||
<el-form-item>
|
<el-select
|
||||||
<el-button @click="onReset" native-type="button">重置</el-button>
|
v-model="search.stackId"
|
||||||
</el-form-item>
|
placeholder="请选择"
|
||||||
</el-form>
|
@change="changeStackId"
|
||||||
<!-- 图表-->
|
>
|
||||||
<!-- <div style="margin:30px 0;box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);">-->
|
<el-option
|
||||||
<!-- <el-row style="background:#fff;margin:30px 0;">-->
|
:label="item.deviceName"
|
||||||
<!-- <el-col :xs="24" :sm="24" :lg="24">-->
|
:value="item.id"
|
||||||
<!-- <bar-chart ref="barChart"/>-->
|
v-for="(item, index) in stackOptions"
|
||||||
<!-- </el-col>-->
|
:key="index + 'stackOptions'"
|
||||||
<!-- </el-row>-->
|
></el-option>
|
||||||
<!-- </div>-->
|
</el-select>
|
||||||
<el-table
|
</el-form-item>
|
||||||
class="common-table"
|
<el-form-item label="电池簇">
|
||||||
:data="tableData"
|
<el-select
|
||||||
stripe
|
v-model="search.clusterId"
|
||||||
style="width: 100%;margin-top: 25px">
|
:no-data-text="
|
||||||
<el-table-column
|
!search.stackId && stackOptions.length > 0
|
||||||
prop="deviceId"
|
? '请先选择电池堆'
|
||||||
label="单体编号">
|
: '无数据'
|
||||||
</el-table-column>
|
"
|
||||||
<el-table-column
|
placeholder="请选择"
|
||||||
prop="clusterDeviceId"
|
:loading="clusterloading"
|
||||||
label="簇号">
|
loading-text="正在加载数据"
|
||||||
</el-table-column>
|
>
|
||||||
<el-table-column
|
<el-option
|
||||||
prop="voltage"
|
:label="item.deviceName"
|
||||||
label="电压(V)"
|
:value="item.id"
|
||||||
>
|
v-for="(item, index) in clusterOptions"
|
||||||
<template slot-scope="scope">
|
:key="index + 'clusterOptions'"
|
||||||
<el-button
|
></el-option>
|
||||||
@click="chartDetail(scope.row,'voltage')"
|
</el-select>
|
||||||
type="text"
|
</el-form-item>
|
||||||
size="small">
|
<el-form-item>
|
||||||
{{scope.row.voltage}}
|
<el-button type="primary" @click="onSearch" native-type="button"
|
||||||
</el-button>
|
>搜索</el-button
|
||||||
</template>
|
>
|
||||||
</el-table-column>
|
</el-form-item>
|
||||||
<el-table-column
|
<el-form-item>
|
||||||
prop="temperature"
|
<el-button @click="onReset" native-type="button">重置</el-button>
|
||||||
label="温度(℃)">
|
</el-form-item>
|
||||||
<template slot-scope="scope">
|
</el-form>
|
||||||
<el-button
|
<!-- 表格 -->
|
||||||
@click="chartDetail(scope.row,'temperature')"
|
<dtdc-table
|
||||||
type="text"
|
:tableData="tableData"
|
||||||
size="small">
|
:pageNum="pageNum"
|
||||||
{{scope.row.temperature}}
|
:pageSize="pageSize"
|
||||||
</el-button>
|
:totalSize="totalSize"
|
||||||
</template>
|
@chart="chartDetail"
|
||||||
</el-table-column>
|
@handleSizeChange="handleSizeChange"
|
||||||
<el-table-column
|
@handleCurrentChange="handleCurrentChange"
|
||||||
prop="soc"
|
/>
|
||||||
label="SOC(%)">
|
<chart-detail ref="chartDetail" />
|
||||||
<template slot-scope="scope">
|
</el-card>
|
||||||
<el-button
|
|
||||||
@click="chartDetail(scope.row,'soc')"
|
|
||||||
type="text"
|
|
||||||
size="small">
|
|
||||||
{{scope.row.soc}}
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="soh"
|
|
||||||
label="SOH(%)">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
@click="chartDetail(scope.row,'soh')"
|
|
||||||
type="text"
|
|
||||||
size="small">
|
|
||||||
{{scope.row.soh}}
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="曲线图">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
@click="chartDetail(scope.row)"
|
|
||||||
type="text"
|
|
||||||
size="small">
|
|
||||||
展示
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</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>
|
|
||||||
<chart-detail ref="chartDetail"/>
|
|
||||||
</el-card>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BarChart from './BarChart'
|
import BarChart from "./BarChart";
|
||||||
import {getStackNameList, getClusterNameList, getClusterDataInfoList} from '@/api/ems/dzjk'
|
import {
|
||||||
|
getStackNameList,
|
||||||
|
getClusterNameList,
|
||||||
|
getClusterDataInfoList,
|
||||||
|
} from "@/api/ems/dzjk";
|
||||||
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
||||||
import ChartDetail from "./ChartDetail.vue";
|
import ChartDetail from "./ChartDetail.vue";
|
||||||
|
import Table from "./Table.vue";
|
||||||
export default {
|
export default {
|
||||||
name:'DzjkSbjkDtdc',
|
name: "DzjkSbjkDtdc",
|
||||||
mixins:[getQuerySiteId],
|
mixins: [getQuerySiteId],
|
||||||
components:{BarChart, ChartDetail},
|
components: { BarChart, ChartDetail, DtdcTable: Table },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading:false,
|
loading: false,
|
||||||
clusterloading:false,
|
clusterloading: false,
|
||||||
search:{stackId:'',clusterId:''},
|
search: { stackId: "", clusterId: "", deviceId: "" },
|
||||||
stackOptions:[],//{id:'',deviceName:''}
|
stackOptions: [], //{id:'',deviceName:''}
|
||||||
clusterOptions:[],//{id:'',deviceName:''}
|
clusterOptions: [], //{id:'',deviceName:''}
|
||||||
tableData:[],
|
tableData: [],
|
||||||
pageSize:10,//分页栏当前每个数据总数
|
pageSize: 10, //分页栏当前每个数据总数
|
||||||
pageNum:1,//分页栏当前页数
|
pageNum: 1, //分页栏当前页数
|
||||||
totalSize:0,//table表格数据总数
|
totalSize: 0, //table表格数据总数
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
//查看表格行图表
|
//查看表格行图表
|
||||||
chartDetail(row,dataType = ''){
|
chartDetail({ clusterDeviceId, deviceId, dataType = "" }) {
|
||||||
const { clusterDeviceId, deviceId} = row,{siteId} = this
|
const { siteId } = this;
|
||||||
this.$refs.chartDetail.initChart({siteId,clusterDeviceId,deviceId},dataType)
|
this.$refs.chartDetail.initChart(
|
||||||
|
{ siteId, clusterDeviceId, deviceId },
|
||||||
|
dataType
|
||||||
|
);
|
||||||
},
|
},
|
||||||
// 分页
|
// 分页
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.pageSize = val;
|
this.pageSize = val;
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(() => {
|
||||||
this.getTableData()
|
this.getTableData();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
this.pageNum = val
|
this.pageNum = val;
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(() => {
|
||||||
this.getTableData()
|
this.getTableData();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 搜索
|
// 搜索
|
||||||
onSearch(){
|
onSearch() {
|
||||||
this.pageNum =1//每次搜索从1开始搜索
|
this.pageNum = 1; //每次搜索从1开始搜索
|
||||||
this.getTableData()
|
this.getTableData();
|
||||||
},
|
},
|
||||||
// 重置
|
// 重置
|
||||||
// 清空搜索栏选中数据
|
// 清空搜索栏选中数据
|
||||||
// 清空电池簇列表,保留电池堆列表
|
// 清空电池簇列表,保留电池堆列表
|
||||||
onReset(){
|
onReset() {
|
||||||
this.search={stackId:'',clusterId:''}
|
this.search = { stackId: "", clusterId: "", deviceId: "" };
|
||||||
this.clusterOptions=[]
|
this.clusterOptions = [];
|
||||||
this.pageNum = 1
|
this.pageNum = 1;
|
||||||
this.getTableData()
|
this.getTableData();
|
||||||
},
|
},
|
||||||
changeStackId(val){
|
changeStackId(val) {
|
||||||
if(val){
|
if (val) {
|
||||||
console.log('选择了电池堆,需要获取对应的电池簇',val,this.search.stackId)
|
console.log(
|
||||||
this.search.clusterId=''
|
"选择了电池堆,需要获取对应的电池簇",
|
||||||
this.getClusterList()
|
val,
|
||||||
|
this.search.stackId
|
||||||
|
);
|
||||||
|
this.search.clusterId = "";
|
||||||
|
this.getClusterList();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//表格数据
|
//表格数据
|
||||||
getTableData(){
|
getTableData() {
|
||||||
this.loading=true;
|
this.loading = true;
|
||||||
const {stackId:stackDeviceId,clusterId:clusterDeviceId} =this.search
|
const {
|
||||||
const {siteId,pageNum,pageSize}=this
|
stackId: stackDeviceId,
|
||||||
getClusterDataInfoList({stackDeviceId,clusterDeviceId,siteId,pageNum,pageSize}).then(response => {
|
clusterId: clusterDeviceId,
|
||||||
this.tableData=response?.rows || [];
|
deviceId,
|
||||||
this.totalSize = response?.total || 0
|
} = this.search;
|
||||||
}).finally(()=>{
|
const { siteId, pageNum, pageSize } = this;
|
||||||
this.loading=false;
|
getClusterDataInfoList({
|
||||||
|
stackDeviceId,
|
||||||
|
clusterDeviceId,
|
||||||
|
siteId,
|
||||||
|
// deviceId,
|
||||||
|
pageNum,
|
||||||
|
pageSize,
|
||||||
})
|
})
|
||||||
|
.then((response) => {
|
||||||
|
this.tableData = response?.rows || [];
|
||||||
|
this.totalSize = response?.total || 0;
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getStackList(){
|
getStackList() {
|
||||||
getStackNameList(this.siteId).then(response => {
|
getStackNameList(this.siteId).then((response) => {
|
||||||
this.stackOptions = JSON.parse(JSON.stringify(response?.data || []))
|
this.stackOptions = JSON.parse(JSON.stringify(response?.data || []));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getClusterList() {
|
||||||
|
this.clusterloading = true;
|
||||||
|
getClusterNameList({
|
||||||
|
stackDeviceId: this.search.stackId,
|
||||||
|
siteId: this.siteId,
|
||||||
})
|
})
|
||||||
|
.then((response) => {
|
||||||
|
this.clusterOptions = JSON.parse(
|
||||||
|
JSON.stringify(response?.data || [])
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.clusterloading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getClusterList(){
|
init() {
|
||||||
this.clusterloading =true
|
|
||||||
getClusterNameList({stackDeviceId:this.search.stackId,siteId: this.siteId}).then(response => {
|
|
||||||
this.clusterOptions = JSON.parse(JSON.stringify(response?.data || []))
|
|
||||||
}).finally(() => {this.clusterloading =false})
|
|
||||||
},
|
|
||||||
init(){
|
|
||||||
// 只有页面初次加载或切换站点的时候调用电池堆列表,其他情况不需要
|
// 只有页面初次加载或切换站点的时候调用电池堆列表,其他情况不需要
|
||||||
this.search={stackId:'',clusterId:''}//保证切换站点时,清空选择项
|
this.search = { stackId: "", clusterId: "" }; //保证切换站点时,清空选择项
|
||||||
this.getStackList()
|
this.getStackList();
|
||||||
this.getTableData()
|
this.getTableData();
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted() {},
|
||||||
|
};
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
<div>总放电量:<span class="point">{{totalDisChargedCap | formatNumber}}kWh</span></div>
|
<div>总放电量:<span class="point">{{totalDisChargedCap | formatNumber}}kWh</span></div>
|
||||||
<div>综合效率:<span class="point">{{efficiency | formatNumber}}%</span></div>
|
<div>综合效率:<span class="point">{{efficiency | formatNumber}}%</span></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="dlzbChart" style="height: 310px"></div>
|
<div id="dlzbChart" style="height: 310px;"></div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
@ -167,7 +167,7 @@ export default {
|
|||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
padding:10px 0;
|
padding:20px 0;
|
||||||
>div{
|
>div{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
|
|||||||
Reference in New Issue
Block a user