feat(module-management): 导航状态化阶段三——概览配置完成度 checklist
- 新组件 ModuleOverviewChecklist:字段/表单/列表/查询/权限按依赖顺序排列, 状态以文案表达(缺 N/已配置 N,不只靠颜色),空态给引导文案 - 条目点击与 Enter 跳转对应分节;查询缺配提供「一键补充」 (复用 fillMissingConfigs,不冒泡为跳转);仅数据/查询模块渲染 - index.vue 补 fieldsEnabledCount/listVisibleCount/powersCount 派生统计; 表单/查询缺配复用阶段二/既有的 missingEditCount/missingQueryCount - 新 spec module-overview-checklist 7 用例:条目显隐、缺配/完整/空态文案、 跳转与一键补充事件
This commit is contained in:
1 parent
6bfa0d816f
commit
29f98494af
3 files changed
+273
No files matched your search
@@ -40,6 +40,7 @@ import { useModuleTree, findModuleNode } from './composables/useModuleTree'
|
||||
import { useModuleConfig } from './composables/useModuleConfig'
|
||||
import { useModuleSave } from './composables/useModuleSave'
|
||||
import ModuleBasicPanel from './components/ModuleBasicPanel.vue'
|
||||
import ModuleOverviewChecklist from './components/ModuleOverviewChecklist.vue'
|
||||
import ModuleFieldsPanel from './components/ModuleFieldsPanel.vue'
|
||||
import ModuleListConfigPanel from './components/ModuleListConfigPanel.vue'
|
||||
import ModuleFormEditPanel from './components/form-edit/FormEditPanel.vue'
|
||||
@@ -215,6 +216,16 @@ const dirtyTabKeys = computed(() => {
|
||||
return keys
|
||||
})
|
||||
|
||||
/* 概览 checklist 统计(由 drafts 派生):字段/列表/权限计数,表单与查询缺配复用
|
||||
useModuleConfig 的 missingEditCount / missingQueryCount */
|
||||
const fieldsEnabledCount = computed(
|
||||
() => (drafts.value?.fields || []).filter((field) => Number(field.b_canuse) === 1).length,
|
||||
)
|
||||
const listVisibleCount = computed(
|
||||
() => (drafts.value?.listConfig || []).filter((row) => Number(row.b_visible) === 1).length,
|
||||
)
|
||||
const powersCount = computed(() => (drafts.value?.powers || []).length)
|
||||
|
||||
/* ================= composables ================= */
|
||||
const { saveModule } = useModuleSave({
|
||||
selectedModule,
|
||||
@@ -491,6 +502,18 @@ loadModuleTree()
|
||||
<div class="mm-body__inner">
|
||||
<div v-if="drafts" class="mm-config-content">
|
||||
<div v-show="activeSection === 'basic'" class="mm-config-pane">
|
||||
<!-- 完成度清单仅数据/查询模块渲染,条目点击跳转对应分节 -->
|
||||
<ModuleOverviewChecklist
|
||||
v-if="isDataModule || isQueryModule"
|
||||
:module-type="moduleType"
|
||||
:fields-enabled-count="fieldsEnabledCount"
|
||||
:edit-missing-count="missingEditCount"
|
||||
:list-visible-count="listVisibleCount"
|
||||
:query-missing-count="missingQueryCount"
|
||||
:powers-count="powersCount"
|
||||
@navigate="(key) => (activeSection = key)"
|
||||
@fill-missing="() => fillMissingConfigs(['queryConfig'])"
|
||||
/>
|
||||
<ModuleBasicPanel
|
||||
ref="basicPanelRef"
|
||||
:data="drafts?.module"
|
||||
|
||||
Reference in new issue
Block a user