中文:收口权限与中心/立项配置改造
This commit is contained in:
@@ -116,6 +116,7 @@ import QuickActions from "../components/QuickActions.vue";
|
||||
import { List, Warning, Money } from "@element-plus/icons-vue";
|
||||
import StateEmpty from "../components/StateEmpty.vue";
|
||||
import { displayEnum } from "../utils/display";
|
||||
import { getProjectRole, isSystemAdmin } from "../utils/roles";
|
||||
import { TEXT } from "../locales";
|
||||
import type { NotificationItem } from "../types/notifications";
|
||||
import { useRouter } from "vue-router";
|
||||
@@ -143,7 +144,11 @@ const milestoneCompletionRate = computed(() => {
|
||||
return TEXT.modules.projectOverview.progressLabel.replace("{rate}", `${(rate * 100).toFixed(0)}%`);
|
||||
});
|
||||
|
||||
const roleLabel = computed(() => displayEnum(TEXT.enums.userRole, auth.user?.role));
|
||||
const projectRole = computed(() => {
|
||||
if (isSystemAdmin(auth.user)) return "ADMIN";
|
||||
return getProjectRole(study.currentStudy, study.currentStudyRole);
|
||||
});
|
||||
const roleLabel = computed(() => displayEnum(TEXT.enums.userRole, projectRole.value));
|
||||
|
||||
const formatAmount = (val: number) => {
|
||||
return new Intl.NumberFormat('zh-CN', { minimumFractionDigits: 2 }).format(val);
|
||||
|
||||
Reference in New Issue
Block a user