数据字典集中治理

This commit is contained in:
Cheng Zhou
2025-12-17 20:58:42 +08:00
parent c2328594b0
commit b0bffbc75e
16 changed files with 170 additions and 39 deletions
+4 -3
View File
@@ -62,8 +62,9 @@ import CommentList from "../components/CommentList.vue";
import AttachmentList from "../components/attachments/AttachmentList.vue";
import PermissionAction from "../components/PermissionAction.vue";
import { usePermission } from "../utils/permission";
import { aeMachine, getAvailableActions, getStateColor, getStateLabel } from "../state-machine";
import { aeMachine, getAvailableActions } from "../state-machine";
import type { ActionConfig } from "../state-machine";
import { statusDict, getDictColor, getDictLabel } from "../dictionaries";
const route = useRoute();
const study = useStudyStore();
@@ -75,8 +76,8 @@ const studyId = computed(() => study.currentStudy?.id || "");
const { can } = usePermission();
const aeState = computed(() => (ae.value?.status as string) || "NEW");
const availableActions = computed(() => getAvailableActions(aeMachine, aeState.value));
const stateLabel = (v?: string | null) => getStateLabel(aeMachine, v);
const stateColor = (v?: string | null) => getStateColor(aeMachine, v) || "info";
const stateLabel = (v?: string | null) => getDictLabel(statusDict, v || "");
const stateColor = (v?: string | null) => getDictColor(statusDict, v || "") || "info";
const enrichOverdue = (item: any) => {
if (!item) return item;