Merge branch 'master' of http://113.200.75.45:82/monitor_v3/hg-monitor-web
Showing
8 changed files
with
53 additions
and
25 deletions
@@ -483,15 +483,18 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -483,15 +483,18 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
483 | function openEditHtml(id) { | 483 | function openEditHtml(id) { |
484 | var url = 'baseconfig/shutdownplan/add'; | 484 | var url = 'baseconfig/shutdownplan/add'; |
485 | var params = {}; | 485 | var params = {}; |
486 | + //lsq 新增时弹框显示新增,编辑时显示编辑 2022-08-04 | ||
487 | + let titleName='新增'; | ||
486 | if (id) { | 488 | if (id) { |
487 | - params['cutoverId'] = id | 489 | + params['cutoverId'] = id; |
490 | + titleName='编辑'; | ||
488 | } | 491 | } |
489 | view('commonViewModel').render(url).then(function (res) { | 492 | view('commonViewModel').render(url).then(function (res) { |
490 | layer.open({ | 493 | layer.open({ |
491 | id: 'shutdownplanEditHtml', | 494 | id: 'shutdownplanEditHtml', |
492 | content: laytpl(res.body).render(JSON.stringify(params)), | 495 | content: laytpl(res.body).render(JSON.stringify(params)), |
493 | btn: ['保存', '取消'], | 496 | btn: ['保存', '取消'], |
494 | - title: `<a class="layui-icon layui-icon-edit win_title_icon"></a>停机计划编辑`, | 497 | + title: `<a class="layui-icon layui-icon-edit win_title_icon"></a>停机计划`+titleName, |
495 | type: '1', | 498 | type: '1', |
496 | resize: false, | 499 | resize: false, |
497 | area: ['80%', '90%'], | 500 | area: ['80%', '90%'], |
@@ -60,12 +60,12 @@ | @@ -60,12 +60,12 @@ | ||
60 | <el-empty :image-size="50" /> | 60 | <el-empty :image-size="50" /> |
61 | </div> | 61 | </div> |
62 | <div v-else v-for="item in cardData" style="width: 50%;overflow: hidden;"> | 62 | <div v-else v-for="item in cardData" style="width: 50%;overflow: hidden;"> |
63 | - <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"> | 63 | + <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"> |
64 | <div style="color: #ffffff;font-size: 24px;">{{item.resClassName}}</div> | 64 | <div style="color: #ffffff;font-size: 24px;">{{item.resClassName}}</div> |
65 | - <img src="../src/style/img/fault/apm/apmAbout.png" style="padding-top: 30px;"> | ||
66 | - <div style="padding-top: 30px;font-size: 18px;color: #333333">应用:<span class="text-link" @click="openBusScenarios(item.resClass,'应用')">{{item.applicationName}}</span></div> | 65 | + <img src="../src/style/img/fault/apm/apmAbout.png" style="padding-top: 12px;"> |
66 | + <div style="padding-top: 10px;font-size: 18px;color: #333333">应用:<span class="text-link" @click="openBusScenarios(item.resClass,'应用')">{{item.applicationName}}</span></div> | ||
67 | <hr style="FILTER: alpha(opacity=100,finishopacity=0,style=3)" width="80%" color=#aed6f4 size=1> | 67 | <hr style="FILTER: alpha(opacity=100,finishopacity=0,style=3)" width="80%" color=#aed6f4 size=1> |
68 | - <div style="text-align: left;display: flex;margin-top: 10px;margin-left: 76px;font-size: 18px;"> | 68 | + <div style="text-align: left;display: flex;margin-top: 10px;margin-left: 50px;font-size: 16px;"> |
69 | <div style="width: 230px;display: flex;align-self: center;align-items:center;"> | 69 | <div style="width: 230px;display: flex;align-self: center;align-items:center;"> |
70 | <img src="../src/style/img/fault/base/alarm.png" style="width:22px;height: 22px;"> | 70 | <img src="../src/style/img/fault/base/alarm.png" style="width:22px;height: 22px;"> |
71 | <span style="margin: 0px 6px;width: 133px;">响应时间告警量:</span> | 71 | <span style="margin: 0px 6px;width: 133px;">响应时间告警量:</span> |
@@ -77,7 +77,7 @@ | @@ -77,7 +77,7 @@ | ||
77 | <span class="text-link" @click="openAlarm(item.kpiId,item.resClass)">{{item.FullGcNum}}</span> | 77 | <span class="text-link" @click="openAlarm(item.kpiId,item.resClass)">{{item.FullGcNum}}</span> |
78 | </div> | 78 | </div> |
79 | </div> | 79 | </div> |
80 | - <div style="text-align: left;display: flex;margin-top: 10px;margin-left: 76px;font-size: 18px;"> | 80 | + <div style="text-align: left;display: flex;margin-top: 10px;margin-left: 50px;font-size: 16px;"> |
81 | <div style="width: 230px;display: flex;align-self: center;align-items:center;"> | 81 | <div style="width: 230px;display: flex;align-self: center;align-items:center;"> |
82 | <img src="../src/style/img/fault/base/alarm.png" style="width:22px;height: 22px;"> | 82 | <img src="../src/style/img/fault/base/alarm.png" style="width:22px;height: 22px;"> |
83 | <span style="margin: 0px 6px;width: 133px;">线程总数告警量:</span> | 83 | <span style="margin: 0px 6px;width: 133px;">线程总数告警量:</span> |
@@ -48,7 +48,7 @@ export default { | @@ -48,7 +48,7 @@ export default { | ||
48 | 48 | ||
49 | store.dispatch('getFaultList', params).then((res) => { | 49 | store.dispatch('getFaultList', params).then((res) => { |
50 | if (res.data && res.success) { | 50 | if (res.data && res.success) { |
51 | - if(res.data.length > 0){ | 51 | + if (res.data.length > 0) { |
52 | dialTest.value = res.data[0]; | 52 | dialTest.value = res.data[0]; |
53 | let arr = []; | 53 | let arr = []; |
54 | for (var i = 1; i < res.data.length; i++) { | 54 | for (var i = 1; i < res.data.length; i++) { |
@@ -74,20 +74,21 @@ export default { | @@ -74,20 +74,21 @@ export default { | ||
74 | let param = [{ | 74 | let param = [{ |
75 | prop: 'resName', | 75 | prop: 'resName', |
76 | label: '资源名称', | 76 | label: '资源名称', |
77 | + width: 500 | ||
77 | }, { | 78 | }, { |
78 | prop: 'ip', | 79 | prop: 'ip', |
79 | label: 'IP地址', | 80 | label: 'IP地址', |
80 | - },{ | 81 | + }, { |
81 | prop: 'resTypeName', | 82 | prop: 'resTypeName', |
82 | label: '资源类型', | 83 | label: '资源类型', |
83 | - },{ | 84 | + }, { |
84 | prop: 'os', | 85 | prop: 'os', |
85 | label: '操作系统', | 86 | label: '操作系统', |
86 | - },{ | 87 | + }, { |
87 | prop: 'adminName', | 88 | prop: 'adminName', |
88 | label: '资源负责人', | 89 | label: '资源负责人', |
89 | }] | 90 | }] |
90 | - service.sendEventDiagnoseBusinessScenarios(emit, props.faultNo, props.targetType.toLocaleLowerCase(), param,'','诊断资源'); | 91 | + service.sendEventDiagnoseBusinessScenarios(emit, props.faultNo, props.targetType.toLocaleLowerCase(), param, '', '诊断资源'); |
91 | } | 92 | } |
92 | //诊断指标 | 93 | //诊断指标 |
93 | const openKpiList = () => { | 94 | const openKpiList = () => { |
@@ -96,7 +97,7 @@ export default { | @@ -96,7 +97,7 @@ export default { | ||
96 | 97 | ||
97 | //诊断项(正常、异常) | 98 | //诊断项(正常、异常) |
98 | const openDiagnosticItem = (type) => { | 99 | const openDiagnosticItem = (type) => { |
99 | - service.sendEventNormalDialog(emit, proxy.$global, props.faultNo, props.targetType.toLocaleLowerCase(), '',type); | 100 | + service.sendEventNormalDialog(emit, proxy.$global, props.faultNo, props.targetType.toLocaleLowerCase(), '', type); |
100 | } | 101 | } |
101 | 102 | ||
102 | // 挂载完 | 103 | // 挂载完 |
@@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
41 | <div style="width: 200px;margin-left: 40px;display: flex;align-self: center;color: red;align-items: center;"> | 41 | <div style="width: 200px;margin-left: 40px;display: flex;align-self: center;color: red;align-items: center;"> |
42 | <img src="../src/style/img/fault/base/alarm.png" style="width:22px;height: 22px;"> | 42 | <img src="../src/style/img/fault/base/alarm.png" style="width:22px;height: 22px;"> |
43 | <span style="margin: 0px 6px 0px 6px;width: 105px;font-size: 16px;"> 告警</span> | 43 | <span style="margin: 0px 6px 0px 6px;width: 105px;font-size: 16px;"> 告警</span> |
44 | - <h style="font-size: 24px;color: red;" class="text-link" @click="openAlarm()">{{getFaultItemValue(cardList,'alarm')}}</h> | 44 | + <h style="font-size: 24px;color: red;" class="text-link" @click="openAlarm('')">{{getFaultItemValue(cardList,'alarm')}}</h> |
45 | </div> | 45 | </div> |
46 | </div> | 46 | </div> |
47 | </div> | 47 | </div> |
@@ -56,10 +56,22 @@ | @@ -56,10 +56,22 @@ | ||
56 | <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;"> | 56 | <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;"> |
57 | <el-row style="height: 70px;padding: 10px 30px;"> | 57 | <el-row style="height: 70px;padding: 10px 30px;"> |
58 | <el-col :span="4" style="line-height: 55px;"> | 58 | <el-col :span="4" style="line-height: 55px;"> |
59 | - <img :src="'../src/style/img/fault/base/base-'+item.resClass+'-'+item.health+'.png'"> | 59 | + <el-tooltip |
60 | + placement="top-start"> | ||
61 | + <template #content> | ||
62 | + {{item.resTypeName}} | ||
63 | + </template> | ||
64 | + <img :src="'../src/style/img/fault/base/base-'+item.resClass+'-'+item.health+'.png'"> | ||
65 | + </el-tooltip> | ||
60 | </el-col> | 66 | </el-col> |
61 | <el-col :span="16" style="color: #666666;"> | 67 | <el-col :span="16" style="color: #666666;"> |
62 | - <div class="text-overflow" style="font-size: 16px">{{item.resName}}</div> | 68 | + <el-tooltip |
69 | + placement="top-start"> | ||
70 | + <template #content> | ||
71 | + {{item.resName}} | ||
72 | + </template> | ||
73 | + <div class="text-overflow" style="font-size: 16px">{{item.resName}}</div> | ||
74 | + </el-tooltip> | ||
63 | <div style="font-size: 14px">IP地址:{{item.ipAddr}}</div> | 75 | <div style="font-size: 14px">IP地址:{{item.ipAddr}}</div> |
64 | </el-col> | 76 | </el-col> |
65 | <el-col :span="4" class="align-right"> | 77 | <el-col :span="4" class="align-right"> |
@@ -123,7 +135,7 @@ | @@ -123,7 +135,7 @@ | ||
123 | <img src="../src/style/img/fault/base/men.png"><br/> | 135 | <img src="../src/style/img/fault/base/men.png"><br/> |
124 | {{item.men}}{{item.menUnit}} | 136 | {{item.men}}{{item.menUnit}} |
125 | </el-col> | 137 | </el-col> |
126 | - <el-col :span="5" class="align-center"> | 138 | + <el-col :span="5" class="text-link align-center" @click="openAlarm(item.resId)"> |
127 | <img src="../src/style/img/fault/base/alarm.png"><br/> | 139 | <img src="../src/style/img/fault/base/alarm.png"><br/> |
128 | {{item.alarm}} | 140 | {{item.alarm}} |
129 | </el-col> | 141 | </el-col> |
@@ -159,7 +171,7 @@ | @@ -159,7 +171,7 @@ | ||
159 | <el-col :span="1" class="align-center"> | 171 | <el-col :span="1" class="align-center"> |
160 | <img src="../src/style/img/fault/base/alarm.png"> | 172 | <img src="../src/style/img/fault/base/alarm.png"> |
161 | </el-col> | 173 | </el-col> |
162 | - <el-col :span="3" class="align-center"> | 174 | + <el-col :span="3" class="text-link align-center" @click="openAlarm(item.resId)"> |
163 | {{item.alarm}} | 175 | {{item.alarm}} |
164 | </el-col> | 176 | </el-col> |
165 | <el-col :span="8" style="line-height: 36px;color: gainsboro;"> | 177 | <el-col :span="8" style="line-height: 36px;color: gainsboro;"> |
@@ -65,11 +65,12 @@ export default { | @@ -65,11 +65,12 @@ export default { | ||
65 | cpuUnit:'', | 65 | cpuUnit:'', |
66 | menUnit:'', | 66 | menUnit:'', |
67 | kpiId:'', | 67 | kpiId:'', |
68 | - resId:'' | 68 | + resId:'', |
69 | + resTypeName:'' | ||
69 | } | 70 | } |
70 | for (let j = 0; j < data[i].length; j++) { | 71 | for (let j = 0; j < data[i].length; j++) { |
71 | resItem.resName=data[i][j].resName; | 72 | resItem.resName=data[i][j].resName; |
72 | - resItem.kpiId=data[i][j].kpiId; | 73 | + resItem.resTypeName=data[i][j].resTypeName; |
73 | resItem.resId=data[i][j].resId; | 74 | resItem.resId=data[i][j].resId; |
74 | resItem.ipAddr=data[i][j].ipAddr; | 75 | resItem.ipAddr=data[i][j].ipAddr; |
75 | resItem.alarm=data[i][j].alarmNum; | 76 | resItem.alarm=data[i][j].alarmNum; |
@@ -79,9 +80,11 @@ export default { | @@ -79,9 +80,11 @@ export default { | ||
79 | if (data[i][j].kpiId=='KPI31CB8D97'){ | 80 | if (data[i][j].kpiId=='KPI31CB8D97'){ |
80 | resItem.men=data[i][j].diagnosisResult; | 81 | resItem.men=data[i][j].diagnosisResult; |
81 | resItem.menUnit=data[i][j].unit; | 82 | resItem.menUnit=data[i][j].unit; |
83 | + resItem.kpiId=data[i][j].kpiId; | ||
82 | }else if (data[i][j].kpiId=='KPI7054BC34'){ | 84 | }else if (data[i][j].kpiId=='KPI7054BC34'){ |
83 | resItem.cpu=data[i][j].diagnosisResult; | 85 | resItem.cpu=data[i][j].diagnosisResult; |
84 | resItem.cpuUnit=data[i][j].unit; | 86 | resItem.cpuUnit=data[i][j].unit; |
87 | + resItem.kpiId=data[i][j].kpiId; | ||
85 | }else if (data[i][j].kpiId=='KPIE13DD9A3'||data[i][j].kpiId=='KPI4DA976AF'){ | 88 | }else if (data[i][j].kpiId=='KPIE13DD9A3'||data[i][j].kpiId=='KPI4DA976AF'){ |
86 | resItem.linkState=data[i][j].diagnosisResult; | 89 | resItem.linkState=data[i][j].diagnosisResult; |
87 | resItem.kpiName=data[i][j].kpiName; | 90 | resItem.kpiName=data[i][j].kpiName; |
@@ -103,12 +106,13 @@ export default { | @@ -103,12 +106,13 @@ export default { | ||
103 | alarmColor.value = '#ff0000'; | 106 | alarmColor.value = '#ff0000'; |
104 | } | 107 | } |
105 | } | 108 | } |
106 | - const openAlarm = () => { | 109 | + const openAlarm = (resId) => { |
107 | service.sendEventAlarmDialog(props.parentEmit, { | 110 | service.sendEventAlarmDialog(props.parentEmit, { |
108 | cardList: props.cardList, | 111 | cardList: props.cardList, |
109 | targetType: targetType, | 112 | targetType: targetType, |
110 | faultNo: faultNo, | 113 | faultNo: faultNo, |
111 | - resClass:resClass | 114 | + resClass:resClass, |
115 | + resId:resId | ||
112 | }); | 116 | }); |
113 | } | 117 | } |
114 | const openMoreDialog = () => { | 118 | const openMoreDialog = () => { |
@@ -59,7 +59,7 @@ const handleInfo = () => { | @@ -59,7 +59,7 @@ const handleInfo = () => { | ||
59 | let saveHandleInfo = (key, callback) => { | 59 | let saveHandleInfo = (key, callback) => { |
60 | proxy.$refs[key].validate((valid) => { | 60 | proxy.$refs[key].validate((valid) => { |
61 | if (valid) { | 61 | if (valid) { |
62 | - proxy.$http.post('/api-web/fault/faultHandle', { | 62 | + proxy.$http.get('/api-web/fault/result/faultHandle', { |
63 | faultId: handleInfoForm.value.id, | 63 | faultId: handleInfoForm.value.id, |
64 | label: handleInfoForm.value.label, | 64 | label: handleInfoForm.value.label, |
65 | solution: handleInfoForm.value.solution | 65 | solution: handleInfoForm.value.solution |
@@ -170,6 +170,14 @@ export default { | @@ -170,6 +170,14 @@ export default { | ||
170 | prop: 'faultState', | 170 | prop: 'faultState', |
171 | label: '故障状态', | 171 | label: '故障状态', |
172 | width: 80, | 172 | width: 80, |
173 | + render: function (row) { | ||
174 | + //lsq 故障状态值更改为按钮形式显示 2022-08-04 | ||
175 | + 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>`; | ||
176 | + if(row.faultState=='未解决'){ | ||
177 | + 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>`; | ||
178 | + } | ||
179 | + return spanHtml; | ||
180 | + } | ||
173 | }, /*{ | 181 | }, /*{ |
174 | prop: 'solveway', | 182 | prop: 'solveway', |
175 | label: '处理方式', | 183 | label: '处理方式', |
@@ -185,7 +193,7 @@ export default { | @@ -185,7 +193,7 @@ export default { | ||
185 | }, { | 193 | }, { |
186 | prop: 'duration', | 194 | prop: 'duration', |
187 | label: '持续时长', | 195 | label: '持续时长', |
188 | - width: 80, | 196 | + width: 170, |
189 | }, { | 197 | }, { |
190 | prop: 'reason', | 198 | prop: 'reason', |
191 | label: '原因分析', | 199 | label: '原因分析', |
@@ -351,7 +351,7 @@ const faultEvent = () => { | @@ -351,7 +351,7 @@ const faultEvent = () => { | ||
351 | }; | 351 | }; |
352 | 352 | ||
353 | colObj['render'] = (row) => { | 353 | colObj['render'] = (row) => { |
354 | - if (row) { | 354 | + if (row[kpiId]) { |
355 | return `<span style="text-decoration: underline;color:#1e9fff;">${row[kpiId]}</span>` | 355 | return `<span style="text-decoration: underline;color:#1e9fff;">${row[kpiId]}</span>` |
356 | } | 356 | } |
357 | return ''; | 357 | return ''; |
-
Please register or login to post a comment