Authored by 鲁尚清

Merge branch 'master' of http://192.168.1.136:82/monitor_v3/hg-monitor-web into …

…master-v32-lushangqing
... ... @@ -84,12 +84,12 @@
<div style="display: flex;text-align: left;margin-top: -17px;margin-left: 50px;">
<p style="width: 50%;">响应率
<h class="text-link" style="margin-left: 6px;"
:style="{color: item.responseColor}" @click="openResPonse(item.kpiId,item.resId)">{{item.responseNum}}%
:style="{color: item.responseColor}" @click="openResPonse(item.kpiId,item.resId,'响应率折线图')">{{item.responseNum}}%
</h>
</p>
<p style="width: 50%;">成功率
<h class="text-link" style="margin-left: 6px;"
:style="{color: item.successColor}" @click="openResPonse(item.kpiId,item.resId)">{{item.successNum}}%
:style="{color: item.successColor}" @click="openResPonse(item.kpiId,item.resId,'成功率折线图')">{{item.successNum}}%
</h>
</p>
</div>
... ...
... ... @@ -99,12 +99,13 @@ export default {
service.sendEventDiagnoseBusinessScenarios(emit, props.faultNo,props.targetType.toLocaleLowerCase(),param,'','诊断链路场景');
}
let openResPonse = (kpiId,redId) =>{
let openResPonse = (kpiId,redId,title) =>{
let param = {
faultNo: props.faultNo,
targetType: props.targetType.toLocaleLowerCase(),
resId: redId,
kpiId: kpiId
kpiId: kpiId,
title: title
}
service.sendEventLineDialog(emit, param);
}
... ...
... ... @@ -66,6 +66,16 @@
</template>
</cm-dialog>
<!-- 曲线图 -->
<cm-dialog top="3vh" :title="dialogName" width="1000px" :showDialogVisible="showLineDialog"
@hidedialog="closeLineDialog" :showFooter="false">
<template v-slot>
<div style="height: 300px" v-if="dataSet.length > 0">
<echarts-line :sourceData="dataSet" height="300px" width="980px" />
</div>
<el-empty :image-size="50" v-else />
</template>
</cm-dialog>
<!-- 资源明细 -->
<cm-dialog top="3vh" :title="moreDialogTitle" width="80%" :showDialogVisible="moreDialog"
... ...
... ... @@ -22,6 +22,9 @@ export default {
),
'faultHis': Vue.defineAsyncComponent(
() => myImport('components/page/faultDiagnosis/result/faultHis/index')
),
'echarts-line': Vue.defineAsyncComponent(
() => myImport('components/common/echarts/line/index')
)
},
setup() {
... ... @@ -146,13 +149,13 @@ export default {
}
// 展示弹框
const openDialog = (type, {faultNo, targetType, resId, kpiId, flag, resClass}, obj) => {
const openDialog = (type, {faultNo, targetType, resId, kpiId, flag, resClass,title}, obj) => {
if (type === 'alarm') {
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') {
service.openLine(proxy, faultNo, targetType, resId, kpiId, flag);
service.openLine(proxy, faultNo, targetType, resId, kpiId, flag,title);
} else if (type === 'more') {
// 展示更多
moreDialogTitle.value = obj.title;
... ...
... ... @@ -10,15 +10,18 @@ const lineService = () => {
let showLineDialog = Vue.ref(false);
let dataSet = Vue.ref([]);
let dialogName = Vue.ref('');
let closeLineDialog = (flg) => {
showLineDialog.value = flg;
}
let openLine = (proxy, faultNo, targetType, resId, kpiId, flag) => {
let openLine = (proxy, faultNo, targetType, resId, kpiId, flag, title) => {
// 展示弹框
closeLineDialog(true);
//弹框名称
dialogName.value = title;
// 获取数据
getLineData(proxy, faultNo, targetType, resId, kpiId, flag);
}
... ... @@ -54,7 +57,8 @@ const lineService = () => {
showLineDialog,
closeLineDialog,
openLine,
dataSet
dataSet,
dialogName
}
}
... ... @@ -245,7 +249,8 @@ const faultEvent = () => {
resId: '',
kpiId: '',
flag: '',
resClass: ''
resClass: '',
title: ''
}, params);
}
... ... @@ -310,6 +315,11 @@ const faultEvent = () => {
var kpiId = listItem.kpiId;
var kpiName = listItem.kpiName;
var val = listItem.diagnosisResult;
var unit = listItem.unit;
var units = '';
if (unit && unit != null) {
units = '(' + unit + ')';
}
var colArr = obj.columns.filter((e) => {
if (e.prop == kpiId) {
... ... @@ -319,7 +329,7 @@ const faultEvent = () => {
if (colArr.length == 0) {
obj.columns.push({
prop: kpiId,
label: kpiName,
label: kpiName + units,
});
}
... ... @@ -366,7 +376,7 @@ const faultEvent = () => {
width: 200,
label: '诊断值',
click: (row) => {
if(row && row.kpiIdent == 1){
if (row && row.kpiIdent == 1) {
sendEventLineDialog(emit, {
faultNo: faultNo,
targetType: targetType,
... ... @@ -389,7 +399,7 @@ const faultEvent = () => {
width: 200,
label: '诊断结果',
click: (row) => {
if(row && row.kpiIdent == 1){
if (row && row.kpiIdent == 1) {
sendEventLineDialog(emit, {
faultNo: faultNo,
targetType: targetType,
... ... @@ -479,7 +489,7 @@ const faultEvent = () => {
* @param targetType 诊断类型
* @param columns 数组,表格列对象
*/
const sendEventDiagnoseKpiList = (emit, faultNo, targetType,resClass) => {
const sendEventDiagnoseKpiList = (emit, faultNo, targetType, resClass) => {
var obj = {
title: '诊断指标',
... ... @@ -507,7 +517,11 @@ const faultEvent = () => {
data: '',
}
store.dispatch('getFaultKpiList', {faultNo: faultNo, targetType: targetType,resClass:resClass}).then((res) => {
store.dispatch('getFaultKpiList', {
faultNo: faultNo,
targetType: targetType,
resClass: resClass
}).then((res) => {
if (res && res.success) {
obj.data = res.data;
emit('openDialog', 'more', {}, obj);
... ...