告警页面先生成告警再跳转,更新电表返回值,更新登陆、注册页面表格左边距离
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}) {
|
||||
|
||||
@ -90,7 +90,7 @@
|
||||
>
|
||||
<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="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>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -113,7 +113,7 @@
|
||||
|
||||
|
||||
<script>
|
||||
import {getAlarmDetailList} from'@/api/ems/dzjk'
|
||||
import {getAlarmDetailList,createTicketNo} from'@/api/ems/dzjk'
|
||||
import {getDeviceList} from'@/api/ems/site'
|
||||
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
||||
import { formatDate } from '@/filters/ems'
|
||||
@ -149,6 +149,13 @@ export default {
|
||||
toTicket(){
|
||||
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) {
|
||||
const date1 = new Date(day1),date2 = new Date(day2)
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
}"
|
||||
>
|
||||
<div slot="header">
|
||||
<span class="large-title">{{ item.deviceName }}</span>
|
||||
<span class="large-title">{{index+1}}#{{ item.deviceName }}</span>
|
||||
<div class="info">
|
||||
<div>
|
||||
{{
|
||||
@ -23,20 +23,13 @@
|
||||
<div>数据更新时间:{{ item.dataUpdateTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
class="common-table"
|
||||
:data="item.loadDataDetailInfo"
|
||||
@cell-click="(row,col)=>{handlerCell(item,row,col)}"
|
||||
stripe
|
||||
style="width: 100%"
|
||||
>
|
||||
<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-row>
|
||||
<el-col v-for="(tempDataItem,tempDataIndex) in deviceIdTypeMsg[item.deviceId]" :key="tempDataIndex+'dbTempData'" :span="8">
|
||||
<span class="pointer" @click="showChart(tempDataItem.pointName,item.deviceName,item.deviceId)">
|
||||
{{tempDataItem.name}}:{{item[tempDataItem.attr]}}<span v-html="tempDataItem.unit"></span>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-empty v-show="list.length<=0" :image-size="200"></el-empty>
|
||||
<point-chart ref="pointChart" :site-id="siteId"/>
|
||||
@ -56,16 +49,97 @@ export default {
|
||||
return {
|
||||
loading: false,
|
||||
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: {
|
||||
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){
|
||||
console.log('点击查询图表',pointName,categoryName,deviceId)
|
||||
pointName && this.$refs.pointChart.showChart({pointName,categoryName,deviceId})
|
||||
@ -94,13 +168,22 @@ export default {
|
||||
&.list:not(:last-child){
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
::v-deep {
|
||||
.el-table__row td{
|
||||
&:not(:first-child){
|
||||
.cell{
|
||||
cursor: pointer;
|
||||
.el-row{
|
||||
background-color: #ffffff;
|
||||
border:1px solid #eeeeee;
|
||||
font-size: 14px;
|
||||
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">
|
||||
.login {
|
||||
padding-left: 50px;
|
||||
padding-left: 180px;
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
align-items: center;
|
||||
|
||||
@ -222,7 +222,7 @@ export default {
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
.register {
|
||||
padding-left: 50px;
|
||||
padding-left: 180px;
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user