diff --git a/ui/dasadmin/src/views/backend/home/home.vue b/ui/dasadmin/src/views/backend/home/home.vue index 5ab59585..03e95dd7 100644 --- a/ui/dasadmin/src/views/backend/home/home.vue +++ b/ui/dasadmin/src/views/backend/home/home.vue @@ -203,6 +203,7 @@ const StatusListData = () => { getWindTurbineMatrixData( { objectType: 10002, + /*belongProject: overviewSlotData.value,*/ belongProject: '', attributesList: [ 'iwindspeed', @@ -233,9 +234,12 @@ const StatusListData = () => { let color:any='' const state = getRealTimeState(item.attributeMap) let firsttriggeredcode=item.attributeMap.firsttriggeredcode - /* if (enumStore.keys.includes('FirstTriggeredCode')) { + if (enumStore.keys.includes('FirstTriggeredCode')) { firsttriggeredcode = enumStore.data['FirstTriggeredCode'][firsttriggeredcode] - }*/ + } + if (malFunctionKeys.includes('FirstTriggeredCode')) { + firsttriggeredcode = malFunctionEnums?.[firsttriggeredcode] ?? firsttriggeredcode + } paramColorData.value.forEach((item, index) => { if (item.state == state) { @@ -329,6 +333,7 @@ const StatusListData = () => { belongLine: item.belongLine || '-', standard: item.standard, layout:paramLayoutData.value[0], + madeinFactory: item.madeinFactory || '-', attributeMap: { iwindspeed: item.attributeMap.iwindspeed, igenpower: item.attributeMap.igenpower, @@ -338,7 +343,7 @@ const StatusListData = () => { color:color, locked: item.attributeMap.locked, irotorspeed: item.attributeMap.irotorspeed, - firsttriggeredcode:item.attributeMap.firsttriggeredcode, + firsttriggeredcode:firsttriggeredcode, }, } }) @@ -351,7 +356,21 @@ const StatusListData = () => { } }) } - +let malFunctionEnums: any = {} +const getMalfunctionEnums = () => { + /*queryfaultCodeDict({ madeinfactory: item!.madeinFactory, model: item!.model }).then((res) => {*/ + queryfaultCodeDict({ madeinfactory: '广东明阳风电', model: 'MY1.5/89' }).then((res) => { + if (res.code == 200) { + const data: any = {} + res.data.forEach((item: any) => { + data[item.code] = item.description + }) + malFunctionEnums = data + } else { + console.warn('查询故障代码字典失败:', res.message); + } + }) +} let autoUpdateForSecondTimer: any = null @@ -386,7 +405,7 @@ onMounted(() => { getList() window.addEventListener('resize', sizeChange) sizeChange() - //getAllChartData() + getMalfunctionEnums() overviewList() StatusListData() autoUpdate() diff --git a/ui/dasadmin/src/views/backend/home/windMatrixpage.vue b/ui/dasadmin/src/views/backend/home/windMatrixpage.vue index d81652ab..b032f924 100644 --- a/ui/dasadmin/src/views/backend/home/windMatrixpage.vue +++ b/ui/dasadmin/src/views/backend/home/windMatrixpage.vue @@ -70,8 +70,11 @@