展示单位调整

This commit is contained in:
caozehui
2025-01-13 15:03:24 +08:00
parent 7556f0e5bc
commit f58f7b97e5
3 changed files with 17 additions and 14 deletions

View File

@@ -267,7 +267,7 @@ const defaultOperate = () => {
defaultExpandedKeys = [node.index]
treeRef.value?.setCurrentKey(node.index);
scriptType = node.scriptType
scriptType = node.scriptType ?? scriptType
} else {
currentScriptTypeName.value = ''
currentDesc.value = ''
@@ -341,7 +341,10 @@ const updateTableData = async () => {
} else if (keys1.length != 0) {
let tempHarmNumList: { value: string, label: string }[] = []
for (let [key, value] of resTableData.resultData) {
tempHarmNumList.push({value: key, label: value.isData === 1 ? key : value.isData === 4 ? `${formatHarmNum(key)}/` : `${formatHarmNum(key)}(不符合)`})
tempHarmNumList.push({
value: key,
label: value.isData === 1 ? key : value.isData === 4 ? `${formatHarmNum(key)}/` : `${formatHarmNum(key)}(不符合)`
})
}
Object.assign(harmNumList, tempHarmNumList)
@@ -455,10 +458,10 @@ const setCheckResultData = (data: CheckData.ResCheckResult) => {
}
const formatHarmNum = (num: string) => {
if(num.includes('.5')){
if (num.includes('.5')) {
return num
}else{
return num.replace('.0','')
} else {
return num.replace('.0', '')
}
}