20260917165839
This commit is contained in:
1 parent
182ed86966
commit
38e1e66c3b
108 files changed
+2497
-1215
No files matched your search
@@ -21,13 +21,15 @@
|
||||
* ctx = { isNew, record }
|
||||
*/
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { Button, Form, FormGroup, FormItem, Message, Modal } from '@/components/ui'
|
||||
import { Button, Form, FormGroup, FormItem, Message, Modal, Spin } from '@/components/ui'
|
||||
import FmsField from '@/components/fms-field/FmsField.vue'
|
||||
import { loadDataApi, loadDataBySqlApi, nextIdApi, saveObjectApi } from '@/services/api'
|
||||
import { diffRow } from '@/utils/dataChanges'
|
||||
import { buildGroupI18nKey } from '@/utils/schemaJson'
|
||||
import { identifierRe, isEmptyValue } from '@/components/fms-module-common/queryUtils'
|
||||
import { parseOptions } from '@/components/fms-module-common/fieldUtils'
|
||||
import { loadModuleSchemas, buildEditRender } from '@/components/fms-module-common/schemaRender'
|
||||
import { useI18nStore } from '@/stores/i18n'
|
||||
|
||||
const props = defineProps({
|
||||
/** 受控打开 */
|
||||
@@ -50,6 +52,8 @@ const props = defineProps({
|
||||
|
||||
const emit = defineEmits(['update:open', 'saved'])
|
||||
|
||||
const i18nStore = useI18nStore()
|
||||
|
||||
/* ================= 元数据状态 ================= */
|
||||
const configLoading = ref(false)
|
||||
const saving = ref(false)
|
||||
@@ -107,7 +111,17 @@ const sections = computed(() => {
|
||||
const gid = String(group.b_id)
|
||||
const rows = byGroup.get(gid) || []
|
||||
if (!rows.length) continue
|
||||
built.push({ key: `g-${gid}`, title: (group.b_title || '').trim(), group, rows })
|
||||
// 分组标题:节点手填 i18n 优先,未填按分组 id 派生键(与模块管理页同一规则)取译文;
|
||||
// 键无译文时回退 b_title,与旧行为一致
|
||||
built.push({
|
||||
key: `g-${gid}`,
|
||||
title: i18nStore.t(
|
||||
group.b_i18n || buildGroupI18nKey(moduleMeta.value?.b_id, 'edit', gid),
|
||||
(group.b_title || '').trim(),
|
||||
),
|
||||
group,
|
||||
rows,
|
||||
})
|
||||
}
|
||||
const ungrouped = byGroup.get('') || []
|
||||
if (ungrouped.length) built.push({ key: 'ungrouped', title: '', group: null, rows: ungrouped })
|
||||
@@ -459,7 +473,9 @@ function controlPropsOf(row) {
|
||||
@update:open="handleClose"
|
||||
@ok="handleSave"
|
||||
>
|
||||
<div v-if="configLoading" class="fme-loading">加载中...</div>
|
||||
<div v-if="configLoading" class="fme-loading">
|
||||
<Spin />
|
||||
</div>
|
||||
<div v-else-if="configError" class="fme-error">
|
||||
<span>{{ configError }}</span>
|
||||
<Button type="primary" @click="loadConfig">重新加载</Button>
|
||||
|
||||
Reference in new issue
Block a user