优化文档管理与导航体验
1、为文档增加编辑接口和前端编辑抽屉,文档列表与详情页统一按创建、更新、删除权限展示操作。 2、将文档版本上传和分发改为抽屉交互,并在详情页补充版本删除权限检查。 3、增强全局面包屑上下文和详情页标题同步,避免详情页重复或缺失导航信息。 4、按项目权限过滤快捷入口、首页费用指标和 eTMF 新建入口,并补充对应前端测试。
This commit is contained in:
@@ -26,11 +26,11 @@
|
||||
<div class="etmf-toolbar-actions">
|
||||
<el-button @click="resetFilters">{{ TEXT.common.actions.reset }}</el-button>
|
||||
<el-button :icon="Refresh" @click="load">{{ TEXT.common.actions.refresh }}</el-button>
|
||||
<el-button :disabled="!canCreate" @click="openNodeDialog">
|
||||
<el-button v-if="canCreate" @click="openNodeDialog">
|
||||
<el-icon class="el-icon--left"><FolderAdd /></el-icon>
|
||||
{{ TEXT.modules.etmf.actions.newNode }}
|
||||
</el-button>
|
||||
<el-button type="primary" :disabled="!canCreate || !selectedNode" @click="openDocumentDialog">
|
||||
<el-button v-if="canCreate && selectedNode" type="primary" @click="openDocumentDialog">
|
||||
<el-icon class="el-icon--left"><DocumentAdd /></el-icon>
|
||||
{{ TEXT.modules.etmf.actions.newDocument }}
|
||||
</el-button>
|
||||
@@ -418,6 +418,10 @@ const resetFilters = () => {
|
||||
};
|
||||
|
||||
const openNodeDialog = () => {
|
||||
if (!canCreate.value) {
|
||||
ElMessage.warning("权限不足");
|
||||
return;
|
||||
}
|
||||
nodeForm.code = "";
|
||||
nodeForm.name = "";
|
||||
nodeForm.scope_type = selectedNode.value?.scope_type || "GLOBAL";
|
||||
@@ -426,6 +430,10 @@ const openNodeDialog = () => {
|
||||
};
|
||||
|
||||
const submitNode = async () => {
|
||||
if (!canCreate.value) {
|
||||
ElMessage.warning("权限不足");
|
||||
return;
|
||||
}
|
||||
if (!studyId.value || !nodeForm.code.trim() || !nodeForm.name.trim()) {
|
||||
ElMessage.warning(TEXT.common.messages.required);
|
||||
return;
|
||||
@@ -451,6 +459,10 @@ const submitNode = async () => {
|
||||
};
|
||||
|
||||
const openDocumentDialog = () => {
|
||||
if (!canCreate.value) {
|
||||
ElMessage.warning("权限不足");
|
||||
return;
|
||||
}
|
||||
if (!selectedNode.value) return;
|
||||
documentForm.doc_no = "";
|
||||
documentForm.title = "";
|
||||
@@ -460,6 +472,10 @@ const openDocumentDialog = () => {
|
||||
};
|
||||
|
||||
const submitDocument = async () => {
|
||||
if (!canCreate.value) {
|
||||
ElMessage.warning("权限不足");
|
||||
return;
|
||||
}
|
||||
if (!studyId.value || !selectedNode.value || !documentForm.doc_no.trim() || !documentForm.title.trim() || !documentForm.doc_type) {
|
||||
ElMessage.warning(TEXT.common.messages.required);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user