Authored by 王涛

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

<title>故障诊断</title>
<title>故障诊断配置</title>
<iframe src="/vue3/index.html#/fault/index" class="layadmin-iframe" style="height: 99.5%!important;"/>
... ...
<title>故障管理</title>
<iframe src="/vue3/index.html#/fault/faultForm" class="layadmin-iframe" style="height: 99.5%!important;"/>
... ...
... ... @@ -31,7 +31,7 @@
</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-for="item in frequencyArr"
<el-dropdown-item v-for="item in frequencyArr" @click="getChartData()"
:key="item.ddicId"
:command="{value:item.ddicCode,label:item.ddicName,flag:1}">
<el-radio v-model="form.scene.frequency" :label="item.ddicCode">{{item.ddicName}}
... ... @@ -52,12 +52,18 @@
<el-row :gutter="5">
<el-col :span="4">
<div style="display: flex;flex-wrap: wrap;width: 100%;padding-left: 15px;">
<el-dropdown>
<el-icon class="el-icon--right">
<!--<el-dropdown>
<el-icon class="el-icon&#45;&#45;right">
<arrow-down/>
</el-icon>
<cm-biz-type-tree-input multiple clearable collapseTags @callback="getBizType"/>
</el-dropdown>
</el-dropdown>-->
<el-select v-model="busTypeArr" multiple filterable clearable collapse-tags placeholder="请选择指标" style="margin-top: 10px">
<el-option
v-for="item in busTypeList"
:label="item.busTypeName" :value="item.busId"></el-option>
</el-select>
<el-dropdown>
<el-icon class="el-icon--right">
... ... @@ -66,12 +72,18 @@
<cm-res-type-tree-input multiple clearable collapseTags @callback="getResType"/>
</el-dropdown>
<el-dropdown>
<el-icon class="el-icon--right">
<!--<el-dropdown>
<el-icon class="el-icon&#45;&#45;right">
<arrow-down/>
</el-icon>
<cm-kpi-type-tree-input multiple clearable collapseTags @callback="getKpiType"/>
</el-dropdown>
</el-dropdown>-->
<el-select v-model="kpiTypeArr" multiple filterable clearable collapse-tags placeholder="请选择指标" style="margin-top: 10px">
<el-option
v-for="item in kpiList"
:label="item.kpiName" :value="item.kpiId"></el-option>
</el-select>
<el-input v-model="keyWords" placeholder="输入关键字" style="margin-top: 15px;width: 225px;"/>
... ...
... ... @@ -123,13 +123,13 @@ export default {
]);
var id = proxy.$global.getQueryVariable('configId');
var id = proxy.$global.getQueryVariable('configId') ;
let resTypeArr = Vue.ref([]);
let kpiTypeArr = Vue.ref([]);
let busTypeArr = Vue.ref([]);
let keyWords = Vue.ref('');
let config = Vue.ref(id);
let config = Vue.ref(id == false ? null : id);
let lineChart = Vue.ref({
legend: {
data: []
... ... @@ -190,20 +190,22 @@ export default {
}
// 查询参数
let params = {
let getParams = () =>{
return {
keyWords: keyWords.value,
resType: resTypeArr.value.join(','),
kpiType: kpiTypeArr.value.join(','),
bizType: busTypeArr.value.join(','),
configId: config.value
}
}
let loadFirstList = (reload) => {
if (!reload && tabFirstList.value.length > 0) {
return false;
}
// if (!reload && tabFirstList.value.length > 0) {
// return false;
// }
proxy.$http.get(`/api-web/ContrastAnalysis/added`, params, function (res) {
proxy.$http.get(`/api-web/ContrastAnalysis/added`, getParams(), function (res) {
if (res && res.data) {
tabFirstList.value = res.data;
}
... ... @@ -211,10 +213,10 @@ export default {
}
let loadSecondList = (reload) => {
if (!reload && tabSecondList.value.length > 0) {
return false;
}
proxy.$http.get(`/api-web/ContrastAnalysis/notAdded`, params, function (res) {
// if (!reload && tabSecondList.value.length > 0) {
// return false;
// }
proxy.$http.get(`/api-web/ContrastAnalysis/notAdded`, getParams(), function (res) {
if (res && res.data) {
tabSecondList.value = res.data;
}
... ... @@ -252,6 +254,9 @@ export default {
let timeRangeChange = (item) => {
let code = item.ddicCode;
loadFrequency(code);
// 加载echar
getChartData();
}
let addRes = (row, index) => {
... ... @@ -467,9 +472,37 @@ export default {
});
}
let resTypeList = Vue.ref([]);
let kpiList = Vue.ref([]);
let busTypeList = Vue.ref([]);
let init = () =>{
/*
proxy.$http.get("/api-web/home/resType/getTree?typeParentFlag=1", {}, function(res) {
if (res && res.data) {
resTypeList.value = res.data;
}
})
*/
proxy.$http.get("/api-web/manage/kpi/list", {}, function(res) {
if (res && res.data) {
kpiList.value = res.data;
}
})
proxy.$http.get("/api-web/home/business/findAllBusType", {}, function(res) {
if (res && res.data) {
busTypeList.value = res.data;
}
})
}
// 挂载完
Vue.onMounted(() => {
init();
if(!id){
activeName.value = 'second';
}
... ... @@ -489,6 +522,10 @@ export default {
return {
resTypeList,
kpiList,
busTypeList,
height,
lineChart,
form,
... ... @@ -503,7 +540,11 @@ export default {
getResType,
getKpiType,
getBizType,
keyWords,
resTypeArr,
kpiTypeArr,
busTypeArr,
loadFirstList,
loadSecondList,
... ... @@ -522,7 +563,8 @@ export default {
dialogFormVisible,
showDialogForm,
saveAnalysis,
parentList
parentList,
getChartData
}
}
}
... ...