import { Pair } from '../../entry/Pair' export class Task { workId: number = 0 nodeId: number = 0 orderNo: string = "" name: string = "" urgencyLevel: string = "0" completionTime: number | null = null cancellationTime: number | null = null cancellationReason: string | null = null // 发起人 initiatorName: string | null = null // 当前执行人 workerUserName: string | null = null workTime: number | null = null currentNodeId: string | null = null currentNodeName: string | null = null approvalStatus: string = "" /** * 获取等级名称和背景色 */ getLevelNameAndColor(): Pair { switch (this.urgencyLevel) { case "1": return new Pair("紧急", "#FFFF9800") case "2": return new Pair("非常紧急", "#FFFF4500") default: return new Pair("正常", "#FF1E90FF") } } }