隐患检查结果页添加隐患等级字典与置信度字典
This commit is contained in:
parent
63e77ebbc0
commit
f4411ac5d3
|
|
@ -4,6 +4,16 @@ import { computed, onMounted, ref } from 'vue'
|
|||
import { useRouter } from 'vue-router'
|
||||
import { runApi } from '~/composables/api'
|
||||
|
||||
const 隐患等级字典: Record<number, string> = {
|
||||
0: '一般隐患',
|
||||
1: '重大隐患',
|
||||
}
|
||||
|
||||
const 置信度字典: Record<number, string> = {
|
||||
0: '疑似',
|
||||
1: '确信',
|
||||
}
|
||||
|
||||
interface HazardItem {
|
||||
隐患编号: string
|
||||
物体编号: string
|
||||
|
|
@ -168,8 +178,8 @@ function getData() {
|
|||
物体编号: obj.track_id || '',
|
||||
物体类型: class_list?.[obj.class_id] || '',
|
||||
隐患名称: tag?.[obj.tag_id] || '',
|
||||
隐患等级: obj.level === 0 ? '一般隐患' : '重大隐患',
|
||||
置信度: obj.conf === 0 ? '疑似' : '确信',
|
||||
隐患等级: 隐患等级字典[obj.level],
|
||||
置信度: 置信度字典[obj.conf],
|
||||
时间点: `${hh}:${mm}:${ss}`,
|
||||
跳转时间点: jumpPoint,
|
||||
隐患描述: obj.location || '',
|
||||
|
|
|
|||
Loading…
Reference in New Issue