feat(module-management): 导航状态化阶段二——表单设计「缺 N」徽标
- 复用既有 missingConfigCount 通用口径,新增 missingEditCount(启用字段 未被 editConfig 任何行 b_field_id 引用的数量),子表表格编辑方式下同样成立 - configGroups 表单设计项挂「缺 N」徽标,样式与语义沿用查询配置; 拖入画布后徽标消失 - spec 新增 4 用例:缺配计数、停用字段不计、b_field_id 类型不一致按字符串比较、空态为 0
This commit is contained in:
1 parent
4f89f373e6
commit
6bfa0d816f
3 files changed
+49
-1
No files matched your search
@@ -387,6 +387,9 @@ export function useModuleConfig(deps) {
|
||||
|
||||
const missingListCount = missingConfigCount('listConfig')
|
||||
const missingQueryCount = missingConfigCount('queryConfig')
|
||||
// 表单设计缺配:启用字段未被 editConfig 任何行引用(b_field_id 口径,
|
||||
// 不涉及布局细节)。editConfig 同时承载主表表单/子表表格两种编辑方式,口径通用
|
||||
const missingEditCount = missingConfigCount('editConfig')
|
||||
|
||||
return {
|
||||
hasModuleChanges,
|
||||
@@ -398,6 +401,7 @@ export function useModuleConfig(deps) {
|
||||
syncFields,
|
||||
missingListCount,
|
||||
missingQueryCount,
|
||||
missingEditCount,
|
||||
fillMissingConfigs,
|
||||
}
|
||||
}
|
||||
@@ -143,7 +143,13 @@ const configGroups = computed(() => {
|
||||
// 界面配置:表单设计(数据模块,含主表表单/子表表格两种编辑方式)→ 列表配置 → 查询配置
|
||||
const uiItems = []
|
||||
if (isDataModule.value) {
|
||||
uiItems.push({ key: 'edit', label: '表单设计', icon: Pencil })
|
||||
// 表单设计缺配徽标:启用字段未布局的数量(口径与查询「缺 N」一致)
|
||||
uiItems.push({
|
||||
key: 'edit',
|
||||
label: '表单设计',
|
||||
icon: Pencil,
|
||||
badge: missingEditCount.value ? `缺 ${missingEditCount.value}` : '',
|
||||
})
|
||||
}
|
||||
// 列表配置行在加载时自动补全全部启用字段,无「缺失」概念,不带徽标
|
||||
uiItems.push({ key: 'list', label: '列表配置', icon: List })
|
||||
@@ -318,6 +324,7 @@ const {
|
||||
syncFields,
|
||||
dirtySections,
|
||||
missingQueryCount,
|
||||
missingEditCount,
|
||||
fillMissingConfigs,
|
||||
} = useModuleConfig({
|
||||
moduleSelectedId,
|
||||
|
||||
Reference in new issue
Block a user