Authored by 王涛

Merge branch 'master-v32-xwx' into 'master'

故障管理bug处理



See merge request !819
@@ -84,12 +84,12 @@ @@ -84,12 +84,12 @@
84 <div style="display: flex;text-align: left;margin-top: -17px;margin-left: 50px;"> 84 <div style="display: flex;text-align: left;margin-top: -17px;margin-left: 50px;">
85 <p style="width: 50%;">响应率 85 <p style="width: 50%;">响应率
86 <h class="text-link" style="margin-left: 6px;" 86 <h class="text-link" style="margin-left: 6px;"
87 - :style="{color: item.responseColor}" @click="openResPonse(item.kpiId,item.resId)">{{item.responseNum}}% 87 + :style="{color: item.responseColor}" @click="openResPonse(item.kpiId,item.resId,'响应率折线图')">{{item.responseNum}}%
88 </h> 88 </h>
89 </p> 89 </p>
90 <p style="width: 50%;">成功率 90 <p style="width: 50%;">成功率
91 <h class="text-link" style="margin-left: 6px;" 91 <h class="text-link" style="margin-left: 6px;"
92 - :style="{color: item.successColor}" @click="openResPonse(item.kpiId,item.resId)">{{item.successNum}}% 92 + :style="{color: item.successColor}" @click="openResPonse(item.kpiId,item.resId,'成功率折线图')">{{item.successNum}}%
93 </h> 93 </h>
94 </p> 94 </p>
95 </div> 95 </div>
@@ -99,12 +99,13 @@ export default { @@ -99,12 +99,13 @@ export default {
99 service.sendEventDiagnoseBusinessScenarios(emit, props.faultNo,props.targetType.toLocaleLowerCase(),param,'','诊断链路场景'); 99 service.sendEventDiagnoseBusinessScenarios(emit, props.faultNo,props.targetType.toLocaleLowerCase(),param,'','诊断链路场景');
100 } 100 }
101 101
102 - let openResPonse = (kpiId,redId) =>{ 102 + let openResPonse = (kpiId,redId,title) =>{
103 let param = { 103 let param = {
104 faultNo: props.faultNo, 104 faultNo: props.faultNo,
105 targetType: props.targetType.toLocaleLowerCase(), 105 targetType: props.targetType.toLocaleLowerCase(),
106 resId: redId, 106 resId: redId,
107 - kpiId: kpiId 107 + kpiId: kpiId,
  108 + title: title
108 } 109 }
109 service.sendEventLineDialog(emit, param); 110 service.sendEventLineDialog(emit, param);
110 } 111 }
@@ -66,6 +66,16 @@ @@ -66,6 +66,16 @@
66 </template> 66 </template>
67 </cm-dialog> 67 </cm-dialog>
68 68
  69 +<!-- 曲线图 -->
  70 +<cm-dialog top="3vh" :title="dialogName" width="1000px" :showDialogVisible="showLineDialog"
  71 + @hidedialog="closeLineDialog" :showFooter="false">
  72 + <template v-slot>
  73 + <div style="height: 300px" v-if="dataSet.length > 0">
  74 + <echarts-line :sourceData="dataSet" height="300px" width="980px" />
  75 + </div>
  76 + <el-empty :image-size="50" v-else />
  77 + </template>
  78 +</cm-dialog>
69 79
70 <!-- 资源明细 --> 80 <!-- 资源明细 -->
71 <cm-dialog top="3vh" :title="moreDialogTitle" width="80%" :showDialogVisible="moreDialog" 81 <cm-dialog top="3vh" :title="moreDialogTitle" width="80%" :showDialogVisible="moreDialog"
@@ -22,6 +22,9 @@ export default { @@ -22,6 +22,9 @@ export default {
22 ), 22 ),
23 'faultHis': Vue.defineAsyncComponent( 23 'faultHis': Vue.defineAsyncComponent(
24 () => myImport('components/page/faultDiagnosis/result/faultHis/index') 24 () => myImport('components/page/faultDiagnosis/result/faultHis/index')
  25 + ),
  26 + 'echarts-line': Vue.defineAsyncComponent(
  27 + () => myImport('components/common/echarts/line/index')
25 ) 28 )
26 }, 29 },
27 setup() { 30 setup() {
@@ -146,13 +149,13 @@ export default { @@ -146,13 +149,13 @@ export default {
146 } 149 }
147 150
148 // 展示弹框 151 // 展示弹框
149 - const openDialog = (type, {faultNo, targetType, resId, kpiId, flag, resClass}, obj) => { 152 + const openDialog = (type, {faultNo, targetType, resId, kpiId, flag, resClass,title}, obj) => {
150 if (type === 'alarm') { 153 if (type === 'alarm') {
151 service.openAlarmDialog(proxy, faultNo, targetType, resId, kpiId, flag, resClass); 154 service.openAlarmDialog(proxy, faultNo, targetType, resId, kpiId, flag, resClass);
152 } else /*if (type === 'resList') { 155 } else /*if (type === 'resList') {
153 service.handleClick(proxy, faultNo, targetType, resId, kpiId, flag); 156 service.handleClick(proxy, faultNo, targetType, resId, kpiId, flag);
154 } else*/ if (type === 'line') { 157 } else*/ if (type === 'line') {
155 - service.openLine(proxy, faultNo, targetType, resId, kpiId, flag); 158 + service.openLine(proxy, faultNo, targetType, resId, kpiId, flag,title);
156 } else if (type === 'more') { 159 } else if (type === 'more') {
157 // 展示更多 160 // 展示更多
158 moreDialogTitle.value = obj.title; 161 moreDialogTitle.value = obj.title;
@@ -10,15 +10,18 @@ const lineService = () => { @@ -10,15 +10,18 @@ const lineService = () => {
10 10
11 let showLineDialog = Vue.ref(false); 11 let showLineDialog = Vue.ref(false);
12 let dataSet = Vue.ref([]); 12 let dataSet = Vue.ref([]);
  13 + let dialogName = Vue.ref('');
13 14
14 15
15 let closeLineDialog = (flg) => { 16 let closeLineDialog = (flg) => {
16 showLineDialog.value = flg; 17 showLineDialog.value = flg;
17 } 18 }
18 19
19 - let openLine = (proxy, faultNo, targetType, resId, kpiId, flag) => { 20 + let openLine = (proxy, faultNo, targetType, resId, kpiId, flag, title) => {
20 // 展示弹框 21 // 展示弹框
21 closeLineDialog(true); 22 closeLineDialog(true);
  23 + //弹框名称
  24 + dialogName.value = title;
22 // 获取数据 25 // 获取数据
23 getLineData(proxy, faultNo, targetType, resId, kpiId, flag); 26 getLineData(proxy, faultNo, targetType, resId, kpiId, flag);
24 } 27 }
@@ -54,7 +57,8 @@ const lineService = () => { @@ -54,7 +57,8 @@ const lineService = () => {
54 showLineDialog, 57 showLineDialog,
55 closeLineDialog, 58 closeLineDialog,
56 openLine, 59 openLine,
57 - dataSet 60 + dataSet,
  61 + dialogName
58 } 62 }
59 } 63 }
60 64
@@ -245,7 +249,8 @@ const faultEvent = () => { @@ -245,7 +249,8 @@ const faultEvent = () => {
245 resId: '', 249 resId: '',
246 kpiId: '', 250 kpiId: '',
247 flag: '', 251 flag: '',
248 - resClass: '' 252 + resClass: '',
  253 + title: ''
249 }, params); 254 }, params);
250 } 255 }
251 256
@@ -310,6 +315,11 @@ const faultEvent = () => { @@ -310,6 +315,11 @@ const faultEvent = () => {
310 var kpiId = listItem.kpiId; 315 var kpiId = listItem.kpiId;
311 var kpiName = listItem.kpiName; 316 var kpiName = listItem.kpiName;
312 var val = listItem.diagnosisResult; 317 var val = listItem.diagnosisResult;
  318 + var unit = listItem.unit;
  319 + var units = '';
  320 + if (unit && unit != null) {
  321 + units = '(' + unit + ')';
  322 + }
313 323
314 var colArr = obj.columns.filter((e) => { 324 var colArr = obj.columns.filter((e) => {
315 if (e.prop == kpiId) { 325 if (e.prop == kpiId) {
@@ -319,7 +329,7 @@ const faultEvent = () => { @@ -319,7 +329,7 @@ const faultEvent = () => {
319 if (colArr.length == 0) { 329 if (colArr.length == 0) {
320 obj.columns.push({ 330 obj.columns.push({
321 prop: kpiId, 331 prop: kpiId,
322 - label: kpiName, 332 + label: kpiName + units,
323 }); 333 });
324 } 334 }
325 335
@@ -366,7 +376,7 @@ const faultEvent = () => { @@ -366,7 +376,7 @@ const faultEvent = () => {
366 width: 200, 376 width: 200,
367 label: '诊断值', 377 label: '诊断值',
368 click: (row) => { 378 click: (row) => {
369 - if(row && row.kpiIdent == 1){ 379 + if (row && row.kpiIdent == 1) {
370 sendEventLineDialog(emit, { 380 sendEventLineDialog(emit, {
371 faultNo: faultNo, 381 faultNo: faultNo,
372 targetType: targetType, 382 targetType: targetType,
@@ -389,7 +399,7 @@ const faultEvent = () => { @@ -389,7 +399,7 @@ const faultEvent = () => {
389 width: 200, 399 width: 200,
390 label: '诊断结果', 400 label: '诊断结果',
391 click: (row) => { 401 click: (row) => {
392 - if(row && row.kpiIdent == 1){ 402 + if (row && row.kpiIdent == 1) {
393 sendEventLineDialog(emit, { 403 sendEventLineDialog(emit, {
394 faultNo: faultNo, 404 faultNo: faultNo,
395 targetType: targetType, 405 targetType: targetType,
@@ -479,7 +489,7 @@ const faultEvent = () => { @@ -479,7 +489,7 @@ const faultEvent = () => {
479 * @param targetType 诊断类型 489 * @param targetType 诊断类型
480 * @param columns 数组,表格列对象 490 * @param columns 数组,表格列对象
481 */ 491 */
482 - const sendEventDiagnoseKpiList = (emit, faultNo, targetType,resClass) => { 492 + const sendEventDiagnoseKpiList = (emit, faultNo, targetType, resClass) => {
483 493
484 var obj = { 494 var obj = {
485 title: '诊断指标', 495 title: '诊断指标',
@@ -507,7 +517,11 @@ const faultEvent = () => { @@ -507,7 +517,11 @@ const faultEvent = () => {
507 data: '', 517 data: '',
508 } 518 }
509 519
510 - store.dispatch('getFaultKpiList', {faultNo: faultNo, targetType: targetType,resClass:resClass}).then((res) => { 520 + store.dispatch('getFaultKpiList', {
  521 + faultNo: faultNo,
  522 + targetType: targetType,
  523 + resClass: resClass
  524 + }).then((res) => {
511 if (res && res.success) { 525 if (res && res.success) {
512 obj.data = res.data; 526 obj.data = res.data;
513 emit('openDialog', 'more', {}, obj); 527 emit('openDialog', 'more', {}, obj);