修复个人中心问题

This commit is contained in:
hero920103 committed 2026-09-29 18:25:09 +08:00
1 parent 0dc5c2f075
commit ca4220f92c
44 files changed
+1793 -310

No files matched your search

@@ -3,7 +3,7 @@
:model-value="visible"
:title="project?.project_name || '项目详情'"
direction="rtl"
size="900px"
size="1200px"
@update:model-value="handleClose"
@opened="loadAll"
>
@@ -168,11 +168,32 @@ function statusOptionsExcept(cur) {
return PROJECT_STATUS_OPTIONS.filter((i) => String(i.value) !== String(cur));
}
/** 项目状态流转:成功后更新本地展示并通知父组件刷新列表 */
/**
* 项目状态流转:成功后更新本地展示并通知父组件刷新列表。
* 置为「异常」时先询问原因,原因会写入操作日志,便于追溯是什么导致的。
*/
async function handleChangeStatus(status) {
if (!props.project?.id) return;
let reason = "";
if (Number(status) === 5) {
try {
const { value } = await ElMessageBox.prompt(
"请填写项目异常原因,该原因会记入操作日志",
"异常原因",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
inputPlaceholder: "如:客户预算取消 / 供应商延期交付",
inputValidator: (v) => (String(v || "").trim() ? true : "异常原因不能为空"),
}
);
reason = String(value || "").trim();
} catch (e) {
return; // 用户取消:不流转状态
}
}
try {
await changeProjectStatus(props.project.id, Number(status));
await changeProjectStatus(props.project.id, Number(status), reason);
ElMessage.success(`状态已更新为「${projectStatusText(status)}」`);
props.project.status = Number(status);
emit("refresh");
@@ -253,11 +274,13 @@ defineExpose({ loadAll });
width: 100%;
min-width: 0;
// 关键:内容区占满「容器剩余宽度」并允许收缩,内部表格才能随容器自适应
// 关键:内容区占满「容器剩余宽度」并允许收缩,内部表格才能随容器自适应。
// 注意不能用 overflow: hidden——它会把附件/日志等较高的内容直接截断,
// 让内容自然撑高,滚动交给 drawer 自身(el-drawer__body)处理。
:deep(.el-tabs__content) {
flex: 1;
min-width: 0;
overflow: hidden;
overflow: visible;
padding-left: 4px;
}