去掉注释代码

This commit is contained in:
fengrong 2024-12-24 15:53:40 +08:00
parent e6f1aed780
commit 9051e38eb8
2 changed files with 0 additions and 81 deletions

View File

@ -363,36 +363,6 @@ const StatusListData = () => {
}
})
}
//
/*const malFunctionEnums = ref<{ [key: string]: { [code: string]: string } }>({});
const requestedParams = new Set<string>();
const failedRequests = new Set<string>();
const fetchData = async (item: any) => {
const key = `${item.madeinFactory}-${item.model}`;
if (requestedParams.has(key)) {
return;
}
requestedParams.add(key);
try {
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.value[key] = data;
} else {
console.warn('查询故障代码字典失败:', response.message);
failedRequests.add(key);
}
} catch (error) {
failedRequests.add(key);
}
};*/
let autoUpdateForSecondTimer: any = null

View File

@ -411,57 +411,6 @@ const getSafeImagePath = (item, type) => {
};
/*const getFaultDescription=(item)=>{
const key = `${item.madeinFactory}-${item.model}`;
if (failedRequests.has(key)) {
return '';
}
if (!malFunctionEnums[key]) {
fetchData(item); //
// return item.attributeMap.firsttriggeredcode;
}
let firsttriggeredcode = item.attributeMap.firsttriggeredcode;
if (malFunctionKeys.includes('FirstTriggeredCode') && malFunctionEnums[key]) {
if(firsttriggeredcode==0){
return ''
}else{
firsttriggeredcode = malFunctionEnums[key][firsttriggeredcode] ?? '';
}
}
return firsttriggeredcode;
}
let malFunctionEnums: { [key: string]: { [code: string]: string } } = {};
const requestedParams = new Set<string>();
const failedRequests = new Set<string>();
const fetchData = async (item: any) => {
const key = `${item.madeinFactory}-${item.model}`;
if (requestedParams.has(key)) {
return;
}
requestedParams.add(key);
try {
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[key] = data;
} else {
console.warn('查询故障代码字典失败:', response.message);
failedRequests.add(key);
}
} catch (error) {
failedRequests.add(key);
}
};*/
</script>
<style scoped lang="scss">