20260827230636
This commit is contained in:
1 parent
3824af0f12
commit
35ca496b5f
15 files changed
+2313
-321
No files matched your search
@@ -0,0 +1,48 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import ModuleTableEditPanel from '@/views/system/module-management/components/ModuleTableEditPanel.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>
|
||||
Reference in new issue
Block a user