From 9257129ed7288a1e0909245566bc2382e657c339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=95=E9=87=91=E6=B3=BD?= <1098696801@qq.com> Date: Wed, 23 Mar 2022 20:59:44 +0800 Subject: [PATCH] =?UTF-8?q?dynamic=20component=20=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/magic-api/component/系统管理/group.json | 10 + .../component/系统管理/字典管理/group.json | 10 + .../component/系统管理/字典管理/列表.ms | 230 ++++++++++++++++++ .../src/views/system/menu/menu-form.vue | 20 +- 4 files changed, 266 insertions(+), 4 deletions(-) create mode 100644 data/magic-api/component/系统管理/group.json create mode 100644 data/magic-api/component/系统管理/字典管理/group.json create mode 100644 data/magic-api/component/系统管理/字典管理/列表.ms diff --git a/data/magic-api/component/系统管理/group.json b/data/magic-api/component/系统管理/group.json new file mode 100644 index 0000000..f349a2f --- /dev/null +++ b/data/magic-api/component/系统管理/group.json @@ -0,0 +1,10 @@ +{ + "properties" : { }, + "id" : "9bf92d503f4242d39a0f271c577aa3ac", + "name" : "系统管理", + "type" : "component", + "parentId" : "0", + "path" : "sys", + "paths" : [ ], + "options" : [ ] +} \ No newline at end of file diff --git a/data/magic-api/component/系统管理/字典管理/group.json b/data/magic-api/component/系统管理/字典管理/group.json new file mode 100644 index 0000000..4f1fc8f --- /dev/null +++ b/data/magic-api/component/系统管理/字典管理/group.json @@ -0,0 +1,10 @@ +{ + "properties" : { }, + "id" : "6bee7576eea04963a573b21bb657784d", + "name" : "字典管理", + "type" : "component", + "parentId" : "9bf92d503f4242d39a0f271c577aa3ac", + "path" : "dict", + "paths" : [ ], + "options" : [ ] +} \ No newline at end of file diff --git a/data/magic-api/component/系统管理/字典管理/列表.ms b/data/magic-api/component/系统管理/字典管理/列表.ms new file mode 100644 index 0000000..503fdb2 --- /dev/null +++ b/data/magic-api/component/系统管理/字典管理/列表.ms @@ -0,0 +1,230 @@ +{ + "properties" : { }, + "id" : "995e2ee59d574429b8e3da3513c05a43", + "script" : null, + "groupId" : "6bee7576eea04963a573b21bb657784d", + "name" : "列表", + "createTime" : 1648017481335, + "updateTime" : 1648026074180, + "lock" : null, + "createBy" : null, + "updateBy" : null, + "path" : "list", + "description" : null +} +================================ + + + diff --git a/magic-boot-ui/src/views/system/menu/menu-form.vue b/magic-boot-ui/src/views/system/menu/menu-form.vue index 09d088d..db87307 100644 --- a/magic-boot-ui/src/views/system/menu/menu-form.vue +++ b/magic-boot-ui/src/views/system/menu/menu-form.vue @@ -27,8 +27,15 @@ - - + + @@ -97,7 +104,7 @@ const props = defineProps({ }) const emit = defineEmits(['reload-table']) - +const componentTree = ref() const dataForm = ref() const iconDialog = ref() const menuType = ref('menu') @@ -113,9 +120,14 @@ const getTemp = () => { pid: 0, icon: '', keepAlive: 1, - componentId: '' + componentName: '' } } + +proxy.$get('component/select').then(res => { + componentTree.value = res.data +}) + const temp = ref(getTemp()) var validateUrl = (rule, value, callback) => {