不含 fms-api Java 侧改动与后续导航状态化阶段提交。主要内容: - ui 组件库:date/dropdown/form/input/popover/select/tooltip 调整, 新增 Segmented 组件;fms-table 可编辑单元格渲染器与 FileCard 更新 - 模块管理:列表配置加载自动补全、查询缺配徽标与一键补充、 结构编辑内核 useStructureEditing/useBandLayout、子表表格编辑方式、 分组标题多语言、I18nKeyCell 等(含配套 spec) - 布局/主题/仪表盘/演示页小幅更新
49 lines
2.0 KiB
Vue
49 lines
2.0 KiB
Vue
<script setup>
|
|
import { ref } from 'vue'
|
|
import ModuleTableEditPanel from '@/views/system/module-management/components/table-edit/TableEditPanel.vue'
|
|
|
|
const fields = [
|
|
{ b_id: '1', b_name: '姓名', b_field: 'name', b_type: 'input' },
|
|
{ b_id: '2', b_name: '年龄', b_field: 'age', b_type: 'number' },
|
|
{ b_id: '3', b_name: '状态', b_field: 'status', b_type: 'select' },
|
|
{ b_id: '4', b_name: '备注', b_field: 'remark', b_type: 'textarea' },
|
|
{ b_id: '5', b_name: '金额', b_field: 'amount', b_type: 'money' },
|
|
]
|
|
const groups = ref([
|
|
{ b_id: 'g1', b_module_id: 'm1', b_parent_id: null, b_title: '基本信息', b_xh: 10, b_canuse: 1 },
|
|
{ b_id: 'g2', b_module_id: 'm1', b_parent_id: null, b_title: '扩展信息', b_xh: 20, b_canuse: 1 },
|
|
])
|
|
const editConfig = ref([
|
|
{ b_id: 'e1', b_module_id: 'm1', b_field_id: '1', b_group_id: null, b_visible: 1, b_required: 0, b_readonly: 0, b_disabled: 0, b_width: 120, b_xh: 10 },
|
|
{ b_id: 'e2', b_module_id: 'm1', b_field_id: '2', b_group_id: 'g1', b_visible: 1, b_required: 1, b_readonly: 0, b_disabled: 0, b_width: 100, b_xh: 20 },
|
|
{ b_id: 'e3', b_module_id: 'm1', b_field_id: '3', b_group_id: 'g1', b_visible: 1, b_required: 0, b_readonly: 0, b_disabled: 0, b_width: 160, b_xh: 30 },
|
|
{ b_id: 'e4', b_module_id: 'm1', b_field_id: '4', b_group_id: 'g2', b_visible: 1, b_required: 0, b_readonly: 0, b_disabled: 0, b_width: 220, b_xh: 40 },
|
|
])
|
|
const listConfig = ref([])
|
|
const queryConfig = ref([])
|
|
function onUpdate(v) {
|
|
editConfig.value = v
|
|
}
|
|
function onUpdateGroups(v) {
|
|
groups.value = v
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div style="height: 100vh; display: flex; padding: 12px; box-sizing: border-box">
|
|
<ModuleTableEditPanel
|
|
module-id="m1"
|
|
:edit-config="editConfig"
|
|
:list-config="listConfig"
|
|
:query-config="queryConfig"
|
|
:fields="fields"
|
|
:groups="groups"
|
|
edit-mode="table"
|
|
:active="true"
|
|
:loading="false"
|
|
@update="onUpdate"
|
|
@update-groups="onUpdateGroups"
|
|
/>
|
|
</div>
|
|
</template>
|