- 将项目相关ID类型统一由number改为string,增强一致性 - 新增项目成员、里程碑、任务、资源、风险、时间线节点等详细类型定义 - 添加获取项目详情接口方法getProjectDetail - 在路由中新增项目详情页路由配置 - 实现项目详情页面,支持展示基本信息、成员、任务、风险及资源等数据 - 项目详情页面集成AI助手简易聊天交互功能展示 - 添加项目状态、风险等级及资源状态的辅助文本和样式方法 - 优化甘特图任务条样式计算,基于项目详情任务数据展现
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useProject } from "./utils/hook";
|
||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||
import CreateProjectWizard from "./components/CreateProjectWizard.vue";
|
||||
@@ -19,6 +20,7 @@ defineOptions({
|
||||
name: "Project"
|
||||
});
|
||||
|
||||
const router = useRouter();
|
||||
const wizardVisible = ref(false);
|
||||
|
||||
const {
|
||||
@@ -50,7 +52,10 @@ function handleWizardSuccess() {
|
||||
|
||||
// 查看项目详情
|
||||
function handleView(row: any) {
|
||||
console.log("查看项目", row);
|
||||
router.push({
|
||||
name: "ProjectDetail",
|
||||
params: { id: row.id.toString() }
|
||||
});
|
||||
}
|
||||
|
||||
// 编辑项目
|
||||
@@ -184,10 +189,10 @@ function getRiskType(risk?: string): "success" | "warning" | "danger" {
|
||||
<div>
|
||||
<p class="text-gray-500 text-sm">平均完成率</p>
|
||||
<p class="text-2xl font-bold mt-1">
|
||||
{{ statistics.averageProgress }}%
|
||||
{{ Math.round(statistics.averageProgress || 0) }}%
|
||||
</p>
|
||||
<el-progress
|
||||
:percentage="statistics.averageProgress"
|
||||
:percentage="Math.round(statistics.averageProgress || 0)"
|
||||
:show-text="false"
|
||||
class="mt-2"
|
||||
style="width: 100px"
|
||||
@@ -302,8 +307,8 @@ function getRiskType(risk?: string): "success" | "warning" | "danger" {
|
||||
:lg="6"
|
||||
class="mb-4"
|
||||
>
|
||||
<el-card shadow="hover" class="project-card">
|
||||
<div class="flex justify-between items-start mb-3">
|
||||
<el-card shadow="hover" class="project-card" @click="handleView(item)">
|
||||
<div class="flex justify-between items-start mb-3" @click.stop>
|
||||
<div class="flex-1 min-w-0">
|
||||
<h4
|
||||
class="font-medium text-base truncate"
|
||||
@@ -315,8 +320,8 @@ function getRiskType(risk?: string): "success" | "warning" | "danger" {
|
||||
{{ item.projectCode || "暂无项目编号" }}
|
||||
</p>
|
||||
</div>
|
||||
<el-dropdown>
|
||||
<el-button link>
|
||||
<el-dropdown @click.stop>
|
||||
<el-button link @click.stop>
|
||||
<component :is="useRenderIcon(MoreIcon)" />
|
||||
</el-button>
|
||||
<template #dropdown>
|
||||
|
||||
Reference in New Issue
Block a user