Authored by 王涛

对比分析优化;故障诊断菜单

1 -<title>故障诊断</title> 1 +<title>故障诊断配置</title>
2 <iframe src="/vue3/index.html#/fault/index" class="layadmin-iframe" style="height: 99.5%!important;"/> 2 <iframe src="/vue3/index.html#/fault/index" class="layadmin-iframe" style="height: 99.5%!important;"/>
  1 +<title>故障管理</title>
  2 +<iframe src="/vue3/index.html#/fault/faultForm" class="layadmin-iframe" style="height: 99.5%!important;"/>
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 </el-button> 31 </el-button>
32 <template #dropdown> 32 <template #dropdown>
33 <el-dropdown-menu> 33 <el-dropdown-menu>
34 - <el-dropdown-item v-for="item in frequencyArr" 34 + <el-dropdown-item v-for="item in frequencyArr" @click="getChartData()"
35 :key="item.ddicId" 35 :key="item.ddicId"
36 :command="{value:item.ddicCode,label:item.ddicName,flag:1}"> 36 :command="{value:item.ddicCode,label:item.ddicName,flag:1}">
37 <el-radio v-model="form.scene.frequency" :label="item.ddicCode">{{item.ddicName}} 37 <el-radio v-model="form.scene.frequency" :label="item.ddicCode">{{item.ddicName}}
@@ -52,12 +52,18 @@ @@ -52,12 +52,18 @@
52 <el-row :gutter="5"> 52 <el-row :gutter="5">
53 <el-col :span="4"> 53 <el-col :span="4">
54 <div style="display: flex;flex-wrap: wrap;width: 100%;padding-left: 15px;"> 54 <div style="display: flex;flex-wrap: wrap;width: 100%;padding-left: 15px;">
55 - <el-dropdown>  
56 - <el-icon class="el-icon--right"> 55 + <!--<el-dropdown>
  56 + <el-icon class="el-icon&#45;&#45;right">
57 <arrow-down/> 57 <arrow-down/>
58 </el-icon> 58 </el-icon>
59 <cm-biz-type-tree-input multiple clearable collapseTags @callback="getBizType"/> 59 <cm-biz-type-tree-input multiple clearable collapseTags @callback="getBizType"/>
60 - </el-dropdown> 60 + </el-dropdown>-->
  61 +
  62 + <el-select v-model="busTypeArr" multiple filterable clearable collapse-tags placeholder="请选择指标" style="margin-top: 10px">
  63 + <el-option
  64 + v-for="item in busTypeList"
  65 + :label="item.busTypeName" :value="item.busId"></el-option>
  66 + </el-select>
61 67
62 <el-dropdown> 68 <el-dropdown>
63 <el-icon class="el-icon--right"> 69 <el-icon class="el-icon--right">
@@ -66,12 +72,18 @@ @@ -66,12 +72,18 @@
66 <cm-res-type-tree-input multiple clearable collapseTags @callback="getResType"/> 72 <cm-res-type-tree-input multiple clearable collapseTags @callback="getResType"/>
67 </el-dropdown> 73 </el-dropdown>
68 74
69 - <el-dropdown>  
70 - <el-icon class="el-icon--right"> 75 + <!--<el-dropdown>
  76 + <el-icon class="el-icon&#45;&#45;right">
71 <arrow-down/> 77 <arrow-down/>
72 </el-icon> 78 </el-icon>
73 <cm-kpi-type-tree-input multiple clearable collapseTags @callback="getKpiType"/> 79 <cm-kpi-type-tree-input multiple clearable collapseTags @callback="getKpiType"/>
74 - </el-dropdown> 80 + </el-dropdown>-->
  81 +
  82 + <el-select v-model="kpiTypeArr" multiple filterable clearable collapse-tags placeholder="请选择指标" style="margin-top: 10px">
  83 + <el-option
  84 + v-for="item in kpiList"
  85 + :label="item.kpiName" :value="item.kpiId"></el-option>
  86 + </el-select>
75 87
76 <el-input v-model="keyWords" placeholder="输入关键字" style="margin-top: 15px;width: 225px;"/> 88 <el-input v-model="keyWords" placeholder="输入关键字" style="margin-top: 15px;width: 225px;"/>
77 89
@@ -123,13 +123,13 @@ export default { @@ -123,13 +123,13 @@ export default {
123 ]); 123 ]);
124 124
125 125
126 - var id = proxy.$global.getQueryVariable('configId'); 126 + var id = proxy.$global.getQueryVariable('configId') ;
127 127
128 let resTypeArr = Vue.ref([]); 128 let resTypeArr = Vue.ref([]);
129 let kpiTypeArr = Vue.ref([]); 129 let kpiTypeArr = Vue.ref([]);
130 let busTypeArr = Vue.ref([]); 130 let busTypeArr = Vue.ref([]);
131 let keyWords = Vue.ref(''); 131 let keyWords = Vue.ref('');
132 - let config = Vue.ref(id); 132 + let config = Vue.ref(id == false ? null : id);
133 let lineChart = Vue.ref({ 133 let lineChart = Vue.ref({
134 legend: { 134 legend: {
135 data: [] 135 data: []
@@ -190,20 +190,22 @@ export default { @@ -190,20 +190,22 @@ export default {
190 } 190 }
191 191
192 // 查询参数 192 // 查询参数
193 - let params = { 193 + let getParams = () =>{
  194 + return {
194 keyWords: keyWords.value, 195 keyWords: keyWords.value,
195 resType: resTypeArr.value.join(','), 196 resType: resTypeArr.value.join(','),
196 kpiType: kpiTypeArr.value.join(','), 197 kpiType: kpiTypeArr.value.join(','),
197 bizType: busTypeArr.value.join(','), 198 bizType: busTypeArr.value.join(','),
198 configId: config.value 199 configId: config.value
199 } 200 }
  201 + }
200 202
201 let loadFirstList = (reload) => { 203 let loadFirstList = (reload) => {
202 - if (!reload && tabFirstList.value.length > 0) {  
203 - return false;  
204 - } 204 + // if (!reload && tabFirstList.value.length > 0) {
  205 + // return false;
  206 + // }
205 207
206 - proxy.$http.get(`/api-web/ContrastAnalysis/added`, params, function (res) { 208 + proxy.$http.get(`/api-web/ContrastAnalysis/added`, getParams(), function (res) {
207 if (res && res.data) { 209 if (res && res.data) {
208 tabFirstList.value = res.data; 210 tabFirstList.value = res.data;
209 } 211 }
@@ -211,10 +213,10 @@ export default { @@ -211,10 +213,10 @@ export default {
211 } 213 }
212 214
213 let loadSecondList = (reload) => { 215 let loadSecondList = (reload) => {
214 - if (!reload && tabSecondList.value.length > 0) {  
215 - return false;  
216 - }  
217 - proxy.$http.get(`/api-web/ContrastAnalysis/notAdded`, params, function (res) { 216 + // if (!reload && tabSecondList.value.length > 0) {
  217 + // return false;
  218 + // }
  219 + proxy.$http.get(`/api-web/ContrastAnalysis/notAdded`, getParams(), function (res) {
218 if (res && res.data) { 220 if (res && res.data) {
219 tabSecondList.value = res.data; 221 tabSecondList.value = res.data;
220 } 222 }
@@ -252,6 +254,9 @@ export default { @@ -252,6 +254,9 @@ export default {
252 let timeRangeChange = (item) => { 254 let timeRangeChange = (item) => {
253 let code = item.ddicCode; 255 let code = item.ddicCode;
254 loadFrequency(code); 256 loadFrequency(code);
  257 +
  258 + // 加载echar
  259 + getChartData();
255 } 260 }
256 261
257 let addRes = (row, index) => { 262 let addRes = (row, index) => {
@@ -467,9 +472,37 @@ export default { @@ -467,9 +472,37 @@ export default {
467 }); 472 });
468 } 473 }
469 474
  475 + let resTypeList = Vue.ref([]);
  476 + let kpiList = Vue.ref([]);
  477 + let busTypeList = Vue.ref([]);
  478 + let init = () =>{
  479 + /*
  480 + proxy.$http.get("/api-web/home/resType/getTree?typeParentFlag=1", {}, function(res) {
  481 + if (res && res.data) {
  482 + resTypeList.value = res.data;
  483 + }
  484 + })
  485 + */
  486 +
  487 + proxy.$http.get("/api-web/manage/kpi/list", {}, function(res) {
  488 + if (res && res.data) {
  489 + kpiList.value = res.data;
  490 + }
  491 + })
  492 +
  493 + proxy.$http.get("/api-web/home/business/findAllBusType", {}, function(res) {
  494 + if (res && res.data) {
  495 + busTypeList.value = res.data;
  496 + }
  497 + })
  498 + }
  499 +
470 500
471 // 挂载完 501 // 挂载完
472 Vue.onMounted(() => { 502 Vue.onMounted(() => {
  503 +
  504 + init();
  505 +
473 if(!id){ 506 if(!id){
474 activeName.value = 'second'; 507 activeName.value = 'second';
475 } 508 }
@@ -489,6 +522,10 @@ export default { @@ -489,6 +522,10 @@ export default {
489 522
490 523
491 return { 524 return {
  525 + resTypeList,
  526 + kpiList,
  527 + busTypeList,
  528 +
492 height, 529 height,
493 lineChart, 530 lineChart,
494 form, 531 form,
@@ -503,7 +540,11 @@ export default { @@ -503,7 +540,11 @@ export default {
503 getResType, 540 getResType,
504 getKpiType, 541 getKpiType,
505 getBizType, 542 getBizType,
  543 +
506 keyWords, 544 keyWords,
  545 + resTypeArr,
  546 + kpiTypeArr,
  547 + busTypeArr,
507 548
508 loadFirstList, 549 loadFirstList,
509 loadSecondList, 550 loadSecondList,
@@ -522,7 +563,8 @@ export default { @@ -522,7 +563,8 @@ export default {
522 dialogFormVisible, 563 dialogFormVisible,
523 showDialogForm, 564 showDialogForm,
524 saveAnalysis, 565 saveAnalysis,
525 - parentList 566 + parentList,
  567 + getChartData
526 } 568 }
527 } 569 }
528 } 570 }