Authored by wangtao
... ... @@ -483,15 +483,18 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common',
function openEditHtml(id) {
var url = 'baseconfig/shutdownplan/add';
var params = {};
//lsq 新增时弹框显示新增,编辑时显示编辑 2022-08-04
let titleName='新增';
if (id) {
params['cutoverId'] = id
params['cutoverId'] = id;
titleName='编辑';
}
view('commonViewModel').render(url).then(function (res) {
layer.open({
id: 'shutdownplanEditHtml',
content: laytpl(res.body).render(JSON.stringify(params)),
btn: ['保存', '取消'],
title: `<a class="layui-icon layui-icon-edit win_title_icon"></a>停机计划编辑`,
title: `<a class="layui-icon layui-icon-edit win_title_icon"></a>停机计划`+titleName,
type: '1',
resize: false,
area: ['80%', '90%'],
... ...
... ... @@ -60,12 +60,12 @@
<el-empty :image-size="50" />
</div>
<div v-else v-for="item in cardData" style="width: 50%;overflow: hidden;">
<div style="width: 566px;min-height: 357px;background: url('../src/style/img/fault/apm/apmCard.png') no-repeat;background-size: 100% 100%;margin: 0px 0px 26px 90px;box-sizing: border-box;text-align: center;margin: 0 auto;padding-top: 65px">
<div style="width: 453px;min-height: 286px;;background: url('../src/style/img/fault/apm/apmCard.png') no-repeat;background-size: 100% 100%;margin: 0px 0px 26px 90px;box-sizing: border-box;text-align: center;margin: 0 auto;padding-top: 50px">
<div style="color: #ffffff;font-size: 24px;">{{item.resClassName}}</div>
<img src="../src/style/img/fault/apm/apmAbout.png" style="padding-top: 30px;">
<div style="padding-top: 30px;font-size: 18px;color: #333333">应用:<span class="text-link" @click="openBusScenarios(item.resClass,'应用')">{{item.applicationName}}</span></div>
<img src="../src/style/img/fault/apm/apmAbout.png" style="padding-top: 12px;">
<div style="padding-top: 10px;font-size: 18px;color: #333333">应用:<span class="text-link" @click="openBusScenarios(item.resClass,'应用')">{{item.applicationName}}</span></div>
<hr style="FILTER: alpha(opacity=100,finishopacity=0,style=3)" width="80%" color=#aed6f4 size=1>
<div style="text-align: left;display: flex;margin-top: 10px;margin-left: 76px;font-size: 18px;">
<div style="text-align: left;display: flex;margin-top: 10px;margin-left: 50px;font-size: 16px;">
<div style="width: 230px;display: flex;align-self: center;align-items:center;">
<img src="../src/style/img/fault/base/alarm.png" style="width:22px;height: 22px;">
<span style="margin: 0px 6px;width: 133px;">响应时间告警量:</span>
... ... @@ -77,7 +77,7 @@
<span class="text-link" @click="openAlarm(item.kpiId,item.resClass)">{{item.FullGcNum}}</span>
</div>
</div>
<div style="text-align: left;display: flex;margin-top: 10px;margin-left: 76px;font-size: 18px;">
<div style="text-align: left;display: flex;margin-top: 10px;margin-left: 50px;font-size: 16px;">
<div style="width: 230px;display: flex;align-self: center;align-items:center;">
<img src="../src/style/img/fault/base/alarm.png" style="width:22px;height: 22px;">
<span style="margin: 0px 6px;width: 133px;">线程总数告警量:</span>
... ...
... ... @@ -48,7 +48,7 @@ export default {
store.dispatch('getFaultList', params).then((res) => {
if (res.data && res.success) {
if(res.data.length > 0){
if (res.data.length > 0) {
dialTest.value = res.data[0];
let arr = [];
for (var i = 1; i < res.data.length; i++) {
... ... @@ -74,20 +74,21 @@ export default {
let param = [{
prop: 'resName',
label: '资源名称',
width: 500
}, {
prop: 'ip',
label: 'IP地址',
},{
}, {
prop: 'resTypeName',
label: '资源类型',
},{
}, {
prop: 'os',
label: '操作系统',
},{
}, {
prop: 'adminName',
label: '资源负责人',
}]
service.sendEventDiagnoseBusinessScenarios(emit, props.faultNo, props.targetType.toLocaleLowerCase(), param,'','诊断资源');
service.sendEventDiagnoseBusinessScenarios(emit, props.faultNo, props.targetType.toLocaleLowerCase(), param, '', '诊断资源');
}
//诊断指标
const openKpiList = () => {
... ... @@ -96,7 +97,7 @@ export default {
//诊断项(正常、异常)
const openDiagnosticItem = (type) => {
service.sendEventNormalDialog(emit, proxy.$global, props.faultNo, props.targetType.toLocaleLowerCase(), '',type);
service.sendEventNormalDialog(emit, proxy.$global, props.faultNo, props.targetType.toLocaleLowerCase(), '', type);
}
// 挂载完
... ...
... ... @@ -41,7 +41,7 @@
<div style="width: 200px;margin-left: 40px;display: flex;align-self: center;color: red;align-items: center;">
<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;color: red;" class="text-link" @click="openAlarm()">{{getFaultItemValue(cardList,'alarm')}}</h>
<h style="font-size: 24px;color: red;" class="text-link" @click="openAlarm('')">{{getFaultItemValue(cardList,'alarm')}}</h>
</div>
</div>
</div>
... ... @@ -56,10 +56,22 @@
<div style="min-width: 338px;height: 160px;background: url(../src/style/img/fault/base/bg.png) no-repeat;background-size: 100% 100%;padding-top: 10px;">
<el-row style="height: 70px;padding: 10px 30px;">
<el-col :span="4" style="line-height: 55px;">
<img :src="'../src/style/img/fault/base/base-'+item.resClass+'-'+item.health+'.png'">
<el-tooltip
placement="top-start">
<template #content>
{{item.resTypeName}}
</template>
<img :src="'../src/style/img/fault/base/base-'+item.resClass+'-'+item.health+'.png'">
</el-tooltip>
</el-col>
<el-col :span="16" style="color: #666666;">
<div class="text-overflow" style="font-size: 16px">{{item.resName}}</div>
<el-tooltip
placement="top-start">
<template #content>
{{item.resName}}
</template>
<div class="text-overflow" style="font-size: 16px">{{item.resName}}</div>
</el-tooltip>
<div style="font-size: 14px">IP地址:{{item.ipAddr}}</div>
</el-col>
<el-col :span="4" class="align-right">
... ... @@ -123,7 +135,7 @@
<img src="../src/style/img/fault/base/men.png"><br/>
{{item.men}}{{item.menUnit}}
</el-col>
<el-col :span="5" class="align-center">
<el-col :span="5" class="text-link align-center" @click="openAlarm(item.resId)">
<img src="../src/style/img/fault/base/alarm.png"><br/>
{{item.alarm}}
</el-col>
... ... @@ -159,7 +171,7 @@
<el-col :span="1" class="align-center">
<img src="../src/style/img/fault/base/alarm.png">
</el-col>
<el-col :span="3" class="align-center">
<el-col :span="3" class="text-link align-center" @click="openAlarm(item.resId)">
{{item.alarm}}
</el-col>
<el-col :span="8" style="line-height: 36px;color: gainsboro;">
... ...
... ... @@ -65,11 +65,12 @@ export default {
cpuUnit:'',
menUnit:'',
kpiId:'',
resId:''
resId:'',
resTypeName:''
}
for (let j = 0; j < data[i].length; j++) {
resItem.resName=data[i][j].resName;
resItem.kpiId=data[i][j].kpiId;
resItem.resTypeName=data[i][j].resTypeName;
resItem.resId=data[i][j].resId;
resItem.ipAddr=data[i][j].ipAddr;
resItem.alarm=data[i][j].alarmNum;
... ... @@ -79,9 +80,11 @@ export default {
if (data[i][j].kpiId=='KPI31CB8D97'){
resItem.men=data[i][j].diagnosisResult;
resItem.menUnit=data[i][j].unit;
resItem.kpiId=data[i][j].kpiId;
}else if (data[i][j].kpiId=='KPI7054BC34'){
resItem.cpu=data[i][j].diagnosisResult;
resItem.cpuUnit=data[i][j].unit;
resItem.kpiId=data[i][j].kpiId;
}else if (data[i][j].kpiId=='KPIE13DD9A3'||data[i][j].kpiId=='KPI4DA976AF'){
resItem.linkState=data[i][j].diagnosisResult;
resItem.kpiName=data[i][j].kpiName;
... ... @@ -103,12 +106,13 @@ export default {
alarmColor.value = '#ff0000';
}
}
const openAlarm = () => {
const openAlarm = (resId) => {
service.sendEventAlarmDialog(props.parentEmit, {
cardList: props.cardList,
targetType: targetType,
faultNo: faultNo,
resClass:resClass
resClass:resClass,
resId:resId
});
}
const openMoreDialog = () => {
... ...
... ... @@ -59,7 +59,7 @@ const handleInfo = () => {
let saveHandleInfo = (key, callback) => {
proxy.$refs[key].validate((valid) => {
if (valid) {
proxy.$http.post('/api-web/fault/faultHandle', {
proxy.$http.get('/api-web/fault/result/faultHandle', {
faultId: handleInfoForm.value.id,
label: handleInfoForm.value.label,
solution: handleInfoForm.value.solution
... ... @@ -170,6 +170,14 @@ export default {
prop: 'faultState',
label: '故障状态',
width: 80,
render: function (row) {
//lsq 故障状态值更改为按钮形式显示 2022-08-04
let spanHtml=`<span style="color:#13ce66;background-color: #ebf9f1;border:1px solid #c8ecd8;border-radius: 3px;display: flex;align-items: center;justify-content: center;padding:5px;">${row.faultState}</span>`;
if(row.faultState=='未解决'){
spanHtml=`<span style="color:#ff4949;background-color: #ffeded;border:1px solid #ffdbdb;border-radius: 3px;display: flex;align-items: center;justify-content: center;padding:5px;">${row.faultState}</span>`;
}
return spanHtml;
}
}, /*{
prop: 'solveway',
label: '处理方式',
... ... @@ -185,7 +193,7 @@ export default {
}, {
prop: 'duration',
label: '持续时长',
width: 80,
width: 170,
}, {
prop: 'reason',
label: '原因分析',
... ...
... ... @@ -351,7 +351,7 @@ const faultEvent = () => {
};
colObj['render'] = (row) => {
if (row) {
if (row[kpiId]) {
return `<span style="text-decoration: underline;color:#1e9fff;">${row[kpiId]}</span>`
}
return '';
... ...