Compare commits
4 Commits
baicai
...
4d58c9883c
Author | SHA1 | Date | |
---|---|---|---|
4d58c9883c | |||
ec35538afd | |||
328f893da9 | |||
c53bc4dc45 |
8
src/api/ems/site.js
Normal file
8
src/api/ems/site.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
// 首页、站点地图页面页面顶部 所有站点信息
|
||||||
|
export function getSiteInfoList({siteName,startTime, endTime,pageSize,pageNum}) {
|
||||||
|
return request({
|
||||||
|
url: `/ems/siteConfig/getSiteInfoList?siteName=${siteName}&startTime=${startTime}&endTime=${endTime}&pageSize=${pageSize}&pageNum=${pageNum}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
@ -41,7 +41,7 @@ export const dzjk=[
|
|||||||
path: '/dzjk/home',
|
path: '/dzjk/home',
|
||||||
component: () => import('@/views/ems/dzjk/home/index.vue'),
|
component: () => import('@/views/ems/dzjk/home/index.vue'),
|
||||||
name: 'DzjkHome',
|
name: 'DzjkHome',
|
||||||
meta: { title: '首页',breadcrumb: false,activeMenu: '/dzjk',activeSecondMenuName:'DzjkHome' }
|
meta: { title: '站点首页',breadcrumb: false,activeMenu: '/dzjk',activeSecondMenuName:'DzjkHome' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/dzjk/sbjk',
|
path: '/dzjk/sbjk',
|
||||||
|
@ -157,6 +157,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 搜索
|
// 搜索
|
||||||
onSearch(){
|
onSearch(){
|
||||||
|
this.pageNum =1//每次搜索从1开始搜索
|
||||||
const [alarmStartTime='',alarmEndTime='']=(this.dateRange || [])
|
const [alarmStartTime='',alarmEndTime='']=(this.dateRange || [])
|
||||||
// 选中了时间范围
|
// 选中了时间范围
|
||||||
if(alarmStartTime && alarmStartTime){
|
if(alarmStartTime && alarmStartTime){
|
||||||
@ -175,6 +176,7 @@ export default {
|
|||||||
onReset(){
|
onReset(){
|
||||||
this.search={deviceType:'',alarmLevel:''}
|
this.search={deviceType:'',alarmLevel:''}
|
||||||
this.dateRange=[]
|
this.dateRange=[]
|
||||||
|
this.pageNum =1//每次搜索从1开始搜索
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
// 切换今日、历史告警
|
// 切换今日、历史告警
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
<!-- 进度-->
|
<!-- 进度-->
|
||||||
<div class="process-container">
|
<div class="process-container">
|
||||||
<div class="process-line-bg">
|
<div class="process-line-bg">
|
||||||
<div class="process-line" :style="{height:baseInfo.currentSoc+'%'}"></div>
|
<div class="process-line" :style="{height:baseInfo.stackSoc+'%'}"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="process">当前SOC : {{baseInfo.currentSoc}}%</div>
|
<div class="process">当前SOC : {{baseInfo.stackSoc}}%</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
@ -100,15 +100,15 @@ export default {
|
|||||||
loading:false,
|
loading:false,
|
||||||
baseInfoList:[],
|
baseInfoList:[],
|
||||||
infoData:[
|
infoData:[
|
||||||
{label:'电池堆总电压',attr:'totalVoltage',unit:'V'},
|
{label:'电池堆总电压',attr:'stackVoltage',unit:'V'},
|
||||||
{label:'可充电量',attr:'chargeableCapacity',unit:'kWh'},
|
{label:'可充电量',attr:'availableChargeCapacity',unit:'kWh'},
|
||||||
{label:'累计充电量',attr:'totalChargedCapacity',unit:'kWh'},
|
{label:'累计充电量',attr:'totalChargeCapacity',unit:'kWh'},
|
||||||
{label:'电池堆总电流',attr:'totalCurrent',unit:'A'},
|
{label:'电池堆总电流',attr:'stackCurrent',unit:'A'},
|
||||||
{label:'可放电量',attr:'dischargeableCapacity',unit:'kWh'},
|
{label:'可放电量',attr:'availableDischargeCapacity',unit:'kWh'},
|
||||||
{label:'累计放电量',attr:'totalDischargedCapacity',unit:'kWh'},
|
{label:'累计放电量',attr:'totalDischargeCapacity',unit:'kWh'},
|
||||||
{label:'SOH',attr:'soh',unit:'%'},
|
{label:'SOH',attr:'stackSoh',unit:'%'},
|
||||||
{label:'平均温度',attr:'averageTemperature',unit:'℃'},
|
{label:'平均温度',attr:'operatingTemp',unit:'℃'},
|
||||||
{label:'绝缘电阻',attr:'insulationResistance',unit:'Ω'},
|
{label:'绝缘电阻',attr:'stackInsulationResistance',unit:'Ω'},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -117,6 +117,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 搜索
|
// 搜索
|
||||||
onSearch(){
|
onSearch(){
|
||||||
|
this.pageNum =1//每次搜索从1开始搜索
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
},
|
},
|
||||||
// 重置
|
// 重置
|
||||||
@ -125,6 +126,7 @@ export default {
|
|||||||
onReset(){
|
onReset(){
|
||||||
this.search={stackId:'',clusterId:''}
|
this.search={stackId:'',clusterId:''}
|
||||||
this.clusterOptions=[]
|
this.clusterOptions=[]
|
||||||
|
this.pageNum = 1
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
},
|
},
|
||||||
changeStackId(val){
|
changeStackId(val){
|
||||||
|
@ -81,6 +81,7 @@ export default {
|
|||||||
xAxis: { type: 'category' },
|
xAxis: { type: 'category' },
|
||||||
yAxis: [{
|
yAxis: [{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
|
name:'充电量/放电量kWh',
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle:{
|
lineStyle:{
|
||||||
color: '#333333',
|
color: '#333333',
|
||||||
@ -89,6 +90,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},{
|
},{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
|
name:'效率%',
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle:{
|
lineStyle:{
|
||||||
color: '#333333',
|
color: '#333333',
|
||||||
@ -96,7 +98,7 @@ export default {
|
|||||||
onZero:false
|
onZero:false
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
grid:{top:30},
|
grid:{top:40},
|
||||||
dataset:{
|
dataset:{
|
||||||
source
|
source
|
||||||
},
|
},
|
||||||
@ -123,7 +125,7 @@ export default {
|
|||||||
const startDate=formatDate(start),endDate = formatDate(end)
|
const startDate=formatDate(start),endDate = formatDate(end)
|
||||||
getElectricData({siteId:this.siteId,startDate,endDate}).then(response => {
|
getElectricData({siteId:this.siteId,startDate,endDate}).then(response => {
|
||||||
const {totalChargedCap='',totalDisChargedCap='',efficiency='',sevenDayDisChargeStats=[]}=response?.data || {}
|
const {totalChargedCap='',totalDisChargedCap='',efficiency='',sevenDayDisChargeStats=[]}=response?.data || {}
|
||||||
this.setOption(sevenDayDisChargeStats)
|
this.setOption(sevenDayDisChargeStats || [])
|
||||||
this.totalChargedCap=totalChargedCap
|
this.totalChargedCap=totalChargedCap
|
||||||
this.totalDisChargedCap=totalDisChargedCap
|
this.totalDisChargedCap=totalDisChargedCap
|
||||||
this.efficiency=efficiency
|
this.efficiency=efficiency
|
||||||
|
143
src/views/ems/site/index.vue
Normal file
143
src/views/ems/site/index.vue
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="ems-dashboard-editor-container" style="background-color: #ffffff" v-loading="loading">
|
||||||
|
<el-form :inline="true" class="select-container">
|
||||||
|
<el-form-item label="站点名称">
|
||||||
|
<el-input
|
||||||
|
v-model="siteName"
|
||||||
|
placeholder="请输入"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="运营时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dateRange"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
: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-button @click="onReset" native-type="button">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table
|
||||||
|
class="common-table"
|
||||||
|
:data="tableData"
|
||||||
|
stripe
|
||||||
|
max-height="500px"
|
||||||
|
style="width: 100%;margin-top: 25px">
|
||||||
|
<el-table-column
|
||||||
|
prop="siteName"
|
||||||
|
label="站点名称">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="siteAddress"
|
||||||
|
label="站点地址"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="runningTime"
|
||||||
|
label="运营时间">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="installPower"
|
||||||
|
label="装机功率">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="installCapacity"
|
||||||
|
label="装机容量">
|
||||||
|
</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 {getSiteInfoList} from'@/api/ems/site'
|
||||||
|
import { formatDate } from '@/filters/ems'
|
||||||
|
export default {
|
||||||
|
name: "Site",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading:false,
|
||||||
|
siteName:"",
|
||||||
|
pickerOptions:{
|
||||||
|
disabledDate(time) {
|
||||||
|
return time.getTime() > Date.now();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
defaultDateRange:[],//默认展示的时间
|
||||||
|
dateRange:[],//startTime,endTime
|
||||||
|
tableData:[],
|
||||||
|
pageSize:10,//分页栏当前每个数据总数
|
||||||
|
pageNum:1,//分页栏当前页数
|
||||||
|
totalSize:0,//table表格数据总数
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
// 分页
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.pageSize = val;
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.getTableData()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.pageNum = val
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.getTableData()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 搜索
|
||||||
|
onSearch(){
|
||||||
|
this.pageNum =1//每次搜索从1开始搜索
|
||||||
|
this.getData()
|
||||||
|
},
|
||||||
|
// 重置
|
||||||
|
onReset(){
|
||||||
|
this.siteName=''
|
||||||
|
this.dateRange=[]
|
||||||
|
this.pageNum =1//每次搜索从1开始搜索
|
||||||
|
this.getData()
|
||||||
|
},
|
||||||
|
// 获取数据
|
||||||
|
getData(){
|
||||||
|
this.loading=true
|
||||||
|
const {siteName,pageNum,pageSize} =this
|
||||||
|
const [startTime='',endTime='']=(this.dateRange || [])
|
||||||
|
getSiteInfoList({siteName,pageSize,pageNum,startTime:formatDate(startTime),endTime:formatDate(endTime)}).then(response => {
|
||||||
|
this.tableData=response?.rows || [];
|
||||||
|
this.totalSize = response?.total || 0
|
||||||
|
}).finally(() => {this.loading=false})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.onReset()
|
||||||
|
const now = new Date();
|
||||||
|
const lastMonth = new Date(now.getFullYear(), now.getMonth() - 1, 1);
|
||||||
|
this.defaultDateRange = [lastMonth, now];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
Reference in New Issue
Block a user