Authored by xwx

Merge branch 'master' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into master-v32-xwx

... ... @@ -216,4 +216,8 @@ a {
cursor: pointer;
}
.border-solid{
border: solid 1px #bbb8b8;
}
... ...
... ... @@ -65,6 +65,6 @@
</div>
<res-item v-for="item in card" v-if="cardOpen" :cardList="item" :faultNo="faultNo" :targetType="targetType"/>
<res-item v-for="item in card" v-if="cardOpen" :parentEmit="parentEmit" :cardList="item" :faultNo="faultNo" :targetType="targetType"/>
</div>
... ...
... ... @@ -32,10 +32,10 @@ export default {
let cardOpen = Vue.ref(false);
let openOrCloseBase = () => {
cardOpen.value = !cardOpen.value;
if (cardOpen.value){
cardName.value='收起';
}else {
cardName.value='展开';
if (cardOpen.value) {
cardName.value = '收起';
} else {
cardName.value = '展开';
}
}
let faultNo = props.faultNo;
... ... @@ -49,8 +49,8 @@ export default {
store.dispatch('getFaultList', params).then((res) => {
if (res.data && res.success) {
dialTest.value = res.data[0];
let arr=[];
for(var i=1;i<res.data.length;i++ ){
let arr = [];
for (var i = 1; i < res.data.length; i++) {
arr.push(res.data[i])
}
card.value = arr;
... ... @@ -71,7 +71,7 @@ export default {
let param = [{
prop: 'resName',
label: '资源名称',
},{
}, {
prop: 'ip',
label: 'IP地址',
},{
... ... @@ -84,11 +84,11 @@ export default {
prop: 'createBy',
label: '创建用户',
}]
service.sendEventDiagnoseBusinessScenarios(emit, props.faultNo,props.targetType.toLocaleLowerCase(),param);
service.sendEventDiagnoseBusinessScenarios(emit, props.faultNo, props.targetType.toLocaleLowerCase(), param);
}
//诊断指标
const openKpiList = () => {
service.sendEventDiagnoseKpiList(emit, props.faultNo,props.targetType.toLocaleLowerCase());
service.sendEventDiagnoseKpiList(emit, props.faultNo, props.targetType.toLocaleLowerCase());
}
// 挂载完
Vue.onMounted(() => {
... ... @@ -106,7 +106,8 @@ export default {
openBusScenarios,
openKpiList,
faultNo,
targetType
targetType,
parentEmit: emit
}
}
}
... ...
... ... @@ -63,7 +63,41 @@
<span style="font-size: 14px">IP地址:{{item.ipAddr}}</span>
</el-col>
<el-col :span="4" class="align-right">
<i class="iconfont icon-gengduo-shuxiang" style="font-size: 30px;"></i>
<div style="line-height: 60px;" class="m-l-6">
<el-tooltip effect="light" >
<template #content>
<div style="width: 140px">
<el-row>
<el-col :span="12" class="align-left border-solid p-6">
链接状态
</el-col>
<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" >
CPU
</el-col>
<el-col :span="12" class="align-right border-solid p-6">
{{item.cpu}}
</el-col>
<el-col :span="12" class="align-left border-solid p-6">
内存
</el-col>
<el-col :span="12" class="align-right border-solid p-6">
{{item.men}}
</el-col>
<el-col :span="12" class="align-left border-solid p-6">
告警量
</el-col>
<el-col :span="12" class="align-right border-solid p-6">
{{item.alarm}}
</el-col>
</el-row>
</div>
</template>
<i class="iconfont icon-gengduo-shuxiang" style="font-size: 30px;"></i>
</el-tooltip>
</div>
</el-col>
</el-row>
... ...
... ... @@ -5,7 +5,24 @@ export default {
name: 'faultDialTest',
template: '',
components: {},
props: ['cardList','faultNo','targetType'],
props: {
cardList:{
type: Array,
default: []
},
faultNo: {
type: String,
default: ''
},
targetType: {
type: String,
default: ''
},
parentEmit:{
type: Object,
default: {}
}
},
data() {
return {}
},
... ... @@ -102,11 +119,11 @@ export default {
prop: 'createBy',
label: '创建用户',
}]
service.sendEventDiagnoseBusinessScenarios(emit, props.faultNo,props.targetType.toLocaleLowerCase(),param,props.cardList.resClass);
service.sendEventDiagnoseBusinessScenarios(props.parentEmit, props.faultNo,props.targetType.toLocaleLowerCase(),param,props.cardList.resClass);
}
//诊断指标
const openKpiList = () => {
service.sendEventDiagnoseKpiList(emit, props.faultNo,props.targetType.toLocaleLowerCase());
service.sendEventDiagnoseKpiList(props.parentEmit, props.faultNo,props.targetType.toLocaleLowerCase());
}
// 挂载完
... ...
... ... @@ -146,9 +146,9 @@ export default {
const openDialog = (type, {faultNo, targetType, resId, kpiId, flag}, obj) => {
if (type === 'alarm') {
service.openAlarmDialog(proxy, faultNo, targetType, resId, kpiId, flag);
} else if (type === 'resList') {
} else /*if (type === 'resList') {
service.handleClick(proxy, faultNo, targetType, resId, kpiId, flag);
} else if (type === 'line') {
} else*/ if (type === 'line') {
service.openLine(proxy, faultNo, targetType, resId, kpiId, flag);
} else if (type === 'more') {
// 展示更多
... ...
... ... @@ -257,14 +257,14 @@ const faultEvent = () => {
emit('openDialog', 'alarm', getParams(params));
}
/**
* 展示资源列表弹框
* @param emit
* @param params
*/
const sendEventResListDialog = (emit, params) => {
emit('openDialog', 'resList', getParams(params));
}
// /**
// * 展示资源列表弹框
// * @param emit
// * @param params
// */
// const sendEventResListDialog = (emit, params) => {
// emit('openDialog', 'resList', getParams(params));
// }
/**
* 展示性能曲线图
... ... @@ -334,24 +334,24 @@ const faultEvent = () => {
* @param targetType 诊断类型
* @param columns 数组,表格列对象
*/
const sendEventDiagnoseBusinessScenarios = (emit, faultNo, targetType, columns,resClass) => {
const sendEventDiagnoseBusinessScenarios = (emit, faultNo, targetType, columns, resClass) => {
var obj = {
columns: columns,
data: []
}
var param = {
faultNo:faultNo,
targetType:targetType
faultNo: faultNo,
targetType: targetType
}
if (resClass&&resClass!=''){
param.resClass=resClass;
if (resClass && resClass != '') {
param.resClass = resClass;
}
store.dispatch('getFaultBusinessList', param).then((res) => {
if (res && res.success) {
obj.data = res.data;
emit('openDialog', 'more', {},obj);
emit('openDialog', 'more', {}, obj);
}
});
}
... ... @@ -370,13 +370,13 @@ const faultEvent = () => {
columns: [{
prop: 'kpiId',
label: "指标ID",
},{
}, {
prop: 'kpiName',
label: "指标名称",
},{
}, {
prop: 'kpiIdent',
label: "指标分类",
render:function (row) {
render: function (row) {
if (row.kpiIdent == 3) {
return '告警指标';
} else if (row.kpiIdent == 2) {
... ... @@ -394,7 +394,7 @@ const faultEvent = () => {
store.dispatch('getFaultKpiList', {faultNo: faultNo, targetType: targetType}).then((res) => {
if (res && res.success) {
obj.data = res.data;
emit('openDialog', 'more',{}, obj);
emit('openDialog', 'more', {}, obj);
}
});
... ... @@ -402,7 +402,7 @@ const faultEvent = () => {
return {
sendEventAlarmDialog,
sendEventResListDialog,
/*sendEventResListDialog,*/
sendEventLineDialog,
sendEventMoreDialog,
sendEventDiagnoseBusinessScenarios,
... ...