...
|
...
|
@@ -2,8 +2,8 @@ |
|
|
<div :style="styleObj" @mouseleave.stop="closePressingDialog" ref="detailTable">
|
|
|
<div class="detail-table-title title-flex-between">
|
|
|
<div class="title-left">{{tableStyle.tableName}}</div>
|
|
|
<div class="title-right">
|
|
|
<span class="title-link" @click="handlerDetailDataNoPage()">更多</span>
|
|
|
<div class="title-right" v-if="!getUrlToken.isAlarm">
|
|
|
<span class="title-link" @click="handlerDetailDataNoPage">更多</span>
|
|
|
<span class="title-link" @click="downloadTableList">下载</span>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -23,6 +23,8 @@ |
|
|
<i class="sort-caret descending" @click="changeSort(item,'descending')"></i>
|
|
|
</span>
|
|
|
</div>
|
|
|
<div v-if="getUrlToken.isAlarm" class="padding-10" :style="[headerTableStlye,tableRowHeight(),handleStyle]">操作</div>
|
|
|
|
|
|
</div>
|
|
|
<!--数据-->
|
|
|
<div class="bd">
|
...
|
...
|
@@ -39,16 +41,21 @@ |
|
|
>
|
|
|
<el-tooltip v-if="!itemChild.componentName || itemChild.componentName==1" :disabled="isEllipsis[index+'-'+idx]" ref="elTooltip" trigger="hover" >
|
|
|
<template #content>
|
|
|
<span>{{ item[itemChild.key].kpiValue}}</span>
|
|
|
<span v-if="!getUrlToken.isAlarm">{{ item[itemChild.key].kpiValue}}</span>
|
|
|
<span v-if="getUrlToken.isAlarm">{{ item[itemChild.key][itemChild.key]}}</span>
|
|
|
</template>
|
|
|
<span @mouseleave="" :ref="'isOverflow'+index+'-'+idx" :data-num="index+'-'+idx" @click="clickListName(item[itemChild.key],itemChild)" :style="colorStyle(item[itemChild.key].kpiValue)"
|
|
|
<span v-if="!getUrlToken.isAlarm" @mouseleave="" :ref="'isOverflow'+index+'-'+idx" :data-num="index+'-'+idx" @click="clickListName(item[itemChild.key],itemChild)" :style="colorStyle(item[itemChild.key].kpiValue)"
|
|
|
:class="['listName','width-80','text-overflow',{'listName-link':item[itemChild.key] && (item[itemChild.key].kpiIdent==1 || item[itemChild.key].isWarning==1)}]">
|
|
|
{{ item[itemChild.key].kpiValue}}
|
|
|
</span>
|
|
|
<span v-if="getUrlToken.isAlarm" @mouseleave="" :ref="'isOverflow'+index+'-'+idx" :data-num="index+'-'+idx" @click="clickListName(item[itemChild.key],itemChild)" :style="colorStyle(item[itemChild.key][itemChild.key])"
|
|
|
:class="['listName','width-80','text-overflow',{'listName-link':item[itemChild.key] &&itemChild.key=='kpiName' && (item[itemChild.key].kpiIdent==1 || item[itemChild.key].isWarning==1)}]">
|
|
|
{{ item[itemChild.key][itemChild.key]}}
|
|
|
</span>
|
|
|
</el-tooltip>
|
|
|
<component v-if="itemChild.componentName && itemChild.componentName!=1" :is="itemChild.componentName" :alarmLevel="item[itemChild.key].alarmLevel?item[itemChild.key].alarmLevel:'2'" :way="item[itemChild.key].way?item[itemChild.key].way:'message'" />
|
|
|
|
|
|
<customMenuBox ref="customMenu" v-if="pressingVisible==index+'-'+idx && item[itemChild.key] && (item[itemChild.key].kpiIdent==1 || item[itemChild.key].isWarning==1)"
|
|
|
<customMenuBox ref="customMenu" v-if="tableStyle.probeDown && pressingVisible==index+'-'+idx && item[itemChild.key] && (item[itemChild.key].kpiIdent==1 || item[itemChild.key].isWarning==1)"
|
|
|
:detailMenubox="calcDetailMenubox"
|
|
|
:tableDataValue="item[itemChild.key]" :flg="''"
|
|
|
:tableDataValueHead="itemChild"
|
...
|
...
|
@@ -57,6 +64,8 @@ |
|
|
:resType="resType"
|
|
|
></customMenuBox>
|
|
|
</div>
|
|
|
<div @click="clearAlarm(item)" v-if="getUrlToken.isAlarm" :class="['infoList-flex','padding-10',{'listName-link':getUrlToken.isAlarm}]" :style="[handleStyle]">
|
|
|
告警消除</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
...
|
...
|
@@ -98,23 +107,21 @@ |
|
|
>
|
|
|
<el-tooltip v-if="!itemChild.componentName || itemChild.componentName==1" :disabled="isEllipsisMore[index+'-'+idx]" ref="elTooltip" trigger="hover" >
|
|
|
<template #content>
|
|
|
<span>{{ item[itemChild.key].kpiValue}}</span>
|
|
|
<span v-if="!getUrlToken.isAlarm">{{ item[itemChild.key].kpiValue}}</span>
|
|
|
<span v-if="getUrlToken.isAlarm">{{ item[itemChild.key][itemChild.key]}}</span>
|
|
|
</template>
|
|
|
<span @mouseleave="" :ref="'isOverflow1'+index+'-'+idx" :data-num="index+'-'+idx" @click="clickListName(item[itemChild.key],itemChild)" :style="colorStyle(item[itemChild.key].kpiValue)"
|
|
|
<span v-if="!getUrlToken.isAlarm" @mouseleave="" :ref="'isOverflow1'+index+'-'+idx" :data-num="index+'-'+idx" @click="clickListName(item[itemChild.key],itemChild)" :style="colorStyle(item[itemChild.key].kpiValue)"
|
|
|
:class="['listName','width-80','text-overflow',{'listName-link':item[itemChild.key] && (item[itemChild.key].kpiIdent==1 || item[itemChild.key].isWarning==1)}]">
|
|
|
{{ item[itemChild.key].kpiValue}}
|
|
|
</span>
|
|
|
<span v-if="getUrlToken.isAlarm" @mouseleave="" :ref="'isOverflow1'+index+'-'+idx" :data-num="index+'-'+idx" @click="clickListName(item[itemChild.key],itemChild)" :style="colorStyle(item[itemChild.key][itemChild.key])"
|
|
|
:class="['listName','width-80','text-overflow',{'listName-link':item[itemChild.key] && (item[itemChild.key].kpiIdent==1 || item[itemChild.key].isWarning==1)}]">
|
|
|
{{ item[itemChild.key][itemChild.key]}}
|
|
|
</span>
|
|
|
</el-tooltip>
|
|
|
<component v-if="itemChild.componentName && itemChild.componentName!=1" :is="itemChild.componentName" :alarmLevel="item[itemChild.key].alarmLevel?item[itemChild.key].alarmLevel:'2'" :way="item[itemChild.key].way?item[itemChild.key].way:'message'" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <span @click="clickListName(item[itemChild.key])" :style="colorStyle(item[itemChild.key].kpiValue)"
|
|
|
:class="['listName',{'listName-link':item[itemChild.key] && (item[itemChild.key].kpiIdent==1 || item[itemChild.key].isWarning==1)}]">
|
|
|
{{ item[itemChild.key]?item[itemChild.key].kpiValue:'' }}</span>-->
|
|
|
<customMenuBox v-if="pressingVisible==index+'-'+idx && item[itemChild.key] && (item[itemChild.key].kpiIdent==1 || item[itemChild.key].isWarning==1)"
|
|
|
<customMenuBox v-if="tableStyle.probeDown && pressingVisible==index+'-'+idx && item[itemChild.key] && (item[itemChild.key].kpiIdent==1 || item[itemChild.key].isWarning==1)"
|
|
|
:detailMenubox="calcDetailMenubox"
|
|
|
:tableDataValue="item[itemChild.key]" :flg="''"
|
|
|
:tableDataValueHead="itemChild"
|
...
|
...
|
@@ -144,7 +151,8 @@ |
|
|
</template>
|
|
|
</customDialog>
|
|
|
<!-- 直接点击表格数据展示 性能趋势弹框-->
|
|
|
<customDialog :dialogVisible="trendVisible" :heightStyle="heightStyle" :marginStyle="marginStyle" :widthStyle="widthStyle" :title-name="dialogName"
|
|
|
<customDialog :dialogVisible="trendVisible" :heightStyle="heightStyle" :marginStyle="marginStyle"
|
|
|
:widthStyle="widthStyle" :title-name="dialogName"
|
|
|
:showFooter="true" :showCancelBtn="true" :showOkBtn="true" @hideDialog="hideDialog" @okFunc="okFunc"
|
|
|
>
|
|
|
<template v-slot>
|
...
|
...
|
@@ -153,6 +161,30 @@ |
|
|
</div>
|
|
|
</template>
|
|
|
</customDialog>
|
|
|
<!-- 告警消除弹框-->
|
|
|
<customDialog :dialogVisible="alarmTableVisible" :heightStyle="heightStyle" :marginStyle="marginStyle" widthStyle="width:360px;height:275px;min-height:275px;max-height:275px;overflow:hidden;"
|
|
|
title-name="告警消除" :showFooter="true" :showCancelBtn="true" :showOkBtn="true"
|
|
|
@hideDialog="hideDialogTableAlarm" @okFunc="okFuncTableAlarm"
|
|
|
>
|
|
|
<template v-slot>
|
|
|
<div class="alarmClear">
|
|
|
<el-input
|
|
|
v-model="reason"
|
|
|
:rows="4"
|
|
|
type="textarea"
|
|
|
placeholder="消除意见(必填)"
|
|
|
/>
|
|
|
</div>
|
|
|
<div class="alarmRadio">
|
|
|
<span class="radioLabel">是否通知:</span>
|
|
|
<el-radio-group v-model="noticeFlag">
|
|
|
<el-radio :label="1">是</el-radio>
|
|
|
<el-radio :label="0">否</el-radio>
|
|
|
</el-radio-group>
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
</customDialog>
|
|
|
|
|
|
</div>
|
|
|
</template>
|
...
|
...
|
@@ -163,7 +195,12 @@ import {getDetailTableData,getDetailTableDataNoPage,getResType,getTrendBaseUrl} |
|
|
import customDialog from "../../designerComponents/customDialog";
|
|
|
import customMenuBox from "../../designerComponents/customMenuBox";//下探组件
|
|
|
import textToImage from "../../designerComponents/textToImage";//文字转图片
|
|
|
import textToBg from "../../designerComponents/textToBg";//文字转背景
|
|
|
import textToBg from "../../designerComponents/textToBg";
|
|
|
import {saveClearAalarm} from "../../../../../../api/platform";
|
|
|
import {Message} from "element-ui";
|
|
|
import {mapGetters} from "vuex";
|
|
|
import tableHead from "../../../../../../store/modules/tableHead";
|
|
|
//文字转背景
|
|
|
|
|
|
vue.use(VueSuperSlide);
|
|
|
export default {
|
...
|
...
|
@@ -176,6 +213,9 @@ export default { |
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
alarmId:'',//消除告警的id
|
|
|
noticeFlag:0,//是否通知
|
|
|
reason:'',//消除意见
|
|
|
currentPage:1,
|
|
|
pageSize:10,
|
|
|
pageSizes:[10,50,100, 200, 300, 400],
|
...
|
...
|
@@ -183,6 +223,7 @@ export default { |
|
|
trendVisible:false,//性能趋势弹框
|
|
|
headerAll:[],
|
|
|
listAll:[],
|
|
|
alarmTableVisible:false,//告警消除弹框
|
|
|
tableVisible:false,//更多表格弹框
|
|
|
dialogVisible:false,//表格下探后的弹框
|
|
|
popoverVisible:false,//下探弹框
|
...
|
...
|
@@ -275,10 +316,20 @@ export default { |
|
|
|
|
|
}
|
|
|
},
|
|
|
handleStyle(){
|
|
|
const bodyStyle = this.optionsSetUp;
|
|
|
return{
|
|
|
width:'30%',
|
|
|
"border-left":bodyStyle.isLine? bodyStyle.borderWidth + "px "+"solid "+bodyStyle.borderColor:'none',
|
|
|
"border-bottom":bodyStyle.isLine? bodyStyle.borderWidth + "px "+"solid "+bodyStyle.borderColor:'none'
|
|
|
}
|
|
|
|
|
|
},
|
|
|
tableStyle(){
|
|
|
const tableStyleSetup=this.optionsSetUp;
|
|
|
return{
|
|
|
tableName:tableStyleSetup.tableName
|
|
|
tableName:tableStyleSetup.tableName,
|
|
|
probeDown:tableStyleSetup.probeDown
|
|
|
}
|
|
|
},
|
|
|
//表格下探列表
|
...
|
...
|
@@ -325,11 +376,16 @@ export default { |
|
|
},
|
|
|
//获取url地址中的token
|
|
|
getUrlToken(){
|
|
|
const tableStyleSetup=this.optionsSetUp;
|
|
|
let locationUrl=this.$route.query;
|
|
|
let resId=locationUrl.resId;
|
|
|
let token=locationUrl.access_token;
|
|
|
let flag=tableStyleSetup.flag;
|
|
|
let isAlarm=tableStyleSetup.isAlarm;
|
|
|
let urlObj={
|
|
|
resId:resId,
|
|
|
flag:flag,
|
|
|
isAlarm:isAlarm,
|
|
|
token:token
|
|
|
}
|
|
|
return urlObj;
|
...
|
...
|
@@ -459,7 +515,9 @@ export default { |
|
|
}
|
|
|
colArr.push(columnObj)
|
|
|
})
|
|
|
|
|
|
if(this.getUrlToken.isAlarm){
|
|
|
datas=content;
|
|
|
}else{
|
|
|
content.map((cv) => {
|
|
|
let kpi = {};
|
|
|
cv.map((ccv) => {
|
...
|
...
|
@@ -473,10 +531,10 @@ export default { |
|
|
isWarning: 0,
|
|
|
};
|
|
|
}
|
|
|
|
|
|
})
|
|
|
datas.push(kpi);
|
|
|
})
|
|
|
}
|
|
|
if(flg=='all'){
|
|
|
this.headerAll=colArr;
|
|
|
this.listAll=datas;
|
...
|
...
|
@@ -486,7 +544,7 @@ export default { |
|
|
}
|
|
|
this.tableFiledColumnSort();
|
|
|
},
|
|
|
handlerDetailData(valData,sortBy){
|
|
|
async handlerDetailData(valData,sortBy,order){
|
|
|
let kpiArr=[]
|
|
|
let kpiIdStr='';
|
|
|
if(this.header && this.header.length>0){
|
...
|
...
|
@@ -502,33 +560,86 @@ export default { |
|
|
kpiIdStr=kpiArr.join(',');
|
|
|
}
|
|
|
let param={
|
|
|
kpiId:kpiIdStr
|
|
|
resId:this.getUrlToken.resId,
|
|
|
kpiId:kpiIdStr,
|
|
|
flagPrifix:this.getUrlToken.flag,
|
|
|
page:this.currentPage,
|
|
|
size:this.pageSize
|
|
|
}
|
|
|
let sort=sortBy;
|
|
|
if(sort){
|
|
|
param.sort=sort;
|
|
|
param.sortBy=sort;
|
|
|
}
|
|
|
if(order){
|
|
|
param.order=order;
|
|
|
}
|
|
|
let headTable = valData;
|
|
|
if(kpiIdStr){
|
|
|
//根据kpiId集合获取表格数据
|
|
|
let tableData=getDetailTableData(param);
|
|
|
headTable=tableData.data[0];
|
|
|
let tableData='';
|
|
|
const { success,data } = await getDetailTableData(param,this.getUrlToken);
|
|
|
if (success ){
|
|
|
tableData=data;
|
|
|
}
|
|
|
|
|
|
if(tableData && tableData.length>0){
|
|
|
headTable=tableData[0];
|
|
|
}
|
|
|
}
|
|
|
if(headTable){
|
|
|
this.handleHeadContent(headTable)
|
|
|
|
|
|
}
|
|
|
},
|
|
|
//打开更多表格
|
|
|
handlerDetailDataNoPage(){
|
|
|
let headTable =getDetailTableDataNoPage();
|
|
|
this.handleHeadContent(headTable.data[0],'all');
|
|
|
async handlerDetailDataNoPage(sortBy){
|
|
|
let kpiArr=[];
|
|
|
let kpiIdStr='';
|
|
|
if(this.header && this.header.length>0){
|
|
|
this.header.map(item=>{
|
|
|
if(item.isStatic){
|
|
|
|
|
|
}else{
|
|
|
if(item.key!='KPIF74D9D2B'){
|
|
|
kpiArr.push(item.key)
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
if(kpiArr && kpiArr.length>0){
|
|
|
kpiIdStr=kpiArr.join(',');
|
|
|
}
|
|
|
let param={
|
|
|
resId:this.getUrlToken.resId,
|
|
|
kpiId:kpiIdStr,
|
|
|
flagPrifix:this.getUrlToken.flag,
|
|
|
}
|
|
|
let sort=sortBy;
|
|
|
if(sort){
|
|
|
param.sortBy=sort;
|
|
|
}
|
|
|
|
|
|
const { success,data } = await getDetailTableDataNoPage(param,this.getUrlToken);
|
|
|
if(success){
|
|
|
let headTable =data;
|
|
|
console.log("alalalal",data)
|
|
|
|
|
|
this.handleHeadContent(headTable[0],'all');
|
|
|
this.widthStyle='';
|
|
|
// this.setDialog('table');
|
|
|
this.tableVisible=true;
|
|
|
}
|
|
|
|
|
|
},
|
|
|
//点击表格内容名称事件
|
|
|
clickListName(obj,tableDataValueHead){
|
|
|
if(obj.kpiIdent==1 || obj.isWarning==1){
|
|
|
let isIf=obj.kpiIdent==1 || obj.isWarning==1;
|
|
|
|
|
|
if(this.getUrlToken.isAlarm){
|
|
|
//告警表格的判断
|
|
|
isIf=tableDataValueHead.key=='kpiName' && (obj.kpiIdent==1 || obj.isWarning==1);
|
|
|
}else{
|
|
|
isIf=obj.kpiIdent==1 || obj.isWarning==1;
|
|
|
}
|
|
|
if(isIf){
|
|
|
this.widthStyle='';
|
|
|
this.pressingValue=obj;
|
|
|
this.dialogNameStyle(obj)
|
...
|
...
|
@@ -536,6 +647,7 @@ export default { |
|
|
this.trendVisible=true;
|
|
|
}
|
|
|
|
|
|
|
|
|
},
|
|
|
//设置性能趋势图
|
|
|
setTrend(tableDataValueHead){
|
...
|
...
|
@@ -580,7 +692,97 @@ export default { |
|
|
getEchartData(val) {
|
|
|
const data = this.queryEchartsData(val);
|
|
|
data.then(res => {
|
|
|
this.list = res;
|
|
|
let resTable='';
|
|
|
if(res && res.length>0){
|
|
|
// this.handlerDetailData(res[0].data[0]);
|
|
|
if(!this.getUrlToken.isAlarm){
|
|
|
//普通详情表格
|
|
|
resTable=res[0].data[0];
|
|
|
this.handleHeadContent(res[0].data[0]);
|
|
|
|
|
|
}else{
|
|
|
//告警表格
|
|
|
let tableData=res[0].data;
|
|
|
//alarmLevel,alarmContent,kpiName,updateTime
|
|
|
if(tableData && tableData.length>0){
|
|
|
let head=[{
|
|
|
id: "alarmLevel",
|
|
|
name: "告警级别",
|
|
|
unit: ""
|
|
|
},
|
|
|
{
|
|
|
id: "alarmContent",
|
|
|
name: "告警内容",
|
|
|
unit: ""
|
|
|
},
|
|
|
{
|
|
|
id: "kpiName",
|
|
|
name: "指标名称",
|
|
|
unit: ""
|
|
|
},
|
|
|
{
|
|
|
id: "updateTime",
|
|
|
name: "告警时间",
|
|
|
unit: ""
|
|
|
}
|
|
|
]
|
|
|
let content=[];
|
|
|
|
|
|
tableData.map(item=>{
|
|
|
let contentObj={};
|
|
|
head.map(hv=>{
|
|
|
contentObj[hv.id]=item;
|
|
|
})
|
|
|
content.push(contentObj)
|
|
|
})
|
|
|
let obj={
|
|
|
header:head,
|
|
|
content:content
|
|
|
}
|
|
|
resTable=obj;
|
|
|
this.handleHeadContent(obj);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
// this.list = res;
|
|
|
let isNewData=false;
|
|
|
let addTableData=[];
|
|
|
let head=resTable.header;
|
|
|
let addTableDataOld=this.optionsSetUp.dynamicAddTable;
|
|
|
addTableDataOld.map(v=>{
|
|
|
head.map((item,index)=>{
|
|
|
if(v.key==item.key){
|
|
|
isNewData=false;
|
|
|
addTableData.push({
|
|
|
columnSort:v.columnSort?v.columnSort:index,
|
|
|
componentName:v.componentName?v.componentName:1,
|
|
|
isStatic:false,
|
|
|
key:item.id,
|
|
|
name:item.name,
|
|
|
width:v.width
|
|
|
})
|
|
|
}else{
|
|
|
isNewData=true;
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
})
|
|
|
if(isNewData){
|
|
|
head.map((item,index)=>{
|
|
|
addTableData.push({
|
|
|
columnSort:index,
|
|
|
componentName:1,
|
|
|
isStatic:false,
|
|
|
key:item.id,
|
|
|
name:item.name,
|
|
|
width:"50%"
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
this.$store.commit('CHANGE_HEAD', addTableData);
|
|
|
this.hackResetFun();
|
|
|
});
|
|
|
},
|
...
|
...
|
@@ -591,6 +793,7 @@ export default { |
|
|
this.hackReset = true;
|
|
|
});
|
|
|
},
|
|
|
|
|
|
// 计算 奇偶背景色
|
|
|
bodyTable(index) {
|
|
|
var styleJson = {};
|
...
|
...
|
@@ -702,6 +905,15 @@ export default { |
|
|
this.tableVisible=false;
|
|
|
|
|
|
},
|
|
|
//告警消除弹框关闭确定
|
|
|
hideDialogTableAlarm(){
|
|
|
this.alarmTableVisible=false;
|
|
|
},
|
|
|
okFuncTableAlarm(){
|
|
|
// this.alarmTableVisible=false;
|
|
|
this.clearAlarmHandle();
|
|
|
|
|
|
},
|
|
|
//排序
|
|
|
changeSort(item,flg){
|
|
|
if(this.sortCaret==flg){
|
...
|
...
|
@@ -711,16 +923,37 @@ export default { |
|
|
this.sortCaret=flg;
|
|
|
this.sortBy=item.key;
|
|
|
}
|
|
|
console.log(" this.optionsData", this.optionsData)
|
|
|
console.log("iiiiiiii",item)
|
|
|
if(this.sortCaret=='ascending'){
|
|
|
//正序
|
|
|
this.order='ASC';
|
|
|
}else if(this.sortCaret=='ascending'){
|
|
|
//倒序
|
|
|
this.order='DESC';
|
|
|
}else{
|
|
|
//不排序
|
|
|
this.order='';
|
|
|
}
|
|
|
// this.handlerDetailData('',item.key)
|
|
|
this.handlerDetailData('',this.sortBy,this.order)
|
|
|
|
|
|
// this.handlerDetailDataNoPage();
|
|
|
},
|
|
|
//获取表格数据
|
|
|
async reGetDetailTableData(param){
|
|
|
let tableData='';
|
|
|
let headTable='';
|
|
|
const { success,data } = await getDetailTableData(param,this.getUrlToken);
|
|
|
if (success ){
|
|
|
tableData=data;
|
|
|
}
|
|
|
if(tableData && tableData.length>0){
|
|
|
headTable=tableData[0];
|
|
|
}
|
|
|
if(headTable){
|
|
|
this.handleHeadContent(headTable)
|
|
|
}
|
|
|
},
|
|
|
// 每页展示多少条
|
|
|
handleSizeChange(val){
|
|
|
// 切换页码重置初始页
|
...
|
...
|
@@ -792,6 +1025,44 @@ export default { |
|
|
}
|
|
|
|
|
|
},
|
|
|
//消除告警
|
|
|
clearAlarm(obj){
|
|
|
///
|
|
|
this.alarmId=obj.alarmContent.id;
|
|
|
this.alarmTableVisible=true;
|
|
|
},
|
|
|
async clearAlarmHandle(){
|
|
|
if(this.reason){
|
|
|
let params={
|
|
|
ids:this.alarmId,
|
|
|
reason:this.reason,
|
|
|
access_token: this.getUrlToken.token,
|
|
|
noticeFlag:this.noticeFlag
|
|
|
}
|
|
|
const { success } = await saveClearAalarm(params,this.getUrlToken);
|
|
|
if(success){
|
|
|
Message({
|
|
|
message: '告警已消除!',
|
|
|
type: 'success',
|
|
|
duration: 3 * 1000
|
|
|
});
|
|
|
}else{
|
|
|
Message({
|
|
|
message: '告警消除失败,请与管理员联系!',
|
|
|
type: 'error',
|
|
|
duration: 3 * 1000
|
|
|
});
|
|
|
}
|
|
|
this.alarmTableVisible=false;
|
|
|
}else{
|
|
|
Message({
|
|
|
message: '请填写消除意见',
|
|
|
type: 'warning',
|
|
|
duration: 3 * 1000
|
|
|
});
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
};
|
...
|
...
|
@@ -1029,4 +1300,12 @@ export default { |
|
|
.padding-10{
|
|
|
padding:5px;
|
|
|
}
|
|
|
.alarmClear{
|
|
|
margin:15px;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.alarmRadio{
|
|
|
margin:20px;
|
|
|
text-align: left;
|
|
|
}
|
|
|
</style> |
...
|
...
|
|