This commit is contained in:
高云鹏 2024-12-19 17:11:56 +08:00
commit 695c95769e
2 changed files with 33 additions and 16 deletions

View File

@ -58,6 +58,7 @@ import { useRoute } from 'vue-router'
import { getParamList } from '/@/api/backend/SystemParam/request'
import { queryfaultCodeDict } from '/@/api/backend/theoreticalpowerCurve/request'
import { useEnumStore } from '/@/stores/enums'
import {equipList} from "/@/api/backend/realData/request";
const route = useRoute()
@ -66,6 +67,7 @@ const d = new Date()
const { t } = useI18n()
let timer: any = null
let myTable = ref<TableInstance>()
const windList=ref([])
const overviewSlotData= ref('一期')
@ -203,7 +205,7 @@ const StatusListData = () => {
getWindTurbineMatrixData(
{
objectType: 10002,
/*belongProject: overviewSlotData.value,*/
/* belongProject: overviewSlotData.value,*/
belongProject: '',
attributesList: [
'iwindspeed',
@ -344,6 +346,7 @@ const StatusListData = () => {
locked: item.attributeMap.locked,
irotorspeed: item.attributeMap.irotorspeed,
firsttriggeredcode:firsttriggeredcode,
//firsttriggeredcode:item.attributeMap.firsttriggeredcode,
},
}
})
@ -358,18 +361,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);
}
windList.value.forEach((item)=> {
console.log({madeinfactory: item.madeinfactory, model: item.model })
queryfaultCodeDict({madeinfactory: item.madeinfactory, model: item.model }).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);
}
})
})
}
@ -405,7 +411,19 @@ onMounted(() => {
getList()
window.addEventListener('resize', sizeChange)
sizeChange()
getMalfunctionEnums()
equipList({ objectType: 10002 }).then((res) => {
res.data.map((item: any) => {
deviceCode.value.push(item.code)
})
windList.value=res.data.map((item: any) => {
return {
madeinfactory:item.madeinFactory,
model: item.model ?? '-',
}
})
getMalfunctionEnums()
})
overviewList()
StatusListData()
autoUpdate()
@ -490,7 +508,6 @@ $labelHeight: 30px;
}
.homeHeader{
display: flex;
margin-bottom: 10px;
justify-content: space-between;
.cardLabel{
margin-right: 10px;

View File

@ -418,9 +418,9 @@ const getSafeImagePath = (item, type) => {
firsttriggeredcode = malFunctionEnums?.[firsttriggeredcode] ?? firsttriggeredcode
}
return firsttriggeredcode
}*/
}
/*let malFunctionEnums: any = {}
let malFunctionEnums: any = {}
const getMalfunctionEnums = (item) => {
/!*queryfaultCodeDict({ madeinfactory: item!.madeinFactory, model: item!.model }).then((res) => {*!/
queryfaultCodeDict({ madeinfactory: '广东明阳风电', model: 'MY1.5/89' }).then((res) => {