统一业务页面权限与抽屉编辑
1、将 FAQ 分类和问题维护改为抽屉交互,并按分类、问题、回复的细粒度权限控制入口。 2、将注意事项、可行性和伦理记录接入详情页抽屉编辑,创建时支持先保存主记录再上传附件。 3、将参与者基础信息编辑改为抽屉,详情页按可读权限显示病史、访视、AE 和 PD 标签页。 4、补充业务页面权限一致性测试,覆盖停用中心、无权限入口和面包屑上下文。
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div class="page ctms-page-shell page--flush">
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="5">
|
||||
<el-col v-if="canReadCategories" :span="5">
|
||||
<FaqCategoryPanel
|
||||
v-model="activeCategory"
|
||||
:categories="categories"
|
||||
@refresh="loadCategories"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-col :span="canReadCategories ? 19 : 24">
|
||||
<div class="faq-main unified-shell">
|
||||
<div class="filters unified-action-bar">
|
||||
<el-input
|
||||
@@ -29,7 +29,8 @@
|
||||
:items="faqs"
|
||||
:categories="categories"
|
||||
:loading="loading"
|
||||
:can-edit="canEdit"
|
||||
:can-update="canUpdateFaq"
|
||||
:can-delete="canDeleteFaq"
|
||||
@refresh="loadFaqs"
|
||||
/>
|
||||
<div class="pagination-wrap" v-if="total > 0">
|
||||
@@ -81,11 +82,18 @@ const showForm = ref(false);
|
||||
const editing = ref<any | null>(null);
|
||||
|
||||
const { can } = usePermission();
|
||||
const canEdit = computed(() => can("faq.edit"));
|
||||
const canReadCategories = computed(() => can("faq.category.read"));
|
||||
const canUpdateFaq = computed(() => can("faq.update"));
|
||||
const canDeleteFaq = computed(() => can("faq.delete"));
|
||||
|
||||
const loadCategories = async () => {
|
||||
try {
|
||||
if (!study.currentStudy) return;
|
||||
if (!canReadCategories.value) {
|
||||
categories.value = [];
|
||||
activeCategory.value = "";
|
||||
return;
|
||||
}
|
||||
const params: Record<string, any> = {};
|
||||
if (study.currentStudy) params.study_id = study.currentStudy.id;
|
||||
const { data } = await fetchFaqCategories(params);
|
||||
|
||||
Reference in New Issue
Block a user