首页
This commit is contained in:
parent
695c95769e
commit
9b4c1db23e
@ -9,7 +9,7 @@
|
|||||||
<div class="cardLabel">风机矩阵</div>
|
<div class="cardLabel">风机矩阵</div>
|
||||||
<div class="cardBtn">
|
<div class="cardBtn">
|
||||||
<el-radio-group v-model="overviewSlotData">
|
<el-radio-group v-model="overviewSlotData">
|
||||||
<el-radio value=" ">全部</el-radio>
|
<el-radio value="">全部</el-radio>
|
||||||
<el-radio value="一期">一期</el-radio>
|
<el-radio value="一期">一期</el-radio>
|
||||||
<el-radio value="二期">二期</el-radio>
|
<el-radio value="二期">二期</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
@ -69,7 +69,7 @@ let timer: any = null
|
|||||||
let myTable = ref<TableInstance>()
|
let myTable = ref<TableInstance>()
|
||||||
const windList=ref([])
|
const windList=ref([])
|
||||||
|
|
||||||
const overviewSlotData= ref('一期')
|
const overviewSlotData= ref('')
|
||||||
|
|
||||||
const realData = ref({
|
const realData = ref({
|
||||||
windFarmId: '',
|
windFarmId: '',
|
||||||
@ -205,8 +205,7 @@ const StatusListData = () => {
|
|||||||
getWindTurbineMatrixData(
|
getWindTurbineMatrixData(
|
||||||
{
|
{
|
||||||
objectType: 10002,
|
objectType: 10002,
|
||||||
/* belongProject: overviewSlotData.value,*/
|
belongProject: overviewSlotData.value,
|
||||||
belongProject: '',
|
|
||||||
attributesList: [
|
attributesList: [
|
||||||
'iwindspeed',
|
'iwindspeed',
|
||||||
'iturbineoperationmode',
|
'iturbineoperationmode',
|
||||||
@ -239,10 +238,10 @@ const StatusListData = () => {
|
|||||||
if (enumStore.keys.includes('FirstTriggeredCode')) {
|
if (enumStore.keys.includes('FirstTriggeredCode')) {
|
||||||
firsttriggeredcode = enumStore.data['FirstTriggeredCode'][firsttriggeredcode]
|
firsttriggeredcode = enumStore.data['FirstTriggeredCode'][firsttriggeredcode]
|
||||||
}
|
}
|
||||||
if (malFunctionKeys.includes('FirstTriggeredCode')) {
|
/*if (malFunctionKeys.includes('FirstTriggeredCode')) {
|
||||||
firsttriggeredcode = malFunctionEnums?.[firsttriggeredcode] ?? firsttriggeredcode
|
firsttriggeredcode = malFunctionEnums?.[firsttriggeredcode] ?? firsttriggeredcode
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
paramColorData.value.forEach((item, index) => {
|
paramColorData.value.forEach((item, index) => {
|
||||||
if (item.state == state) {
|
if (item.state == state) {
|
||||||
color = item.color
|
color = item.color
|
||||||
@ -360,7 +359,7 @@ const StatusListData = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
let malFunctionEnums: any = {}
|
let malFunctionEnums: any = {}
|
||||||
const getMalfunctionEnums = () => {
|
/*const getMalfunctionEnums = () => {
|
||||||
windList.value.forEach((item)=> {
|
windList.value.forEach((item)=> {
|
||||||
console.log({madeinfactory: item.madeinfactory, model: item.model })
|
console.log({madeinfactory: item.madeinfactory, model: item.model })
|
||||||
queryfaultCodeDict({madeinfactory: item.madeinfactory, model: item.model }).then((res) => {
|
queryfaultCodeDict({madeinfactory: item.madeinfactory, model: item.model }).then((res) => {
|
||||||
@ -376,7 +375,38 @@ const getMalfunctionEnums = () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
/*const requestedParams = new Set<string>();
|
||||||
|
|
||||||
|
const fetchData = async (item: any) => {
|
||||||
|
// 创建一个唯一的键来标识参数组合
|
||||||
|
const key = `${item.madeinFactory}-${item.model}`;
|
||||||
|
|
||||||
|
// 检查这个键是否已经在 Set 中
|
||||||
|
if (requestedParams.has(key)) {
|
||||||
|
console.log('Duplicate request detected, skipping...');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 将键添加到 Set 中
|
||||||
|
requestedParams.add(key);
|
||||||
|
|
||||||
|
try {
|
||||||
|
console.log({ madeinfactory: item.madeinFactory, model: item.model })
|
||||||
|
const response = await queryfaultCodeDict({ madeinfactory: item.madeinFactory, model: item.model });
|
||||||
|
if (response.code === 200) {
|
||||||
|
const data: any = {};
|
||||||
|
response.data.forEach((item: any) => {
|
||||||
|
data[item.code] = item.description;
|
||||||
|
});
|
||||||
|
malFunctionEnums = data;
|
||||||
|
} else {
|
||||||
|
console.warn('查询故障代码字典失败:', response.message);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('请求出错:', error);
|
||||||
|
}
|
||||||
|
};*/
|
||||||
|
|
||||||
|
|
||||||
let autoUpdateForSecondTimer: any = null
|
let autoUpdateForSecondTimer: any = null
|
||||||
@ -416,12 +446,13 @@ onMounted(() => {
|
|||||||
deviceCode.value.push(item.code)
|
deviceCode.value.push(item.code)
|
||||||
})
|
})
|
||||||
windList.value=res.data.map((item: any) => {
|
windList.value=res.data.map((item: any) => {
|
||||||
|
//fetchData(item)
|
||||||
return {
|
return {
|
||||||
madeinfactory:item.madeinFactory,
|
madeinfactory:item.madeinFactory,
|
||||||
model: item.model ?? '-',
|
model: item.model ?? '-',
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
getMalfunctionEnums()
|
//getMalfunctionEnums()
|
||||||
})
|
})
|
||||||
|
|
||||||
overviewList()
|
overviewList()
|
||||||
|
@ -69,12 +69,12 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<div class="fanlist-bottom">
|
<div class="fanlist-bottom">
|
||||||
<span :style="item.attributeMap.locked == 1 ? 'max-width:120px;' : 'max-width:150px;'">
|
|
||||||
{{ item.attributeMap.firsttriggeredcode }}
|
|
||||||
</span>
|
|
||||||
<!-- <span :style="item.attributeMap.locked == 1 ? 'max-width:120px;' : 'max-width:150px;'">
|
<!-- <span :style="item.attributeMap.locked == 1 ? 'max-width:120px;' : 'max-width:150px;'">
|
||||||
{{ getFaultDescription(item) }}
|
{{ item.attributeMap.firsttriggeredcode }}
|
||||||
</span>-->
|
</span>-->
|
||||||
|
<span :style="item.attributeMap.locked == 1 ? 'max-width:120px;' : 'max-width:150px;'">
|
||||||
|
{{ getFaultDescription(item) }}
|
||||||
|
</span>
|
||||||
<!-- <el-tag class="tag-panel is-danger">已锁定</el-tag>-->
|
<!-- <el-tag class="tag-panel is-danger">已锁定</el-tag>-->
|
||||||
<el-tag v-if="item.attributeMap.locked === 1" class="tag-panel is-danger">已锁定</el-tag>
|
<el-tag v-if="item.attributeMap.locked === 1" class="tag-panel is-danger">已锁定</el-tag>
|
||||||
</div>
|
</div>
|
||||||
@ -411,8 +411,9 @@ const getSafeImagePath = (item, type) => {
|
|||||||
return imagePath;
|
return imagePath;
|
||||||
|
|
||||||
};
|
};
|
||||||
/*const getFaultDescription=(item)=>{
|
const getFaultDescription=(item)=>{
|
||||||
getMalfunctionEnums(item)
|
//getMalfunctionEnums(item)
|
||||||
|
fetchData(item)
|
||||||
let firsttriggeredcode=item.attributeMap.firsttriggeredcode
|
let firsttriggeredcode=item.attributeMap.firsttriggeredcode
|
||||||
if (malFunctionKeys.includes('FirstTriggeredCode')) {
|
if (malFunctionKeys.includes('FirstTriggeredCode')) {
|
||||||
firsttriggeredcode = malFunctionEnums?.[firsttriggeredcode] ?? firsttriggeredcode
|
firsttriggeredcode = malFunctionEnums?.[firsttriggeredcode] ?? firsttriggeredcode
|
||||||
@ -421,7 +422,7 @@ const getSafeImagePath = (item, type) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let malFunctionEnums: any = {}
|
let malFunctionEnums: any = {}
|
||||||
const getMalfunctionEnums = (item) => {
|
/*const getMalfunctionEnums = (item) => {
|
||||||
/!*queryfaultCodeDict({ madeinfactory: item!.madeinFactory, model: item!.model }).then((res) => {*!/
|
/!*queryfaultCodeDict({ madeinfactory: item!.madeinFactory, model: item!.model }).then((res) => {*!/
|
||||||
queryfaultCodeDict({ madeinfactory: '广东明阳风电', model: 'MY1.5/89' }).then((res) => {
|
queryfaultCodeDict({ madeinfactory: '广东明阳风电', model: 'MY1.5/89' }).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
@ -435,6 +436,34 @@ const getMalfunctionEnums = (item) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
const requestedParams = new Set<string>();
|
||||||
|
|
||||||
|
const fetchData = async (item: any) => {
|
||||||
|
const key = `${item.madeinFactory}-${item.model}`;
|
||||||
|
|
||||||
|
if (requestedParams.has(key)) {
|
||||||
|
console.log('Duplicate request detected, skipping...');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
requestedParams.add(key);
|
||||||
|
|
||||||
|
try {
|
||||||
|
malFunctionEnums={}
|
||||||
|
const response = await queryfaultCodeDict({ madeinfactory: item.madeinFactory, model: item.model });
|
||||||
|
if (response.code === 200) {
|
||||||
|
const data: any = {};
|
||||||
|
response.data.forEach((item: any) => {
|
||||||
|
data[item.code] = item.description;
|
||||||
|
});
|
||||||
|
malFunctionEnums = data;
|
||||||
|
} else {
|
||||||
|
console.warn('查询故障代码字典失败:', response.message);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('请求出错:', error);
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
Loading…
Reference in New Issue
Block a user