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 @@
- {{ item.attributeMap.firsttriggeredcode }} + {{ item.attributeMap.firsttriggeredcode }} + 已锁定
@@ -125,6 +128,10 @@ import { sendCommandReq, sendManualCommandReq } from '/@/api/backend/control/req import {ElMessage, ElMessageBox} from "element-plus"; import {equipUpdate} from '/@/api/backend/index.ts' import {queryfaultCodeDict} from "/@/api/backend/theoreticalpowerCurve/request"; +import { malFunctionKeys } from '/@/views/backend/equipment/airBlower/utils' +import { useEnumStore } from '/@/stores/enums' + +const enumStore = useEnumStore() const router = useRouter() const props = defineProps({ @@ -404,20 +411,30 @@ const getSafeImagePath = (item, type) => { return imagePath; }; +/*const getFaultDescription=(item)=>{ + getMalfunctionEnums(item) + let firsttriggeredcode=item.attributeMap.firsttriggeredcode + if (malFunctionKeys.includes('FirstTriggeredCode')) { + firsttriggeredcode = malFunctionEnums?.[firsttriggeredcode] ?? firsttriggeredcode + } + return firsttriggeredcode +}*/ -let malFunctionEnums: any = {} -const getMalfunctionEnums = () => { - const curWindBlower = airBlowerList.value.find((item) => item.irn === route.query.irn) - queryfaultCodeDict({ madeinfactory: curWindBlower!.madeinfactory, model: curWindBlower!.model }).then((res) => { +/*let malFunctionEnums: any = {} +const getMalfunctionEnums = (item) => { + /!*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); + } }) -} +}*/