20260824225422
This commit is contained in:
1 parent
97aea665f9
commit
7421019ef2
6 files changed
+2210
-401
No files matched your search
+22
-2
@@ -119,10 +119,21 @@ function onI18nSaved(key) {
|
||||
|
||||
<template>
|
||||
<div v-if="formData" class="mm-basic">
|
||||
<Form ref="formRef" :model="formData" :rules="formRules" layout="vertical" :columns="3" max-width="720px">
|
||||
<Form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
layout="vertical"
|
||||
:columns="3"
|
||||
max-width="720px"
|
||||
>
|
||||
<div class="mm-basic__section-title">标识与归属</div>
|
||||
<FormItem :label="isCategory ? '分类编码' : '模块编码'" name="b_code" required>
|
||||
<Input :model-value="formData.b_code" :disabled="loading" @update:model-value="onCodeInput" />
|
||||
<Input
|
||||
:model-value="formData.b_code"
|
||||
:disabled="loading"
|
||||
@update:model-value="onCodeInput"
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem label="模块名称" name="b_name" required>
|
||||
<Input
|
||||
@@ -265,6 +276,15 @@ function onI18nSaved(key) {
|
||||
}
|
||||
}
|
||||
|
||||
/* 编辑方式等字段的说明文字 */
|
||||
.mm-basic__hint {
|
||||
grid-column: 1 / -1;
|
||||
margin: -4px 0 8px;
|
||||
color: var(--fms-text-secondary);
|
||||
font-size: 12px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.mm-basic__i18n-btn {
|
||||
flex: none;
|
||||
display: inline-flex;
|
||||
|
||||
+1457
-304
File diff suppressed because it is too large.
Load diff
@@ -419,6 +419,7 @@ async function addModule(parentId, moduleType) {
|
||||
b_keyfield: null,
|
||||
b_orderfield: null,
|
||||
b_delete_policy: moduleType === 'data' ? 'restrict' : null,
|
||||
b_edit_mode: moduleType === 'data' ? 'form' : null,
|
||||
b_canuse: 1,
|
||||
b_xh: 10,
|
||||
b_bz: null,
|
||||
@@ -715,7 +716,7 @@ const configGroups = computed(() => {
|
||||
const editLen = drafts.value?.editConfig?.length ?? 0
|
||||
uiItems.push({
|
||||
key: 'edit',
|
||||
label: '表单设计',
|
||||
label: editNavLabel.value,
|
||||
icon: Pencil,
|
||||
badge: editLen ? '已配置' : '',
|
||||
})
|
||||
@@ -778,6 +779,10 @@ const referencedGroupIds = computed(() => {
|
||||
return Array.from(ids)
|
||||
})
|
||||
|
||||
// 编辑方式(form 主表表单 / table 子表表格)决定「表单设计」面板的形态与导航标签
|
||||
const editMode = computed(() => drafts.value?.module?.b_edit_mode || 'form')
|
||||
const editNavLabel = computed(() => (editMode.value === 'table' ? '表格设计' : '表单设计'))
|
||||
|
||||
const finalI18nItems = computed(() => {
|
||||
const module = drafts.value?.module
|
||||
if (!module) return []
|
||||
@@ -1524,9 +1529,13 @@ loadMenuTree()
|
||||
:fields="drafts?.fields"
|
||||
:groups="drafts?.groups"
|
||||
:referenced-group-ids="referencedGroupIds"
|
||||
:edit-mode="editMode"
|
||||
:active="activeSection === 'edit'"
|
||||
:loading="busy"
|
||||
@update="(v) => onModuleUpdate('editConfig', v)"
|
||||
@update:edit-mode="
|
||||
(v) => onModuleUpdate('module', { ...(drafts?.module || {}), b_edit_mode: v })
|
||||
"
|
||||
@update-groups="(v) => onModuleUpdate('groups', v)"
|
||||
@groups-saved="onGroupsSaved"
|
||||
@sync-list="(v) => onModuleUpdate('listConfig', v)"
|
||||
|
||||
Reference in new issue
Block a user