Authored by xwx

故障管理NPM折线图及告警

... ... @@ -45,13 +45,13 @@
<div style="width: 230px;margin-left: 20px;display: flex;align-self: center;color: #75af49;">
<img src="../src/style/img/fault/success.png" style="width: 22px;height: 22px;">
<span style="margin: 0px 6px 0px 6px;width: 105px;font-size: 16px">正常</span>
<h class="text-link" style="font-size: 24px">{{ getFaultItemValue(dialTest,'normal')}}</h>
<h class="text-link" style="font-size: 24px"@click="openDiagnosticItem('normal')" >{{ getFaultItemValue(dialTest,'normal')}}</h>
</div>
|
<div style="width: 200px;margin-left: 20px;display: flex;align-self: center;color: #febb1a;" @click="openAlarm">
<div style="width: 200px;margin-left: 20px;display: flex;align-self: center;color: #febb1a;">
<img src="../src/style/img/fault/error.png" style="width: 22px;height: 22px;">
<span style="margin: 0px 6px 0px 6px;width: 105px;font-size: 16px"> 异常</span>
<h class="text-link" style="font-size: 24px">{{ getFaultItemValue(dialTest,'abnormal') }}</h>
<h class="text-link" style="font-size: 24px" @click="openDiagnosticItem('abnormal')">{{ getFaultItemValue(dialTest,'abnormal') }}</h>
</div>
</div>
</div>
... ...
... ... @@ -76,12 +76,7 @@ export default {
console.log(cardData.value)
}
const openAlarm = () => {
service.sendEventAlarmDialog(emit, {
faultNo: props.faultNo,
targetType: props.targetType
});
}
const openBusScenarios = () => {
let param = [{
... ... @@ -107,6 +102,9 @@ export default {
const openMoreDialog = () => {
service.sendEventMoreDialog(emit, proxy.$global, card.value);
}
const openDiagnosticItem = (type) => {
service.sendEventNormalDialog(emit, proxy.$global, props.faultNo, props.targetType.toLocaleLowerCase(), '',type);
}
// 挂载完
Vue.onMounted(() => {
... ... @@ -119,13 +117,13 @@ export default {
cardName,
cardOpen,
dialTest,
openAlarm,
getDialtestCard,
cardData,
openMoreDialog,
openBusScenarios,
openKpiList,
getFaultItemValue: service.getFaultItemValue,
openDiagnosticItem
}
}
}
... ...
... ... @@ -41,7 +41,7 @@
<div style="width: 200px;margin-left: 20px;display: flex;align-self: center;color: red">
<img src="../src/style/img/fault/base/alarm.png" style="width:22px;height: 22px;">
<span style="margin: 0px 6px 0px 6px;width: 105px;font-size: 16px;"> 告警</span>
<h style="font-size: 24px" class="text-link">{{getFaultItemValue(cardList,'abnormal')}}</h>
<h style="font-size: 24px" class="text-link" @click="openAlarm()">{{getFaultItemValue(cardList,'abnormal')}}</h>
</div>
</div>
</div>
... ... @@ -74,16 +74,16 @@
<el-col :span="12" class="align-right border-solid p-6">
{{item.linkState}}
</el-col>
<el-col :span="12" class="align-left border-solid p-6" >
<el-col :span="12" class="align-left border-solid p-6" v-if="resClass!='database'">
CPU
</el-col>
<el-col :span="12" class="align-right border-solid p-6">
<el-col :span="12" class="align-right border-solid p-6" v-if="resClass!='database'">
{{item.cpu}}
</el-col>
<el-col :span="12" class="align-left border-solid p-6">
<el-col :span="12" class="align-left border-solid p-6" v-if="resClass!='database'">
内存
</el-col>
<el-col :span="12" class="align-right border-solid p-6">
<el-col :span="12" class="align-right border-solid p-6" v-if="resClass!='database'">
{{item.men}}
</el-col>
<el-col :span="12" class="align-left border-solid p-6">
... ...
... ... @@ -47,7 +47,8 @@ export default {
}
}
let faultNo=props.faultNo;
let targetType=props.targetType;
let targetType=props.targetType.toLocaleLowerCase();
let resClass=props.cardList.resClass;
let getDialtestList = (data) => {
for (let i = 0; i < data.length; i++) {
let resItem={
... ... @@ -93,14 +94,17 @@ export default {
}
}
const openAlarm = () => {
service.sendEventAlarmDialog(emit, {
service.sendEventAlarmDialog(props.parentEmit, {
cardList: props.cardList,
targetType: props.targetType
targetType: targetType,
faultNo: faultNo,
resClass:resClass
});
}
const openMoreDialog = () => {
service.sendEventMoreDialog(emit, proxy.$global, cardList.faultFixInfoList);
}
//诊断资源
const openBusScenarios = () => {
let param = [{
... ... @@ -119,11 +123,11 @@ export default {
prop: 'createBy',
label: '创建用户',
}]
service.sendEventDiagnoseBusinessScenarios(props.parentEmit, props.faultNo,props.targetType.toLocaleLowerCase(),param,props.cardList.resClass);
service.sendEventDiagnoseBusinessScenarios(props.parentEmit, faultNo,targetType,param,resClass);
}
//诊断指标
const openKpiList = () => {
service.sendEventDiagnoseKpiList(props.parentEmit, props.faultNo,props.targetType.toLocaleLowerCase());
service.sendEventDiagnoseKpiList(props.parentEmit, faultNo,targetType);
}
// 挂载完
... ... @@ -145,7 +149,8 @@ export default {
faultNo,
targetType,
openBusScenarios,
openKpiList
openKpiList,
resClass
}
}
}
... ...
... ... @@ -70,18 +70,18 @@
<p style="width: 290px;margin-left: 40px;font-size: 16px">{{item.streamName}}</p>
<div style="margin-top: 35px;">
<p style="width: 85%;text-align: left;padding-left: 50px;">业务量
<h style="margin-left: 6px;text-decoration: underline">{{item.busNum}}</h>
<h class="text-link" style="margin-left: 6px;">{{item.busNum}}</h>
</p>
</div>
<div style="display: flex;text-align: left;margin-top: -17px;margin-left: 50px;">
<p style="width: 50%;">响应率
<h style="margin-left: 6px;text-decoration: underline"
:style="{color: item.responseColor}">{{item.responseNum}}%
<h class="text-link" style="margin-left: 6px;"
:style="{color: item.responseColor}" @click="openResPonse(item.kpiId,item.resId)">{{item.responseNum}}%
</h>
</p>
<p style="width: 50%;">成功率
<h style="margin-left: 6px;text-decoration: underline"
:style="{color: item.successColor}">{{item.successNum}}%
<h class="text-link" style="margin-left: 6px;"
:style="{color: item.successColor}" @click="openResPonse(item.kpiId,item.resId)">{{item.successNum}}%
</h>
</p>
</div>
... ...
... ... @@ -47,10 +47,14 @@ export default {
successNum:'0',
successColor:'red',
responseNum:'0',
responseColor:'red'
responseColor:'red',
kpiId:'',
resId:''
}
for (let j = 0; j < data[i].length; j++) {
resItem.streamName=data[i][j].streamName;
resItem.kpiId=data[i][j].kpiId;
resItem.resId=data[i][j].resId;
if (data[i][j].kpiId=='KPI5F8CCDA0'){
resItem.busNum=data[i][j].diagnosisResult;
}else if (data[i][j].kpiId=='KPIFE85BE59'){
... ... @@ -80,12 +84,6 @@ export default {
console.log(e);
})
}
const openAlarm = () => {
service.sendEventAlarmDialog(emit, {
faultNo: props.faultNo,
targetType: props.targetType
});
}
const openMoreDialog = () => {
service.sendEventMoreDialog(emit, proxy.$global, card.value);
}
... ... @@ -101,6 +99,16 @@ export default {
service.sendEventDiagnoseBusinessScenarios(emit, props.faultNo,props.targetType.toLocaleLowerCase(),param);
}
let openResPonse = (kpiId,redId) =>{
let param = {
faultNo: props.faultNo,
targetType: props.targetType.toLocaleLowerCase(),
resId: redId,
kpiId: kpiId
}
service.sendEventLineDialog(emit, param);
}
//诊断指标
const openKpiList = () => {
service.sendEventDiagnoseKpiList(emit, props.faultNo,props.targetType.toLocaleLowerCase());
... ... @@ -121,10 +129,10 @@ export default {
getDialtestCard,
cardData,
openMoreDialog,
openAlarm,
getFaultItemValue: service.getFaultItemValue,
openBusScenarios,
openKpiList
openKpiList,
openResPonse
}
}
}
... ...
... ... @@ -143,9 +143,9 @@ export default {
}
// 展示弹框
const openDialog = (type, {faultNo, targetType, resId, kpiId, flag}, obj) => {
const openDialog = (type, {faultNo, targetType, resId, kpiId, flag,resClass}, obj) => {
if (type === 'alarm') {
service.openAlarmDialog(proxy, faultNo, targetType, resId, kpiId, flag);
service.openAlarmDialog(proxy, faultNo, targetType, resId, kpiId, flag,resClass);
} else /*if (type === 'resList') {
service.handleClick(proxy, faultNo, targetType, resId, kpiId, flag);
} else*/ if (type === 'line') {
... ...
... ... @@ -85,7 +85,7 @@ const alarmService = () => {
// 基础更多查询需要传入对应的资源类型
resClass: resClass,
faultNo: faultNo,
type: targetType,
targetType: targetType,
resId: resId,
kpiId: kpiId,
flag: flag
... ... @@ -244,7 +244,8 @@ const faultEvent = () => {
targetType: '',
resId: '',
kpiId: '',
flag: ''
flag: '',
resClass:''
}, params);
}
... ...