告警页面先生成告警再跳转,更新电表返回值,更新登陆、注册页面表格左边距离
This commit is contained in:
@ -100,6 +100,14 @@ export function getAlarmDetailList({status,siteId, deviceId, alarmLevel, alarmSt
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 告警生成工单
|
||||||
|
export function createTicketNo(data) {
|
||||||
|
return request({
|
||||||
|
url: `/ems/siteAlarm/createTicketNo`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
// 概率统计
|
// 概率统计
|
||||||
//获取概率统计 电量指标接口
|
//获取概率统计 电量指标接口
|
||||||
export function getElectricData({siteId,startDate,endDate}) {
|
export function getElectricData({siteId,startDate,endDate}) {
|
||||||
|
|||||||
@ -90,7 +90,7 @@
|
|||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="mini" v-if="scope.row.ticketNo" @click="toTicket">已生成工单(工单号:{{scope.row.ticketNo}})</el-button>
|
<el-button type="text" size="mini" v-if="scope.row.ticketNo" @click="toTicket">已生成工单(工单号:{{scope.row.ticketNo}})</el-button>
|
||||||
<el-button type="primary" size="mini" v-else @click="toTicket">生成工单</el-button>
|
<el-button type="primary" size="mini" v-else @click="createTicket(scope.row.id)">生成工单</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -113,7 +113,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getAlarmDetailList} from'@/api/ems/dzjk'
|
import {getAlarmDetailList,createTicketNo} from'@/api/ems/dzjk'
|
||||||
import {getDeviceList} from'@/api/ems/site'
|
import {getDeviceList} from'@/api/ems/site'
|
||||||
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
||||||
import { formatDate } from '@/filters/ems'
|
import { formatDate } from '@/filters/ems'
|
||||||
@ -149,6 +149,13 @@ export default {
|
|||||||
toTicket(){
|
toTicket(){
|
||||||
this.$router.push({path:'/ticket'})
|
this.$router.push({path:'/ticket'})
|
||||||
},
|
},
|
||||||
|
//生成工单
|
||||||
|
createTicket(id){
|
||||||
|
this.loading = true
|
||||||
|
createTicketNo({id}).then(response=>{
|
||||||
|
response?.data && this.toTicket()
|
||||||
|
}).finally(()=>{this.loading = false})
|
||||||
|
},
|
||||||
// 判断是否是同一天
|
// 判断是否是同一天
|
||||||
isSameDay(day1, day2) {
|
isSameDay(day1, day2) {
|
||||||
const date1 = new Date(day1),date2 = new Date(day2)
|
const date1 = new Date(day1),date2 = new Date(day2)
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<span class="large-title">{{ item.deviceName }}</span>
|
<span class="large-title">{{index+1}}#{{ item.deviceName }}</span>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div>
|
<div>
|
||||||
{{
|
{{
|
||||||
@ -23,20 +23,13 @@
|
|||||||
<div>数据更新时间:{{ item.dataUpdateTime }}</div>
|
<div>数据更新时间:{{ item.dataUpdateTime }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-row>
|
||||||
class="common-table"
|
<el-col v-for="(tempDataItem,tempDataIndex) in deviceIdTypeMsg[item.deviceId]" :key="tempDataIndex+'dbTempData'" :span="8">
|
||||||
:data="item.loadDataDetailInfo"
|
<span class="pointer" @click="showChart(tempDataItem.pointName,item.deviceName,item.deviceId)">
|
||||||
@cell-click="(row,col)=>{handlerCell(item,row,col)}"
|
{{tempDataItem.name}}:{{item[tempDataItem.attr]}}<span v-html="tempDataItem.unit"></span>
|
||||||
stripe
|
</span>
|
||||||
style="width: 100%"
|
</el-col>
|
||||||
>
|
</el-row>
|
||||||
<el-table-column prop="category" label="类别"> </el-table-column>
|
|
||||||
<el-table-column prop="totalKwh" label="总/kWh"> </el-table-column>
|
|
||||||
<el-table-column prop="peakKwh" label="尖/kWh"> </el-table-column>
|
|
||||||
<el-table-column prop="highKwh" label="峰/kWh"> </el-table-column>
|
|
||||||
<el-table-column prop="flatKwh" label="平/kWh"> </el-table-column>
|
|
||||||
<el-table-column prop="valleyKwh" label="谷/kWh"> </el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-empty v-show="list.length<=0" :image-size="200"></el-empty>
|
<el-empty v-show="list.length<=0" :image-size="200"></el-empty>
|
||||||
<point-chart ref="pointChart" :site-id="siteId"/>
|
<point-chart ref="pointChart" :site-id="siteId"/>
|
||||||
@ -56,16 +49,97 @@ export default {
|
|||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
list:[],
|
list:[],
|
||||||
|
deviceIdTypeMsg:{
|
||||||
|
'LOAD':[
|
||||||
|
{
|
||||||
|
name:'正向有功电能',
|
||||||
|
attr:'forwardActive',
|
||||||
|
pointName:'正向有功电能'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:'反向有功电能',
|
||||||
|
attr:'reverseActive',
|
||||||
|
pointName:'反向有功电能'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:'正向无功电能',
|
||||||
|
attr:'forwardReactive',
|
||||||
|
pointName:'正向无功电能'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:'反向无功电能',
|
||||||
|
attr:'reverseReactive',
|
||||||
|
pointName:'反向无功电能'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:'有功功率',
|
||||||
|
attr:'activePower',
|
||||||
|
pointName:'总有功功率'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:'无功功率',
|
||||||
|
attr:'reactivePower',
|
||||||
|
pointName:'总无功功率'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'METE':[
|
||||||
|
{
|
||||||
|
name:'正向有功电能',
|
||||||
|
attr:'forwardActive',
|
||||||
|
pointName:'当前正向总有功电能'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:'反向有功电能',
|
||||||
|
attr:'reverseActive',
|
||||||
|
pointName:'当前反向总有功电能'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:'正向无功电能',
|
||||||
|
attr:'forwardReactive',
|
||||||
|
pointName:'当前正向总无功电能'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:'反向无功电能',
|
||||||
|
attr:'reverseReactive',
|
||||||
|
pointName:'当前反向总无功电能'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:'有功功率',
|
||||||
|
attr:'activePower',
|
||||||
|
pointName:'总有功功率'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:'无功功率',
|
||||||
|
attr:'reactivePower',
|
||||||
|
pointName:'总无功功率'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'METEGF':[
|
||||||
|
{
|
||||||
|
name:'有功电能',
|
||||||
|
attr:'activeEnergy',
|
||||||
|
pointName:'有功电能'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:'无功电能',
|
||||||
|
attr:'reactiveEnergy',
|
||||||
|
pointName:'无功电能'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:'有功功率',
|
||||||
|
attr:'activePower',
|
||||||
|
pointName:'总有功功率'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:'无功功率',
|
||||||
|
attr:'reactivePower',
|
||||||
|
pointName:'总无功功率'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handlerCell({deviceId,deviceName},row,column){
|
|
||||||
if(column.label !== '类别'){
|
|
||||||
const arr = row.category.split('')
|
|
||||||
arr.splice(6,0,column.label[0])
|
|
||||||
this.showChart(arr.join(''),deviceName,deviceId)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
showChart(pointName,categoryName,deviceId){
|
showChart(pointName,categoryName,deviceId){
|
||||||
console.log('点击查询图表',pointName,categoryName,deviceId)
|
console.log('点击查询图表',pointName,categoryName,deviceId)
|
||||||
pointName && this.$refs.pointChart.showChart({pointName,categoryName,deviceId})
|
pointName && this.$refs.pointChart.showChart({pointName,categoryName,deviceId})
|
||||||
@ -94,13 +168,22 @@ export default {
|
|||||||
&.list:not(:last-child){
|
&.list:not(:last-child){
|
||||||
margin-bottom: 25px;
|
margin-bottom: 25px;
|
||||||
}
|
}
|
||||||
::v-deep {
|
.el-row{
|
||||||
.el-table__row td{
|
background-color: #ffffff;
|
||||||
&:not(:first-child){
|
border:1px solid #eeeeee;
|
||||||
.cell{
|
font-size: 14px;
|
||||||
cursor: pointer;
|
line-height: 16px;
|
||||||
|
color: #333333;
|
||||||
|
.el-col{
|
||||||
|
padding:12px 0;
|
||||||
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
.el-col{
|
||||||
|
border-bottom: 1px solid #eeeeee;
|
||||||
}
|
}
|
||||||
|
.el-col:not(:nth-child(3n)){
|
||||||
|
border-right: 1px solid #eeeeee;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -210,7 +210,7 @@ export default {
|
|||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss">
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
.login {
|
.login {
|
||||||
padding-left: 50px;
|
padding-left: 180px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: left;
|
justify-content: left;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@ -222,7 +222,7 @@ export default {
|
|||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss">
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
.register {
|
.register {
|
||||||
padding-left: 50px;
|
padding-left: 180px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: left;
|
justify-content: left;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user