diff --git a/src/views/project/detail.vue b/src/views/project/detail.vue index 898634d..97e98f2 100644 --- a/src/views/project/detail.vue +++ b/src/views/project/detail.vue @@ -588,11 +588,42 @@ function getResourceTypeText(type?: string): string { equipment: "设备", material: "物料", human: "人力", - service: "服务" + software: "软件", + finance: "资金", + service: "服务", + other: "其他" }; return typeMap[type || ""] || type || "其他"; } +// 获取资源类型图标 +function getResourceTypeIcon(type?: string): string { + const iconMap: Record = { + equipment: "ri/server-line", + material: "ri/archive-line", + human: "ri/team-line", + software: "ri/code-line", + finance: "ri/money-cny-circle-line", + service: "ri/service-line", + other: "ri/file-list-line" + }; + return iconMap[type || ""] || "ri/file-list-line"; +} + +// 获取资源类型颜色 +function getResourceTypeColor(type?: string): string { + const colorMap: Record = { + equipment: "#409eff", // 设备 - 蓝色 + material: "#67c23a", // 物料 - 绿色 + human: "#e6a23c", // 人力 - 橙色 + software: "#9b59b6", // 软件 - 紫色 + finance: "#f56c6c", // 资金 - 红色 + service: "#00bcd4", // 服务 - 青色 + other: "#909399" // 其他 - 灰色 + }; + return colorMap[type || ""] || "#909399"; +} + // 获取资源状态类型 function getResourceStatusType( status?: string @@ -1382,9 +1413,24 @@ onMounted(() => {